_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 |
|---|---|---|---|---|---|---|---|---|
81c58e1c3c968efd89120ef207e9f56ed682ea2accbe29a68dc3113acba884fc | techwhizbang/bluecollar | job_plans_test.clj | (ns bluecollar.job-plans-test
(:use clojure.test
bluecollar.test-helper
conjure.core)
(:require [clj-time.core :as time]
[bluecollar.job-plans :as plan]
[bluecollar.redis :as redis]
[bluecollar.workers-union :as workers-union]
[bluecollar.keys-and-queu... | null | https://raw.githubusercontent.com/techwhizbang/bluecollar/10269249a686c4e92daefd7cecd6c7c5934db81c/test/bluecollar/job_plans_test.clj | clojure | (ns bluecollar.job-plans-test
(:use clojure.test
bluecollar.test-helper
conjure.core)
(:require [clj-time.core :as time]
[bluecollar.job-plans :as plan]
[bluecollar.redis :as redis]
[bluecollar.workers-union :as workers-union]
[bluecollar.keys-and-queu... | |
6fd5f8393b6194ad7d1a5147991b462741b465d20c2f591a21831cb1a077679f | FranklinChen/hugs98-plus-Sep2006 | Reader.hs | -----------------------------------------------------------------------------
-- |
Module : Control . . Reader
Copyright : ( c ) 2001 ,
( c ) Oregon Graduate Institute of Science and Technology , 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- S... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/mtl/Control/Monad/Reader.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : non-portable (multi-param classes, functional dependencies)
Declaration of the Monoid class,and instances for l... | Module : Control . . Reader
Copyright : ( c ) 2001 ,
( c ) Oregon Graduate Institute of Science and Technology , 2001
( < /~mpj/ > )
Advanced School of Functional Programming , 1995 .
module Control.Monad.Reader (
MonadReader(..),
asks,
Reader(..),
mapReader,
withReader,
R... |
fabd1c83a74fa7685ebd0ab0ecb81a84804d5c57d7501e30884d360a1a5a2c24 | helium/blockchain-core | blockchain_poc_target_v3.erl | %%%-----------------------------------------------------------------------------
%%% @doc blockchain_poc_target_v3 implementation.
%%%
%%% The targeting mechanism is based on the following conditions:
- Filter hotspots which have n't done a poc request for a long time
- Target selection is entirely random
%%%
%%%--... | null | https://raw.githubusercontent.com/helium/blockchain-core/3d8613bc192a3d3b1db0fe78afbb7486e7982063/src/poc/blockchain_poc_target_v3.erl | erlang | -----------------------------------------------------------------------------
@doc blockchain_poc_target_v3 implementation.
The targeting mechanism is based on the following conditions:
-----------------------------------------------------------------------------
Get all hexes once
Initial zone to begin targeting... | - Filter hotspots which have n't done a poc request for a long time
- Target selection is entirely random
-module(blockchain_poc_target_v3).
-include("blockchain_utils.hrl").
-include("blockchain_vars.hrl").
-include("blockchain_caps.hrl").
-export([
target/4
]).
-spec target(ChallengerPubkeyBin... |
6dff69a11550fe7fb1f4c74dc7a0233ccc2edaa94710be8d86eb0b69b7441df0 | strint/sicpAns | 2050_picture_language_flip_horiz.scm | (load "2049_picture_language_painters.scm")
(define (flip-horiz painter)
(transform-painter painter
(make-vect 1.0 0.0)
(make-vect 0.0 0.0)
(make-vect 1.0 1.0)))
(define (flip-ccw90 painter)
(transform-painter painter
(make-vect 1.0 0.0)
(make-vect 1.0 1.0)
(make-vect 0.0 0.0)))
(de... | null | https://raw.githubusercontent.com/strint/sicpAns/efc4bdfaab7583117d42f2141d4b3b9e12792b79/2.2.4-4_PictureLanguage/2050_picture_language_flip_horiz.scm | scheme | (load "2049_picture_language_painters.scm")
(define (flip-horiz painter)
(transform-painter painter
(make-vect 1.0 0.0)
(make-vect 0.0 0.0)
(make-vect 1.0 1.0)))
(define (flip-ccw90 painter)
(transform-painter painter
(make-vect 1.0 0.0)
(make-vect 1.0 1.0)
(make-vect 0.0 0.0)))
(de... | |
0d651e81ec708313f8c841a44f0d6690d7d213948778e770458c9558fe3fb829 | GlideAngle/flare-timing | Target.hs | module Target where
import Development.Shake (Rules)
import Doc (buildRules, cleanRules)
import Cmd (buildRules, cleanRules, testRules, lintRules, docTestRules)
import Nix (buildRules, cleanRules, shellRules, fromCabalRules)
import Snack (buildRules, testRules, rulesSiggyChardust)
import Pkg (buildRules)
allWants :: ... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/90cc11b39a16e0ef0a859a4815cef6c8c560c32e/lang-haskell/build/library/Target.hs | haskell | NOTE: The following targets build but I don't want them built by default.
, "docs"
, "cabal-prod-apps"
, "cabal-test-apps"
, "nix-build"
WARNING: The following targets don't currently build.
, "view-www" | module Target where
import Development.Shake (Rules)
import Doc (buildRules, cleanRules)
import Cmd (buildRules, cleanRules, testRules, lintRules, docTestRules)
import Nix (buildRules, cleanRules, shellRules, fromCabalRules)
import Snack (buildRules, testRules, rulesSiggyChardust)
import Pkg (buildRules)
allWants :: ... |
248989bc36c20e6a946c2c1cea0a023e19b52cbb51261de05f0367683e684598 | ocaml/ood | website_meta.ml | (** This module determines an image to be used as preview of a website.
It does this by following the same logic Google+ and other websites use, and described in this article:
-are-Facebook-and-Google-creating-link-previews
*)
let get_sync url =
let open Piaf in
let open Lwt_result.Syntax in
Lwt_main.run
... | null | https://raw.githubusercontent.com/ocaml/ood/75c4f85e9a8cbe26530301cc14df578f0fc5c494/src/ood-gen/lib/website_meta.ml | ocaml | * This module determines an image to be used as preview of a website.
It does this by following the same logic Google+ and other websites use, and described in this article:
-are-Facebook-and-Google-creating-link-previews
|
let get_sync url =
let open Piaf in
let open Lwt_result.Syntax in
Lwt_main.run
(let config = { Config.default with follow_redirects = true } in
let* response = Client.Oneshot.get ~config (Uri.of_string url) in
if Status.is_successful response.status then Body.to_string response.body
else
... |
cb5866bb7d3217c5757bfc985a5cb6da06bea234ad7079a9cd4672d5e8c5de0c | hercules-ci/legacy-old-hercules | Hercules.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TemplateHaskell #-}
module Hercules.Database.Hercules where
import Data.ByteString
import Data.Profunctor
import Data.Profunctor.Product
import Data.Profunctor.Product.Default
import Data.P... | null | https://raw.githubusercontent.com/hercules-ci/legacy-old-hercules/db10eb399a64355cdcbba0e18beb1514588772e9/backend/src/Hercules/Database/Hercules.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
Nullable types.
| This instance makes sure that values which are required in the output are
required in the input.
| This instance allows values which are optional in the output to be
optional in the input.
-- Types for table: users ---- | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Hercules.Database.Hercules where
import Data.ByteString
import Data.Profunctor
import Data.Profunctor.Product
import Data.Profunctor.Product.Default
import Data.Profunctor.Product.TH (makeAdaptorAndInstance)
import Data.Text
import GHC... |
1fdf81a3c79a414864b80aece10df83bd4f30f2e5dd07e8d0bfe9b3c0fd1f3cb | heroku/logplex | live_upgrade.erl | f(UpgradeNode).
UpgradeNode = fun () ->
case logplex_app:config(git_branch) of
"v64" ->
io:format(whereis(user), "at=upgrade_start cur_vsn=64~n", []);
"v65" ->
io:format(whereis(user),
"at=upgrade type=retry cur_vsn=64 old_vsn=65~n", []);
Else ->
io:... | null | https://raw.githubusercontent.com/heroku/logplex/fc520c44cf4687726d5d51464d3264ddc6abb0ba/upgrades/v64_v65/live_upgrade.erl | erlang | stateless, internal | f(UpgradeNode).
UpgradeNode = fun () ->
case logplex_app:config(git_branch) of
"v64" ->
io:format(whereis(user), "at=upgrade_start cur_vsn=64~n", []);
"v65" ->
io:format(whereis(user),
"at=upgrade type=retry cur_vsn=64 old_vsn=65~n", []);
Else ->
io:... |
496404e3eb3b97672aac9738d752356c1b20b71e50959699b8b5bc134b42d0a1 | PacktWorkshops/The-Clojure-Workshop | repl.clj | ;;; In REPL
(odd? 5)
(odd? 6)
(filter odd? [1 2 3 4 5])
(remove odd? [1 2 3 4 5])
(filter (constantly true) [1 2 3 4 5])
(filter (constantly false) [1 2 3 4 5])
| null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter04/Exercise4.02/repl.clj | clojure | In REPL | (odd? 5)
(odd? 6)
(filter odd? [1 2 3 4 5])
(remove odd? [1 2 3 4 5])
(filter (constantly true) [1 2 3 4 5])
(filter (constantly false) [1 2 3 4 5])
|
76c9a1f79c0488c902bf734630746cf9ef3d00aa70a4091108e25f7d921ba4d8 | chenyukang/eopl | tests.scm | (module tests mzscheme
(provide test-list)
;;;;;;;;;;;;;;;; tests ;;;;;;;;;;;;;;;;
(define test-list
'(
;; simple arithmetic
(positive-const "11" 11)
(negative-const "-33" -33)
(simple-arith-1 "-(44,33)" 11)
;; nested arithmetic
(nested-arith-left ... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter6/cps-lang/tests.scm | scheme | tests ;;;;;;;;;;;;;;;;
simple arithmetic
nested arithmetic
simple variables
simple unbound variables
simple conditionals
test dynamic typechecking
make sure that the test and both arms get evaluated
properly.
and make sure the other arm doesn't get evaluated.
simple let
check nested let and shad... | (module tests mzscheme
(provide test-list)
(define test-list
'(
(positive-const "11" 11)
(negative-const "-33" -33)
(simple-arith-1 "-(44,33)" 11)
(nested-arith-left "-(-(44,33),22)" -11)
(nested-arith-right "-(55, -(22,11))" 44)
(test-var-1 "x" 1... |
e3a68826bc2cf7c39061653f958ed1e87df98f22f437441c7669afc7ae828b12 | aeternity/aeternity | aesc_close_mutual_tx.erl | %%%=============================================================================
2018 , Aeternity Anstalt
%%% @doc
Module defining the State Channel close mutual transaction
%%% @end
%%%=============================================================================
-module(aesc_close_mutual_tx).
-behavior(aetx).... | null | https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/apps/aechannel/src/aesc_close_mutual_tx.erl | erlang | =============================================================================
@doc
@end
=============================================================================
Behavior API
aesc_signable_transaction callbacks
===================================================================
Types
==========================... | 2018 , Aeternity Anstalt
Module defining the State Channel close mutual transaction
-module(aesc_close_mutual_tx).
-behavior(aetx).
-export([new/1,
type/0,
fee/1,
gas/1,
ttl/1,
nonce/1,
origin/1,
check/3,
process/3,
signers/2,
... |
05d50ff4565a9c18c44102b7a541ecbfe7d71087bc99d14757edf5fe098816a0 | raptazure/experiments | StaticFiles.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Settings.StaticFiles where
import Settings (appStaticDir, compileTimeAppSettings)
import Yesod.Static (staticFiles)
-- This generates easy references to files in the static directory at compile time,
-- giving... | null | https://raw.githubusercontent.com/raptazure/experiments/c48263980d1ce22ee9407ff8dcf0cf5091b01c70/haskell/yesodapp/src/Settings/StaticFiles.hs | haskell | # LANGUAGE OverloadedStrings #
This generates easy references to files in the static directory at compile time,
giving you compile-time verification that referenced files exist.
Warning: any files added to your static directory during run-time can't be
For example, to refer to @static/js/script.js@ via an identifi... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
module Settings.StaticFiles where
import Settings (appStaticDir, compileTimeAppSettings)
import Yesod.Static (staticFiles)
accessed this way . You 'll have to use their FilePath or URL to access them .
js_script_js
StaticFile [ " js " , ... |
b3abdbb94f32567a522b62e80900c48dfd3643516d375cfcee49107bfde289a3 | slipstream/SlipStreamServer | configuration_template_slipstream.clj | (ns com.sixsq.slipstream.ssclj.resources.configuration-template-slipstream
(:require
[com.sixsq.slipstream.ssclj.resources.common.utils :as u]
[com.sixsq.slipstream.ssclj.resources.configuration-template :as p]
[com.sixsq.slipstream.ssclj.resources.spec.configuration-template-slipstream :as configuration-... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/src/com/sixsq/slipstream/ssclj/resources/configuration_template_slipstream.clj | clojure |
resource
Optional, without a good default.
:termsAndConditions "-or-remove"
description
multimethods for validation
initialization: register this Configuration template
| (ns com.sixsq.slipstream.ssclj.resources.configuration-template-slipstream
(:require
[com.sixsq.slipstream.ssclj.resources.common.utils :as u]
[com.sixsq.slipstream.ssclj.resources.configuration-template :as p]
[com.sixsq.slipstream.ssclj.resources.spec.configuration-template-slipstream :as configuration-... |
3b5928c3d2f7fd1240280cfcd59fb7c6c3cf67311ac9adfc150ba90dda29a47b | lispbuilder/lispbuilder | net.lisp | (in-package #:lispbuilder-net-cffi)
(defconstant NET_STARTUP_FAILED -1)
(defconstant NET_CLEANUP_FAILED -2)
(defconstant NET_BIND_FAILED -3)
(defconstant NET_CREATE_SOCKET_FAILED -4)
(defconstant NET_GET_HOST_BY_NAME_FAILED -5)
(defconstant NET_LISTEN_FAILED -6)
(defconstant NET_ACCEPT_FAILED -7)
(defconstant NET_CLO... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-net/cffi/net.lisp | lisp | (in-package #:lispbuilder-net-cffi)
(defconstant NET_STARTUP_FAILED -1)
(defconstant NET_CLEANUP_FAILED -2)
(defconstant NET_BIND_FAILED -3)
(defconstant NET_CREATE_SOCKET_FAILED -4)
(defconstant NET_GET_HOST_BY_NAME_FAILED -5)
(defconstant NET_LISTEN_FAILED -6)
(defconstant NET_ACCEPT_FAILED -7)
(defconstant NET_CLO... | |
f73e5ebeee12062795871c3adf540f608b4c5dfb8f6cdacba15e8cbf0aee3447 | paurkedal/ocaml-caqti | system_sig.mli | Copyright ( C ) 2022 < >
*
* This library 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 , either version 3 of the License , or ( at your
* option ) any later version , with the ... | null | https://raw.githubusercontent.com/paurkedal/ocaml-caqti/f8b7a1c2bde2013d24ffc0b104f4af6e5f01480b/caqti/lib-platform/system_sig.mli | ocaml | * A concurrency monad with an optional failure monad, or just the identity
type constructor for blocking operation.
* Bind operation of the concurrency monad.
* Map operation of the concurrency monad.
* Return operation of the concurrency monad.
* [finally f g] runs [f ()] and then runs [g ()] whether the fo... | Copyright ( C ) 2022 < >
*
* This library 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 , either version 3 of the License , or ( at your
* option ) any later version , with the ... |
f3579aac3148baa706af888cbb6973b29e2237b013f03a032166bfdf9ad3869c | dannywillems/types-and-programming-languages-pierce-implementation | chap4.ml | (* A term represents a node in the AST *)
The grammar is given by :
t : : =
True
False
if t1 then t2 else t3
0
succ t
pred t
isZero t
Possible values are given by :
v : : =
True
False
nv
And nv ( numerical value ) is... | null | https://raw.githubusercontent.com/dannywillems/types-and-programming-languages-pierce-implementation/f3b48d44adc59fd957909b9157e0ff104dea1959/OCaml/chapter04/chap4.ml | ocaml | A term represents a node in the AST
Grammar representation using a sum type.
For the True value
For the False value
For the if ... then ... else ... term
For the successor term
For the predecessor term
For the isZero term
Return true if the given term is a numerical values.
Small step evaluation.
... | The grammar is given by :
t : : =
True
False
if t1 then t2 else t3
0
succ t
pred t
isZero t
Possible values are given by :
v : : =
True
False
nv
And nv ( numerical value ) is bounded to :
nv : : =
0
... |
c9d5eba482edd2d5f07b9259ea4e4cdf2c9bf3454a29a6cc3f92f3e484d4cf24 | krajj7/BotHack | delegator.clj | (ns bothack.delegator
"The delegator delegates event and prompt invocations to all registered
handlers which implement the protocol for the given event type, or the first
handler that implements the prompt protocol. For prompts it writes responses
back to the terminal. Handlers are invoked in order of their p... | null | https://raw.githubusercontent.com/krajj7/BotHack/70226b3c8ed12d29c64068aec0acc0ca71d57adf/src/bothack/delegator.clj | clojure | (log/debug "testing handler" handler " for " protocol)
(log/debug "invoking handler" handler)
(log/debug "invoking next prompt handler" handler)
can return "\n" to send empty response
rebinding *ns* for definterface didn't seem to work...
:internal = interface will be auto-generated from clojure (no javadoc, no para... | (ns bothack.delegator
"The delegator delegates event and prompt invocations to all registered
handlers which implement the protocol for the given event type, or the first
handler that implements the prompt protocol. For prompts it writes responses
back to the terminal. Handlers are invoked in order of their p... |
0d361a975121d5b0f0b7a9f8ef7933cada7f59547d52bbe0a03b822baf76778a | nvim-treesitter/nvim-treesitter | indents.scm | Gleam indents similar to Rust and JavaScript
[
(assert)
(case)
(case_clause)
(constant)
(expression_group)
(external_function)
(function)
(import)
(let)
(list)
(public_constant)
(public_external_function)
(public_function)
(public_opaque_type_definition)
(public_type_alias)
(public_typ... | null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/0fbb268b078ca2361868512cfac1f274c619361c/queries/gleam/indents.scm | scheme | Gleam pipelines are not indented, but other binary expression chains are | Gleam indents similar to Rust and JavaScript
[
(assert)
(case)
(case_clause)
(constant)
(expression_group)
(external_function)
(function)
(import)
(let)
(list)
(public_constant)
(public_external_function)
(public_function)
(public_opaque_type_definition)
(public_type_alias)
(public_typ... |
eddb43f5f864975c4fc7aa4775c69d7b4aff843ac35f9f4173aff712bf1bcbce | yuriy-chumak/ol | base64_decode_data.scm | ; #Ol
(define base64-codes "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")
(define kernel (alist->ff (map cons (string->bytes base64-codes) (iota (string-length base64-codes)))))
; returns n bits from input binary stream
(define (bits n hold)
(let loop ((hold hold))
(vector-apply hold (la... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/rosettacode/base64_decode_data.scm | scheme | #Ol
returns n bits from input binary stream
decoder. |
(define base64-codes "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")
(define kernel (alist->ff (map cons (string->bytes base64-codes) (iota (string-length base64-codes)))))
(define (bits n hold)
(let loop ((hold hold))
(vector-apply hold (lambda (v i l)
(cond
((null? ... |
b91eac065a57b561891b28457913ac058a9d3a67846406a8d8130b0dffe24cc9 | facebook/pyre-check | preprocessing.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/7e7e43e2ec32b755210300824ff7f1af836fd1cf/source/analysis/preprocessing.mli | ocaml | Resolve imports and fully qualify names.
Resolves sys.version_info related checks at parse time.
Uses heuristics to pick platform-specific code at parse time.
Add implicit returns when a function doesn't have one.
List of function definitions in a source. include_toplevels copies all definitions into a
topl... |
* 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... |
e8a5a4c1adb62a96871c38b122477ba0bf6620845105c7b5f93e4b68751a6c07 | barrucadu/dejafu | DejaFu.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
-- |
Module : Test . HUnit . DejaFu
Copyright : ( c ) 2015 - -2019
License : MIT
Maintainer : < >
-- Stability : stable
Portability : FlexibleContexts , FlexibleInstances , LambdaCase
--
This module ... | null | https://raw.githubusercontent.com/barrucadu/dejafu/98f0ce0f348455a412992ee4e7d6bfc4b29204df/hunit-dejafu/Test/HUnit/DejaFu.hs | haskell | |
Stability : stable
behaviour of concurrent systems.
* Unit testing
failures the cases which throw an 'HUnitFailure' exception.
@instance Assertable (ConcIO ())@
These instances use 'defaultWay' and 'defaultMemType'.
* Unit testing
** Re-exports
*** Settings
*** Expressing concurrent programs
*** Inva... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
Module : Test . HUnit . DejaFu
Copyright : ( c ) 2015 - -2019
License : MIT
Maintainer : < >
Portability : FlexibleContexts , FlexibleInstances , LambdaCase
This module allows using predicates with H... |
c1b411e90832b0ccd97e606ac99160c2d36be82062dca498d16cec71d7ed41d6 | jyp/glpk-hs | Solver.hs | {-# OPTIONS -funbox-strict-fields #-}
{-# LANGUAGE TupleSections, RecordWildCards #-}
| Interface between the representation of a linear programming problem , a value of type ' LP ' , and
-- the GLPK solver. The options available to the solver correspond naturally with GLPK's available options,
-- so to find the m... | null | https://raw.githubusercontent.com/jyp/glpk-hs/a1f4410e93eb76047bafa58583c31b8c8a404860/src/Data/LinearProgram/GLPK/Solver.hs | haskell | # OPTIONS -funbox-strict-fields #
# LANGUAGE TupleSections, RecordWildCards #
the GLPK solver. The options available to the solver correspond naturally with GLPK's available options,
so to find the meaning of any particular option, consult the GLPK documentation.
The option of which solver to use -- the general L... |
| Interface between the representation of a linear programming problem , a value of type ' LP ' , and
The marshalling from Haskell to C is specialized for ' Int 's and ' Double 's , so using those types in your
linear program is recommended .
module Data.LinearProgram.GLPK.Solver (
GLPOpts(..),
simplexDefault... |
e4c77381f01ac773e5d2459c6e586cf377a53e8c7db41c269828fd95041c44de | OCamlPro/ocamlexc | main.ml | (***********************************************************************)
(* *)
(* Ocamlexc *)
(* *)
, projet Cris... | null | https://raw.githubusercontent.com/OCamlPro/ocamlexc/a9ddcfff6f376f5dd6c5fcc3211b8f89e36f79fe/toplevel/main.ml | ocaml | *********************************************************************
Ocamlexc
... | , projet Cristal , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Format ;;
let debug_level1 = ref false ;;
let debug_level2 = ref false ;;
let debug_level3 = ref false ;;... |
bd4f401cd33ed9f4a83126ac46225c2a1c1436ebbe6ad6fc49a5924e0550c845 | kwrooijen/gungnir | field.cljc | (ns gungnir.field
(:require
[clojure.spec.alpha :as s]
[gungnir.spec]
[gungnir.model]
[gungnir.util.malli :as util.malli]))
(defn- ?field->key [?field]
(if (coll? ?field)
(get gungnir.model/*column->field* (first ?field) (first ?field))
(get gungnir.model/*column->field* ?field ?field)))
(s/fd... | null | https://raw.githubusercontent.com/kwrooijen/gungnir/1b4b70a72082a89150d01a72e0dfb9037caf50ce/src/cljc/gungnir/field.cljc | clojure | (ns gungnir.field
(:require
[clojure.spec.alpha :as s]
[gungnir.spec]
[gungnir.model]
[gungnir.util.malli :as util.malli]))
(defn- ?field->key [?field]
(if (coll? ?field)
(get gungnir.model/*column->field* (first ?field) (first ?field))
(get gungnir.model/*column->field* ?field ?field)))
(s/fd... | |
4da9d7602ff4438bf2db239995400d0e7bb72d37f3511466fdfec641a38437fd | ice1000/learn | Data2.hs | -- {-# LANGUAGE
TemplateHaskell
# - }
module PointFree2 where
import Data.List
import Data.Function
data Car = Car {
-- company :: String,
-- model :: String,
-- year :: Int
-- } deriving (Show)
data Car a b c = Car {
company :: a,
model :: b,
year :: c
} deriving (Show)
... | null | https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/Data2.hs | haskell | {-# LANGUAGE
company :: String,
model :: String,
year :: Int
} deriving (Show)
tellCar :: Car -> String
| TemplateHaskell
# - }
module PointFree2 where
import Data.List
import Data.Function
data Car = Car {
data Car a b c = Car {
company :: a,
model :: b,
year :: c
} deriving (Show)
tellCar ( Car { company = c , model = m , year = y } ) = " This " + + c + + " " + + m " " " was made i... |
e2550f7632b13e8cfd65080753467dec36c98633d12cf890ac9dbfcd1137e656 | ocaml-community/obus | nm_vpn_plugin.mli |
* nm_vpn_plugin.mli
* -----------------
* Copyright : ( c ) 2010 , < >
* Licence : BSD3
*
* This file is a part of obus , an ocaml implementation of D - Bus .
* nm_vpn_plugin.mli
* -----------------
* Copyright : (c) 2010, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a part of ... | null | https://raw.githubusercontent.com/ocaml-community/obus/8d38ee6750587ae6519644630b75d53a0a011acd/bindings/network-manager/nm_vpn_plugin.mli | ocaml | * VPN plugin interface |
* nm_vpn_plugin.mli
* -----------------
* Copyright : ( c ) 2010 , < >
* Licence : BSD3
*
* This file is a part of obus , an ocaml implementation of D - Bus .
* nm_vpn_plugin.mli
* -----------------
* Copyright : (c) 2010, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a part of ... |
36ebd516585f33910898166eef739b5c768e237e155504b867a8753d3a85bc18 | cnuernber/tmdjs | column_parsers.cljs | (ns tech.v3.dataset.io.column-parsers
"A column parser is a parser that takes an indexed stream of values
and returns a packed datastructure and a missing set. nil values,
#NaN values, and values of :tech.v3.dataset/missing are all interpreted as
nil values."
(:require [tech.v3.datatype :as dtype]
... | null | https://raw.githubusercontent.com/cnuernber/tmdjs/5a4cca6d729044032baaf897aadd5c42a389a197/src/tech/v3/dataset/io/column_parsers.cljs | clojure | add all missing values so far
Do scanning/adding of data separate from checking for missing
if we have absolutely no idea what this is.
We pay a performance penalty in order to have correct datatypes
for array-based objects
Else container has meaningful data- promote to object
for numeric data
when we have to change ou... | (ns tech.v3.dataset.io.column-parsers
"A column parser is a parser that takes an indexed stream of values
and returns a packed datastructure and a missing set. nil values,
#NaN values, and values of :tech.v3.dataset/missing are all interpreted as
nil values."
(:require [tech.v3.datatype :as dtype]
... |
ffa1072f3eb4478c5580cbce9e49695cd68ab47f6ff37e35bc41c216e496298d | tweag/network-transport-zeromq | TestAPI.hs | -- |
Copyright : ( C ) 2014 - 2015 EURL Tweag
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent
import Control.Monad ( replicateM )
import Data.IORef
import Network.Transport
import Network.Transport.ZMQ
import Test.Tasty
import Test.Tasty.HUnit
main :: IO ()
main = defaultMain $
te... | null | https://raw.githubusercontent.com/tweag/network-transport-zeromq/491b0cc1321b6e17b89b4a7287c325df2502f527/tests/TestAPI.hs | haskell | |
# LANGUAGE OverloadedStrings # | Copyright : ( C ) 2014 - 2015 EURL Tweag
module Main where
import Control.Concurrent
import Control.Monad ( replicateM )
import Data.IORef
import Network.Transport
import Network.Transport.ZMQ
import Test.Tasty
import Test.Tasty.HUnit
main :: IO ()
main = defaultMain $
testGroup "API tests"
[ testCase "si... |
ff40984ae8a8d79ee8fe0657db9afef1b8c93a3ece12fb455f738de574b3b707 | orthecreedence/ghostie | world.lisp | (in-package :ghostie)
(defvar *perspective-matrix* nil)
(defvar *ortho-matrix* nil)
(defvar *view-matrix* nil)
(defvar *game-data* nil)
(defclass world ()
((physics :accessor world-physics :initform nil)
(position :accessor world-position :initform '(0 0 -36))
(level :accessor world-level :initform nil)
(d... | null | https://raw.githubusercontent.com/orthecreedence/ghostie/6e6f77e1f33511d5311319db4656960de1c6f668/world.lisp | lisp | setup physics
(cp-f:space-set-collision-slop (cpw:base-c space) .05d0)
cleanuip game objects/physics
cleanup opengl objects
sync each game object with its physics body
load the current level
grab/generate some display/physics characteristics for the level
this is the quad we render our FBO texture onto
TODO: cu... | (in-package :ghostie)
(defvar *perspective-matrix* nil)
(defvar *ortho-matrix* nil)
(defvar *view-matrix* nil)
(defvar *game-data* nil)
(defclass world ()
((physics :accessor world-physics :initform nil)
(position :accessor world-position :initform '(0 0 -36))
(level :accessor world-level :initform nil)
(d... |
98bd681085686c234cd7f91941824fe0cc1b02da5f63071ca917572858119e4b | mejgun/haskell-tdlib | Venue.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.Venue where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.Location as Location
import qualified Utils as U
-- |
data Venue = -- | Describes a venue
Venue
{ -- | Type of the venue in the provider database; as... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/dc380d18d49eaadc386a81dc98af2ce00f8797c2/src/TD/Data/Venue.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| Describes a venue
| Type of the venue in the provider database; as defined by the sender
| Identifier of the venue in the provider database; as defined by the sender
| Provider of the venue database; as defined by the sender. Currently, only "foursquare" and "gplaces" (Google ... |
module TD.Data.Venue where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.Location as Location
import qualified Utils as U
Venue
_type :: Maybe String,
_id :: Maybe String,
provider :: Maybe String,
address :: Maybe String,
title :: Maybe String... |
ae9489f5615a9cea22ad5c500d3d051eb5690c69ac68dfcd8c532ca2fa53ae46 | MyDataFlow/ttalk-server | meck_matcher.erl | %%%============================================================================
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in compliance with the License.
%%% You may obtain a copy of the License at
%%%
%%% -2.0
%%%
%%% Unless required by applicable law ... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/meck/src/meck_matcher.erl | erlang | ============================================================================
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre... | Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@private
@doc This module introduces abstraction . It is an entity that can
framework ( at the moment only is supported ) . Then it can be used
-module(meck_matcher).
... |
8df2c5e22adcb76989d1c79abfd00fe8c4df30ee8d834ad518c6151d1bb4bb28 | david-christiansen/pudding-old | resources.rkt | #lang racket
(require (for-syntax syntax/parse))
(provide define-resource)
(module+ test (require rackunit))
Resources , inspired by MetaPRL but not identical to it
(define-syntax (define-resource stx)
(syntax-parse stx
[(_ r:id
(~optional combiner:expr
#:defaults ([combiner #'ide... | null | https://raw.githubusercontent.com/david-christiansen/pudding-old/6b9ee633b551226df61d40191bafa14386fc86ad/resources.rkt | racket | WARNING: Hack - using the same name for the internal
adder causes the blame messages to make sense, but there
must be a better way... | #lang racket
(require (for-syntax syntax/parse))
(provide define-resource)
(module+ test (require rackunit))
Resources , inspired by MetaPRL but not identical to it
(define-syntax (define-resource stx)
(syntax-parse stx
[(_ r:id
(~optional combiner:expr
#:defaults ([combiner #'ide... |
98207caf8806480b3c24a6ff9cd03962bcfbf8047625636e3d3f1d85fae92db7 | bobatkey/foveran | Definition.hs | module Language.Foveran.Typing.Definition
( processDefinition )
where
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Rec (AnnotRec (Annot))
import Language.Foveran.Syntax.Display (Definition (..), TermCon(Lam))
import Language.... | null | https://raw.githubusercontent.com/bobatkey/foveran/e57463e3f6923becdf1249cd2fd0ccfcd566f7c5/src/Language/Foveran/Typing/Definition.hs | haskell | module Language.Foveran.Typing.Definition
( processDefinition )
where
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Rec (AnnotRec (Annot))
import Language.Foveran.Syntax.Display (Definition (..), TermCon(Lam))
import Language.... | |
03b82d874a27b24d57f0d2d34d0a70835f202217a9e04afc9fc86ba83992200d | jesperes/aoc_erlang | aoc2019_day24.erl | Advent of Code solution for 2019 day 24 .
Created : 2019 - 12 - 24T11:21:51 + 00:00
-module(aoc2019_day24).
-behavior(aoc_puzzle).
-hank([{unnecessary_function_arguments, [{game_of_life2, 2, 1}]}]).
-export([parse/1, solve1/1, solve2/1, info/0]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info(... | null | https://raw.githubusercontent.com/jesperes/aoc_erlang/ec0786088fb9ab886ee57e17ea0149ba3e91810a/src/2019/aoc2019_day24.erl | erlang | ------------------------------------------------------------
------------------------------------------------------------
bug adjacent to it. An empty space becomes infested with a bug if
------------------------------------------------------------
------------------------------------------------------------
At ... | Advent of Code solution for 2019 day 24 .
Created : 2019 - 12 - 24T11:21:51 + 00:00
-module(aoc2019_day24).
-behavior(aoc_puzzle).
-hank([{unnecessary_function_arguments, [{game_of_life2, 2, 1}]}]).
-export([parse/1, solve1/1, solve2/1, info/0]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info(... |
14b6d3d705890fbfb20a399fe9721940624a1cbce9d66319358cda1db057553d | anoma/juvix | ParsedInfoTableBuilder.hs | module Juvix.Compiler.Concrete.Data.ParsedInfoTableBuilder
( InfoTableBuilder,
registerLiteral,
registerKeyword,
registerJudocText,
registerComment,
registerModule,
moduleVisited,
visitModule,
runParserInfoTableBuilder,
module Juvix.Compiler.Concrete.Data.ParsedInfoTable,
)
where... | null | https://raw.githubusercontent.com/anoma/juvix/c1d85c451e447dd8b1b82fe2fd4677d8ee9a117b/src/Juvix/Compiler/Concrete/Data/ParsedInfoTableBuilder.hs | haskell | module Juvix.Compiler.Concrete.Data.ParsedInfoTableBuilder
( InfoTableBuilder,
registerLiteral,
registerKeyword,
registerJudocText,
registerComment,
registerModule,
moduleVisited,
visitModule,
runParserInfoTableBuilder,
module Juvix.Compiler.Concrete.Data.ParsedInfoTable,
)
where... | |
2ef7ad93f7dc301bf430d48a27052221787092cbb2f1bc9357892d1acd99fe2e | open-company/open-company-storage | entries.clj | (ns oc.storage.api.entries
"Liberator API for entry resources."
(:require [clojure.string :as s]
[defun.core :refer (defun-)]
[if-let.core :refer (if-let*)]
[taoensso.timbre :as timbre]
[clojure.set :as clj-set]
[compojure.core :as compojure :refer (ANY OP... | null | https://raw.githubusercontent.com/open-company/open-company-storage/fae0b41c225f40621beae9757ca7e33caa2c175d/src/oc/storage/api/entries.clj | clojure | ----- Utility functions -----
Initial
Email share
----- Validations -----
sanity check
sanity check
sanity check
Entry not found, will fail existance later
No need to error
Good!
couldn't find the specified board
Create the new entry from the URL and data provided
Not a valid entry
Make sure we keep the v... | (ns oc.storage.api.entries
"Liberator API for entry resources."
(:require [clojure.string :as s]
[defun.core :refer (defun-)]
[if-let.core :refer (if-let*)]
[taoensso.timbre :as timbre]
[clojure.set :as clj-set]
[compojure.core :as compojure :refer (ANY OP... |
df19faba013fb6bd63696a6166d1d37cde58559e2cc504ae190ce46a098cbea1 | facebook/infer | ClosuresSubstitution.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/facebook/infer/33c9bf2c7519002c3585fc2fe319998f8cb8d5df/infer/src/backend/ClosuresSubstitution.mli | ocaml |
* 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
... | |
fc433361a2e65f03eefaa98c5d61c096bd763c8486858a06453611fe0774d0bd | ocaml/dune | main.ml | let _ = A.x
| null | https://raw.githubusercontent.com/ocaml/dune/620b98bb01835ac846dbd352c4b62c7d1bfcb697/test/blackbox-tests/test-cases/jsoo/public-libs.t/b/main.ml | ocaml | let _ = A.x
| |
67f1b47942536fa6ccd3f533baa26e24f1ccfd2ff45b91724308331e26442e9f | haskell-opengl/GLUT | CubeMap.hs |
CubeMap.hs ( adapted from CubeMap.c which is ( c ) Silicon Graphics , Inc )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program demonstrates cube map textures . Six different colored ... | null | https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/examples/RedBook4/CubeMap.hs | haskell |
CubeMap.hs ( adapted from CubeMap.c which is ( c ) Silicon Graphics , Inc )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program demonstrates cube map textures . Six different colored ... | |
576517b3280e6cce87d374ed75ed0fd0afb24a97029f9c994d2e2f03db8d3cd5 | josefs/Gradualizer | poly_lists_map_constraints_pass.erl | -module(poly_lists_map_constraints_pass).
-gradualizer([solve_constraints]).
%% This is a minimised problem from type checking `gradualizer_db:collect_specs/1'
%% with constraint solving enabled.
-export([map_many/1]).
-export([j/1]).
We can not preserve the nonempty - property across calls to lists : map/2 anymo... | null | https://raw.githubusercontent.com/josefs/Gradualizer/ba4476fd4ef8e715e49ddf038d5f9f08901a25da/test/should_pass/poly_lists_map_constraints_pass.erl | erlang | This is a minimised problem from type checking `gradualizer_db:collect_specs/1'
with constraint solving enabled.
This interferes with the clause choice when calling an intersection-typed function. | -module(poly_lists_map_constraints_pass).
-gradualizer([solve_constraints]).
-export([map_many/1]).
-export([j/1]).
We can not preserve the nonempty - property across calls to lists : map/2 anymore :(
-spec map_many({_, nonempty_list()}) -> list().
map_many({_Key, Types}) ->
lists:map(fun map_elem/1,
... |
ffd6d38352218505f4f9679f561001c210727435e909fe888ba477621c1a9329 | input-output-hk/offchain-metadata-tools | Weakly.hs | {-# LANGUAGE OverloadedStrings #-}
module Cardano.Metadata.Types.Weakly where
import Data.Aeson ( FromJSON, ToJSON, (.:) )
import qualified Data.Aeson as Aeson
import qualified Data.HashMap.Strict as HM
import Cardano.Metadata.Types.Common
( PropertyName, Subject, fromPropertyNameList, toPropertyNameList )
dat... | null | https://raw.githubusercontent.com/input-output-hk/offchain-metadata-tools/794f08cedbf555e9d207bccc45c08abbcf98add9/metadata-lib/src/Cardano/Metadata/Types/Weakly.hs | haskell | # LANGUAGE OverloadedStrings #
JSON instances |
module Cardano.Metadata.Types.Weakly where
import Data.Aeson ( FromJSON, ToJSON, (.:) )
import qualified Data.Aeson as Aeson
import qualified Data.HashMap.Strict as HM
import Cardano.Metadata.Types.Common
( PropertyName, Subject, fromPropertyNameList, toPropertyNameList )
data Metadata
= Metadata { metaSubje... |
f65db52ef406f8b60b23d0a019a20e7ca9cf903b8e8c648d573f3d468a49d4ed | juspay/atlas | Item.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/parking-bap/src/Core/OnSearch/Item.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
68dec87157bbdbcee7833e2da615a2789a39710c53561afe8d4818f158eb56f6 | lsevero/clj-maxima | core.clj | (ns clj-maxima.core
(:require [clojure.java.io :as io]
[clojure.tools.logging :as log]
[clojure.string :as str]
[clojure.walk :refer [postwalk postwalk-demo]]
[clojure.test :refer [is]]
[abclj.core :as cl]
)
(:import [java.nio.file Files FileSy... | null | https://raw.githubusercontent.com/lsevero/clj-maxima/f261f66b98cb41ad1fb109141b0904eb99aceebe/src/clj_maxima/core.clj | clojure | Some native functions will not be applied and will be treated as variables, we need to evaluate them to their '''real''' value. | (ns clj-maxima.core
(:require [clojure.java.io :as io]
[clojure.tools.logging :as log]
[clojure.string :as str]
[clojure.walk :refer [postwalk postwalk-demo]]
[clojure.test :refer [is]]
[abclj.core :as cl]
)
(:import [java.nio.file Files FileSy... |
1068cf207f071d3ea22885d3467333edd26a3e631e231eff1eb839963f67dc80 | ekmett/rcu | STM.hs | # LANGUAGE Trustworthy #
-----------------------------------------------------------------------------
-- |
Copyright : ( C ) 2015 and
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
< >
-- Stability : experimental
-- Portability : non-portable
--
--------... | null | https://raw.githubusercontent.com/ekmett/rcu/4971b0ab1cad4d2e0d1089edc076912b546f53e7/unstable/Control/Concurrent/RCU/STM.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
---------------------------------------------------------------------------
* Implementation Details | # LANGUAGE Trustworthy #
Copyright : ( C ) 2015 and
Maintainer : < >
< >
module Control.Concurrent.RCU.STM
( SRef
, RCU, runRCU
, MonadNew(..)
, MonadReading(..)
, MonadWriting(..)
, MonadRCU(..)
, ReadingRCU
, WritingRCU
, RCUThread(rcuThreadId)
) where
impo... |
bae0cca92598bf5427f8504b32d4ed429dd23d9607af2fdf13ac81a95dfc66aa | sosy-lab/tbf | crestInstrument.ml | Copyright ( c ) 2008 , ( )
*
* This file is part of CREST , which is distributed under the revised
* BSD license . A copy of this license can be found in the file LICENSE .
*
* This program is distributed in the hope that it will be useful , but
* WITHOUT ANY WARRANTY ; without even the implied... | null | https://raw.githubusercontent.com/sosy-lab/tbf/18d08d6cee6fbfbad4d4ebfa7aed235521edec2b/tbf/tools/crest/cil/_build/src/ext/crestInstrument.ml | ocaml | To help avoid "collisions", skip static functions.
These definitions must match those in "libcrest/crest.h".
enum
Ensure neither branch is empty.
Ensure the conditional is actually a predicate.
* Get handles to the instrumentation functions.
*
* NOTE: If the file we are instrumenting includes "crest... | Copyright ( c ) 2008 , ( )
*
* This file is part of CREST , which is distributed under the revised
* BSD license . A copy of this license can be found in the file LICENSE .
*
* This program is distributed in the hope that it will be useful , but
* WITHOUT ANY WARRANTY ; without even the implied... |
93ffc70b7b5b1e802acbb89816acc7de0b9dca07185433fe25a5962a76e9a2cc | OCamlPro/freeton_wallet | commandContractAbiImpl.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2021 OCamlPro SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/freeton_wallet/c802bf4ea68da07adda607bece4b0c736a9781cd/src/freeton_wallet_lib/commandContractAbiImpl.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2021 OCamlPro SAS
Public License version 2.1 , with the special exception on linking
for StringSet
open Ezcmd.V2
open EZCMD.TYPES
let sol_abi contract =
let _config = Config.config () in
let contract, contract_abi =
if Sys.file_exists contra... |
a97ea5942ad17fb68a6316839d1f9c112c5ff0f84e5ef480dfe98a79d72388ac | well-typed/optics | Cli.hs | module Main (main) where
import Data.List (find)
import System.Environment (getArgs)
import MetaMetaPost (printDiagram)
import MMP.Optics.Common
import MMP.Optics.Hierarchy
import MMP.Optics.Indexed
import MMP.Optics.Re
----------------... | null | https://raw.githubusercontent.com/well-typed/optics/7cc3f9c334cdf69feaf10f58b11d3dbe2f98812c/metametapost/src/Cli.hs | haskell | -----------------------------------------------------------------------------
Main
----------------------------------------------------------------------------- | module Main (main) where
import Data.List (find)
import System.Environment (getArgs)
import MetaMetaPost (printDiagram)
import MMP.Optics.Common
import MMP.Optics.Hierarchy
import MMP.Optics.Indexed
import MMP.Optics.Re
main :: IO ()
m... |
eaa6e5e839761365fdec936048ca1ffb4af86b569cc4f95db14731b6baa7d249 | RichiH/git-annex | LockFile.hs | git - annex lock files .
-
- Copyright 2012 - 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2012-2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Annex.LockFile (
lockFileCached,
unlockFile,
getLockCache,
fromLo... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Annex/LockFile.hs | haskell | Create a specified lock file, and takes a shared lock, which is retained
- in the cache.
already locked
Runs an action with an exclusive lock held. If the lock is already
- held, blocks until it becomes free.
Tries to take an exclusive lock and run an action. If the lock is
- already held, returns Nothing. | git - annex lock files .
-
- Copyright 2012 - 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2012-2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Annex.LockFile (
lockFileCached,
unlockFile,
getLockCache,
fromLo... |
f6dcee31be08dc2f727421ff2306a76f1dca7c82cadf1d9f49160d8ead5f85d3 | etorreborre/ingestion | Input.hs | module Input where
import Data
import FileProvider
import Protolude hiding (toList)
import Streaming (Stream, effect, mapsM, chunksOf)
import Streaming.Prelude
newtype Input m i = Input {
readInput :: Stream (Of i) m ()
}
newCsvInput :: forall m i .... | null | https://raw.githubusercontent.com/etorreborre/ingestion/90ec7ca8bd9cea04337a64ea3bd403ae48e15340/src/Input.hs | haskell | module Input where
import Data
import FileProvider
import Protolude hiding (toList)
import Streaming (Stream, effect, mapsM, chunksOf)
import Streaming.Prelude
newtype Input m i = Input {
readInput :: Stream (Of i) m ()
}
newCsvInput :: forall m i .... | |
5c0329655f16f878170657916cba8054c025b0bfb90817bce94c21c824d11bff | mentat-collective/functional-numerics | minimize_test.cljc | ;;
Copyright © 2017 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
;;
;; This 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 ;... | null | https://raw.githubusercontent.com/mentat-collective/functional-numerics/44856b0e3cd1f0dd9f8ebb2f67f4e85a68aa8380/test/numerical/minimize_test.cljc | clojure |
This is free software; you can redistribute it and/or modify
either version 3 of the License , or ( at
your option) any later version.
This software is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR... | Copyright © 2017 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(ns sicmutils.numerical.minimize-t... |
342b544765277d20c764a57ca8b300653580dccac27df209d2c718968ab3c8d4 | amosr/folderol | ProcDisconnect.hs | -- Processes with partially-dynamic topology:
-- Disconnecting streams is possible, and a process can observe when all streams have disconnected
-- This is useful for combinators that only care about a finite prefix.
For example " take " , and even " zip " when one stream is shorter .
# LANGUAGE PatternGuards #
# LAN... | null | https://raw.githubusercontent.com/amosr/folderol/9b8c0cd30cfb798dadaa404cc66404765b1fc4fe/src/Folderol/Tomorrow/ProcDisconnect.hs | haskell | Processes with partially-dynamic topology:
Disconnecting streams is possible, and a process can observe when all streams have disconnected
This is useful for combinators that only care about a finite prefix.
# LANGUAGE OverloadedStrings #
I am not going to read from this any more
Binary messages
Is anybody listen... | For example " take " , and even " zip " when one stream is shorter .
# LANGUAGE PatternGuards #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE LambdaCase #
module Folderol.Tomorrow.ProcDisconnect where
import P
import Folderol.Tomorrow.Name
import Folderol.Tomorrow.Exp
import Folderol.... |
a3e39a3c617e2a1104c0385827d16134c0c42997e01c18917b6f5043439c0195 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | SubscriptionItem.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
| Contains the types generated from the schema SubscriptionItem
module StripeAPI.Types.SubscriptionItem where
import quali... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/SubscriptionItem.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
# SOURCE #
# SOURCE #
# SOURCE #
| Defines the object schema located at @components.schemas.subscription_item@ in the specification.
| billing_thresholds: Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing ... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
| Contains the types generated from the schema SubscriptionItem
module StripeAPI.Types.SubscriptionItem where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qual... |
6ade36bbc674891bf8db4198eaf81563a444828b0f6723aec80e2bf49d5f0b4a | dbmcclain/LispPlotter | plotter-boxes.lisp |
(in-package :plotter)
;; ------------------------------------------
(defun inset-box-sides (box dxleft dytop
&optional (dxright dxleft)
(dybottom dytop))
(list (+ (gp:rectangle-left box) dxleft)
(+ (gp:rectangle-top box) dytop)
... | null | https://raw.githubusercontent.com/dbmcclain/LispPlotter/c019c7062711f454308a69aa9bed26584c0708fd/plotter-boxes.lisp | lisp | ------------------------------------------ |
(in-package :plotter)
(defun inset-box-sides (box dxleft dytop
&optional (dxright dxleft)
(dybottom dytop))
(list (+ (gp:rectangle-left box) dxleft)
(+ (gp:rectangle-top box) dytop)
(- (gp:rectangle-right box) dxright)
... |
3f44df564f6a08880405a60e2edf6c9d17cbc4ba0fa14dae4e04d2008ba3b90f | seandepagnier/cruisingplot | net.scm | Copyright ( C ) 2010 < >
;;
This Program is free software ; you can redistribute it and/or
;; modify it under the terms of the GNU General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at your option ) any later version .
; This type of networking provi... | null | https://raw.githubusercontent.com/seandepagnier/cruisingplot/d3d83e7372e2c5ce1a8e8071286e30c2028088cf/net.scm | scheme |
you can redistribute it and/or
modify it under the terms of the GNU General Public
either
This type of networking provides both client and server capabilities and
gives unlimited control. The basic mechanic is all scheme expressions
delivered over the socket are evaluated remotely, and the results sent back
ov... | Copyright ( C ) 2010 < >
version 3 of the License , or ( at your option ) any later version .
(declare (unit net))
(use tcp srfi-18)
(define net-default-port 23227)
(define (net-repl i o)
(call/cc (lambda (cont)
(with-exception-handler
(lambda _ (cont #f))
(lambda ... |
a50b2b0659fa18cfd9182f42b9ac307985367fed4cbffa9e4bd83c2805b1b474 | np/hlatex | Babel.hs | TODO add more langs
module Language.LaTeX.Builder.Babel
(Lang, BabelOpt
,useBabel
,langName
,otherlanguage
-- langs
,francais
,french
-- last resort
,customLang
,customBabelOpt
,pkg
) where
import Data.String
import Language.LaTeX.Types
import qualified Language.LaTeX.Builder.Inte... | null | https://raw.githubusercontent.com/np/hlatex/4f2212c5db5e10dab7f6cbb9cf47a041b3320176/Language/LaTeX/Builder/Babel.hs | haskell | langs
last resort
| Switch locally to another language | TODO add more langs
module Language.LaTeX.Builder.Babel
(Lang, BabelOpt
,useBabel
,langName
,otherlanguage
,francais
,french
,customLang
,customBabelOpt
,pkg
) where
import Data.String
import Language.LaTeX.Types
import qualified Language.LaTeX.Builder.Internal as BI
newtype BabelOpt =... |
61f9d2c58aa6749fba2132bd427c59b6b3aeb6ff3e49231f76a95e6ee1c3b0b1 | nasa/Common-Metadata-Repository | services.clj | (ns cmr.ingest.api.services
"Service ingest functions in support of the ingest API."
(:require
[cmr.acl.core :as acl]
[cmr.common-app.api.enabled :as common-enabled]
[cmr.common-app.api.launchpad-token-validation :as lt-validation]
[cmr.common.log :refer [debug info warn error]]
[cmr.ingest.api.core ... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/d0685f2b84a81ed0e6d9b3e44ccdf01a7fb8469c/ingest-app/src/cmr/ingest/api/services.clj | clojure |
Log the ingest attempt
Log the successful ingest, with the metadata size in bytes. | (ns cmr.ingest.api.services
"Service ingest functions in support of the ingest API."
(:require
[cmr.acl.core :as acl]
[cmr.common-app.api.enabled :as common-enabled]
[cmr.common-app.api.launchpad-token-validation :as lt-validation]
[cmr.common.log :refer [debug info warn error]]
[cmr.ingest.api.core ... |
85cddb8bec0dcef6eca779a5703e7978647b821fa7989e527a944873f0e3f222 | zen-lang/zd | deep_merge.clj | (ns zd.deep-merge)
(defn deep-merge
"efficient deep merge"
([a b & more]
(apply deep-merge (deep-merge a b) more))
([a b]
(if (and (map? a) (map? b))
(loop [[[k v :as i] & ks] b
acc a]
(if (nil? i)
acc
(let [av (get a k)]
(if (= v av)
(recur... | null | https://raw.githubusercontent.com/zen-lang/zd/07141ba062ec0b8e9b8420707b48c7b8bf7b3476/src/zd/deep_merge.clj | clojure | (ns zd.deep-merge)
(defn deep-merge
"efficient deep merge"
([a b & more]
(apply deep-merge (deep-merge a b) more))
([a b]
(if (and (map? a) (map? b))
(loop [[[k v :as i] & ks] b
acc a]
(if (nil? i)
acc
(let [av (get a k)]
(if (= v av)
(recur... | |
00e252927df95f1ec3167488dfb66456ae63a2661c4ed6e93ffe58c5b32c07f2 | Opetushallitus/ataru | valinnaiset_kielet.cljs | (ns ataru.hakija.arvosanat.components.valinnaiset-kielet
(:require [schema.core :as s]
[ataru.hakija.schema.render-field-schema :as render-field-schema]
[schema-tools.core :as st]
[re-frame.core :as re-frame]
[clojure.string :as string]
[ataru.hakija.arvosan... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/499f053cf3491f4f219acb1c30d289c12c4ea1ae/src/cljs/ataru/hakija/arvosanat/components/valinnaiset_kielet.cljs | clojure | (ns ataru.hakija.arvosanat.components.valinnaiset-kielet
(:require [schema.core :as s]
[ataru.hakija.schema.render-field-schema :as render-field-schema]
[schema-tools.core :as st]
[re-frame.core :as re-frame]
[clojure.string :as string]
[ataru.hakija.arvosan... | |
6e5f0fcf0569e6a8a6be35f4506db9030e72a92158739a894e70069583f31962 | theam/haskell-do | HaskellDo.hs |
- Copyright ( c ) 2017 The Agile Monkeys S.L. < >
-
- Licensed under the Apache License , Version 2.0 ( the " License " ) ;
- you may not use this file except in compliance with the License .
- You may obtain a copy of the License at
-
- -2.0
-
- Unless required by applicable law or agr... | null | https://raw.githubusercontent.com/theam/haskell-do/f339e57859d308437a72800bda08f96d0de12982/src/common/HaskellDo.hs | haskell | | Executes Haskell.do in designated 'port' |
- Copyright ( c ) 2017 The Agile Monkeys S.L. < >
-
- Licensed under the Apache License , Version 2.0 ( the " License " ) ;
- you may not use this file except in compliance with the License .
- You may obtain a copy of the License at
-
- -2.0
-
- Unless required by applicable law or agr... |
bbbabe68495f817d927cd0afc632c318c75242c6009bfa252848f2f2e165ab0c | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | PaymentPagesCheckoutSessionAutomaticTax.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the types generated from the schema PaymentPagesCheckoutSessionAutomaticTax
module StripeAPI.Types.PaymentPages... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/PaymentPagesCheckoutSessionAutomaticTax.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema PaymentPagesCheckoutSessionAutomaticTax
| Defines the object schema located at @components.schemas.payment_pages_checkout_session_automatic_tax@ in the specification.
| enabled: Indicates whether automatic tax is en... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.PaymentPagesCheckoutSessionAutomaticTax where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Int... |
f205e17cf7c48cda38f498f9abac08de0ee9e0d1f234e2beaca054a5ec3648df | Clozure/ccl-tests | load-files.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Thu Jan 1 11:59:35 2004
Contains : Load tests of section 20 , ' Files '
(in-package :cl-test)
(load "directory.lsp")
(load "probe-file.lsp")
(load "ensure-directories-exist.lsp")
(load "truename.lsp")
(load "file-author.lsp")
(load "file-write-date.lsp")
(load... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/load-files.lsp | lisp | -*- Mode: Lisp -*- | Author :
Created : Thu Jan 1 11:59:35 2004
Contains : Load tests of section 20 , ' Files '
(in-package :cl-test)
(load "directory.lsp")
(load "probe-file.lsp")
(load "ensure-directories-exist.lsp")
(load "truename.lsp")
(load "file-author.lsp")
(load "file-write-date.lsp")
(load "rename-file.lsp")
(loa... |
cc8fb18537f813eb1b58746be674d77a035ac93bf11826c2e3c5df6ae4af8de6 | jeromesimeon/Galax | code_sc_join.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/code_selection/code/code_sc_join.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : code_sc_join.mli , v 1.4 2007/02/01 22:08:45 simeon Exp $
open Algebra_type
open Xquery_common_ast
open Xquery_algebra_ast
open Physical_value
open Execution_context
open Code_selection_context
val build_staircase_join_code :
c... |
874499343bb1b31ac790115abda9b3d5e620c28c2dd67877cd63dbcd052b800d | soulomoon/SICP | Exercise4.28.scm | Exercise 4.28 : Eval uses actual - value rather than eval to evaluate the operator before passing it to apply , in order to force the value of the operator . Give an example that demonstrates the need for this forcing .
(define (id x) x)
((id +) 1 1)
eval id is a compund procedure, which mean + woule be delay-it'ed... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter4/Exercise4.28.scm | scheme | memory limit : 128 MB .
'done
eval#-----(define (id x) x)
eval#-----(lambda (x) x)
eval#-----(id +)
eval#-----id
delay-it--------+
eval#-----x
eval#-----+
force-it------thunk+
eval#-----1
eval#-----1
> | Exercise 4.28 : Eval uses actual - value rather than eval to evaluate the operator before passing it to apply , in order to force the value of the operator . Give an example that demonstrates the need for this forcing .
(define (id x) x)
((id +) 1 1)
eval id is a compund procedure, which mean + woule be delay-it'ed... |
75dd380e37efc1db260dc0ecfa18efc4d16cc9dbad6e46e8803d4f31083cda39 | serokell/tzbot | Main.hs | SPDX - FileCopyrightText : 2022 >
--
SPDX - License - Identifier : MPL-2.0
module Main
( main
) where
import Universum
import Test.Tasty
import Tree (tests)
main :: IO ()
main = tests >>= defaultMain
| null | https://raw.githubusercontent.com/serokell/tzbot/8bec6e4a1afc1e1997f4dba46572658170bb1902/test/Main.hs | haskell | SPDX - FileCopyrightText : 2022 >
SPDX - License - Identifier : MPL-2.0
module Main
( main
) where
import Universum
import Test.Tasty
import Tree (tests)
main :: IO ()
main = tests >>= defaultMain
| |
f787407e0862cd1ccbac85199bf616780b28d163e4c1eff17f869acfc48994ab | aiya000/haskell-examples | gtgt.hs | firstLeftOrLastRight :: [Either e a] -> Either e a
firstLeftOrLastRight = foldr1 (>>)
main :: IO ()
main = do
let rights = [Right 1, Right 2, Right 3, Right 4] :: [Either String Int]
let someLeft = [Right 1, Right 2, Left "oops!", Right 4]
print $ foldr1 (>>) rights
print $ foldr1 (>>) someLeft
| null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Control/Monad/gtgt.hs | haskell | firstLeftOrLastRight :: [Either e a] -> Either e a
firstLeftOrLastRight = foldr1 (>>)
main :: IO ()
main = do
let rights = [Right 1, Right 2, Right 3, Right 4] :: [Either String Int]
let someLeft = [Right 1, Right 2, Left "oops!", Right 4]
print $ foldr1 (>>) rights
print $ foldr1 (>>) someLeft
| |
a679efd82622ffdb415e3b9f020353a77f929f6645a6936fe97ddf2abeea0cbe | cognitect-labs/day-of-datomic-cloud | required_rule_binding.clj | Copyright ( c ) Cognitect , Inc. All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be... | null | https://raw.githubusercontent.com/cognitect-labs/day-of-datomic-cloud/b1684c8d131942f0451185288ed65bc51ee2b81d/tutorial/required_rule_binding.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 ) Cognitect , Inc. All rights reserved .
(require '[datomic.client.api :as d])
(def client (d/client {:server-type :dev-local
:system "datomic-samples"}))
(def conn (d/connect client {:db-name "mbrainz-subset"}))
(d/db-stats (d/db conn))
{ : datoms 800958 }
(def rules '[[(... |
50004dac4e2c7c9946790892ab004176b5adcd880ae8e7dca67ae2d9aa76f634 | semilin/layoup | ace-vim-test.lisp |
(MAKE-LAYOUT :NAME "ace-vim-test" :MATRIX
(APPLY #'KEY-MATRIX '("jlhpgqkuo," "srncymteai" "zxbfwvd/;."))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/ace-vim-test.lisp | lisp |
(MAKE-LAYOUT :NAME "ace-vim-test" :MATRIX
(APPLY #'KEY-MATRIX '("jlhpgqkuo," "srncymteai" "zxbfwvd/;."))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | |
c3741510e29f25d3ddb1212989a748ee6cf52dceec898a43eb46b22929149766 | dm3/clojure.java-time | gen_test.clj | (ns java-time.dev.gen-test
(:require [clojure.test :refer [deftest is]]
[java-time.util :as jt.u]))
(jt.u/when-threeten-extra
(require 'java-time.dev.gen)
(deftest gen-test
(doseq [[source nsym] (doto @(resolve 'java-time.dev.gen/gen-source->nsym)
(-> not-empty assert)... | null | https://raw.githubusercontent.com/dm3/clojure.java-time/d43fa6b699afdaf559f7bd612b6ff14fe20151fd/test/java_time/dev/gen_test.clj | clojure | (ns java-time.dev.gen-test
(:require [clojure.test :refer [deftest is]]
[java-time.util :as jt.u]))
(jt.u/when-threeten-extra
(require 'java-time.dev.gen)
(deftest gen-test
(doseq [[source nsym] (doto @(resolve 'java-time.dev.gen/gen-source->nsym)
(-> not-empty assert)... | |
a9b86c558fd9998237388b7a9a16cef7bf7de06c606885f628ae71c701ab1e20 | sdiehl/elliptic-curve | BN254.hs | module Data.Curve.Weierstrass.BN254
( module Data.Curve.Weierstrass
, Point(..)
* BN254 curve
, module Data.Curve.Weierstrass.BN254
) where
import Protolude
import Data.Field.Galois
import GHC.Natural (Natural)
import Data.Curve.Weierstrass
-----------------------------------------------------------------... | null | https://raw.githubusercontent.com/sdiehl/elliptic-curve/445e196a550e36e0f25bd4d9d6a38676b4cf2be8/src/Data/Curve/Weierstrass/BN254.hs | haskell | -----------------------------------------------------------------------------
Types
-----------------------------------------------------------------------------
# INLINABLE a_ #
# INLINABLE h_ #
-----------------------------------------------------------------------------
Parameters
---------------------------------... | module Data.Curve.Weierstrass.BN254
( module Data.Curve.Weierstrass
, Point(..)
* BN254 curve
, module Data.Curve.Weierstrass.BN254
) where
import Protolude
import Data.Field.Galois
import GHC.Natural (Natural)
import Data.Curve.Weierstrass
| BN254 curve .
data BN254
| Field of points of BN254 curve... |
dc6560037f917764ba366f9bde768eec1eff538fd1de59946fbd7181629b5c45 | the-real-blackh/cassandra-cql | test-pool.hs | # LANGUAGE OverloadedStrings , DataKinds , ScopedTypeVariables #
import Control.Applicative ((<$>))
import Control.Concurrent (threadDelay, forkIO)
import Control.Concurrent.MVar
import Control.Exception (SomeException)
import Control.Monad (replicateM, forM, unless)
import Control.Monad.CatchIO (throw, catch)
import ... | null | https://raw.githubusercontent.com/the-real-blackh/cassandra-cql/681d900fadcede786d1008eac2270166ca915e8b/tests/test-pool.hs | haskell | Debug and higher goes to STDERR
Not properly exception safe, but good enough for a test.
wait long enough for all idle connections to be destroyed | # LANGUAGE OverloadedStrings , DataKinds , ScopedTypeVariables #
import Control.Applicative ((<$>))
import Control.Concurrent (threadDelay, forkIO)
import Control.Concurrent.MVar
import Control.Exception (SomeException)
import Control.Monad (replicateM, forM, unless)
import Control.Monad.CatchIO (throw, catch)
import ... |
3486b366247225f09edc83da759c78a4f1d765b6ee23300a681b9a8255d5f4d9 | GaloisInc/daedalus | StateT.hs | -- | This is convenient for writing parsers with a state that is
-- backtracked when the parser backtracks.
-- It is just a standard state transformer: we implement it here to
-- avoid dependency on an external library and orphan instances.
# Language BlockArguments , TypeFamilies #
module RTS.StateT
( StateT
, run... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/3f180d29441960e35386654ec79a2b205bddc157/rts-hs/src/RTS/StateT.hs | haskell | | This is convenient for writing parsers with a state that is
backtracked when the parser backtracks.
It is just a standard state transformer: we implement it here to
avoid dependency on an external library and orphan instances.
Strict
Strict in the state | # Language BlockArguments , TypeFamilies #
module RTS.StateT
( StateT
, runStateT
, liftS
, get
, set, sets, sets_
) where
import Control.Monad(liftM,ap)
import RTS.ParserAPI
newtype StateT s m a = S (s -> m (a,s))
runStateT :: s -> StateT s m a -> m (a,s)
runStateT s (S m) = m s
instance Monad m => Fu... |
ba257caf1df39269a556beffc42dacc9f03753b5a5c05447e5089d625d4b6378 | aprolog-lang/aprolog | util.ml |
exception Impos of string;;
exception Error of string;;
exception RuntimeError of string;;
exception NYI;;
type 'a equal = 'a -> 'a -> bool;;
let warning msg = print_endline ("Warning: "^msg);;
let error msg = raise (Error msg);;
let runtime_error msg = raise (RuntimeError msg);;
let nyi () = raise NYI;;
l... | null | https://raw.githubusercontent.com/aprolog-lang/aprolog/410327a615919eb6827d71661e69de14279b8c50/src/util.ml | ocaml | 0 <= i <= j <= n
j < n
0 <= j <= n |
exception Impos of string;;
exception Error of string;;
exception RuntimeError of string;;
exception NYI;;
type 'a equal = 'a -> 'a -> bool;;
let warning msg = print_endline ("Warning: "^msg);;
let error msg = raise (Error msg);;
let runtime_error msg = raise (RuntimeError msg);;
let nyi () = raise NYI;;
l... |
743a809ba4901c9bd784d60567a531c62a1880a760efd86ca7156868f30dd5bb | charlieg/Sparser | directions.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1995 - 1999 -- all rights reserved
;;;
;;; File: "directions"
Module : " : places : "
version : 0.1 November 1999
initiated in 1/9/95 . Added string printer 1/9/96 .
0.1 ( 11/25/99 ) Changed the realizations... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/core/places/directions.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "directions"
and flushed the treatment of prepositions that take np complements
over to its own file [spatial prepositions] with their category
object ] . Broke out the two types as their own subcategories
---------------------
uni... | copyright ( c ) 1995 - 1999 -- all rights reserved
Module : " : places : "
version : 0.1 November 1999
initiated in 1/9/95 . Added string printer 1/9/96 .
0.1 ( 11/25/99 ) Changed the realizations to use the new schema protocol
(in-package :sparser)
(define-category direction
:instantiat... |
ce4932ca74314ea7dbd6b2bb19d0abea6a7f660f86ad93258773642ce580567d | rems-project/cerberus | pp_mem.mli | open Mem_common
val pp_pure_memop: pure_memop -> PPrint.document
val pp_memop: memop -> PPrint.document
val pp_pointer_value : pointer_value - > PPrint.document
val pp_integer_value : integer_value - > PPrint.document
val pp_integer_value_for_core : integer_value - > PPrint.document
val pp_mem_value : mem_val... | null | https://raw.githubusercontent.com/rems-project/cerberus/124c93f10cb4c235f6396adec82ebf9563daeb7e/ocaml_frontend/pprinters/pp_mem.mli | ocaml | open Mem_common
val pp_pure_memop: pure_memop -> PPrint.document
val pp_memop: memop -> PPrint.document
val pp_pointer_value : pointer_value - > PPrint.document
val pp_integer_value : integer_value - > PPrint.document
val pp_integer_value_for_core : integer_value - > PPrint.document
val pp_mem_value : mem_val... | |
080740d3d926f972f521f0e0b1c1aea3dd8d4fa55f451af67976968f50be8c48 | jarohen/chord | project.clj | (defproject jarohen/chord.example ""
:description "An example project to show Chord in action"
:url "-henderson/chord/example-project"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/tools.reader "0.9.2"]
... | null | https://raw.githubusercontent.com/jarohen/chord/5db71fd7ae8be04bd64ccc8b800a76e74fc59e69/example-project/project.clj | clojure | (defproject jarohen/chord.example ""
:description "An example project to show Chord in action"
:url "-henderson/chord/example-project"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/tools.reader "0.9.2"]
... | |
98a19edadbf42ce8627dba60d0e4e18dfaf43b118a840814df365a5a9b3c295b | mbj/stratosphere | MsSmoothGroupSettingsProperty.hs | module Stratosphere.MediaLive.Channel.MsSmoothGroupSettingsProperty (
module Exports, MsSmoothGroupSettingsProperty(..),
mkMsSmoothGroupSettingsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Str... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/medialive/gen/Stratosphere/MediaLive/Channel/MsSmoothGroupSettingsProperty.hs | haskell | # SOURCE # | module Stratosphere.MediaLive.Channel.MsSmoothGroupSettingsProperty (
module Exports, MsSmoothGroupSettingsProperty(..),
mkMsSmoothGroupSettingsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.Resou... |
9de12b06b69da52bc26e2bb5c9ed19113f9108cc761fb04a7f2b4fd89950dc81 | evturn/haskellbook | 25.08-identity-t.hs | # LANGUAGE InstanceSigs #
newtype IdentityT f a = IdentityT
{ runIdentityT :: f a
} deriving (Eq, Show)
instance Functor m => Functor (IdentityT m) where
fmap f (IdentityT fa) = IdentityT (fmap f fa)
instance Applicative m => Applicative (IdentityT m) where
pure x = IdentityT (pure x)
IdentityT fab <*>... | null | https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/25/25.08-identity-t.hs | haskell | # LANGUAGE InstanceSigs #
newtype IdentityT f a = IdentityT
{ runIdentityT :: f a
} deriving (Eq, Show)
instance Functor m => Functor (IdentityT m) where
fmap f (IdentityT fa) = IdentityT (fmap f fa)
instance Applicative m => Applicative (IdentityT m) where
pure x = IdentityT (pure x)
IdentityT fab <*>... | |
feb600b2ca1f1a5bf07b6881628c60fc452edcf497bcc8b1704b6b59e2e3d0c4 | kbaird/consensus | four_candidates_test.erl | -module('four_candidates_test').
-author('Kevin C. Baird').
-include_lib("eunit/include/eunit.hrl").
four_candidates_setup() -> ok.
four_candidates_teardown(_) -> ok.
four_candidates_test_() ->
{setup, fun four_candidates_setup/0,
fun four_candidates_teardown/1,
[
fun ... | null | https://raw.githubusercontent.com/kbaird/consensus/37a8e1e502435c8537e5dd3d3dff23bec5b95e2f/test/four_candidates_test.erl | erlang | PRIVATE FUNCTIONS | -module('four_candidates_test').
-author('Kevin C. Baird').
-include_lib("eunit/include/eunit.hrl").
four_candidates_setup() -> ok.
four_candidates_teardown(_) -> ok.
four_candidates_test_() ->
{setup, fun four_candidates_setup/0,
fun four_candidates_teardown/1,
[
fun ... |
a893588423219d8495f9609fec2c17f30f14b7345d14aacdc1fed933c1b06ab9 | s3team/uroboros | ail.ml | open Batteries
open Type
open Ail_parser
open Pp_print
open Reassemble
open Reassemble_symbol_get
open Cfg
open Cg
open Ail_utils
class ail =
object (self)
val mutable funcs : func list = []
val mutable secs: section list = []
val mutable intrs: string list = []
val mutable instrs_list: instr list = []
... | null | https://raw.githubusercontent.com/s3team/uroboros/cdb379a4678ba912bde5d53f7302ad9409abee71/src/ail.ml | ocaml | in stripped binary, any user functions' information has been stripped
* so slicing function class really does the job
currently we just dump the extern function info
self#ehframe_dump;
self#excpt_tbl_dump;
| open Batteries
open Type
open Ail_parser
open Pp_print
open Reassemble
open Reassemble_symbol_get
open Cfg
open Cg
open Ail_utils
class ail =
object (self)
val mutable funcs : func list = []
val mutable secs: section list = []
val mutable intrs: string list = []
val mutable instrs_list: instr list = []
... |
32b6cad06895790a76ee920445fee3f1e753a2d10954e15e062997f2456e33ae | boomerang-lang/boomerang | prefs.mli | Unison file synchronizer : src / ubase / prefs.mli
$ I3 : Copyright 1999 - 2002 ( see COPYING for details ) $
type 'a t
val read : 'a t -> 'a
val set : 'a t -> 'a -> unit
val name : 'a t -> string list
val outputPref : string t
val lensPref : string list t
val sourcePref : string list t
val viewPref : string l... | null | https://raw.githubusercontent.com/boomerang-lang/boomerang/b42c2bfc72030bbe5c32752c236c0aad3b17d149/ubase/prefs.mli | ocaml | Convenient functions for registering simple kinds of preferences. Note
that createStringPref creates a preference that can only be set once,
while createStringListPref creates a reference to a list of strings that
accumulates a list of values.
preference name... | Unison file synchronizer : src / ubase / prefs.mli
$ I3 : Copyright 1999 - 2002 ( see COPYING for details ) $
type 'a t
val read : 'a t -> 'a
val set : 'a t -> 'a -> unit
val name : 'a t -> string list
val outputPref : string t
val lensPref : string list t
val sourcePref : string list t
val viewPref : string l... |
2a40c39a63ad9ad955f85d005250f795ec8ad581949fc37d8373ab58962bf8e5 | dtqec/aether | network.lisp | ;;;; tests/network.lisp
(in-package #:aether-tests)
(deftest test-courier-grid ()
"Instantiates a grid of couriers, opens a mailbox on each, and sends an all-to-all batch of messages."
;; set up couriers
(let* ((grid-width 5)
(couriers (make-courier-grid grid-width grid-width))
(mailboxes (mak... | null | https://raw.githubusercontent.com/dtqec/aether/bb1de4e9165945d143ad274a37d8bf19d68f0c1a/tests/network.lisp | lisp | tests/network.lisp
set up couriers
set up mailboxes
drop messages into system
run the simulation 'til we see n^2 messages in every mailbox |
(in-package #:aether-tests)
(deftest test-courier-grid ()
"Instantiates a grid of couriers, opens a mailbox on each, and sends an all-to-all batch of messages."
(let* ((grid-width 5)
(couriers (make-courier-grid grid-width grid-width))
(mailboxes (make-array (list grid-width grid-width)))
... |
36ea2b7bc74f883fc498a27eb29510a2f22f9cb64cc66df6043cdcaa310dc034 | gerritjvv/kafka-fast | topics_tests.clj | (ns kafka-clj.topics-tests
(:require [kafka-clj.topics :as topics]
[kafka-clj.test-utils :as utils]
[kafka-clj.tcp :as tcp]
[kafka-clj.client :as client])
(:use midje.sweet))
(defonce state (atom nil))
(defn start-resources! []
(swap! state (constantly (utils/startup-kafka)... | null | https://raw.githubusercontent.com/gerritjvv/kafka-fast/fd149d8744c8100b2a8f4d09f1a251812e7baf6a/kafka-clj/test/kafka_clj/topics_tests.clj | clojure |
send a message to trigger the topic creation | (ns kafka-clj.topics-tests
(:require [kafka-clj.topics :as topics]
[kafka-clj.test-utils :as utils]
[kafka-clj.tcp :as tcp]
[kafka-clj.client :as client])
(:use midje.sweet))
(defonce state (atom nil))
(defn start-resources! []
(swap! state (constantly (utils/startup-kafka)... |
dfc2f03382e9e652f53df03f0387fe78992e8ce02dd8b0a6e32a601c3e001368 | PDP-10/panda | zbabyl.lisp | ;;; -*- Mode:LISP; Package:ZBABYL-INTERNALS; -*-
(DEFINE-FILTER Expired
"expired mail"
(PRECEDES EXPIRATION-DATE))
(DEFINE-FILTER After-Startup
"recent mail and reminders"
(OR (LABEL "recent") (FILTER-CALL "Reminders")))
(DEFINE-FILTER Reminders
"reminders"
(AND
(NOT (LABEL "deleted"))
... | null | https://raw.githubusercontent.com/PDP-10/panda/522301975c062914ea3d630a1daefde261ddf590/files/emacs/zbabyl.lisp | lisp | -*- Mode:LISP; Package:ZBABYL-INTERNALS; -*-
|
(DEFINE-FILTER Expired
"expired mail"
(PRECEDES EXPIRATION-DATE))
(DEFINE-FILTER After-Startup
"recent mail and reminders"
(OR (LABEL "recent") (FILTER-CALL "Reminders")))
(DEFINE-FILTER Reminders
"reminders"
(AND
(NOT (LABEL "deleted"))
(OR
(LABEL "RemindNow")
(AND
(PR... |
2a195695ccb963132e6ef0ea3255b47cf7f511a5f51445e5b90cdc63a4454d2a | mrphlip/aoc | 18.hs | # OPTIONS_GHC -Wno - tabs #
import Data.Maybe
import qualified Text.ParserCombinators.ReadP as P
import Control.Exception
import Control.Monad
import GHC.Base ((<|>))
import Utils
import Debug.Trace
data Node = Pair Node Node | Regular Integer deriving (Eq)
getInput :: IO [Node]
getInput = do
dat <- readFile "18.txt... | null | https://raw.githubusercontent.com/mrphlip/aoc/d9ea2ac5476c80aa1bb62afb624383b9b3f1cc33/2021/18.hs | haskell | # OPTIONS_GHC -Wno - tabs #
import Data.Maybe
import qualified Text.ParserCombinators.ReadP as P
import Control.Exception
import Control.Monad
import GHC.Base ((<|>))
import Utils
import Debug.Trace
data Node = Pair Node Node | Regular Integer deriving (Eq)
getInput :: IO [Node]
getInput = do
dat <- readFile "18.txt... | |
23d2b74c867266a8d6d6f41f3ff68eb613ed7c658bfe99381fac730714e9436c | jinluchang/LibPNG-haskell | Main.hs | module Main where
import Codec.Image.LibPNG
spectrum :: [[Pixel]]
spectrum = replicate 40 $ map (\g -> colorPixel 255 255 g 0) [0..255]
++ map (\r -> colorPixel 255 r 255 0) [254,253..1]
++ map (\b -> colorPixel 255 0 255 b) [0..255]
... | null | https://raw.githubusercontent.com/jinluchang/LibPNG-haskell/03357eace9fa89f0894ba81ef07e81a16b3c0fcd/src/Main.hs | haskell | module Main where
import Codec.Image.LibPNG
spectrum :: [[Pixel]]
spectrum = replicate 40 $ map (\g -> colorPixel 255 255 g 0) [0..255]
++ map (\r -> colorPixel 255 r 255 0) [254,253..1]
++ map (\b -> colorPixel 255 0 255 b) [0..255]
... | |
60486c72dd238d5c19426141d3c0ea7434bd0a1f42f156f1ee99bb1413c5b8da | aliaksandr-s/prototyping-with-clojure | core.clj | (ns visitera.db.core
(:require
[datomic.api :as d]
[io.rkn.conformity :as c]
[mount.core :refer [defstate]]
[visitera.config :refer [env]]))
(defstate conn
:start (do (-> env :database-url d/create-database) (-> env :database-url d/connect))
:stop (-> conn .release))
(defn install-schema
"This... | null | https://raw.githubusercontent.com/aliaksandr-s/prototyping-with-clojure/e1f90bf66c315de1dfa72624895637f1c609c42e/app/chapter-04/start/visitera/src/clj/visitera/db/core.clj | clojure | find Specifications using ':find ?a .' will return single scalar | (ns visitera.db.core
(:require
[datomic.api :as d]
[io.rkn.conformity :as c]
[mount.core :refer [defstate]]
[visitera.config :refer [env]]))
(defstate conn
:start (do (-> env :database-url d/create-database) (-> env :database-url d/connect))
:stop (-> conn .release))
(defn install-schema
"This... |
daadba565d1c5efdd7510c0e57f796fe0eda7b0e7c9a777ebdcf75ec5f0fbf35 | mbenelli/gambit-sqlite3 | sqlite3-ffi.scm | ;; Gambit-c's sqlite3 binding. Low-level interface.
;;
Copyright ( C ) 2008 < >
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
;; Redistributions of source code must retain the above copyright
;; no... | null | https://raw.githubusercontent.com/mbenelli/gambit-sqlite3/18dc75386508b35a806b06ffe65149f27f0db1d4/sqlite3-ffi.scm | scheme | Gambit-c's sqlite3 binding. Low-level interface.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following ... | Copyright ( C ) 2008 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
HOLDERS OR FOR ANY DIRECT , INDIRECT ,
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING ,
AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT
(c-declare #<<C-END
#include <sq... |
b57c3456c5977d42597091609fef8a67f002c7efd090f63274415a0ba71dca60 | rtoy/cmucl | echo.lisp | -*- Log : hemlock.log ; Package : Hemlock - Internals -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/hem... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/hemlock/echo.lisp | lisp | Package : Hemlock - Internals -*-
**********************************************************************
**********************************************************************
Variables that control parsing:
This function is called if someone does stuff in the echo area when
we aren't inside a parse. It... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/hemlock/echo.lisp $")
Hemlock Echo Area stuff .
Written by and .
Modified by .
(in-package "HEMLOCK-INTERNALS")
(export '(*echo-area-b... |
95a05f7e269a6ad428be2f12760cbf4b18b7e4219089cc53bc05ca7bfcb0f66b | gregr/experiments | database.rkt | #lang racket
(provide
database-empty
database-update
interaction-command
interactions-empty
interactions-new
workspace-command
workspaces-empty
workspaces-new
)
(module+ test-support
(provide
test-dbs-new
))
(require
"interaction-model.rkt"
"workspace-model.rkt"
(submod "interaction-... | null | https://raw.githubusercontent.com/gregr/experiments/cd4c7953f45102539081077bbd6195cf834ba2fa/supercompilation/cog/database.rkt | racket | {workspaces: {name => workspace}, interactions: {name => interaction}, ...} | #lang racket
(provide
database-empty
database-update
interaction-command
interactions-empty
interactions-new
workspace-command
workspaces-empty
workspaces-new
)
(module+ test-support
(provide
test-dbs-new
))
(require
"interaction-model.rkt"
"workspace-model.rkt"
(submod "interaction-... |
f712526c227b9944be69fd6282a42b7a3096ced4be10ebe4b2e2bcabc08c8a87 | AshleyYakeley/Truth | Streamable.hs | module Data.Streamable where
import Data.Filterable
import Shapes.Import
import qualified Text.ParserCombinators.ReadP as ReadP
import qualified Text.ParserCombinators.ReadPrec as ReadPrec
class (Riggable f, Monoid (StreamableBasis f)) => Streamable f where
type StreamableBasis f :: Type
rItem :: f (Element (... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/5419656ee674793da8e344776576aca2196351af/Changes/shapes/src/Data/Streamable.hs | haskell | (<++>) :: forall a. m a -> m a -> m a
(<++>) = (ReadPrec.<++>) | module Data.Streamable where
import Data.Filterable
import Shapes.Import
import qualified Text.ParserCombinators.ReadP as ReadP
import qualified Text.ParserCombinators.ReadPrec as ReadPrec
class (Riggable f, Monoid (StreamableBasis f)) => Streamable f where
type StreamableBasis f :: Type
rItem :: f (Element (... |
504c61fe3e4aa43c70e784afbcd222d90b45316e7778fb65408f25b44fb8aa5a | miraj-project/miraj | config.clj | (ns co-ns.config
(:require [miraj :refer [config >> >>!]] :reload)
(:require [miraj.markup :as ml] :reload)
(:require [miraj.html :as h]
[miraj.http.response :refer [not-found]]))
(miraj/config :sync)
(remove-ns 'co-ns.meta-test)
(require '[co-ns.meta-test] :reload)
(ml/pprint
:html
(:co-config (m... | null | https://raw.githubusercontent.com/miraj-project/miraj/bf6f7d4d1c383ac9294dcdef2ad48b3863b6d84f/test/co_ns/config.clj | clojure | >> : OBSERVE THEN EXHIBIT
GET: >>
(>> $ hello.world/main)
(>> employee hello.world/employee)
(>> foo.bar hello.world/f1)
(>> foo.bar.baz hello.world/f2)
(>> dump hello.world/dump)
; multi - arity fns
;; (>> multi hello.world/multiarity)
;; to get entire rqst as arg, use a lambda wrapper:
; myfn will be pass... | (ns co-ns.config
(:require [miraj :refer [config >> >>!]] :reload)
(:require [miraj.markup :as ml] :reload)
(:require [miraj.html :as h]
[miraj.http.response :refer [not-found]]))
(miraj/config :sync)
(remove-ns 'co-ns.meta-test)
(require '[co-ns.meta-test] :reload)
(ml/pprint
:html
(:co-config (m... |
1b410dfe8c58bd75ad4f610805d98a86bbe817112ae25e1c2dda92bda8e07877 | TrustInSoft/tis-kernel | VC.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/VC.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
dd83fd831767c7b24c86041370887bf75c1532347978e04250e7387fd67507be | xapi-project/xen-api | cpuid_helpers.ml |
* Copyright ( C ) 2006 - 2012 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 describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/fa6f118fb512a2c90159368a1a0bc1cc730c895b/ocaml/xapi/cpuid_helpers.ml | ocaml | * Calculate the features that are missing from [right],
* but present in [left]
* is_subset left right returns true if left is a subset of right
* is_strict_subset left right returns true if left is a strict subset of right
(left is a subset of right, but left and right are not equal)
* Field definitions for c... |
* Copyright ( C ) 2006 - 2012 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 describe... |
56910766051620f674010c6e4567db1ddc0ee1d96431786eb8ef3cf40d57ab2c | xu-hao/QueryArrow | Serialize.hs | # LANGUAGE TypeFamilies , MultiParamTypeClasses , ExistentialQuantification , FlexibleInstances , StandaloneDeriving , DeriveFunctor , UndecidableInstances , DeriveGeneric ,
RankNTypes , FlexibleContexts , GADTs , PatternSynonyms , ScopedTypeVariables #
RankNTypes, FlexibleContexts, GADTs, PatternSynonyms, Scop... | null | https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/QueryArrow-common/src/QueryArrow/Syntax/Serialize.hs | haskell | # LANGUAGE TypeFamilies , MultiParamTypeClasses , ExistentialQuantification , FlexibleInstances , StandaloneDeriving , DeriveFunctor , UndecidableInstances , DeriveGeneric ,
RankNTypes , FlexibleContexts , GADTs , PatternSynonyms , ScopedTypeVariables #
RankNTypes, FlexibleContexts, GADTs, PatternSynonyms, Scop... | |
04f8335f17f17bc620094451f7dde115cdb160db7f542c6a428068b54be991e7 | tautologico/progfun | exercicio8.rkt | #lang racket
(require rackunit rackunit/text-ui)
;;
Exercício 8 - Características imperativas em Racket
;;
;;
Neste exercício explorar o uso de características imperativas na
. Racket é
híbrida ou " puramente funcional " .
aspectos problemáticos , a intenção é dizer que Racket permite o
... | null | https://raw.githubusercontent.com/tautologico/progfun/0e8b2985e48445d289fa96f27c2485710c356709/exercicios/exercicio8.rkt | racket |
(display #f)
(display "hello!")
O especificador de formato ~a pode ser usado com a maioria dos
valores em Racket.
em uma definição de função,
(define (f x)
e1
e2)
for é bastante
e)
--- Questão 3 - Vector (arrays) ------------------------------
caractere #, por exemplo:
um vector:
--- Questão ... | #lang racket
(require rackunit rackunit/text-ui)
Exercício 8 - Características imperativas em Racket
Neste exercício explorar o uso de características imperativas na
. Racket é
híbrida ou " puramente funcional " .
aspectos problemáticos , a intenção é dizer que Racket permite o
livre das... |
f6e4a0fbd3f49d279a848a6923c9c1e8cfaf36dbea276733eee88987f6661bfd | avsm/platform | opamAdminCheck.ml | (**************************************************************************)
(* *)
Copyright 2017 - 2018 OCamlPro
(* *)
(* All right... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/client/opamAdminCheck.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2017 - 2018 OCamlPro
GNU Lesser General Public License version 2.1 , with the special
open OpamTypes
open OpamPackage.Set.Op
let env ~with_test ~with_doc ~dev nv v =
match OpamVariable.Full.scope v,
OpamVariable.(to_string (Full.variable v))
... |
b26cba364ca013ad2121d0deb2bea04c89f5ef7b8b9221563d38eb126e5e8fcf | GlideAngle/flare-timing | TestNewtypes.hs | {-# OPTIONS_GHC -fplugin Data.UnitsOfMeasure.Plugin #-}
module TestNewtypes where
-- NOTE: Avoid orphan instance warnings with these newtypes.
import Test.SmallCheck.Series as SC
import Test.Tasty.QuickCheck as QC
import Data.UnitsOfMeasure (u)
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.LatLng... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/task/test-suite-task/TestNewtypes.hs | haskell | # OPTIONS_GHC -fplugin Data.UnitsOfMeasure.Plugin #
NOTE: Avoid orphan instance warnings with these newtypes. |
module TestNewtypes where
import Test.SmallCheck.Series as SC
import Test.Tasty.QuickCheck as QC
import Data.UnitsOfMeasure (u)
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.LatLng (Lat(..), Lng(..), LatLng(..))
import Flight.Zone (Radius(..), Incline(..), Bearing(..), Zone(..))
newtype Haversin... |
db21ca2aa7072606ab62331ab93a7976a19d4033c8b6e9c699affbe2c74385dc | johnwhitington/ocamli | letrecand.ml | let rec f x = x + 1
and g y = if y = 10 then 0 else f y
let p = g 0
| null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/newtype/programs/letrecand.ml | ocaml | let rec f x = x + 1
and g y = if y = 10 then 0 else f y
let p = g 0
| |
308c396e5d1997ed7326992229d11d5cc7a7c3de245f7d92c15a18916d9bb3c5 | seckcoder/iu_c311 | store.rkt | #lang eopl
; another impl modeling store based on scheme's own store
(require "../base/utils.rkt")
(provide (all-defined-out))
(define empty-store
(lambda ()
'()))
(define the-store '())
(define initialize-store!
(lambda ()
(set! the-store (empty-store))))
(define get-store
(lambda ()
the-store)... | null | https://raw.githubusercontent.com/seckcoder/iu_c311/a1215983b6ab08df32058ef1e089cb294419e567/racket/thread2/store.rkt | racket | another impl modeling store based on scheme's own store | #lang eopl
(require "../base/utils.rkt")
(provide (all-defined-out))
(define empty-store
(lambda ()
'()))
(define the-store '())
(define initialize-store!
(lambda ()
(set! the-store (empty-store))))
(define get-store
(lambda ()
the-store))
(define reference?
(lambda (ref)
(number? ref)))
... |
b0f39e3495f4181ad54370c81ba491b8335277d2210dce2cd5aa8ae64dbaf923 | jrm-code-project/LISP-Machine | custom.lisp | -*- Mode : LISP ; : CL ; -*-
Dependancies : ( )
;;; ENVIRONMENTAL IMPACT STATEMENT
;;;
;;; This program was written on recycled memory.
;;; No cons cells were created.
;;;
JRM 's customization .
DEFSYNONYM
(defmacro defsynonym (new-name old-name)
"New-name is a subst for old-name. Uses rest arg so be ... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/jrm/custom.lisp | lisp | : CL ; -*-
ENVIRONMENTAL IMPACT STATEMENT
This program was written on recycled memory.
No cons cells were created.
P REMOVAL
RANDOMNESS
ALIKE
Makes an object eq? to nothing but itself.
DEFCONSTANT-NOW
BINARY-FUNCTION->LEFT-ASSOCIATING-LEXPR
VALUES-VALUES
FORMAT-UNREADABLE
CHECK-SPLIT-LIST
TIMING
End ... |
Dependancies : ( )
JRM 's customization .
DEFSYNONYM
(defmacro defsynonym (new-name old-name)
"New-name is a subst for old-name. Uses rest arg so be careful."
`(DEFSUBST ,new-name (&REST ARGUMENTS)
(APPLY (FUNCTION ,old-name) ARGUMENTS))
)
(defsynonym array-in-bounds? array-in-bounds-p)
(defsyno... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.