_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 |
|---|---|---|---|---|---|---|---|---|
dda1f5678ac0b311f85e62ce4510b54d1e06e7d2aeca7c9a01b51ea69620fa70 | theronic/eacl | exceptions.clj | (ns eacl.exceptions)
| null | https://raw.githubusercontent.com/theronic/eacl/e9913b646bbc2d4492994ce2c67a365e53b0e76c/clj-eacl/src/eacl/exceptions.clj | clojure | (ns eacl.exceptions)
| |
2d0b0cd865dc267b78919f8454eea29464dda6e8bb0e6659b6c726e9401393a0 | let-def/lrgrep | test_ko_05.ml | (* -error-compiling-code-with-functor-module/6352 *)
let () = module P = Csv(ShowInt)
| null | https://raw.githubusercontent.com/let-def/lrgrep/29e64174dc9617bcd1871fd2e4fd712269568324/demo/test_ko_05.ml | ocaml | -error-compiling-code-with-functor-module/6352 | let () = module P = Csv(ShowInt)
|
de953d6ca9a6257be158c2f6f0a3900947b368a9e7bc38f81fa91ffe9f269150 | input-output-hk/ouroboros-network | LeaderSchedule.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE RecordWildCards #
{-# LANGUAGE TypeFamilies #-}
module Ouroboros.Consensus.Protocol.LeaderSchedule (
LeaderSchedule (..)
, leaderScheduleFor
) where
import... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/54cd34e68afafe957feef485ceaee3171efb0693/ouroboros-consensus/src/Ouroboros/Consensus/Protocol/LeaderSchedule.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE TypeFamilies #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------------------------------}
| The 'Slots' a given... | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE RecordWildCards #
module Ouroboros.Consensus.Protocol.LeaderSchedule (
LeaderSchedule (..)
, leaderScheduleFor
) where
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map... |
a19455c0e7168abd05ee04c2e87436138517917648d2914edb9eb494aeb14aef | ddmcdonald/sparser | non-academic-cells.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER COMMON-LISP) -*-
Copyright ( c ) 2014 - 2021 SIFT LLC . All Rights Reserved
;;;
;;; File: "non-academic-cells"
;;; Module: "grammar/model/sl/biology/
version : October 2021
;; broken out from cells and new-defs/new-cells
(def-indiv-with-id cell-type "hos... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/4bb59f0989152f059f7b008ca4bfd89501bae04c/Sparser/code/s/grammar/model/sl/biology/non-academic-cells.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER COMMON-LISP) -*-
File: "non-academic-cells"
Module: "grammar/model/sl/biology/
broken out from cells and new-defs/new-cells
reproductive cells
brain cells/neurons
should probably be category
should be category
retinal glia
blood/immune cells
"TS-0819"
... | Copyright ( c ) 2014 - 2021 SIFT LLC . All Rights Reserved
version : October 2021
(def-indiv-with-id cell-type "host cell" "GO:0043657" :name "host cell")
should be category , also SC is confounding
(def-indiv-with-id cell-type "embryonic stem cell" "TS-0263")
(def-indiv-with-id cell-type "gamete" "CO:000030... |
ec85dceeaab8d2b24c68fde44fb1529c5d5ab04e9b9abf56a4cff951545d82e0 | amnh/PCG | Custom.hs | ------------------------------------------------------------------------------
-- |
-- Module : Control.Parallel.Custom
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
----------------------------------... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/utility/src/Control/Parallel/Custom.hs | haskell | ----------------------------------------------------------------------------
|
Module : Control.Parallel.Custom
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
# LANGUAGE FlexibleContext... | Copyright : ( c ) 2015 - 2021 Ward Wheeler
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Control.Parallel.Custom
( parmap
, parZipWith
, parZipWith3
) where
import Control.Parallel.Strategies
import Data.Key
import Prelude hiding (zipWith)
Shoul... |
214cca5d0f558458206b137df85d6b23aa54032ee82d9ff9ac01644d7b5059d8 | linyinfeng/myml | Syntax.hs | module Myml.Lang.Syntax
( TopLevel (..),
)
where
import Myml.Syntax
data TopLevel
= TopBind VarName Term
| TopTerm Term
| TopImport String
| null | https://raw.githubusercontent.com/linyinfeng/myml/c90446431caeebd4b67f9b6a7a172a70b92f138f/src/Myml/Lang/Syntax.hs | haskell | module Myml.Lang.Syntax
( TopLevel (..),
)
where
import Myml.Syntax
data TopLevel
= TopBind VarName Term
| TopTerm Term
| TopImport String
| |
146d927f887569b93b3413243371bc7109efa1af77266c932a5ee39dc516dd0d | babashka/babashka | exec_test.clj | (ns babashka.exec-test
(:require
[babashka.test-utils :as u]
[cheshire.core :as cheshire]
[clojure.edn :as edn]
[clojure.test :as t :refer [deftest is testing]]))
(defn bb [& args]
(apply u/bb nil args))
(deftest exec-test
(is (= {:foo 1} (edn/read-string (bb "-x" "prn" "--foo" "1"))))
(is (thrown... | null | https://raw.githubusercontent.com/babashka/babashka/9b21986f0505e62c6e4f7214810035dbe876f2bd/test/babashka/exec_test.clj | clojure | (ns babashka.exec-test
(:require
[babashka.test-utils :as u]
[cheshire.core :as cheshire]
[clojure.edn :as edn]
[clojure.test :as t :refer [deftest is testing]]))
(defn bb [& args]
(apply u/bb nil args))
(deftest exec-test
(is (= {:foo 1} (edn/read-string (bb "-x" "prn" "--foo" "1"))))
(is (thrown... | |
1462b8186cce2f1ea4e76b387e8627783612545dfc34edd7cfa46e7c16fd8cfb | shirok/Gauche-lisp15 | mexpr-env.scm | ;;
;; A helper tool to convert definitions M-expr source into an assoc list.
;;
(use gauche.parseopt)
(add-load-path ".." :relative)
(define (usage)
(print "Usage: gosh tools/axiom-env [-e] MEXPR-SOURCE ...")
(print " Read MEXPR-SOURCE and writes out the definitions in an assoc list")
(print " that can be pas... | null | https://raw.githubusercontent.com/shirok/Gauche-lisp15/d40163e6aa473608dd38a23f9cb67f13af676722/tools/mexpr-env.scm | scheme |
A helper tool to convert definitions M-expr source into an assoc list.
|
(use gauche.parseopt)
(add-load-path ".." :relative)
(define (usage)
(print "Usage: gosh tools/axiom-env [-e] MEXPR-SOURCE ...")
(print " Read MEXPR-SOURCE and writes out the definitions in an assoc list")
(print " that can be passed to EVAL as an environment.")
(print " With -e option, generate a defini... |
0b0a8abffa374bbe272b78160fc92b794645e00d6f020a1ff55cd57554ce0b7b | TyOverby/mono | eval.mli | open! Core
open! Import
val eval
: environment:Environment.t
-> path:Path.t
-> clock:Incr.Clock.t
-> model:'model Incr.t
-> inject_dynamic:('dynamic_action -> unit Effect.t)
-> inject_static:('static_action -> unit Effect.t)
-> ('model, 'dynamic_action, 'static_action, 'result) Computation.t
-> ('mode... | null | https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-bonsai/src/eval.mli | ocaml | open! Core
open! Import
val eval
: environment:Environment.t
-> path:Path.t
-> clock:Incr.Clock.t
-> model:'model Incr.t
-> inject_dynamic:('dynamic_action -> unit Effect.t)
-> inject_static:('static_action -> unit Effect.t)
-> ('model, 'dynamic_action, 'static_action, 'result) Computation.t
-> ('mode... | |
472a7b1ce02b295165ff9352d392f5b64bb6b1be5f0860938b3d3d0d0bc6e341 | synduce/Synduce | minmax.ml | type 'a tree = Node of 'a * 'a tree * 'a tree | Leaf of 'a
let rec spec t = f t
and f = function
| Leaf x -> (x, x)
| Node (a, l, r) ->
let amin, amax = g (a, a) l in
g (amin, amax) r
and g s = function
| Leaf x ->
let amin, amax = s in
(min amin x, max amax x)
| Node (a, l, r) ->
... | null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/tree/minmax.ml | ocaml | type 'a tree = Node of 'a * 'a tree * 'a tree | Leaf of 'a
let rec spec t = f t
and f = function
| Leaf x -> (x, x)
| Node (a, l, r) ->
let amin, amax = g (a, a) l in
g (amin, amax) r
and g s = function
| Leaf x ->
let amin, amax = s in
(min amin x, max amax x)
| Node (a, l, r) ->
... | |
f3882c04a732e1dd920908f06b6856cc1a943806284cda10d57929343019bf59 | yetibot/core | karma.clj | (ns yetibot.core.models.karma
(:require
[yetibot.core.db.karma :as db]
[clj-time.coerce :as time.coerce]))
(defn add-score-delta!
[{uuid :uuid room :room} user-id voter-id points note]
(db/create {:chat-source-adapter (pr-str uuid)
:chat-source-room room
:user-id user-id
... | null | https://raw.githubusercontent.com/yetibot/core/e35cc772622e91aec3ad7f411a99fff09acbd3f9/src/yetibot/core/models/karma.clj | clojure | (ns yetibot.core.models.karma
(:require
[yetibot.core.db.karma :as db]
[clj-time.coerce :as time.coerce]))
(defn add-score-delta!
[{uuid :uuid room :room} user-id voter-id points note]
(db/create {:chat-source-adapter (pr-str uuid)
:chat-source-room room
:user-id user-id
... | |
016f5f9b7444cce0e133c6d2dbdd9acad51da1cc884c5cbe439e8d4184a0d731 | mejgun/haskell-tdlib | GetForumTopicDefaultIcons.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Query.GetForumTopicDefaultIcons where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- |
-- Returns list of custom emojis, which can be used as forum topic icon by all users
data GetForumTopicDefaultIcons = GetFor... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/d9868e9231a4ec23e4bcbf7f6627ff9f43acea21/src/TD/Query/GetForumTopicDefaultIcons.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
Returns list of custom emojis, which can be used as forum topic icon by all users |
module TD.Query.GetForumTopicDefaultIcons where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
data GetForumTopicDefaultIcons = GetForumTopicDefaultIcons
{
}
deriving (Eq)
instance Show GetForumTopicDefaultIcons where
show GetForumTopicDefaultIcons =
... |
9cd23edd6eabc4da785c9c3561360334b1c4df845b42b90fbe77a13c9660cc20 | oakes/edna | project.clj | (defproject enda "1.6.1-SNAPSHOT"
:description "A Clojure data -> music library"
:url ""
:license {:name "Public Domain"
:url ""}
:repositories [["clojars" {:url ""
:sign-releases false}]])
| null | https://raw.githubusercontent.com/oakes/edna/ca1928cd4190047aec486d2bcdc54d8d5a8bbf06/project.clj | clojure | (defproject enda "1.6.1-SNAPSHOT"
:description "A Clojure data -> music library"
:url ""
:license {:name "Public Domain"
:url ""}
:repositories [["clojars" {:url ""
:sign-releases false}]])
| |
07f71f8e2d00769eb63f26beafa5d2f19bd637ee4c3ae36d1f7b0ff522232fdb | rainyt/ocaml-haxe | set.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/rainyt/ocaml-haxe/9d0ab323c6857d7fe3ce89764a00921eff1a5aaf/ocaml-extern/ocaml/set.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module type OrderedType =
sig
type t
val compare: t -> t -> int
end
module type S =
sig
... |
704cfc9576a5411f8720924afaf7f2248fd0f349976788ef27228778841e78f1 | nasa/Common-Metadata-Repository | config.clj | (ns cmr.ous.components.config
(:require
[cmr.authz.components.config :as authz-config]
[cmr.exchange.common.components.config :as config]
[cmr.http.kit.components.config :as httpd-config]
[cmr.metadata.proxy.components.config :as metadata-config]
[cmr.metadata.proxy.config :as metadata-config-lib]
[... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/ous-plugin/src/cmr/ous/components/config.clj | clojure |
Utility Functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Config Component API ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The URLs returned by these functions have no trailing slash:
From the common config component
Component Lifecycle Implementation ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | (ns cmr.ous.components.config
(:require
[cmr.authz.components.config :as authz-config]
[cmr.exchange.common.components.config :as config]
[cmr.http.kit.components.config :as httpd-config]
[cmr.metadata.proxy.components.config :as metadata-config]
[cmr.metadata.proxy.config :as metadata-config-lib]
[... |
bdc76823424a250de771e2cb0bb5e3727e532db66a93e735969ab4e57bca0ead | testedminds/lein-topology | project.clj | (defproject lein-topology "0.3.0-SNAPSHOT"
:description "A Leiningen plugin that generates a project's function dependency structure matrix."
:url "-topology"
:license {:name "Apache License, Version 2.0"
:url "-2.0.html"}
:eval-in-leiningen true
:dependencies [[org.clojure/tools.namespace "0.2.11... | null | https://raw.githubusercontent.com/testedminds/lein-topology/fc85f9b7482ca9bf8e48f6c459034e5132cfe7f4/project.clj | clojure | (defproject lein-topology "0.3.0-SNAPSHOT"
:description "A Leiningen plugin that generates a project's function dependency structure matrix."
:url "-topology"
:license {:name "Apache License, Version 2.0"
:url "-2.0.html"}
:eval-in-leiningen true
:dependencies [[org.clojure/tools.namespace "0.2.11... | |
7f60e49cd4eec0529ebbd4138421ddaa2a5831f5df67ae7c49c786a3527ed494 | majelbstoat/Morgana | jfile.erl | -module(jfile).
-export([read/1, read/2]).
% Reads a file into a list of lines quickly.
read(FileName) ->
read(FileName, "\n").
read(FileName, Tokeniser) ->
{ok, Binary} = file:read_file(FileName),
string:tokens(binary_to_list(Binary), Tokeniser).
| null | https://raw.githubusercontent.com/majelbstoat/Morgana/a055ab916936648198ffffe2e6c12ddddd03bdef/src/jfile.erl | erlang | Reads a file into a list of lines quickly. | -module(jfile).
-export([read/1, read/2]).
read(FileName) ->
read(FileName, "\n").
read(FileName, Tokeniser) ->
{ok, Binary} = file:read_file(FileName),
string:tokens(binary_to_list(Binary), Tokeniser).
|
2be96f76f97297e7bc075e5d77a689ae07ec90c92e4236ab022b689ea28ae078 | tweag/asterius | T8472.hs | # LANGUAGE MagicHash #
module Main (f, main) where
import GHC.Exts(Ptr(..))
import Foreign.Ptr
-- We should be able to inline this function.
f :: Ptr Int -> Int -> Int
f =
let x = "foo"#
in \p n -> n + (Ptr x `minusPtr` p)
main :: IO ()
main = print $ x `mod` 2 == (x + 4) `mod` 2
where
x = go (10000::Int)... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/perf/T8472.hs | haskell | We should be able to inline this function. | # LANGUAGE MagicHash #
module Main (f, main) where
import GHC.Exts(Ptr(..))
import Foreign.Ptr
f :: Ptr Int -> Int -> Int
f =
let x = "foo"#
in \p n -> n + (Ptr x `minusPtr` p)
main :: IO ()
main = print $ x `mod` 2 == (x + 4) `mod` 2
where
x = go (10000::Int) 4
go 0 a = a
go n a = go (n-1) (f nul... |
3682e3517beff7622b1f97f23cce7855b74533f419bf7873c58db4a26754c836 | Leonidas-from-XIV/slacko | abbrtypes.ml | Slacko 's public interface does n't let us easily construct Slacko.user and
Slacko.channel values from JSON , and it does n't let us extract strings from
those values at all . Therefore , we copy the record type that use these and
skip the problematic fields .
Slacko.channel values from JSON, and it... | null | https://raw.githubusercontent.com/Leonidas-from-XIV/slacko/784c5b70f521b4bb50f757782bad681e53ec6b4a/test/abbrtypes.ml | ocaml | Wrap Yojson.Safe.t so we don't have to keep providing printers for it.
user_id: user;
creator: user;
id: channel;
creator: user;
members: user list;
user: user;
id: user;
TODO file id type
deprecated
user: user;
url: string;
url_download: string;
public_url_shared: ???;
channels: channel list... | Slacko 's public interface does n't let us easily construct Slacko.user and
Slacko.channel values from JSON , and it does n't let us extract strings from
those values at all . Therefore , we copy the record type that use these and
skip the problematic fields .
Slacko.channel values from JSON, and it... |
7d30ba45e06774030abb779a55d30ee4c7ac9c5acddba03c12db00efe733009f | MyDataFlow/ttalk-server | rec_props_test1.erl | Copyright 2010 - 2011 < > ,
< >
and < >
%%%
This file is part of PropEr .
%%%
%%% PropEr 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 o... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/proper/test/rec_props_test1.erl | erlang |
PropEr is free software: you can redistribute it and/or modify
(at your option) any later version.
PropEr is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License fo... | Copyright 2010 - 2011 < > ,
< >
and < >
This file is part of PropEr .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Pub... |
d3fda1acccefca27695a7108d41f054ef022163b7eeea819914ce7a49e2ec463 | Elastifile/git-sling | Sling.hs | {-# LANGUAGE OverloadedStrings #-}
module Sling
( Job(..)
, tryTakeJob
, rejectProposal
, updateProposal
, transitionProposal
, runPrepush
) where
import Control.Monad (unless, when, void)
import Control.Monad.Except (MonadError (..))
import Data.Monoid ((<>))
... | null | https://raw.githubusercontent.com/Elastifile/git-sling/a92f1836910c0a4d8105ca0dff9d1bd08e9bb181/server/src/Sling.hs | haskell | # LANGUAGE OverloadedStrings #
in case it exists
in case it exists
We have to be on another branch before deleting stuff, so arbitrarily picking rejected branch
Checks that the proposal is valid (e.g. the onto branch still actually exists on the remote)
TODO: Add check that base hash (for merge proposals) is in ra... | module Sling
( Job(..)
, tryTakeJob
, rejectProposal
, updateProposal
, transitionProposal
, runPrepush
) where
import Control.Monad (unless, when, void)
import Control.Monad.Except (MonadError (..))
import Data.Monoid ((<>))
import Data.Text ... |
1ff73322351613e5915e8d0fc57b21d035ba4e3227347bc9b24853700d5d0e88 | bos/rwh | basicio.hs | {-- snippet all --}
main = do
putStrLn "Greetings! What is your name?"
inpStr <- getLine
putStrLn $ "Welcome to Haskell, " ++ inpStr ++ "!"
{-- /snippet all --}
| null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch07/basicio.hs | haskell | - snippet all -
- /snippet all - | main = do
putStrLn "Greetings! What is your name?"
inpStr <- getLine
putStrLn $ "Welcome to Haskell, " ++ inpStr ++ "!"
|
437d1a505c08e2c068104545fdb9429d4e8286a36a983e1dc290215f90019850 | g000001/MacLISP-compat | CARCDR.lisp | ;;; -*-LISP-*-
(cl:in-package :maclisp.internal)
#|(named-readtables:in-readtable :maclisp)|#
;(named-readtables:in-readtable :standard)
Purpose : to permit long names , like CADADADADDDR , to be easily
;;; macro-defined into appropriate sequences of CARs and CDRs.
;;; Use: (DEF-CARCDR CADADADADDDR CADADADDDD... | null | https://raw.githubusercontent.com/g000001/MacLISP-compat/a147d09b98dca4d7c089424c3cbaf832d2fd857a/CARCDR.lisp | lisp | -*-LISP-*-
(named-readtables:in-readtable :maclisp)
(named-readtables:in-readtable :standard)
macro-defined into appropriate sequences of CARs and CDRs.
Use: (DEF-CARCDR CADADADADDDR CADADADDDDDR ... )
Produces a format internal to the compiler when being expanded
for optimal compilation. For interpretation... |
(cl:in-package :maclisp.internal)
Purpose : to permit long names , like CADADADADDDR , to be easily
where the names must have at least 5 A / D 's .
of up to 4 deep , which should be ( already ) defined primitively .
(DEFMACRO DEF-CARCDR (&rest carcdrs)
`(PROGN ,@(mapcar (lambda (x)
... |
9b890e637183621795c4bda9c57fc18ab23e2ae178ed58f3b970c534856cd944 | basho/riak_ensemble | riak_ensemble_peer_intercepts.erl | -module(riak_ensemble_peer_intercepts).
-compile([export_all, nowarn_export_all]).
-include("riak_ensemble_types.hrl").
-define(M, riak_ensemble_peer_orig).
check_epoch_false(_Peer, _Epoch, _State) ->
false.
check_epoch(Peer, Epoch, State) ->
?M:check_epoch_orig(Peer, Epoch, State).
| null | https://raw.githubusercontent.com/basho/riak_ensemble/f279810f3b9b3a1b4bc82dda738364242896ff32/test/riak_ensemble_peer_intercepts.erl | erlang | -module(riak_ensemble_peer_intercepts).
-compile([export_all, nowarn_export_all]).
-include("riak_ensemble_types.hrl").
-define(M, riak_ensemble_peer_orig).
check_epoch_false(_Peer, _Epoch, _State) ->
false.
check_epoch(Peer, Epoch, State) ->
?M:check_epoch_orig(Peer, Epoch, State).
| |
ed6ed8c47054e2434ba9bbb51197cc11b1a314a21c43a6775b3baa746fab36d1 | rcherrueau/APE | ownership.rkt | #lang racket/base
;; ,-,-,-.
;; `,| | | ,-. . . ,-. ,-. . . ,-. ,-.
;; | ; | . ,-| | | | ,-| | | | | |
;; ' `-' `-^ `-^ `-' `-^ `-^ `-' `-'
;; Ownership Types Checker.
;;
;; Ownership type checking phase (Θ>)
;; - Type checks the program (for simple type -- "simple" as in simply
;; typed λ calculus, i.e.... | null | https://raw.githubusercontent.com/rcherrueau/APE/8b5302709000bd043b64d46d55642acb34ce5ba7/racket/CPN98/ownership.rkt | racket | ,-,-,-.
`,| | | ,-. . . ,-. ,-. . . ,-. ,-.
| ; | . ,-| | | | ,-| | | | | |
' `-' `-^ `-^ `-' `-^ `-^ `-' `-'
Ownership Types Checker.
Ownership type checking phase (Θ>)
- Type checks the program (for simple type -- "simple" as in simply
typed λ calculus, i.e., no ownership).
- Based on [CPN98] ... | #lang racket/base
(require (for-syntax racket/base)
racket/function
racket/match
racket/sequence
racket/syntax
syntax/parse
syntax/srcloc
syntax/stx
"definitions.rkt"
"utils.rkt"
"meta.rkt"
(prefix-in env: (submod "env.... |
46813bb9bf980df76cabe041c0ec57047f0e42cd7d9c3bc47e779b59e46878a4 | cljfx/cljfx | views.clj | (ns e18-pure-event-handling.views
(:require [cljfx.api :as fx]
[e18-pure-event-handling.subs :as subs]
[e18-pure-event-handling.events :as events]
[clojure.java.io :as io])
(:import [org.jsoup.nodes Element]
[org.jsoup Jsoup]))
(defn- loading [_]
{:fx/type :h-box
... | null | https://raw.githubusercontent.com/cljfx/cljfx/ec3c34e619b2408026b9f2e2ff8665bebf70bf56/examples/e18_pure_event_handling/views.clj | clojure | (ns e18-pure-event-handling.views
(:require [cljfx.api :as fx]
[e18-pure-event-handling.subs :as subs]
[e18-pure-event-handling.events :as events]
[clojure.java.io :as io])
(:import [org.jsoup.nodes Element]
[org.jsoup Jsoup]))
(defn- loading [_]
{:fx/type :h-box
... | |
8c0f1b05d6e5f3fe5c39d5912a4db551d1ff1a505882e0f8599312a07fee33ce | cstar/ejabberd-old | ejabberd_loglevel.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_loglevel.erl
Author : < >
Purpose : Loglevel switcher .
%%% Be careful: you should not have any ejabberd_logger module
%%% as ejabberd_loglevel switcher is compiling and loading
%%% dy... | null | https://raw.githubusercontent.com/cstar/ejabberd-old/559f8b6b0a935710fe93e9afacb4270d6d6ea00f/src/ejabberd_loglevel.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_loglevel.erl
Be careful: you should not have any ejabberd_logger module
as ejabberd_loglevel switcher is compiling and loading
dynamically a "virtual" ejabberd_logger module (Described
... | Author : < >
Purpose : Loglevel switcher .
Created : 29 Nov 2006 by < >
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU... |
0de2379b5d9dfd7227f74a2d3829d3f536b4c55fa483ace9e3a8f516f5e36218 | mput/sicp-solutions | 2_04.rkt | #lang racket
Solution for exercise 2_04 .
(require rackunit "../solutions/utils.rkt")
(provide n-cons n-car n-cdr)
(define (n-cons x y)
(lambda (m) (m x y)))
(define (n-car pair)
(pair (lambda (p q) p)))
Воспользуемся методом подстановки , данной реализации пар :
( define testpair ( n - cons 1 2 ) )
#|... | null | https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/2_04.rkt | racket | (n-car testpair)
(testpair (lambda (p q) p)) | #lang racket
Solution for exercise 2_04 .
(require rackunit "../solutions/utils.rkt")
(provide n-cons n-car n-cdr)
(define (n-cons x y)
(lambda (m) (m x y)))
(define (n-car pair)
(pair (lambda (p q) p)))
Воспользуемся методом подстановки , данной реализации пар :
( define testpair ( n - cons 1 2 ) )
... |
4d16cb572c26799066b4f4ebd2e48bbe6a9b8fe8e7c467eab7606eccf6615b66 | evidentsystems/converge | filesystem_test.clj | (ns converge.storage.filesystem-test
(:require converge.storage.filesystem))
| null | https://raw.githubusercontent.com/evidentsystems/converge/7a7f542fe86e98b1ae52b3418837a6fe38686142/storage/test/converge/storage/filesystem_test.clj | clojure | (ns converge.storage.filesystem-test
(:require converge.storage.filesystem))
| |
5237605ea99312850fbd4b8f9d5cb3ef08e492a301f75b1ec3876a6c008fe5ea | alanzplus/EOPL | 4.10-test.rkt | #lang eopl
(require rackunit "explicit-refs-interpreter.rkt")
(require rackunit/text-ui)
(define begin-test
(test-suite
"Test for begin"
(check-equal?
(run "
let x = newref(1) in
begin
setref(x, 11);
setref(x, 12);
deref(x)
end")
(num-val 12)... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch4/4.10-test.rkt | racket | #lang eopl
(require rackunit "explicit-refs-interpreter.rkt")
(require rackunit/text-ui)
(define begin-test
(test-suite
"Test for begin"
(check-equal?
(run "
let x = newref(1) in
begin
deref(x)
end")
(num-val 12))
))
(run-tests begin-test)
| |
96fa73fead0cbc3dda10d1286ba330759d489e2f1be0b8f59665cb9f042e8a7d | OCamlPro/ocaml-benchs | echo_client.ml | open Core.Std
open Async.Std
let send_stuff nbr_stuff state r w =
let size = 27 in
let str = String.make size 'a' in
let buffer = String.create size in
let rec send_stuffs i =
if i = nbr_stuff then return ()
else
let len = (Random.State.int state (size - 1)) + 1 in
Writer.write ~pos:0 ~len ... | null | https://raw.githubusercontent.com/OCamlPro/ocaml-benchs/98047e112574e6bf55137dd8058f227a9f40281b/async_echo/echo_client.ml | ocaml | open Core.Std
open Async.Std
let send_stuff nbr_stuff state r w =
let size = 27 in
let str = String.make size 'a' in
let buffer = String.create size in
let rec send_stuffs i =
if i = nbr_stuff then return ()
else
let len = (Random.State.int state (size - 1)) + 1 in
Writer.write ~pos:0 ~len ... | |
25a527b88be181f5881cb341dbc8493a90170cbdd4f69e5be3cf9623903ad61b | BinaryAnalysisPlatform/bap | bap_c_type_printer.ml | let pp = Bap_c_type.pp and pp_proto = Bap_c_type.pp_proto
| null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/db26f0034a38398909f3c1d882b51cc9dc6c3338/lib/bap_c/bap_c_type_printer.ml | ocaml | let pp = Bap_c_type.pp and pp_proto = Bap_c_type.pp_proto
| |
db2d2b5bcb5316b7a4ff71d18d2de4dc6b0e6d207fc12841805fa6518a523938 | basho/basho_bench | basho_bench_stats_writer.erl | %% -------------------------------------------------------------------
%%
%% basho_bench: Benchmarking Suite
%%
Copyright ( c ) 2009 - 2014 Basho Techonologies
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License... | null | https://raw.githubusercontent.com/basho/basho_bench/aa66398bb6a91645dbb97e91a236f3cdcd1f188f/src/basho_bench_stats_writer.erl | erlang | -------------------------------------------------------------------
basho_bench: Benchmarking Suite
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
spe... | Copyright ( c ) 2009 - 2014 Basho Techonologies
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
HOWTO :
{ stats , } .... |
ed2211681005b2e247e05e6a3652f3b7ce7504105a3776d55fcff8d6583cc6b6 | alexrobbins/cascalog-intro | scrape.clj | (ns cascalog-intro.scrape
(:require [clojure.java.io :refer (reader)]
[clojure.string :as s]
[clojure.tools.cli :refer :all]
[net.cgrand.enlive-html :as html]))
(defn -main [& args]
"Grab the talk content from the div'ed session page. Dump as newline delimited talks"
(let [[ar... | null | https://raw.githubusercontent.com/alexrobbins/cascalog-intro/895221d57357a35f8e20218886af2ba9b9907b16/src/cascalog_intro/scrape.clj | clojure | (ns cascalog-intro.scrape
(:require [clojure.java.io :refer (reader)]
[clojure.string :as s]
[clojure.tools.cli :refer :all]
[net.cgrand.enlive-html :as html]))
(defn -main [& args]
"Grab the talk content from the div'ed session page. Dump as newline delimited talks"
(let [[ar... | |
849e152c3d2ee9176f4985ebdc3eed164253681decf26f376b7506095be0a4a5 | MarcKaufmann/congame | resource.rkt | #lang racket/base
(require congame/components/resource
koyo/mime
racket/port
web-server/dispatchers/dispatch
web-server/http)
(provide
serve-resource-page)
(define (serve-resource-page _req id [subresource #f])
(define r (get-resource id))
(unless r
(next-dispatcher))
(... | null | https://raw.githubusercontent.com/MarcKaufmann/congame/c3e09a6b707c22d14dde7954fb0d5ba4f94717f8/congame-web/pages/resource.rkt | racket | #lang racket/base
(require congame/components/resource
koyo/mime
racket/port
web-server/dispatchers/dispatch
web-server/http)
(provide
serve-resource-page)
(define (serve-resource-page _req id [subresource #f])
(define r (get-resource id))
(unless r
(next-dispatcher))
(... | |
836e30197c2fcdcb0a1dd21fc0decef3e229738e5bb8f375aacc1b85cdcfbf86 | GaloisInc/cereal | Put.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
#ifndef MIN_VERSION_base
#define MIN_VERSION_base(x,y,z) 0
#endif
#ifndef MIN_VERSION_bytestring
#define MIN_VERSION_bytestring(x,y,z) 0
#endif
-----------------------------------------------------------------------------
-- |
Module ... | null | https://raw.githubusercontent.com/GaloisInc/cereal/b4fff04dc2fb28eb0ec5e6c63b53248a63eb4ca5/src/Data/Serialize/Put.hs | haskell | # LANGUAGE BangPatterns #
---------------------------------------------------------------------------
|
License : BSD3-style (see LICENSE)
Stability :
Portability :
The Put monad. A monad for efficiently constructing bytestrings.
---------------------------------------------------------------------------
... | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
#ifndef MIN_VERSION_base
#define MIN_VERSION_base(x,y,z) 0
#endif
#ifndef MIN_VERSION_bytestring
#define MIN_VERSION_bytestring(x,y,z) 0
#endif
Module : Data . Serialize . Put
Copyright : , Galois Inc. 2009
Maintainer : < >
module Data.Serialize.... |
70d2a02590bd9784e6b3c7fe1171fe3c1f164ac1b106f309b63c627f1af44626 | monadfix/ormolu-live | FileCleanup.hs | # LANGUAGE CPP #
module FileCleanup
( TempFileLifetime(..)
, cleanTempDirs, cleanTempFiles, cleanCurrentModuleTempFiles
, addFilesToClean, changeTempFilesLifetime
, newTempName, newTempLibName, newTempDir
, withSystemTempDirectory, withTempDirectory
) where
import GhcPrelude
import DynFlags
import ErrUtil... | null | https://raw.githubusercontent.com/monadfix/ormolu-live/d8ae72ef168b98a8d179d642f70352c88b3ac226/ghc-lib-parser-8.10.1.20200412/compiler/main/FileCleanup.hs | haskell | | Used when a temp file is created. This determines which component Set of
FilesToClean will get the temp file
^ A file with lifetime TFL_CurrentModule will be cleaned up at the
end of upweep_mod
^ A file with lifetime TFL_GhcSession will be cleaned up at the end of
runGhc(T)
| Delete all files in @filesToClean ... | # LANGUAGE CPP #
module FileCleanup
( TempFileLifetime(..)
, cleanTempDirs, cleanTempFiles, cleanCurrentModuleTempFiles
, addFilesToClean, changeTempFilesLifetime
, newTempName, newTempLibName, newTempDir
, withSystemTempDirectory, withTempDirectory
) where
import GhcPrelude
import DynFlags
import ErrUtil... |
e8785a0d7a05fcbea0e9e807d7edc2c65741cd4c2034db0a00f68319f05c6472 | mirage/mirage | mirage_impl_misc.mli | open Functoria
module Log : Logs.LOG
val get_target : Info.t -> Mirage_key.mode
val connect_err : string -> int -> string
val pp_key : Format.formatter -> 'a Key.key -> unit
val query_ocamlfind :
?recursive:bool ->
?format:string ->
?predicates:string ->
string list ->
string list Action.t
val opam_prefix ... | null | https://raw.githubusercontent.com/mirage/mirage/479e40ae6aa1efe18fb1cd199cec0d5ee1f46f26/lib/mirage/impl/mirage_impl_misc.mli | ocaml | open Functoria
module Log : Logs.LOG
val get_target : Info.t -> Mirage_key.mode
val connect_err : string -> int -> string
val pp_key : Format.formatter -> 'a Key.key -> unit
val query_ocamlfind :
?recursive:bool ->
?format:string ->
?predicates:string ->
string list ->
string list Action.t
val opam_prefix ... | |
283d431e4aefdab55a8b2f8ce86da9736ef10b3ddb72a7cb8cf3e5ea48fc6805 | cac-t-u-s/om-sharp | midi-mix.lisp | ;============================================================================
; om#: visual programming language for computer-assisted music composition
;============================================================================
;
; This program is free software. For information on usage
; and redistribution, see... | null | https://raw.githubusercontent.com/cac-t-u-s/om-sharp/80f9537368471d0e6e4accdc9fff01ed277b879e/src/packages/midi/objects/midi-mix.lisp | lisp | ============================================================================
om#: visual programming language for computer-assisted music composition
============================================================================
This program is free software. For information on usage
and redistribution, see the "... | File author :
(in-package :om)
(defclass channel-controls ()
((midiport :initform nil :initarg :midiport :accessor midiport :type integer)
(midichannel :initform 1 :initarg :midichannel :accessor midichannel :type integer)
(program :initform 0 :initarg :program :accessor program :type integer)
(pan-c... |
16cd4438e856d3cc56e44c1b0f5cab45cf9ff6f29bb4e64f7ad4f25ad9456954 | PacktWorkshops/The-Clojure-Workshop | utils.clj | (ns coffee-app.utils)
;;; orders calculating and formatting function
(defn calculate-coffee-price [coffees coffee-type number]
(->
(get coffees coffee-type)
(* number)
float))
(defn display-bought-coffee-message [type number total]
(str "Buying " number " " (name type) " coffees f... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter09/tests/Exercise9.04/coffee-app/src/coffee_app/utils.clj | clojure | orders calculating and formatting function | (ns coffee-app.utils)
(defn calculate-coffee-price [coffees coffee-type number]
(->
(get coffees coffee-type)
(* number)
float))
(defn display-bought-coffee-message [type number total]
(str "Buying " number " " (name type) " coffees for total:€" total)) |
74df5353373e9ed2e7b0f316a38fbed24cec1e0ebf6e3592c1ba3309012657ea | camsaul/toucan2 | after_select.clj | (ns toucan2.tools.after-select
(:require
[clojure.spec.alpha :as s]
[methodical.core :as m]
[toucan2.pipeline :as pipeline]
[toucan2.tools.simple-out-transform :as tools.simple-out-transform]
[toucan2.util :as u]))
(m/defmulti after-select
{:arglists '([instance]), :defmethod-arities #{1}}
u/dispa... | null | https://raw.githubusercontent.com/camsaul/toucan2/5204b34d46f5adb3e52b022218049abe9b336928/src/toucan2/tools/after_select.clj | clojure | Do after-select for anything returning instances, not just SELECT. [[toucan2.insert/insert-returning-instances!]]
should do after-select as well.
`after-select` should be done before [[toucan2.tools.after-update]] and [[toucan2.tools.after-insert]] | (ns toucan2.tools.after-select
(:require
[clojure.spec.alpha :as s]
[methodical.core :as m]
[toucan2.pipeline :as pipeline]
[toucan2.tools.simple-out-transform :as tools.simple-out-transform]
[toucan2.util :as u]))
(m/defmulti after-select
{:arglists '([instance]), :defmethod-arities #{1}}
u/dispa... |
744290b8ecaba75622b105d66e58cd2ddc5101ef640d4e41b9ed32cd94d1fc17 | mbutterick/beautiful-racket | txtadv-reader.rkt | #lang racket
(require syntax/readerr)
(provide (rename-out [txtadv-read-syntax read-syntax]))
(define (txtadv-read-syntax src in)
(expect-section src in "VERBS")
(define verbs (in-section src in read-verb))
(expect-section src in "EVERYWHERE")
(define actions (in-section src in read-action))
(expect-section... | null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/txtadv-demo/5-lang/txtadv-reader.rkt | racket | #lang racket
(require syntax/readerr)
(provide (rename-out [txtadv-read-syntax read-syntax]))
(define (txtadv-read-syntax src in)
(expect-section src in "VERBS")
(define verbs (in-section src in read-verb))
(expect-section src in "EVERYWHERE")
(define actions (in-section src in read-action))
(expect-section... | |
962eefe326a2c4fbc6ebedb526c8c08ade194ec9b1b5d4d167d26457a0e6c5fc | wrengr/unification-fd | IntVar.hs |
# LANGUAGE MultiParamTypeClasses , FlexibleInstances #
{-# OPTIONS_GHC -Wall -fwarn-tabs #-}
----------------------------------------------------------------
-- ~ 2021.10.17
-- |
-- Module : Control.Unification.IntVar
Copyright : Copyright ( c ) 2007 - -202... | null | https://raw.githubusercontent.com/wrengr/unification-fd/16301b1630a3a75168da0dd7d744c91dfaf007cc/test/bench/Control/Unification/IntVar.hs | haskell | # OPTIONS_GHC -Wall -fwarn-tabs #
--------------------------------------------------------------
~ 2021.10.17
|
Module : Control.Unification.IntVar
Maintainer :
Stability : experimental
Portability : semi-portable (MPTCs, FlexibleInstances)
This modu... |
# LANGUAGE MultiParamTypeClasses , FlexibleInstances #
Copyright : Copyright ( c ) 2007 - -2021 wren
License : BSD
was independently discovered by Dijkstra et al . This module
underlying monad to some ' MonadLogic ' ( part of the @logict@
library , described by Kiselyov et al . ) .
* , ... |
98dc8855f2593920c7fda3045a67ea1111fd6cb4590d2913dbf0a94ebd9e6148 | eponai/sulolive | menu.cljc | (ns eponai.common.ui.elements.menu
(:require
[eponai.common.ui.elements.css :as css]
[eponai.common.ui.dom :as dom]))
;; Menu elements
(defn- menu*
"Custom menu element with provided content. For the provided content it's
recommended to use any if the item- functions to generate compatible elements.
Op... | null | https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/common/ui/elements/menu.cljc | clojure | Menu elements
Menu list item elements | (ns eponai.common.ui.elements.menu
(:require
[eponai.common.ui.elements.css :as css]
[eponai.common.ui.dom :as dom]))
(defn- menu*
"Custom menu element with provided content. For the provided content it's
recommended to use any if the item- functions to generate compatible elements.
Opts
:classes - c... |
1e2a99aad9cd2563cc61e8528d6e5a5c8e13df90155151f0f2c6d92f02535502 | mfoemmel/erlang-otp | snmp_appup_mgr.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2003 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pu... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/snmp/test/snmp_appup_mgr.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limit... | Copyright Ericsson AB 2003 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(snmp_appup_mgr).
-behaviour(snmpm... |
72d081104b64912203d98a9677644021387f9a85645d2213106b03d55abea8a6 | inhabitedtype/ocaml-aws | describePatchGroupState.mli | open Types
type input = DescribePatchGroupStateRequest.t
type output = DescribePatchGroupStateResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/describePatchGroupState.mli | ocaml | open Types
type input = DescribePatchGroupStateRequest.t
type output = DescribePatchGroupStateResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
365de2917dbf39d9ccef1a2f2aa556363f8d630c027bb333f3704d3ffda8d638 | sky-big/RabbitMQ | tcp_acceptor.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/src/tcp_acceptor.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
----------------... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
825a1297da945171ce43b09bf7e999be87455ad3215c0818423a2e0f57bfc0e8 | jimcrayne/jhc | tc151.hs | {-# OPTIONS -fglasgow-exts #-}
-- A test for rank-3 types
module ShouldCompile where
data Fork a = ForkC a a
mapFork :: forall a1 a2 . (a1 -> a2) -> (Fork a1 -> Fork a2)
mapFork mapA (ForkC a1 a2) = ForkC (mapA a1) (mapA a2)
data SequF s a = EmptyF | ZeroF (s (Fork a... | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/tc151.hs | haskell | # OPTIONS -fglasgow-exts #
A test for rank-3 types |
module ShouldCompile where
data Fork a = ForkC a a
mapFork :: forall a1 a2 . (a1 -> a2) -> (Fork a1 -> Fork a2)
mapFork mapA (ForkC a1 a2) = ForkC (mapA a1) (mapA a2)
data SequF s a = EmptyF | ZeroF (s (Fork a)) | OneF a (s (Fork a))
newtype HFix h a = HIn (h (HFix... |
d224cf80361db7624599595df7fdd00e648b1a67c31c9195bc13702e1f3d0b62 | racehub/om-bootstrap | basic.cljs | #_
(:require [om-bootstrap.random :as r]
[om-tools.dom :as d :include-macros true])
(r/alert {:bs-style "warning"}
(d/strong "Holy guacamole!")
" Best check yo self, you're not looking too good.")
| null | https://raw.githubusercontent.com/racehub/om-bootstrap/18fb7f67c306d208bcb012a1b765ac1641d7a00b/dev/snippets/alert/basic.cljs | clojure | #_
(:require [om-bootstrap.random :as r]
[om-tools.dom :as d :include-macros true])
(r/alert {:bs-style "warning"}
(d/strong "Holy guacamole!")
" Best check yo self, you're not looking too good.")
| |
24e03ad8674aff39a82508c382e5ded6a2071d2d5c5e9dc290b083ffc066766a | phadej/language-pts | Check.hs | {-# LANGUAGE OverloadedStrings #-}
-- | Type-checker.
module Language.PTS.Check (
type_,
check_,
) where
import Language.PTS.Bound
import Language.PTS.Error
import Language.PTS.Pretty
import Language.PTS.Specification
import Language.PTS.Sym
import Language.PTS.Term
import Language.PTS.Value
#ifdef LANGUA... | null | https://raw.githubusercontent.com/phadej/language-pts/761e5b92b14506b75164bd3162487df2d7fbfa93/src/Language/PTS/Check.hs | haskell | # LANGUAGE OverloadedStrings #
| Type-checker.
-----------------------------------------------------------------------------
Type-checker
-----------------------------------------------------------------------------
^ environment
^ term to type-check
^ as result we get evaluated term and its type.
| ... and check... | module Language.PTS.Check (
type_,
check_,
) where
import Language.PTS.Bound
import Language.PTS.Error
import Language.PTS.Pretty
import Language.PTS.Specification
import Language.PTS.Sym
import Language.PTS.Term
import Language.PTS.Value
#ifdef LANGUAGE_PTS_HAS_NAT
import Language.PTS.Smart
#endif
#ifde... |
dcdfc622581b6e840902e0350b26e6e50a523c18d82059dde60503d78d17cc6f | dpiponi/formal-weyl | Poly.hs | -- Formal power series.
-- Note the big caveat for division.
-- Probably best to use division only when constant term
of divisor is non - zero .
# LANGUAGE FlexibleInstances #
module Poly where
import Data.Array
import Data.List
import Data.Ratio
import Data.Tuple
import Debug.Trace
import Control.Applicative
impo... | null | https://raw.githubusercontent.com/dpiponi/formal-weyl/f0b8e5e8f749877ceebb809f37a844df7a8e4969/Poly.hs | haskell | Formal power series.
Note the big caveat for division.
Probably best to use division only when constant term
in and [fn u i == fn v i | i <- range bz]
in (i, j): i labels row, j column
XXX What if list is empty?
??
a `wLeftDivide` b = divide a by b on left, ie. b\a
instance (Floating a) => Floating (Poly a... | of divisor is non - zero .
# LANGUAGE FlexibleInstances #
module Poly where
import Data.Array
import Data.List
import Data.Ratio
import Data.Tuple
import Debug.Trace
import Control.Applicative
import LeftDivide
import Padded
import Over
import MShow
import ISqrt2
data Poly a = P (Array Integer a)
monomialTime... |
8c834ca0616ba05fdabf6445d49a8c9cd5bcd513499e75cbc6da5adc4cf1ef37 | heyoka/faxe | esp_state_duration.erl | %% Date: 15.07.2019 - 09:55
Ⓒ 2019 heyoka
%% @doc
%% Computes the duration of a given state. The state is defined via a lambda expression.
%% Timestamps for the duration are taken from the incoming data-point.
%%
%% For each consecutive point for which the lambda expression evaluates as true,
%% the state duration wi... | null | https://raw.githubusercontent.com/heyoka/faxe/2317e092a54a670a46df4d4f8b49aee982708e4d/apps/faxe/src/components/esp_state_duration.erl | erlang | Date: 15.07.2019 - 09:55
@doc
Computes the duration of a given state. The state is defined via a lambda expression.
Timestamps for the duration are taken from the incoming data-point.
For each consecutive point for which the lambda expression evaluates as true,
the state duration will be incremented by the durat... | Ⓒ 2019 heyoka
-module(esp_state_duration).
-author("Alexander Minichmair").
-behavior(df_component).
-include("faxe.hrl").
-define(TOTAL_NAME, <<"_total">>).
-export([init/3, process/3, options/0, wants/0, emits/0]).
-record(state, {
node_id,
lambda,
as,
unit,
emit_total = false,
state_change
... |
f9f8a09dec889abb8effb6b8d9488b7474c108528c1168dacd99b7929a72980d | haskell-beam/beam | employee1sql-agg.hs | # LANGUAGE MultiParamTypeClasses #
-- ! BUILD_COMMAND: runhaskell --ghc-arg=-fglasgow-exts -XStandaloneDeriving -XTypeSynonymInstances -XDeriveGeneric -XGADTs -XOverloadedStrings -XFlexibleContexts -XFlexibleInstances -XTypeFamilies -XTypeApplications -XAllowAmbiguousTypes -XPartialTypeSignatures -fno-warn-partial-typ... | null | https://raw.githubusercontent.com/haskell-beam/beam/3dc9f47b081384c99b45f3b4264f419ebc6d7b09/docs/beam-templates/employee1sql-agg.hs | haskell | ! BUILD_COMMAND: runhaskell --ghc-arg=-fglasgow-exts -XStandaloneDeriving -XTypeSynonymInstances -XDeriveGeneric -XGADTs -XOverloadedStrings -XFlexibleContexts -XFlexibleInstances -XTypeFamilies -XTypeApplications -XAllowAmbiguousTypes -XPartialTypeSignatures -fno-warn-partial-type-signatures
! BUILD_DIR: beam-sqlite... | # LANGUAGE MultiParamTypeClasses #
module Main where
import Database.Beam hiding (withDatabaseDebug)
import qualified Database.Beam as Beam
import Database.Beam.Sqlite hiding (runBeamSqliteDebug)
import qualified Database.Beam.Sqlite as Sqlite
import Database.SQLite.Simple
import Data.Text (Text)
import Data.Int
im... |
32ea50e9ce06401fd5c74efd9ee9a18c358288c13ff495bdf3f3cd86df44f346 | aws-beam/aws-erlang | aws_mq.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
@doc Amazon MQ is a managed message broker service for Apache ActiveMQ and
%% RabbitMQ that makes it easy to set up and operate message brokers in the
%% cloud.
%%
%% A message broker allows software applications and components ... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_mq.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
RabbitMQ that makes it easy to set up and operate message brokers in the
cloud.
A message broker allows software applications and components to
communicate using various programming languages, operating systems, and
formal messaging protocols.
==========================... | See -beam/aws-codegen for more details .
@doc Amazon MQ is a managed message broker service for Apache ActiveMQ and
-module(aws_mq).
-export([create_broker/2,
create_broker/3,
create_configuration/2,
create_configuration/3,
create_tags/3,
create_tags/4,
create... |
87ff14e522e6a7ee8eea69e5f0b105f875823ec309309e35fb10149ef4b35855 | g000001/tagger | corpus-sysdcl.lisp | -*- Package : TDB ; Syntax : Common - Lisp ; Mode : Lisp ; Base : 10 -*-
Copyright ( c ) 1992 , 1993 by Xerox Corporation . All rights reserved .
(cl:eval-when (cl:compile cl:eval cl:load)
(pdefsys:load-system-def :tdb-sysdcl))
(cl:in-package :tdb)
(def-tdb-system :corpus
((:dir "corpus")
(:sub-syste... | null | https://raw.githubusercontent.com/g000001/tagger/a4e0650c55aba44250871b96e2220e1b4953c6ab/orig/src/sysdcl/corpus-sysdcl.lisp | lisp | Syntax : Common - Lisp ; Mode : Lisp ; Base : 10 -*-
generic corpora
specific corpora |
Copyright ( c ) 1992 , 1993 by Xerox Corporation . All rights reserved .
(cl:eval-when (cl:compile cl:eval cl:load)
(pdefsys:load-system-def :tdb-sysdcl))
(cl:in-package :tdb)
(def-tdb-system :corpus
((:dir "corpus")
(:sub-systems :util))
"corpus-protocol")
(def-tdb-system :persistent-corpus
... |
7520aa1f4acd708cb571b4f6aad7149c55829d3db2ada72d49ce821e1636d75a | jepsen-io/jepsen | bank.clj | (ns jepsen.ignite.bank
"Simulates transfers between bank accounts"
(:refer-clojure :exclude [test])
(:require [clojure.tools.logging :refer :all]
[jepsen [ignite :as ignite]
[checker :as checker]
[client :as client]
[nemesis :as nemesis]
[generator :as gen]]
[clojure.... | null | https://raw.githubusercontent.com/jepsen-io/jepsen/a75d5a50dd5fa8d639a622c124bf61253460b754/ignite/src/jepsen/ignite/bank.clj | clojure | (ns jepsen.ignite.bank
"Simulates transfers between bank accounts"
(:refer-clojure :exclude [test])
(:require [clojure.tools.logging :refer :all]
[jepsen [ignite :as ignite]
[checker :as checker]
[client :as client]
[nemesis :as nemesis]
[generator :as gen]]
[clojure.... | |
14f323861dcc90a02371516372dd2f57e983cd8543d6040c8b1e735a7dd095fc | qiao/sicp-solutions | 1.20.scm | ;; normal order:
(gcd 206 40)
(gcd 40 (remainder 206 40))
(if (= (remainder 206 40) 0)
40
(gcd (remainder 206 40) (remainder 40 (remainder 206 40))))
(gcd (remainder 206 40) (remainder 40 (remainder 206 40)))
(if (= (remainder 40 (remainder 206 40)) 0)
(remainder 206 40)
(gcd (remainder 40 (remainde... | null | https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter1/1.20.scm | scheme | normal order:
applicative order: | (gcd 206 40)
(gcd 40 (remainder 206 40))
(if (= (remainder 206 40) 0)
40
(gcd (remainder 206 40) (remainder 40 (remainder 206 40))))
(gcd (remainder 206 40) (remainder 40 (remainder 206 40)))
(if (= (remainder 40 (remainder 206 40)) 0)
(remainder 206 40)
(gcd (remainder 40 (remainder 206 40))
... |
68b55f45fffd95e1355bd867165a41867bb5be9be54243bd279aa54004ccd26a | 7theta/re-frame-via | config.clj | ;; Copyright (c) 7theta. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-v10.html)
;; which can be found in the LICENSE file at the root of this
;; distribution.
;;
;; By using this software in any fashion, you are agreeing to be bo... | null | https://raw.githubusercontent.com/7theta/re-frame-via/ae530337eff4098991e937d6e06aa413d8ad7b45/example/src/clj/example/config.clj | clojure | Copyright (c) 7theta. All rights reserved.
The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-v10.html)
which can be found in the LICENSE file at the root of this
distribution.
By using this software in any fashion, you are agreeing to be bound by
the ... |
(ns example.config
(:require [taoensso.sente.server-adapters.http-kit :refer [get-sch-adapter]]
[integrant.core :as ig]))
(def config
{:via.server/client-proxy
{:sente-web-server-adapter (get-sch-adapter)
:user-id-fn (fn [ring-req] (-> ring-req :params :user-id))}
:via.server/router
{:ms... |
b3ed3d4c85412724e13c120d7c50f1a1923e7b60aa7020fd683e65b776021f15 | static-analysis-engineering/codehawk | bCHELFSymbolTable.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : and
------------------------------------------------------------------------------
The MIT License ( MIT ... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/c1b3158e0d73cda7cfc10d75f6173f4297991a82/CodeHawk/CHB/bchlibelf/bCHELFSymbolTable.ml | ocaml | chutil
bchlib
bchlibelf
$a.0,1,2 llvm-generated code? | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : and
------------------------------------------------------------------------------
The MIT License ( MIT ... |
74f6e363d19b255802db520f07975e1c9977f7aa8a7b0a12ae2826d4622aae04 | xmonad/xmonad-extras | EvalServer.hs | -----------------------------------------------------------------------------
-- |
-- Module : XMonad.Hooks.EvalServer
Copyright : ( c ) 2009
-- License : BSD3-style (see LICENSE)
--
Maintainer : < >
-- Stability : unstable
-- Portability : unportable
--
This module allows controlling... | null | https://raw.githubusercontent.com/xmonad/xmonad-extras/d45b4cbfadbd8a6c2f0c062e5027a1c800b0e959/XMonad/Hooks/EvalServer.hs | haskell | ---------------------------------------------------------------------------
|
Module : XMonad.Hooks.EvalServer
License : BSD3-style (see LICENSE)
Stability : unstable
Portability : unportable
via a socket.
---------------------------------------------------------------------------
* Usage
$usa... | Copyright : ( c ) 2009
Maintainer : < >
This module allows controlling XMonad through Haskell expressions sent
module XMonad.Hooks.EvalServer (
initEVData
,startServer
,defaultServer
... |
1cc265a5a70fc47c9c70ee8503d2db268784f9fb0f5599bd7ad1ee9beedbb6c2 | incoherentsoftware/defect-process | Types.hs | module Window.Graphics.Texture.Manager.Types
( TextureManager(..)
) where
import qualified Data.Map as M
import Window.Graphics.Texture.Types
data TextureManager = TextureManager
{ _textures :: M.Map FilePath Texture
}
| null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Window/Graphics/Texture/Manager/Types.hs | haskell | module Window.Graphics.Texture.Manager.Types
( TextureManager(..)
) where
import qualified Data.Map as M
import Window.Graphics.Texture.Types
data TextureManager = TextureManager
{ _textures :: M.Map FilePath Texture
}
| |
c9cfabf53e7aad5b81c1bb2862fe329043643df15abac6276ec9f7c0d540748f | io-tupelo/clj-template | _bootstrap.clj | (ns _bootstrap
"This namespace is used to perform one-time tasks at the beginning of a test run,
such as printing the Clojure version."
(:use tupelo.test)
(:require
[schema.core :as s]
[tupelo.core :as t]))
; Prismatic Schema type definitions
(s/set-fn-validation! true) ; enforce fn schemas
(dotest
... | null | https://raw.githubusercontent.com/io-tupelo/clj-template/5fb85f035f65b69901331617226655b35b8c1aa2/test/clj/_bootstrap.clj | clojure | Prismatic Schema type definitions
enforce fn schemas | (ns _bootstrap
"This namespace is used to perform one-time tasks at the beginning of a test run,
such as printing the Clojure version."
(:use tupelo.test)
(:require
[schema.core :as s]
[tupelo.core :as t]))
(dotest
(t/print-versions))
|
de87287aeb164772b1287193ffc1aeb6af2ec5fd61a6db58eeb350e0b4f21909 | OCamlPro/alt-ergo | profiling.ml | (******************************************************************************)
(* *)
Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 2013 - 2018
(* ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/43c4cb3a4d194399eea91f09f84f4092d6d87019/src/lib/structures/profiling.ml | ocaml | ****************************************************************************
This file is distributed under the terms of the license indicated
in the ... | Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 2013 - 2018
module SE = Expr.Set
module MS = Map.Make(String)
type inst_info = {
loc : Loc.t;
kept : int;
ignored : int;
all_insts : SE.t;
confl : int;
decided : int;
... |
3d09c03381e2d51d304c63c4207141f44a4ff036d01f95e5ca83640990dd7452 | input-output-hk/marlowe-cardano | Main.hs | {-# LANGUAGE GADTs #-}
module Main
where
import Control.Arrow (arr, (<<<))
import Control.Concurrent.Component
import Control.Monad ((<=<))
import Data.Either (fromRight)
import qualified Data.Set.NonEmpty as NESet
import Data.String (fromString)
import qualified Data.Text.Lazy.IO as TL
import Data.Time (secondsToN... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/bc9a0325f13b886e90ea05196ffb70a46c2ab095/marlowe-runtime/marlowe-indexer/Main.hs | haskell | # LANGUAGE GADTs # |
module Main
where
import Control.Arrow (arr, (<<<))
import Control.Concurrent.Component
import Control.Monad ((<=<))
import Data.Either (fromRight)
import qualified Data.Set.NonEmpty as NESet
import Data.String (fromString)
import qualified Data.Text.Lazy.IO as TL
import Data.Time (secondsToNominalDiffTime)
import ... |
d1273012d63ae02551c9eddc3fc00cca7646de5e2d54fcc41ab7be17611badf0 | jaseemabid/lisper | Primitives.hs | -----------------------------------------------------------------------------
-- |
-- Module : Lisper.Primitives
--
Scheme primitives implemented in Haskell
--
-- This module has several issues and needs a complete rewrite.
--
1 . Find a good architecture for native functions .
2 . Can not use any of these ... | null | https://raw.githubusercontent.com/jaseemabid/lisper/91bc7876e93d5fa4fb65046eedf500a6d99278b3/src/Lisper/Primitives.hs | haskell | ---------------------------------------------------------------------------
|
Module : Lisper.Primitives
This module has several issues and needs a complete rewrite.
---------------------------------------------------------------------------
Primitives, implemented in terms of haskell
[verify] Get quotien... | Scheme primitives implemented in Haskell
1 . Find a good architecture for native functions .
2 . Can not use any of these as higher order functions .
3 . Remove ` error ` from everywhere
4 . Add a prelude file which can have pure lisp definitions
module Lisper.Primitives (primitives) where
import Lisper.Cor... |
30aac22b3268497cafee4d698adab32b15479424f80056c141de87f386d25c17 | KoenvdBerg/csv-validator | test-csv-validator.lisp | ;; tests the validation_utils
(in-package :csv-validator-tests)
(def-suite testmain
:description "test suite for validation utils")
( setf fiveam:*on - failure * : debug )
(in-suite testmain)
;; data type tests
(test test-check-integer-string
;; not valid
(is (not (csv-validator:check-integer-string "-klsdf"... | null | https://raw.githubusercontent.com/KoenvdBerg/csv-validator/a3f56d30ea9241dc4a8943c2073a199cf488bfcc/tests/test-csv-validator.lisp | lisp | tests the validation_utils
data type tests
not valid
valid
not valid
valid
not valid
valid
not valid
valid
not valid
valid
not valid
valid
not valid
valid
not valid
valid
not valid
valid
not valid
valid | (in-package :csv-validator-tests)
(def-suite testmain
:description "test suite for validation utils")
( setf fiveam:*on - failure * : debug )
(in-suite testmain)
(test test-check-integer-string
(is (not (csv-validator:check-integer-string "-klsdf")))
(is (not (csv-validator:check-integer-string "1.42")))
(... |
0a7a7ee21b789ad1ae5bed71f811badc3105e2c225f6b526c73ed87ad7699818 | mokus0/junkbox | ana.hs | {-# OPTIONS -fth #-}
- " ana.hs "
- ( c ) 2008
- "ana.hs"
- (c) 2008 James Cook
-}
module Ana where
import Language.Haskell.TH
| null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Template%20Haskell/ana.hs | haskell | # OPTIONS -fth # |
- " ana.hs "
- ( c ) 2008
- "ana.hs"
- (c) 2008 James Cook
-}
module Ana where
import Language.Haskell.TH
|
dba181d371bfd68ed3dec233877b3dbea50e5059cb89ee8589b8f129a4e2be2f | bhuztez/shu | shu_trie.erl | -module(shu_trie).
-export([add/3]).
add([], Value, Trie) ->
Trie#{[] => lists:append(maps:get([], Trie, []), [Value])};
add([H|T], Value, Trie) ->
Trie#{H => add(T, Value, maps:get(H, Trie, #{}))}.
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
add_test() ->
?assertEqual(#{$多 => #{$少 => #{[] ... | null | https://raw.githubusercontent.com/bhuztez/shu/98125ae20b88d343cf3ef21e8956854f34a1aa14/src/shu_trie.erl | erlang | -module(shu_trie).
-export([add/3]).
add([], Value, Trie) ->
Trie#{[] => lists:append(maps:get([], Trie, []), [Value])};
add([H|T], Value, Trie) ->
Trie#{H => add(T, Value, maps:get(H, Trie, #{}))}.
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
add_test() ->
?assertEqual(#{$多 => #{$少 => #{[] ... | |
beb1267f21ddb8488b6991c14c38945931f388d3646ffed939de34527b05c469 | commercialhaskell/stack | Main.hs | module Main where
import Lib.A
main :: IO ()
main = putStrLn messageA
| null | https://raw.githubusercontent.com/commercialhaskell/stack/255cd830627870cdef34b5e54d670ef07882523e/test/integration/tests/module-added-multiple-times/files/exe/Main.hs | haskell | module Main where
import Lib.A
main :: IO ()
main = putStrLn messageA
| |
ed838315c365fdcf4aba69e7fbd3ebf60398693ec475fda71538713503131fea | grin-compiler/ghc-grin | aux.hs | --module Aux where
--import Key
data Key = K String Char Char Int {- String, end letters, length of string -}
data HashSet = H (Maybe Int) (Maybe Int) [Int]
type HashFun = [(Char,Int)] {- Association list of Character to values -}
1.3 : data Maybe a = Nothing | Just a deriving Text
ends :: Key -> String
ends (K _ a... | null | https://raw.githubusercontent.com/grin-compiler/ghc-grin/ebc4dca2e1f5b3581d4b84726730564ce909d786/ghc-grin-benchmark/boquist-grin-bench/spectral/cichelli/aux.hs | haskell | module Aux where
import Key
String, end letters, length of string
Association list of Character to values
partain: in the prelude
all :: (a->Bool) -> [a] -> Bool |
data HashSet = H (Maybe Int) (Maybe Int) [Int]
1.3 : data Maybe a = Nothing | Just a deriving Text
ends :: Key -> String
ends (K _ a z _) = [a,z]
morefreq :: Key -> Key -> Bool
morefreq (K _ a x _) (K _ b y _) = freq a + freq x > freq b + freq y
freq :: Char -> Int
freq c = assoc c freqtab
assoc :: (Eq a) => a ->... |
dba0ae9490dcb870d8f80070d064b583c93471d0fc1ee4219f71048261995763 | saa/fluxer | fluxer.erl | -module(fluxer).
-export([start_link/1]).
-export([pool_name/0]).
-export([create_database/1]).
-export([create_database/2]).
-export([show_databases/0]).
-export([write/2, write/3, write/4]).
-export([write_batch/3]).
-export([select/2, select/3]).
-export([query/2]).
-define(POOL_NAME, fluxer_pool).
-define(CT, {<<... | null | https://raw.githubusercontent.com/saa/fluxer/28a60274407cabe8b1317a06799c608265e6fe60/src/fluxer.erl | erlang | ====================================================================
API
====================================================================
====================================================================
==================================================================== | -module(fluxer).
-export([start_link/1]).
-export([pool_name/0]).
-export([create_database/1]).
-export([create_database/2]).
-export([show_databases/0]).
-export([write/2, write/3, write/4]).
-export([write_batch/3]).
-export([select/2, select/3]).
-export([query/2]).
-define(POOL_NAME, fluxer_pool).
-define(CT, {<<... |
86d50625d9a16d0b628acc963f32bf310618dafecca9abf0621423a7607a7fc8 | kazu-yamamoto/dns | StateBinary.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE CPP #
module Network.DNS.StateBinary (
PState(..)
, initialState
, SPut
, runSPut
, put8
, put16
, put32
, putInt8
, putInt16
, putInt32
, putByteStrin... | null | https://raw.githubusercontent.com/kazu-yamamoto/dns/067e91ae552d70eaeea890b2c78f983519a824db/internal/Network/DNS/StateBinary.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE OverloadedStrings #
--------------------------------------------------------------
--------------------------------------------------------------
--------------------------------------------------------------
----------------------------------------... | # LANGUAGE FlexibleInstances #
# LANGUAGE CPP #
module Network.DNS.StateBinary (
PState(..)
, initialState
, SPut
, runSPut
, put8
, put16
, put32
, putInt8
, putInt16
, putInt32
, putByteString
, putReplicate
, SGet
, failSGet
, fitSGet
, runSGet
, runSGetAt
, runSGetWithLeftovers... |
071848c690d9cd9f941c54565398a6bd8836c85086ac8feed2b3d02d77603593 | koka-lang/koka | Box.hs | -----------------------------------------------------------------------------
Copyright 2020 - 2021 , Microsoft Research , .
--
-- This is free software; you can redistribute it and/or modify it under the
terms of the Apache License , Version 2.0 . A copy of the License can be
-- found in the LICENSE file at the ... | null | https://raw.githubusercontent.com/koka-lang/koka/86b1ee9284b70881e0bc78195d74fcc441986825/src/Backend/C/Box.hs | haskell | ---------------------------------------------------------------------------
This is free software; you can redistribute it and/or modify it under the
found in the LICENSE file at the root of this distribution.
---------------------------------------------------------------------------
-------------------------------... | Copyright 2020 - 2021 , Microsoft Research , .
terms of the Apache License , Version 2.0 . A copy of the License can be
module Backend.C.Box ( boxCore ) where
import Lib.Trace
import Control.Applicative hiding (empty)
import Control.Monad
import Data.List ( intersperse, partition )
import Data.Char
import Dat... |
584cfbe53b1088a55b5f170a3c3c47d7088fd8d59a9802e7accd68b7ceb64529 | lagenorhynque/duct.module.pedestal | pedestal_test.clj | (ns duct.module.pedestal-test
(:require
[clojure.test :as t]
[duct.core :as duct]
[duct.module.pedestal :as sut]))
(duct/load-hierarchy)
(t/deftest module-test
(let [base-config {:duct.profile/base
{:duct.core/project-ns 'some-api}
:duct.profile/prod {}
... | null | https://raw.githubusercontent.com/lagenorhynque/duct.module.pedestal/28a3f3c98b922294cb42c8589079eabba743552d/test/duct/module/pedestal_test.clj | clojure | (ns duct.module.pedestal-test
(:require
[clojure.test :as t]
[duct.core :as duct]
[duct.module.pedestal :as sut]))
(duct/load-hierarchy)
(t/deftest module-test
(let [base-config {:duct.profile/base
{:duct.core/project-ns 'some-api}
:duct.profile/prod {}
... | |
29897813c886858548259fb5c7147594918203bd483b6b6f6c875f8ee3580bc6 | ruricolist/serapeum | box.lisp | (in-package #:serapeum)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defconstant +atomic-accessors+
(and (member :ecl *features*)
(ignore-errors
(eval `(defstruct (,(gensym) :atomic-accessors))))
'(:atomic-accessors))))
(declaim (inline box)) ;Allow dynami... | null | https://raw.githubusercontent.com/ruricolist/serapeum/c3bc9566a381a2a6ce9ba75deef3933abe54c323/box.lisp | lisp | Allow dynamic-extent.
Required for older ECLs only. | (in-package #:serapeum)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defconstant +atomic-accessors+
(and (member :ecl *features*)
(ignore-errors
(eval `(defstruct (,(gensym) :atomic-accessors))))
'(:atomic-accessors))))
(defstruct (box (:constructor box (unbox))
... |
56e8bca06e3afdf293f6a5e5c8a5ca98825b912eb992f05db41e6cbe72c7b52b | rrnewton/haskell-lockfree | Test.hs | # LANGUAGE BangPatterns , NamedFieldPuns #
{- Example build:
ghc --make Test.hs -o Test.exe -rtsopts -fforce-recomp
-}
module Main where
import Test.HUnit as HU
import Data.Concurrent.Deque.Tests
import Data.Concurrent.Deque.Class
import Data.Concurrent.MegaDeque () -- Instances.
main :: IO ()
main = stdTestHarnes... | null | https://raw.githubusercontent.com/rrnewton/haskell-lockfree/87122157cbbc96954fcc575b4b110003d3e5c2f8/mega-deque/tests/Test.hs | haskell | Example build:
ghc --make Test.hs -o Test.exe -rtsopts -fforce-recomp
Instances.
, TestLabel "Maxed" $ tests_all (newQ :: IO (Deque T T D D Grow Safe)) | # LANGUAGE BangPatterns , NamedFieldPuns #
module Main where
import Test.HUnit as HU
import Data.Concurrent.Deque.Tests
import Data.Concurrent.Deque.Class
main :: IO ()
main = stdTestHarness $ return all_tests
where
all_tests :: HU.Test
all_tests = TestList $
[ TestLabel "WSDeque" $ tests_wsqueue (newQ :: ... |
4745c7840cab97a23ec000438169203cc1898f34ccd8a6ab91b3f39b7483f31a | phylogeography/spread | logging.cljs | (ns ui.logging
(:require [mount.core :as mount :refer [defstate]]
[taoensso.timbre :as timbre]))
(declare logging)
(def ^:private timbre->devtools-level
{:fatal js/console.error
:error js/console.error
:warn js/console.warn
:info js/console.info
:debug js/console.info
:trace js/consol... | null | https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/cljs/ui/logging.cljs | clojure | (ns ui.logging
(:require [mount.core :as mount :refer [defstate]]
[taoensso.timbre :as timbre]))
(declare logging)
(def ^:private timbre->devtools-level
{:fatal js/console.error
:error js/console.error
:warn js/console.warn
:info js/console.info
:debug js/console.info
:trace js/consol... | |
9086c26941e62ef5a7206274d7fb7f3f7698b22cca0ed66fd3851b229b0d2d72 | developandplay/material-components-web-miso | Radio.hs | {-# LANGUAGE OverloadedStrings #-}
module Material.Radio
( Config,
config,
setOnChange,
setChecked,
setDisabled,
setTouch,
setAttributes,
radio,
)
where
import qualified Data.Maybe as Maybe
import qualified Miso
-- | Radio button configuration
data Config msg = Config
{ checked :: B... | null | https://raw.githubusercontent.com/developandplay/material-components-web-miso/97a20097bf522b62743c884b66757eb895edd690/sample-app-jsaddle/Material/Radio.hs | haskell | # LANGUAGE OverloadedStrings #
| Radio button configuration
| Default radio button configuration
| Specify whether a radio button is checked
| Specify whether a radio button is disabled
Disabled radio buttons cannot be interacted with and have no visual interaction
effect.
| Specify additional attributes
| Spec... |
module Material.Radio
( Config,
config,
setOnChange,
setChecked,
setDisabled,
setTouch,
setAttributes,
radio,
)
where
import qualified Data.Maybe as Maybe
import qualified Miso
data Config msg = Config
{ checked :: Bool,
disabled :: Bool,
additionalAttributes :: [Miso.Attrib... |
d95d638e052d40d593c418433db73c528b289ae43147811757d5f6ac7c680558 | Ferada/cl-mock | suite.lisp | (in-package #:cl-mock-tests)
(def-suite cl-mock)
| null | https://raw.githubusercontent.com/Ferada/cl-mock/714a4122970d836e65a5a33f6bf6c6d99116325c/tests/suite.lisp | lisp | (in-package #:cl-mock-tests)
(def-suite cl-mock)
| |
5bb7331eb10a5a0bf21916563091907527df82aa7218376f316fbcf6a32f2002 | helium/miner | miner_critical_sup.erl | %%%-------------------------------------------------------------------
%% @doc miner Supervisor
%% @end
%%%-------------------------------------------------------------------
-module(miner_critical_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-define(SUP(I... | null | https://raw.githubusercontent.com/helium/miner/0b1e3c93f595c7c929038814026efd59af3e28ec/src/miner_critical_sup.erl | erlang | -------------------------------------------------------------------
@doc miner Supervisor
@end
-------------------------------------------------------------------
API
Supervisor callbacks
------------------------------------------------------------------
API functions
--------------------------------------------... | -module(miner_critical_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SUP(I, Args), #{
id => I,
start => {I, start_link, Args},
restart => permanent,
shutdown => infinity,
type => supervisor,
modules => [I]
}).
-define(WORKER(I, Args), #{
id => I,
... |
075770db405ca1dc71824b0f0b88478f19794a10077f85ce3dc920cb7afab1e3 | SamB/coq | libobject.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/library/libobject.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i $Id$ i
i
i
the identity substitut... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Libnames
o... |
e0b270271e9b5b186753ff6eab87731b5f47d03235f6875ca0a07727a103cfd7 | seancorfield/honeysql | union_test.cljc | copyright ( c ) 2023 , all rights reserved
(ns honey.union-test
(:refer-clojure :exclude [format])
(:require [clojure.test :refer [deftest is]]
[honey.sql :as sut]))
(deftest issue-451
(is (= [(str "SELECT ids.id AS id"
" FROM ((SELECT dimension.human_readable_field_id AS id"
... | null | https://raw.githubusercontent.com/seancorfield/honeysql/d17d44ffcf1519cb216ccdf3ee6a7fd1b033f90c/test/honey/union_test.cljc | clojure | copyright ( c ) 2023 , all rights reserved
(ns honey.union-test
(:refer-clojure :exclude [format])
(:require [clojure.test :refer [deftest is]]
[honey.sql :as sut]))
(deftest issue-451
(is (= [(str "SELECT ids.id AS id"
" FROM ((SELECT dimension.human_readable_field_id AS id"
... | |
4c97009f1d62b5473eb0d11a5f3b3cf7f4f30df3f276330662620cda505add0e | fpco/schoolofhaskell.com | Files.hs | module Import.Files where
import ClassyPrelude.Yesod hiding (fileName)
import Foundation
import qualified FP.Store.Blob as Blob
EKB TODO Eliminate this by giving FP.Store . a ' HasBlobStore ' typeclass like
-- -server/blob/master/Data/BlobStore.hs
getFileSourceBlob
:: Blob.BlobName
-> Handler (ResumableSour... | null | https://raw.githubusercontent.com/fpco/schoolofhaskell.com/15ec1a03cb9d593ee9c0d167dc522afe45ba4f8e/src/Import/Files.hs | haskell | -server/blob/master/Data/BlobStore.hs | module Import.Files where
import ClassyPrelude.Yesod hiding (fileName)
import Foundation
import qualified FP.Store.Blob as Blob
EKB TODO Eliminate this by giving FP.Store . a ' HasBlobStore ' typeclass like
getFileSourceBlob
:: Blob.BlobName
-> Handler (ResumableSource (ResourceT IO) ByteString)
getFileSour... |
9613ff107bfd7d2b4c6252799db382a9db960af9a6841062c8b7869bda822a57 | JacquesCarette/Drasil | PythonRenderer.hs | # LANGUAGE TypeFamilies #
-- | The logic to render Python code is contained in this module
module GOOL.Drasil.LanguageRenderer.PythonRenderer (
* Python Code Configuration -- defines syntax of all Python code
PythonCode(..), pyName, pyVersion
) where
import Utils.Drasil (blank, indent)
import GOOL.Drasil.CodeTyp... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/c7c57e77e0de03158e7c4db6e74e13898a889764/code/drasil-gool/lib/GOOL/Drasil/LanguageRenderer/PythonRenderer.hs | haskell | | The logic to render Python code is contained in this module
defines syntax of all Python code
) = M.decrement1
convenience | # LANGUAGE TypeFamilies #
module GOOL.Drasil.LanguageRenderer.PythonRenderer (
PythonCode(..), pyName, pyVersion
) where
import Utils.Drasil (blank, indent)
import GOOL.Drasil.CodeType (CodeType(..))
import GOOL.Drasil.ClassInterface (Label, Library, VSType, SVariable, SValue,
VSFunction, MSStatement, MixedCtor... |
949a160839c312e403989c6aa8e8f7b3b15cbb0afa4939c2a715845f6b8519cd | EligiusSantori/L2Apf | target_selected.scm | (module system racket/base
(require "../../packet.scm")
(provide game-server-packet/target-selected)
(define (game-server-packet/target-selected buffer)
(let ((s (open-input-bytes buffer)))
(list
(cons 'id (read-byte s))
(cons 'object-id (read-int32 #f s))
(cons 'target-id (read-int32 #f ... | null | https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/game/server/target_selected.scm | scheme | (module system racket/base
(require "../../packet.scm")
(provide game-server-packet/target-selected)
(define (game-server-packet/target-selected buffer)
(let ((s (open-input-bytes buffer)))
(list
(cons 'id (read-byte s))
(cons 'object-id (read-int32 #f s))
(cons 'target-id (read-int32 #f ... | |
156a2d3ccd26b16a14c10def01fd67623bc81c347b3dcbee50e6a5b06214a89a | OCamlPro/ocp-build | buildActionClean.ml | (**************************************************************************)
(* *)
(* Typerex Tools *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/b29be2f23ebe8db4bd3f16e035770b038876b9bc/tools/ocp-build/actions/buildActionClean.ml | ocaml | ************************************************************************
Typerex Tools
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU General Public License version 3 described in the file
open Ezcmd.V2
open EZCMD.TYPES
open BuildArgs
open BuildOptions
TODO : handle -arch attribute , ie :
- remove only directories in arch/ subdir
- do n't re... |
05bfbdf529aa56e69d4ecdc81e1bf3adbd56524659617ec7adb03d365912107c | IBM-Watson/kale | login.clj | ;;
( C ) Copyright IBM Corp. 2016 All Rights Reserved .
;;
(ns kale.login
(:require [kale.persistence :refer [write-state]]
[kale.aliases :as aliases]
[kale.cloud-foundry :as cf]
[kale.list :refer [list-working-environment]]
[kale.update :refer [get-selections]]
... | null | https://raw.githubusercontent.com/IBM-Watson/kale/f1c5e312e5db0e3fc01c47dfb965f175b5b0a5b6/src/kale/login.clj | clojure |
This assumes the user hasn't changed the name of their local org | ( C ) Copyright IBM Corp. 2016 All Rights Reserved .
(ns kale.login
(:require [kale.persistence :refer [write-state]]
[kale.aliases :as aliases]
[kale.cloud-foundry :as cf]
[kale.list :refer [list-working-environment]]
[kale.update :refer [get-selections]]
... |
a645d1483b2d4ca2d9147ea9fa92a215dc5ac9557eea453dec4f235f97a9fd58 | verystable/warframe-autobuilder | AutoBuilder.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : AutoBuilder
-- Maintainer :
-- Stability : experimental
--
This module is the main entry point for Warframe - Autobuilder via ' autoBuilder '
module AutoBuilder
( autoBuilder
)
where
import ClassyPrelude
impo... | null | https://raw.githubusercontent.com/verystable/warframe-autobuilder/015e0bb6812711ea27071816d054cbaa1c65770b/src/AutoBuilder.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : AutoBuilder
Maintainer :
Stability : experimental
| autoBuilder is the main entry function that connects
Setting some default cases and passing 'safe' args to rankers
sets needed mods to [] if parsing fails.
sets all available mods to ignore if parsing fails.
... | # LANGUAGE NoImplicitPrelude #
This module is the main entry point for Warframe - Autobuilder via ' autoBuilder '
module AutoBuilder
( autoBuilder
)
where
import ClassyPrelude
import Ranker.WeaponRankers
import Ranker.ComparatorsGenerator
import qualified ArgInterface.ModsMappe... |
1aa5123e84ecb1df68f4a91e0e085852ba5266abfb1cc9893f0398335a1b70cc | antoniogarrote/erlfaye | erlfaye_demo_app.erl | %%%----------------------------------------------------------------
@author < >
%%% @doc
%%%
%%% @end
2011
%%%----------------------------------------------------------------,
-module(erlfaye_demo_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1, demo/0]).
%%%===============... | null | https://raw.githubusercontent.com/antoniogarrote/erlfaye/366227ac6c671e557cedb047c620e69ed3f94b3b/erlfaye_demo/src/erlfaye_demo_app.erl | erlang | ----------------------------------------------------------------
@doc
@end
----------------------------------------------------------------,
Application callbacks
===================================================================
Application callbacks
==============================================================... | @author < >
2011
-module(erlfaye_demo_app).
-behaviour(application).
-export([start/2, stop/1, demo/0]).
@private
-spec start(normal | {takeover, node()} | {failover, node()},
any()) -> {ok, pid()} | {ok, pid(), State::any()} |
{error, Reason::any()}.
start(_StartType, ... |
673a3be35b31a8b73d676ea10fd5e52b70d61dfb8b4cd8b039f1d1cc12ee8565 | netguy204/brianscheme | color.scm | ;;; "color.scm" color data-type
Copyright 2001 , 2002
;
;Permission to copy this software, to modify it, to redistribute it,
;to distribute modified versions, and to use it for any purpose is
;granted, subject to the following restrictions and understandings.
;
1 . Any copy made of this software must include this c... | null | https://raw.githubusercontent.com/netguy204/brianscheme/1b7d7b35485ffdec3b76113064191062e3874efa/slib/color.scm | scheme | "color.scm" color data-type
Permission to copy this software, to modify it, to redistribute it,
to distribute modified versions, and to use it for any purpose is
granted, subject to the following restrictions and understandings.
in full.
this software will be error-free, and I am under no obligation to
provide any ... | Copyright 2001 , 2002
1 . Any copy made of this software must include this copyright notice
2 . I have made no warranty or representation that the operation of
3 . In conjunction with products arising from the use of this
(require 'record)
(require 'color-space)
(require 'scanf)
(require 'printf)
(require 'str... |
9ad3e7b77cb9ff72e15edded0557f4643068caf0926479a422ee5b665fd2ee61 | dyzsr/ocaml-selectml | format.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/stdlib/format.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Pretty - printing .
This module implements a pretty - printing facility to format values
wi... |
d6a0d45975b8a29c1ff877825ccbb208a5a7d5d9fe1a6e5a358e915a65b1d5cb | ajhc/ajhc | Main.hs | module Grin.Main(compileToGrin) where
import Control.Monad
import Data.List
import Data.Monoid(mappend)
import System.Directory
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
import qualified Data.ByteString.Lazy.UTF8 as LBS
import qualified Data.Map as Map
import qualified Data.Se... | null | https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/src/Grin/Main.hs | haskell | x <- return $ normalizeGrin x
x <- return $ twiddleGrin x | module Grin.Main(compileToGrin) where
import Control.Monad
import Data.List
import Data.Monoid(mappend)
import System.Directory
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
import qualified Data.ByteString.Lazy.UTF8 as LBS
import qualified Data.Map as Map
import qualified Data.Se... |
4dd800508e21a236e0fd31e6518a19a7e39278b2e2cc34b56579dbe67bd7094e | SKA-ScienceDataProcessor/RC | Run.hs | # LANGUAGE ExistentialQuantification #
{-# LANGUAGE BangPatterns #-}
module Flow.Run
( dumpStrategy
, dumpStrategyDOT
, dumpSteps
, execStrategy
, execStrategyDNA
) where
import Control.Monad
import Control.Concurrent
import Data.List
import Data.Maybe ( fromMaybe, fromJust, mapMaybe )
import qualified D... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS5/dna/flow/Flow/Run.hs | haskell | # LANGUAGE BangPatterns #
Generate sorted kernel
Generate sorted kernel
Open output file
Run steps given by strategy
| Execute schedule, discarding unecessary buffers as required
Annotate steps with dependencies of the following steps
Execute step
Discard all buffers that are not required any more.
TODO: fix O... | # LANGUAGE ExistentialQuantification #
module Flow.Run
( dumpStrategy
, dumpStrategyDOT
, dumpSteps
, execStrategy
, execStrategyDNA
) where
import Control.Monad
import Control.Concurrent
import Data.List
import Data.Maybe ( fromMaybe, fromJust, mapMaybe )
import qualified Data.IntMap as IM
import qualif... |
42a597706fa9cb66a971819fc532897ad4809da99203089b85535d9a42f02dc6 | sebsheep/elm2node | Constraint.hs | # OPTIONS_GHC -Wall #
{-# LANGUAGE OverloadedStrings #-}
module Elm.Constraint
( Constraint
, exactly
, anything
, toChars
, satisfies
, check
, intersect
, goodElm
, defaultElm
, untilNextMajor
, untilNextMinor
, expand
--
, Error(..)
, decoder
, encode
)
where
import Control.Mona... | null | https://raw.githubusercontent.com/sebsheep/elm2node/602a64f48e39edcdfa6d99793cc2827b677d650d/compiler/src/Elm/Constraint.hs | haskell | # LANGUAGE OverloadedStrings #
CONSTRAINTS
COMMON CONSTRAINTS
TO CHARS
IS SATISFIED
INTERSECT
CREATE CONSTRAINTS
JSON
BINARY
PARSER
v
<
= | # OPTIONS_GHC -Wall #
module Elm.Constraint
( Constraint
, exactly
, anything
, toChars
, satisfies
, check
, intersect
, goodElm
, defaultElm
, untilNextMajor
, untilNextMinor
, expand
, Error(..)
, decoder
, encode
)
where
import Control.Monad (liftM4)
import Data.Binary (Binary, g... |
84e34d2374818251b4114ec6d612952d8202edf0f0d7673a322233e5867cf595 | TrustInSoft/tis-kernel | ctrlDpds.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/pdg/ctrlDpds.mli | 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 Frama - C.
Copyright ( C ) 2007 - 2015 ... |
2e287d42adbe85d05d25f3969fb6b9771c702cfa24523b47b68f66ef2f7c9b48 | xavierleroy/camlidl | com.ml | (***********************************************************************)
(* *)
(* CamlIDL *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/xavierleroy/camlidl/b192760875fe6e97b13004bd289720618e12ee22/lib/com.ml | ocaml | *********************************************************************
CamlIDL
... | , projet Cristal , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License .
$ I d : com.ml , v 1.9 2004 - 07 - 08... |
4a187dd0ebb31f5e74ee5a1f7d18ca4ed9727d79f7b65dd9c3e2da452ccd85d5 | ml4tp/tcoq | refl_omega.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
PROJET RNRT Calife - 2001
Author : France Télécom R&D
Licence : LGPL version 2.1
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/plugins/romega/refl_omega.ml | ocaml | \section{Useful functions and flags}
Especially useful debugging functions
More readable than the prefix notation
\section{Types}
\subsection{How to walk in a term}
To represent how to get to a proposition. Only choice points are
kept (branch to choose in a disjunction and identifier of the disjunctive
... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
PROJET RNRT Calife - 2001
Author : France Télécom R&D
Licence : LGPL version 2.1
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... |
580e836a10055ebe75dfb192922162eb25f82b9b3aa17269d397ea3a20cbb39d | camllight/camllight | char.ml | (* Character operations, with sanity checks *)
#open "bool";;
#open "eq";;
#open "exc";;
#open "fstring";;
let char_of_int i =
if i < 0 || i > 255
then invalid_arg "char_of_int"
else fchar__char_of_int i
;;
let char_for_read = fchar__char_for_read;;
let string_of_char c = make_string 1 c;;
| null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/src/lib/char.ml | ocaml | Character operations, with sanity checks |
#open "bool";;
#open "eq";;
#open "exc";;
#open "fstring";;
let char_of_int i =
if i < 0 || i > 255
then invalid_arg "char_of_int"
else fchar__char_of_int i
;;
let char_for_read = fchar__char_for_read;;
let string_of_char c = make_string 1 c;;
|
59eff07fe5ec69cbde3abf2cb6769373ead5e60ecfbabeb0ab2a401020665684 | day8/re-frame-10x | material.cljs | (ns day8.re-frame-10x.material
(:require
[day8.re-frame-10x.styles :as styles])
(:refer-clojure :exclude [print]))
Icons from / ' ' theme .
;; Names have been kept the same for ease of reference.
(defn add
[{:keys [size]}]
[:svg {:height size
:viewBox "0 0 24 24"
:width size}
[:... | null | https://raw.githubusercontent.com/day8/re-frame-10x/dba53ea170797a661d7eee37908746615d24ad16/src/day8/re_frame_10x/material.cljs | clojure | Names have been kept the same for ease of reference. | (ns day8.re-frame-10x.material
(:require
[day8.re-frame-10x.styles :as styles])
(:refer-clojure :exclude [print]))
Icons from / ' ' theme .
(defn add
[{:keys [size]}]
[:svg {:height size
:viewBox "0 0 24 24"
:width size}
[:path {:d "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}]])
(def... |
1c2416ef0c82e9271b0a674fcd7488a45b39305f51dcedb0577a3d622c47dd9f | julienXX/clj-slack | oauth.clj | (ns clj-slack.oauth
(:require [clj-slack.core :refer [slack-request]]))
(defn access
"Exchanges a temporary OAuth code for an API token.
Provides client-id and client-secret using HTTP Basic auth."
[connection client-id client-secret code redirect-uri]
(slack-request
(merge connection {:skip-token-valid... | null | https://raw.githubusercontent.com/julienXX/clj-slack/ff5649161646f11dd8d52d1315c0e74dc723eeb7/src/clj_slack/oauth.clj | clojure | (ns clj-slack.oauth
(:require [clj-slack.core :refer [slack-request]]))
(defn access
"Exchanges a temporary OAuth code for an API token.
Provides client-id and client-secret using HTTP Basic auth."
[connection client-id client-secret code redirect-uri]
(slack-request
(merge connection {:skip-token-valid... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.