_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 |
|---|---|---|---|---|---|---|---|---|
bac704031384e1633fdd32f790107ffb837d4dcd6227c477560e5effc20b0926 | ucsd-progsys/liquidhaskell | Bounds.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE TupleSections #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
module Language.Haskell.Liquid.Types.Bounds (
Bound(..),
RBound, RRBound,
RBEnv, ... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/2ead75f10a7dc664186828a6299e99f26042e754/src/Language/Haskell/Liquid/Types/Bounds.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable #
^ The name of the bound
^ Type variables that appear in the bounds
^ These are abstract refinements, for now
^ These are value variables
^ The body of the bound
NV TODO: Turn this into a proper error
NV TODO: Turn this into a proper error
unProp
... | # LANGUAGE FlexibleContexts #
# LANGUAGE TupleSections #
# LANGUAGE DeriveGeneric #
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
module Language.Haskell.Liquid.Types.Bounds (
Bound(..),
RBound, RRBound,
RBEnv, RRBEnv,
makeBound,
) where
import Prelude hiding (error)
impo... |
522ed153d1cde47e135e14a719736a4057e4db1320c5f29585a08cf4850f42f9 | serokell/ariadne | TxMeta.hs | -- | Transaction metadata conform the wallet specification
module Ariadne.Wallet.Cardano.Kernel.DB.TxMeta
( -- * Transaction metadata
module Types
-- * Handy re-export to not leak our current choice of storage backend.
, openMetaDB
) where
import qualified Ariadne.Wallet.Cardano... | null | https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ariadne/cardano/src/Ariadne/Wallet/Cardano/Kernel/DB/TxMeta.hs | haskell | | Transaction metadata conform the wallet specification
* Transaction metadata
* Handy re-export to not leak our current choice of storage backend.
Concrete instantiation of 'MetaDBHandle' | module Ariadne.Wallet.Cardano.Kernel.DB.TxMeta
module Types
, openMetaDB
) where
import qualified Ariadne.Wallet.Cardano.Kernel.DB.Sqlite as ConcreteStorage
import Ariadne.Wallet.Cardano.Kernel.DB.TxMeta.Types as Types
openMetaDB :: FilePath -> IO MetaDBHandle
openMetaDB fp = do
conn <- C... |
8c015c1714dd34369db91c2fde01ef9414220e9ff9ca4c3cf242c32756e621fb | danabr/visualize.erl | process_communication_analysis_transform.erl | %% Implements a parse transform for analysing communication between
%% processes. It transforms the following functions:
%% x The ! (bang) operator
%% x spawn
%% x spawn_link
%% x register
%% * gen_server:call
%% * gen_server:cast
%% * gen_server:reply
%% * gen_server:start
* gen_server : start_link... | null | https://raw.githubusercontent.com/danabr/visualize.erl/abf1d35a2dcbb274792e517c0e670c40688c162a/src/process_analyser/process_communication_analysis_transform.erl | erlang | Implements a parse transform for analysing communication between
processes. It transforms the following functions:
x The ! (bang) operator
x spawn
x spawn_link
x register
* gen_server:call
* gen_server:cast
* gen_server:reply
* gen_server:start
Exported functions
Calls
spawn
spawn_link
... | * gen_server : start_link
-module(process_communication_analysis_transform).
-export([parse_transform/2]).
-record(state, {module, func}).
-spec(parse_transform(Forms, Options) -> Forms2 when
Forms :: [erl_parse:abstract_form()],
Forms2 :: [erl_parse:abstract_form()],
Options :: [Option],
... |
8a396e3f0e76dd2ede3a93a0b8cbf81e1838a7e528cf924cc4aec69244b3c96d | oxidizing/letters | test.ml | open Letters
let ( let* ) = Lwt.bind
let get_ethereal_account_details () =
let open Yojson.Basic.Util in
(* see the README.md how to generate the account file and the path
* below is relative to the location of the executable under _build
*)
let json = Yojson.Basic.from_file "../../../ethereal_account.jso... | null | https://raw.githubusercontent.com/oxidizing/letters/35f7594d15e3e670a5b99c8f6f75248bad9f7f85/service-test/test.ml | ocaml | see the README.md how to generate the account file and the path
* below is relative to the location of the executable under _build
see the README.md how to generate the account file and the path
* below is relative to the location of the executable under _build
Run it
Use PEM file containing correct ... | open Letters
let ( let* ) = Lwt.bind
let get_ethereal_account_details () =
let open Yojson.Basic.Util in
let json = Yojson.Basic.from_file "../../../ethereal_account.json" in
let username = json |> member "username" |> to_string in
let password = json |> member "password" |> to_string in
let hostname = json... |
9e93f369f548008b0ae1a100d167622e19807869df985faac7de875f9564b00a | typedclojure/typedclojure | ctyp97_tvar_scoping.clj | (ns clojure.core.typed.test.ctyp97-tvar-scoping
(:import (clojure.lang ASeq LazySeq))
(:require [clojure.core.typed :as t :refer [ann]]))
(ann reduce_ (t/All [a b]
(t/IFn
[[a b -> b] b (t/Seqable a) -> b]
[[a (t/Seqable (t/U a b)) -> (t/Seqable (t/U a b))]
... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/f0f736bdeb2cbdb86a1194aa8217cf5e9cb675c7/typed/clj.checker/test/clojure/core/typed/test/ctyp97_tvar_scoping.clj | clojure | -------- main
if you comment out this function, you will get :ok
ERROR!! -- Cannot resolve type: a | (ns clojure.core.typed.test.ctyp97-tvar-scoping
(:import (clojure.lang ASeq LazySeq))
(:require [clojure.core.typed :as t :refer [ann]]))
(ann reduce_ (t/All [a b]
(t/IFn
[[a b -> b] b (t/Seqable a) -> b]
[[a (t/Seqable (t/U a b)) -> (t/Seqable (t/U a b))]
... |
06429c92244ad21a0a9bf88415ee611ed0167ff1e835c3e040bb701223d9c4e6 | grin-compiler/ghc-wpc-sample-programs | Pretty.hs | module Agda.Compiler.JS.Pretty where
import Prelude hiding ( null )
import Data.Char ( isAsciiLower, isAsciiUpper, isDigit )
import Data.List ( intercalate )
import Data.Set ( Set, toList, singleton, insert, member )
import Data.Map ( Map, toAscList, empty, null )
import Agda.Syntax.Common ( Nat )
import Agda.Utils.H... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/Compiler/JS/Pretty.hs | haskell | do the pretty-printing directly than use the Pretty library, which
with i levels of indentation.
Pretty-print collections
Pretty print identifiers
Pretty print expressions
| Check if a string is a valid JS identifier. The check ignores keywords
as we prepend z_ to our identifiers. The check
is conservative and ... | module Agda.Compiler.JS.Pretty where
import Prelude hiding ( null )
import Data.Char ( isAsciiLower, isAsciiUpper, isDigit )
import Data.List ( intercalate )
import Data.Set ( Set, toList, singleton, insert, member )
import Data.Map ( Map, toAscList, empty, null )
import Agda.Syntax.Common ( Nat )
import Agda.Utils.H... |
42ba3fe5e46761080427d100161c24dead43950db87000eb2f9d35ebc857ba95 | zellige/hastile | Tile.hs | {-# LANGUAGE DeriveFunctor #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Hastile.Types.Tile where
import qualified Data.Aeson as Aeson
import qualified Data.Functor.Contravariant as Contravaria... | null | https://raw.githubusercontent.com/zellige/hastile/4dabe66bd997e91128ab4136b6f40da51c204a2b/src/Hastile/Types/Tile.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE OverloadedStrings # | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
module Hastile.Types.Tile where
import qualified Data.Aeson as Aeson
import qualified Data.Functor.Contravariant as Contravariant
import qualified Data.Geometry.Types.Geography as GeometryTypesGeography
import quali... |
7a3dd8455797ebb71a01911b47a6ed8c0cd8ca61494e760700290f5f6f5519c4 | cblp/stack-offline | Simple.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
module Development.Shake.Simple
(Rule, need, rule, simpleRule, simpleStoredValue, storedValue, want) where
import Data.Functor (($>))
import Development.Shake (Action, Rules, ShakeOptions,... | null | https://raw.githubusercontent.com/cblp/stack-offline/94215104d0cd295e39815db307513a5cc959e02f/test/Development/Shake/Simple.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
module Development.Shake.Simple
(Rule, need, rule, simpleRule, simpleStoredValue, storedValue, want) where
import Data.Functor (($>))
import Development.Shake (Action, Rules, ShakeOptions,... | |
ffc7f379df363ab3b36fe6ff96111cde302331493f5c716d87069eba1a80d14f | fogfish/typhoon | typhoon_sup.erl | %%
%% Copyright 2015 Zalando SE
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
... | null | https://raw.githubusercontent.com/fogfish/typhoon/db0d76050a9c41c45582e9928206270450600d00/apps/typhoon/src/typhoon_sup.erl | erlang |
Copyright 2015 Zalando SE
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Licens... | Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(typhoon_sup).
-behaviour(supervisor).
-author('').
-export([
start_link/0, init/1
]).
-define(CHILD(Type, I), {I, {I, start_link, []}, permanent, ... |
862496a55bfbf9ec2667bd48a0671778a37dd0ed0665f7c33c1d53fdf7b6479a | madgen/exalog | Error.hs | # LANGUAGE RecordWildCards #
module Language.Exalog.Error
( Error(..)
, Severity(..)
) where
import Protolude hiding ((<>))
import Text.PrettyPrint
import Language.Exalog.Pretty.Helper (Pretty(..), ($+?$))
import Language.Exalog.SrcLoc (SrcSpan, prettySpan)
data Severity =
-- |Error that should never be th... | null | https://raw.githubusercontent.com/madgen/exalog/7d169b066c5c08f2b8e44f5e078df264731ac177/src/Language/Exalog/Error.hs | haskell | |Error that should never be thrown
|Standard user error
|Warning | # LANGUAGE RecordWildCards #
module Language.Exalog.Error
( Error(..)
, Severity(..)
) where
import Protolude hiding ((<>))
import Text.PrettyPrint
import Language.Exalog.Pretty.Helper (Pretty(..), ($+?$))
import Language.Exalog.SrcLoc (SrcSpan, prettySpan)
data Severity =
Impossible
| User
| Warning... |
344f750ed145406cdfa423e6173f02a9efbea6341979394c519cf444772843f7 | taksatou/cl-gearman | backup-server.lisp | Run two gearman servers using
docker run --rm -p 4730:4730 artefactual / gearmand:1.1.19.1 - alpine
docker run --rm -p 4731:4730 artefactual / gearmand:1.1.19.1 - alpine
1 ) Test with two servers active
2 ) Shutdown the first server and check that still got the answer to the client side
(ql:quickload :cl-ge... | null | https://raw.githubusercontent.com/taksatou/cl-gearman/94658c51cd58f4720de8973d8aed5ee9d9d6ba13/examples/backup-server.lisp | lisp | worker side
client side | Run two gearman servers using
docker run --rm -p 4730:4730 artefactual / gearmand:1.1.19.1 - alpine
docker run --rm -p 4731:4730 artefactual / gearmand:1.1.19.1 - alpine
1 ) Test with two servers active
2 ) Shutdown the first server and check that still got the answer to the client side
(ql:quickload :cl-ge... |
23475c002950dcca197c4199cc69c4a94de38f3c6b6e5bed270909a811c4c927 | byorgey/thesis | SpeciesDiagrams.hs | # LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
module SpeciesDiagrams where
i... | null | https://raw.githubusercontent.com/byorgey/thesis/b60af0501cdb2d1154d9303694884f461c0e499a/SpeciesDiagrams.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeSynonymInstances #
----------------------------------------------------------
Some specific constructions
------------------------------------------------
------------------------------------------------
-----------------... | # LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE NoMonomorphismRestriction #
module SpeciesDiagrams where
import Control.Arrow (first, second)
import Control.Lens (_head, _last)
imp... |
0963eb2d3befccd87079f4e9f22b4a8957de2528b3a05ebcee4b2da7d81c18bd | tonyg/kali-scheme | write.scm |
(define (test)
(let* ((b (allocate-memory 16))
(res (read-block (current-input-port)
b
16
(lambda (okay? eof? got)
(if (or (not okay?)
eof?)
-1
(write-block (current-output-port)
b
got
(lambda (okay? sent)
(if okay? sent -1))))))))
... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/ps-compiler/prescheme/test/write.scm | scheme |
(define (test)
(let* ((b (allocate-memory 16))
(res (read-block (current-input-port)
b
16
(lambda (okay? eof? got)
(if (or (not okay?)
eof?)
-1
(write-block (current-output-port)
b
got
(lambda (okay? sent)
(if okay? sent -1))))))))
... | |
9018ca4c09b62fa09f65ee05c1d14b3d496b8eccfa8a229107eaa712d6ab4885 | seth/pooler | pooler_tests.erl | -module(pooler_tests).
-include_lib("eunit/include/eunit.hrl").
-include("../src/pooler.hrl").
-compile([export_all]).
% The `user' processes represent users of the pooler library. A user
% process will take a pid, report details on the pid it has, release
% and take a new pid, stop cleanly, and crash.
start_user(... | null | https://raw.githubusercontent.com/seth/pooler/9c28fb479f9329e2a1644565a632bc222780f1b7/test/pooler_tests.erl | erlang | The `user' processes represent users of the pooler library. A user
process will take a pid, report details on the pid it has, release
and take a new pid, stop cleanly, and crash.
The `tc' processes represent the pids tracked by pooler for testing.
They have a type and an ID and can report their type and ID and
s... | -module(pooler_tests).
-include_lib("eunit/include/eunit.hrl").
-include("../src/pooler.hrl").
-compile([export_all]).
start_user() ->
spawn(fun() -> user_loop(start) end).
user_id(Pid) ->
Pid ! {get_tc_id, self()},
receive
{Type, Id} ->
{Type, Id}
end.
user_new_tc(Pid) ->
... |
2c615210162f963b1f0515b16f6f1bca7d44cf346e44dcbd6ea6306f748e26b6 | racket/typed-racket | shallow-deep-id-1.rkt | #lang racket/base
;; deep should protect itself from shallow
(module uuu racket/base
(provide bad-list)
(define bad-list '(X X)))
(module sss typed/racket/shallow
(require/typed (submod ".." uuu)
(bad-list (Listof (List Symbol))))
(provide f)
(: f (-> (-> (List Symbol) Symbol) (Listof Symbol)))
(d... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/shallow-deep-id-1.rkt | racket | deep should protect itself from shallow | #lang racket/base
(module uuu racket/base
(provide bad-list)
(define bad-list '(X X)))
(module sss typed/racket/shallow
(require/typed (submod ".." uuu)
(bad-list (Listof (List Symbol))))
(provide f)
(: f (-> (-> (List Symbol) Symbol) (Listof Symbol)))
(define (f x)
(map x bad-list)))
(module... |
dd6e61ac1646c81470a62337b7fc3c5ce32d36b0e24c57096f8f4d08ad7b56eb | pedestal/pedestal-app | walkthrough.clj | In Pedestal , applications receive input as inform messages . An
;; inform message is a vector of event-entries. Each event-entry has
;; the form
[source event state(s)]
;; Inform messages may be received from back-end services or from the
;; user interface. For example, a button click may generate an inform
;; mes... | null | https://raw.githubusercontent.com/pedestal/pedestal-app/509ab766a54921c0fbb2dd7c6a3cb20223b8e1a1/app/examples/walkthrough.clj | clojure | inform message is a vector of event-entries. Each event-entry has
the form
Inform messages may be received from back-end services or from the
user interface. For example, a button click may generate an inform
message like the one shown below.
and the event is
There are no states included in this message.
An app... | In Pedestal , applications receive input as inform messages . An
[source event state(s)]
[[[:ui :button :a] :click]]
This inform message has one event - entry . The source is
[:ui :button :a]
:click
transform message contains one or more transformations . A
[target op arg(s)]
[[[:info :counter :a] inc... |
174809f2fed2fd7fcbb732a06c6815001f764d4c92b8fc9b958716cd7c1c80da | Yuppiechef/cqrs-server | simple.clj | (ns cqrs-server.simple
(:require
[clojure.tools.logging :as log]
[clojure.core.async :as a]
[clojure.java.data :as data]))
;; TODO: Flow conditions do not support short-circuiting, #{:all :none} to or exception handling
(defn resolve-fn [k]
(cond
(fn? k) k
(keyword? k) (resolve (symbol (namespac... | null | https://raw.githubusercontent.com/Yuppiechef/cqrs-server/57621f52e8f4a9de9f2e06fff16b4b918a81228a/src/cqrs_server/simple.clj | clojure | TODO: Flow conditions do not support short-circuiting, #{:all :none} to or exception handling | (ns cqrs-server.simple
(:require
[clojure.tools.logging :as log]
[clojure.core.async :as a]
[clojure.java.data :as data]))
(defn resolve-fn [k]
(cond
(fn? k) k
(keyword? k) (resolve (symbol (namespace k) (name k)))
:else (throw (RuntimeException. "Unsupported function value: " k))))
(defn a... |
c7276a2d9d1c9bb70ec9040d661060ef36d636f90b0a5aced58009ba2b5f3157 | apache/couchdb-global-changes | global_changes_sup.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " AS ... | null | https://raw.githubusercontent.com/apache/couchdb-global-changes/4aa1fc4b20ee029c93e796309887d66432fdf959/src/global_changes_sup.erl | erlang | use this file except in compliance with the License. You may obtain a copy of
the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations u... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(global_changes_sup).
-behavior(supervisor).
-export([start_link/0]).
-export([init/1]).
-export([handle_config_change/5]).
-export([handle_confi... |
5a334f83dc52f44558272506923dbd436e452378cf260daf9c4066d33b9418af | Zilliqa/scilla | Formatter.ml |
This file is part of scilla .
Copyright ( c ) 2018 - present Zilliqa Research Pvt . Ltd.
scilla is free software : you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at you... | null | https://raw.githubusercontent.com/Zilliqa/scilla/8880cadf4c317415dc808fce004e5e06a33492d0/src/formatter/Formatter.ml | ocaml | instantiated syntax extended with comments
-- helpers --
number of spaces to indent
Add parentheses only if the condition if true
Wrap document in comment symbols
* Add formatted [comments] around [doc].
TODO: temporary solution
This cannot happen in source code
Any address in use
Address containing a... |
This file is part of scilla .
Copyright ( c ) 2018 - present Zilliqa Research Pvt . Ltd.
scilla is free software : you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at you... |
cc116de9a2a36ee234f795415aabbd0570205e1246765ae22accb5de011d7247 | rametta/retros | Move.hs | module Web.View.Columns.Move where
import Web.View.Prelude
data MoveView = MoveView { column :: Column, retros :: [Retro] }
instance View MoveView where
html MoveView {..} =
renderModal
Modal
{ modalTitle = "Move Column",
modalCloseUrl = pathTo $ ShowRetroAction $ get #retroId column,
... | null | https://raw.githubusercontent.com/rametta/retros/55da48d71a409638d3a828cf48ccfe29dc4fc5d6/Web/View/Columns/Move.hs | haskell | module Web.View.Columns.Move where
import Web.View.Prelude
data MoveView = MoveView { column :: Column, retros :: [Retro] }
instance View MoveView where
html MoveView {..} =
renderModal
Modal
{ modalTitle = "Move Column",
modalCloseUrl = pathTo $ ShowRetroAction $ get #retroId column,
... | |
77a8fa82e5b6728907dfa800e9201f12a7f10707bd1586e796ad1044fe8023e8 | techascent/tvm-clj | vision.clj | (ns tvm-clj.impl.fns.topi.vision
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "topi.vision") | null | https://raw.githubusercontent.com/techascent/tvm-clj/1088845bd613b4ba14b00381ffe3cdbd3d8b639e/src/tvm_clj/impl/fns/topi/vision.clj | clojure | (ns tvm-clj.impl.fns.topi.vision
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "topi.vision") | |
ff39571901ab29dd917fcc1a7f56d852e893695df122817f0ad993fe4d12a800 | modular-macros/ocaml-macros | types.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/typing/types.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
* [ Types ] defines the representation of types and declarations ( that is , the
content of module... |
879f2859687495c85b28c6732950b39d1b881d6569bc77553c5287f9997158cd | Clozure/ccl | arrays-fry.lisp | -*- Mode : Lisp ; Package : CCL ; -*-
;;;
Copyright 1994 - 2009 Clozure Associates
;;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the License.
;;; You may obtain a copy of the License at
;;;
;;; -2.0
;;;
;;; Unless required by ... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/lib/arrays-fry.lisp | lisp | Package : CCL ; -*-
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific ... | Copyright 1994 - 2009 Clozure Associates
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package "CCL")
(defun bit (bit-array &rest subscripts)
"Return the bit from the BIT-ARRAY at the specified SUBSCRIPTS."
(declare (dynamic-extent subscripts))
(unless (eq (array-element-type bit-... |
309883dad71496d1ce26640c5bbe48826edfcfb51044f3ffdaa49982b6954cb4 | rlepigre/pml | buckets.mli | (** Simple buckets in which a key is associated to multiple values. The keys
are compared with the equality function specified upon the creation of a
new structure. *)
(** Type of a bucket. *)
type ('a, 'b) t
(** Synonym of [('a, 'b) t]. *)
type ('a, 'b) buckets = ('a, 'b) t
(** [empty eq] creates an empty b... | null | https://raw.githubusercontent.com/rlepigre/pml/cdfdea0eecc6767b16edc6a7bef917bc9dd746ed/src/util/buckets.mli | ocaml | * Simple buckets in which a key is associated to multiple values. The keys
are compared with the equality function specified upon the creation of a
new structure.
* Type of a bucket.
* Synonym of [('a, 'b) t].
* [empty eq] creates an empty bucket using the given equality function for
comparing keys.
* [... |
type ('a, 'b) t
type ('a, 'b) buckets = ('a, 'b) t
val empty : ('a -> 'a -> bool) -> ('a, 'b) t
val add : 'a -> 'b -> ('a, 'b) t -> ('a, 'b) t
val find : 'a -> ('a, 'b) t -> 'b list
val length : ('a, 'b) t -> int
|
bf79a2644608fb322a59e787ac9efb3511c9ddf4fe51f7a5fc67db58bb2ef93e | rnons/shadowsocks-haskell | benchmark.hs | #!/usr/bin/env runhaskell
{-# LANGUAGE OverloadedStrings #-}
import Crypto.Hash.MD5 (hash)
import Data.Binary.Get (runGet, getWord64le)
import Data.ByteString (ByteString)
import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as L
import Data.List (sortBy)
import Data.IntMap.Strict (fromList, (!))... | null | https://raw.githubusercontent.com/rnons/shadowsocks-haskell/5d73db35e0a9f186b74a9e746ad9c9c6b41fb94d/benchmark/benchmark.hs | haskell | # LANGUAGE OverloadedStrings # | #!/usr/bin/env runhaskell
import Crypto.Hash.MD5 (hash)
import Data.Binary.Get (runGet, getWord64le)
import Data.ByteString (ByteString)
import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as L
import Data.List (sortBy)
import Data.IntMap.Strict (fromList, (!))
import Data.Word (Word8, Word64)
... |
08b5f5d005910d1fe858e0a5d5354b45b23c0e610d67ec1235d6fbe711016b25 | AccelerateHS/accelerate-io | Internal.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
-- |
-- Module : Data.Array.Accelerate.IO.Data.Array.Internal
Copyright : [ 2017 .. 2020 ] The Accelerate Team
-- License : BSD3
--
Maintainer : < >
-- Stabilit... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-io/9d72bfb041ee2c9ffdb844b479f082e8993767f8/accelerate-io-array/src/Data/Array/Accelerate/IO/Data/Array/Internal.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Data.Array.Accelerate.IO.Data.Array.Internal
License : BSD3
Stability : experimental
| # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
Copyright : [ 2017 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.IO.Data.Array.Internal
where
import Data.Array.Accelerate... |
4ae9dbb2446d0b9a7f1c9e5fff124eb7bfd527963f1202f33700436c3df11dac | nasa/Common-Metadata-Repository | tool_association.clj | (ns cmr.metadata-db.data.oracle.concepts.tool-association
"Implements multi-method variations for tools"
(:require
[cmr.metadata-db.data.oracle.concepts :as c]))
(defmethod c/db-result->concept-map :tool-association
[concept-type db provider-id result]
(some-> (c/db-result->concept-map :default db provider-... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/f189d55ded0c235f19fbfc3597e772e22e4498ad/metadata-db-app/src/cmr/metadata_db/data/oracle/concepts/tool_association.clj | clojure | (ns cmr.metadata-db.data.oracle.concepts.tool-association
"Implements multi-method variations for tools"
(:require
[cmr.metadata-db.data.oracle.concepts :as c]))
(defmethod c/db-result->concept-map :tool-association
[concept-type db provider-id result]
(some-> (c/db-result->concept-map :default db provider-... | |
1e0a45a42f530f96d45da52860ff849725b94fc99accf7f3210f8fcf4cd9ddb4 | arrdem/blather | core.clj | (ns irregular.core
"Regular expressions.
As data structures.
It's a rite of passage I guess."
(:refer-clojure :exclude [empty? class?]))
(defn tag-dx
"Dispatch by :tag, :type, :ingeger for chars and ints,
otherwise :default."
[tagged-or-raw]
(cond (map? tagged-or-raw)
(:type tagged-or-raw
... | null | https://raw.githubusercontent.com/arrdem/blather/76fc860f26ae2fb7f0d2240da42cf85b0cb1169d/src/main/clj/irregular/core.clj | clojure | The dispatch hierarchy is as follows:
::any
- ::empty
- ::not-empty
- <all other tags must be children of not-empty>
algebra as everything else can normalize to the sentinel empty.
Forward declaration to help out writing the component fragments
Union
------------------------------------------------
Inter... | (ns irregular.core
"Regular expressions.
As data structures.
It's a rite of passage I guess."
(:refer-clojure :exclude [empty? class?]))
(defn tag-dx
"Dispatch by :tag, :type, :ingeger for chars and ints,
otherwise :default."
[tagged-or-raw]
(cond (map? tagged-or-raw)
(:type tagged-or-raw
... |
2320bcd2dce4d9e5fdcb39a5b36a72dd8304f09547260f933c239ca315a7f122 | tiredpixel/isoxya-api | ApexSpec.hs | module Isoxya.API.Endpoint.ApexSpec (spec) where
import Isoxya.API.Test
spec :: Spec
spec = snapAPI $
describe "apex" $
it "=> 200" $ do
let req = get "/" emptyP
res <- runRequest req
rspStatus res `shouldBe` 200
b <- getResponseBody res
... | null | https://raw.githubusercontent.com/tiredpixel/isoxya-api/1022ee6db77f744c77541c53ef6f15f56884f939/test/Isoxya/API/Endpoint/ApexSpec.hs | haskell | module Isoxya.API.Endpoint.ApexSpec (spec) where
import Isoxya.API.Test
spec :: Spec
spec = snapAPI $
describe "apex" $
it "=> 200" $ do
let req = get "/" emptyP
res <- runRequest req
rspStatus res `shouldBe` 200
b <- getResponseBody res
... | |
87ec0dbc8ad3f50225c0f6d1e4fd12508f51b0c0f20b298a32ed1cd1e9ff5806 | metametadata/carry | actions.cljs | (ns unit.actions
(:require
[friend-list.core :as friend-list]
[schema-generators.generators :as g]
[clojure.test :refer [deftest is]]))
(deftest
sets-query
(let [{:keys [initial-model on-action]} (friend-list/new-blueprint :_history :_search)]
(is (= "new query"
(:query (on-action init... | null | https://raw.githubusercontent.com/metametadata/carry/fa5c7cd0d8f1b71edca70330acc97c6245638efb/examples/friend-list/test/unit/actions.cljs | clojure | (ns unit.actions
(:require
[friend-list.core :as friend-list]
[schema-generators.generators :as g]
[clojure.test :refer [deftest is]]))
(deftest
sets-query
(let [{:keys [initial-model on-action]} (friend-list/new-blueprint :_history :_search)]
(is (= "new query"
(:query (on-action init... | |
2de8dbe46210b3ee8c5aa697cc0752beb2c81ac30a76bfb4347c895f4b2ba1de | eslick/cl-registry | lam-tv-widget.lisp | (in-package :registry)
;;
LAM TV Video Popup
;;
(defun/cc do-lamtv-video ()
(do-dialog "LAM TV Video: LAMsight Presentation"
(make-instance 'lamtv-video)))
;;
Custom widget for LAM TV plugin
;;
(defwidget lamtv-video (flash)
()
(:default-initargs
:name "LAM TV Video"
:src ""
:width ... | null | https://raw.githubusercontent.com/eslick/cl-registry/d4015c400dc6abf0eeaf908ed9056aac956eee82/src/plugins/patient-home/lam-tv-widget.lisp | lisp |
Render frame then base class widget
(:object :type "application/x-shockwave-flash"
:data
:id "video_div_1"
:value "file=lta%2Flta-summit-2008-09-13-ianeslick.flv&streamscript=http%3A%2F%2Fv1.apebble.com%2Fflvstream.php&autostart=true")) | (in-package :registry)
LAM TV Video Popup
(defun/cc do-lamtv-video ()
(do-dialog "LAM TV Video: LAMsight Presentation"
(make-instance 'lamtv-video)))
Custom widget for LAM TV plugin
(defwidget lamtv-video (flash)
()
(:default-initargs
:name "LAM TV Video"
:src ""
:width "480"
... |
81494b5a5c3a20e1db82a688b491642438999a0851bf0cc495e1fe79e7600b74 | NorfairKing/cursor | Map.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
module Cursor.Map
( MapCursor (..),
makeMapCursor,
makeMapCursorWithSelection,
singletonMapCursorKey,
singletonMapCursorValue,
rebuildMapCursor,
mapMapCursor,
mapCursorNonEmptyCursorL,
mapCursorElemL,
... | null | https://raw.githubusercontent.com/NorfairKing/cursor/ff27e78281430c298a25a7805c9c61ca1e69f4c5/cursor/src/Cursor/Map.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE DeriveGeneric #
# LANGUAGE TypeFamilies #
module Cursor.Map
( MapCursor (..),
makeMapCursor,
makeMapCursorWithSelection,
singletonMapCursorKey,
singletonMapCursorValue,
rebuildMapCursor,
mapMapCursor,
mapCursorNonEmptyCursorL,
mapCursorElemL,
mapCursorElemSelection,
... |
1a4da5ba01df8a5222070a8425451e9e0947002f5b60254b4b2b26c91ba28dd8 | tezos-checker/checker | testTez.ml | open OUnit2
open TestLib
TODO : Would be nice to have randomized tests , and even check the bounds
* tightly . Perhaps we should consider doing something similar for the other
* types ( Lqt , Kit , ) .
* tightly. Perhaps we should consider doing something similar for the other
* types (Lqt, Kit, Ctez). *)
... | null | https://raw.githubusercontent.com/tezos-checker/checker/2fa79837c80beb3818af166d85ae02ffc7651c49/tests/testTez.ml | ocaml | open OUnit2
open TestLib
TODO : Would be nice to have randomized tests , and even check the bounds
* tightly . Perhaps we should consider doing something similar for the other
* types ( Lqt , Kit , ) .
* tightly. Perhaps we should consider doing something similar for the other
* types (Lqt, Kit, Ctez). *)
... | |
c5f80a39c60b6ef484b98cc1fbcd925ab82a8dc25e8a3afec9ba6c37925dbedc | csabahruska/jhc-components | BitSet.hs | {-# LANGUAGE BangPatterns #-}
module Util.BitSet(
BitSet(),
EnumBitSet(..),
toWord,
fromWord
) where
import Data.List(foldl')
import Data.Bits
import Data.Word
import Data.Monoid
import Util.SetLike
import Util.HasSize
newtype BitSet = BitSet Word
deriving(Eq,Ord)
instance Monoid BitSet wher... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-common/src/Util/BitSet.hs | haskell | # LANGUAGE BangPatterns # | module Util.BitSet(
BitSet(),
EnumBitSet(..),
toWord,
fromWord
) where
import Data.List(foldl')
import Data.Bits
import Data.Word
import Data.Monoid
import Util.SetLike
import Util.HasSize
newtype BitSet = BitSet Word
deriving(Eq,Ord)
instance Monoid BitSet where
mempty = BitSet 0
ma... |
2c74c3e5abcaffceea41aa7784b7e7f5c7366ea9f86a2f3828fdc8c4947b0744 | manuel-serrano/bigloo | rawmidi.scm | ;*=====================================================================*/
* ... /prgm / project / bigloo / bigloo / api / alsa / src / Llib / rawmidi.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/api/alsa/src/Llib/rawmidi.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* ALSA rawmidi wrapper */
*===========================... | * ... /prgm / project / bigloo / bigloo / api / alsa / src / Llib / rawmidi.scm * /
* Author : * /
* Creation : Mon Mar 4 08:15:55 2019 * /
* Last change : We d Mar 13 08:15:55 2019 ( serrano ) * /
* ... |
3dbc726e2c4f226ca49067af1fbbd09d6aad15c09152ea5c0d551edc1403f22d | soegaard/sketching | inheritance.rkt | #lang sketching
;;;
;;; Inheritance
;;;
;; A class can be defined using another class as a foundation.
In object - oriented programming terminology , one class can inherit fields and methods from another .
;; An object that inherits from another is called a subclass,
;; and the object it inherits from is called a su... | null | https://raw.githubusercontent.com/soegaard/sketching/7fa0a354b6711345f0fe0c835241d7c6c666c044/sketching-doc/sketching-doc/manual-examples/basics/objects/inheritance.rkt | racket |
Inheritance
A class can be defined using another class as a foundation.
An object that inherits from another is called a subclass,
and the object it inherits from is called a superclass. A subclass extends the superclass.
Methods
bring variables into scope
(super-make-object x y speed) ; invoke super class i... | #lang sketching
In object - oriented programming terminology , one class can inherit fields and methods from another .
(class Spin Object
(init-field x y speed)
(field [angle #f])
Constructor
(super-new)
(:= angle 0.0)
(define/public (update)
(+= angle speed)))
(class SpinArm Spin
Constructor
... |
c1905c1ee453b69829097809fb2244f75db8955a9e0ad7c009a04e89c2436f19 | mschuldt/ga144 | rom-dump.rkt | #lang racket ;; -*- lexical-binding: t -*-
(require "el.rkt")
(provide (all-defined-out))
(defconst ROM-DUMP (list
'(707 158394 60592 159933 10837 149690 133554 201130 256027 26288 208043 148402 217530 240816 87381 20329 65536 240117 239280 210261 151011 180717 79571 179642 17 150002 191920 151216 112350 240760 150005 ... | null | https://raw.githubusercontent.com/mschuldt/ga144/5b327b958f5d35cf5a015044e6ee62f46446169f/src/rom-dump.rkt | racket | -*- lexical-binding: t -*- | (require "el.rkt")
(provide (all-defined-out))
(defconst ROM-DUMP (list
'(707 158394 60592 159933 10837 149690 133554 201130 256027 26288 208043 148402 217530 240816 87381 20329 65536 240117 239280 210261 151011 180717 79571 179642 17 150002 191920 151216 112350 240760 150005 132066 159960 150005 158234 195708 243624 1... |
fa3d924dd60e7e90acd4723e99dd4ea30bc3bd256441c45182adf7190cf7ff34 | webyrd/n-grams-for-synthesis | default.scm | ;;; The default comparator
;; The unknown-object comparator, used as a fallback to everything else
(define unknown-object-comparator
(make-comparator
(lambda (obj) #t)
(lambda (a b) #t)
(lambda (a b) 0)
(lambda (obj) 0)))
Next index for added comparator
(define first-comparator-index 9)
(define *... | null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-114/comparators/default.scm | scheme | The default comparator
The unknown-object comparator, used as a fallback to everything else
Register a new comparator for use by the default comparator.
Return ordinal for object types: null sorts before pairs, which sort
before booleans, etc. Implementations can extend this.
People who call comparator-register-... |
(define unknown-object-comparator
(make-comparator
(lambda (obj) #t)
(lambda (a b) #t)
(lambda (a b) 0)
(lambda (obj) 0)))
Next index for added comparator
(define first-comparator-index 9)
(define *next-comparator-index* 9)
(define *registered-comparators* (list unknown-object-comparator))
(defi... |
9763d1fec46b8085148ec4894a983d65c621412525dc625aa04601c0e7b6df2c | lightquake/milagos | Settings.hs | -- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
In addition , you can configure a number of different aspects of Yesod
by overriding methods in the Yesod typeclass . That instance is
declared in the Foundation.hs file .... | null | https://raw.githubusercontent.com/lightquake/milagos/bcb052969f727a515fb5ac4d5fbbadff92ae4e4d/Settings.hs | haskell | | Settings are centralized, as much as possible, into this file. This
includes database connection settings, static file locations, etc.
| Which Persistent backend this site is using.
Static setting below. Changing these requires a recompile
| The location of static files on your system. This is a file system
pat... | In addition , you can configure a number of different aspects of Yesod
by overriding methods in the Yesod typeclass . That instance is
declared in the Foundation.hs file .
module Settings
( widgetFile
, PersistConfig
, staticRoot
, staticDir
, themeRoot
, themeDir
, Extra (..)
, pa... |
5ff0720ce86b360b6dc9af0e3c88fee1987a3c43f59e2a3fecc819d5faceae7f | ice1000/learn | pig-atinlay.hs | module Kata(pigLatin) where
pigLatin :: String -> String
pigLatin [] = []
pigLatin [a] = [a]
pigLatin [a, b] = [a, b]
pigLatin [a, b, c] = [a, b, c]
pigLatin (a : b) = b ++ [a] ++ "ay"
| null | https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/pig-atinlay.hs | haskell | module Kata(pigLatin) where
pigLatin :: String -> String
pigLatin [] = []
pigLatin [a] = [a]
pigLatin [a, b] = [a, b]
pigLatin [a, b, c] = [a, b, c]
pigLatin (a : b) = b ++ [a] ++ "ay"
| |
260f3ac5dda369179c6d6f1f85ba48a07968d052428a1d3cc696ec9964109213 | LaurentMazare/ocaml-minipy | bc_eval.mli | open Base
type filename_and_lineno =
{ filename : string
; lineno : int option
}
[@@deriving sexp]
type backtrace = filename_and_lineno list [@@deriving sexp]
exception Exn_with_backtrace of Exn.t * backtrace
val eval : Bc_value.code -> unit
| null | https://raw.githubusercontent.com/LaurentMazare/ocaml-minipy/e83d4bfad55819a27195109d401437faa0f65f69/src/bc_eval.mli | ocaml | open Base
type filename_and_lineno =
{ filename : string
; lineno : int option
}
[@@deriving sexp]
type backtrace = filename_and_lineno list [@@deriving sexp]
exception Exn_with_backtrace of Exn.t * backtrace
val eval : Bc_value.code -> unit
| |
cc2e589cd00b4bb24a3eacf855bf327cca5d8f200253206e3ab36a79ebe9e4a9 | mtolly/onyxite-customs | Crypt.hs | |
WoR encryption from by Quidrex
GH3 encryption from by Invo aka NvNv12
GHWT / GH5 encryption from GHWT Importer by Buldy , originally from GHWT All in One mod by .ocz
WoR encryption from FsbDecrypt.java by Quidrex
GH3 encryption from GHIII FSB Decryptor by Invo aka NvNv12
GHWT/GH5 encrypti... | null | https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib/src/Onyx/Neversoft/Crypt.hs | haskell | # LANGUAGE OverloadedStrings #
i is a Word8 so shiftR fills with zeroes, matching the Java >>>
Not sure what is special about it, different keys aren't song specific, | |
WoR encryption from by Quidrex
GH3 encryption from by Invo aka NvNv12
GHWT / GH5 encryption from GHWT Importer by Buldy , originally from GHWT All in One mod by .ocz
WoR encryption from FsbDecrypt.java by Quidrex
GH3 encryption from GHIII FSB Decryptor by Invo aka NvNv12
GHWT/GH5 encrypti... |
753ac0620187cd0fb0071f0ca90a42d8d8ec383fce68de1569240103dbc13770 | xapi-project/xen-api | network_monitor_thread.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/xapi-project/xen-api/cc7503ebe4778f5c990decbd411acd0a0445a73c/ocaml/networkd/bin/network_monitor_thread.ml | ocaml | * Table for bonds status.
This includes "tap" owing to the use of standardise_name below
It is a bond.
Seen before.
Remove all outstanding reads on a file descriptor
Do not send events for link-local IPv6 addresses, and removed IPs |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... |
1872a0b815a94c9f3c35f1bce298bd607463b5f559aa0cd74b8e03646cd6e78f | shayan-najd/NativeMetaprogramming | T7861.hs | {-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ImpredicativeTypes #-}
{-# OPTIONS_GHC -fdefer-type-errors #-}
module Main where
doA :: (forall b. a) -> [a]
doA = undefined
f :: (forall b. a) -> a
f = doA
main = do { print "Hello 1"
; f `seq` print "Hello 2"
-- The casts are pushed inside the lambd... | null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_run/T7861.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE ImpredicativeTypes #
# OPTIONS_GHC -fdefer-type-errors #
The casts are pushed inside the lambda
for f, so this seq succeeds fine
seq's type (c->d->d) with f's type (c:= (forall b. a) -> a),
which is polymorphic (it has foralls).
But when we *call* f we get a type error | module Main where
doA :: (forall b. a) -> [a]
doA = undefined
f :: (forall b. a) -> a
f = doA
main = do { print "Hello 1"
; f `seq` print "Hello 2"
It does require ImpredicativeTypes , because we instantiate
; f (error "urk") `seq` print "Bad"
}
|
cb31c984a81ca01ad0a0eb0a4a6a72f3dda8b1cc6482adf60a8e45e6d3a0972d | b0-system/brzo | brzo_cmd_log.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2018 The programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2018... | null | https://raw.githubusercontent.com/b0-system/brzo/e481a39d7881d7aaf800cf3c7a9b6cd836867a90/src/brzo_cmd_log.ml | ocaml | Command line interface | ---------------------------------------------------------------------------
Copyright ( c ) 2018 The programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2018... |
40ae6154b7f4ba44f2e983a33af06705fe87554f0639c220b74f4503b7921aae | Chatanga/codingame-hs | SourcePackager.hs | # LANGUAGE OverloadedStrings , LambdaCase #
{-|
A small module to create monolithic sources from multiples files.
-}
module Codingame.SourcePackager
( createMonolithicSource
, createMonolithicSourceWithMode
) where
import Control.Arrow ( Arrow((&&&)) )
import Control.Monad ( foldM )
import Control.Monad.T... | null | https://raw.githubusercontent.com/Chatanga/codingame-hs/2199b3f5fcb11ab2b89d1d106aa5382bd7915da9/src/Codingame/SourcePackager.hs | haskell | |
A small module to create monolithic sources from multiples files.
--------------------------------------------------------------------------------------------------
Reserve a slot for the module with an undefined value to avoid recursion.
TOREDO I really don’t like this. | # LANGUAGE OverloadedStrings , LambdaCase #
module Codingame.SourcePackager
( createMonolithicSource
, createMonolithicSourceWithMode
) where
import Control.Arrow ( Arrow((&&&)) )
import Control.Monad ( foldM )
import Control.Monad.Trans.Except ( runExcept )
import Control.Exception ( tryJust )
import Dat... |
302febe8318faa885a381839e85872231af8a08a3466e3e9713ae1c1cd9de197 | smallmelon/sdzmmo | mod_pet.erl | %%%------------------------------------
%%% @Module : mod_pet
@Author : shebiao
%%% @Email :
@Created : 2010.07.03
%%% @Description: 宠物处理
%%%------------------------------------
-module(mod_pet).
-behaviour(gen_server).
-include("common.hrl").
-include("record.hrl").
-export([init/1, handle_call/... | null | https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/mod/mod_pet.erl | erlang | ------------------------------------
@Module : mod_pet
@Email :
@Description: 宠物处理
------------------------------------
=========================================================================
一些定义
=========================================================================
===============================... | @Author : shebiao
@Created : 2010.07.03
-module(mod_pet).
-behaviour(gen_server).
-include("common.hrl").
-include("record.hrl").
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-compile(export_all).
-record(state, {interval = 0}).
start_link() ->
ge... |
72f0070bfcca229598f200139cbe955592ab3582fa92e6616e9212f0b28b4e6b | elastic/eui-cljs | icon_trash.cljs | (ns eui.icon-trash
(:require ["@elastic/eui/lib/components/icon/assets/trash.js" :as eui]))
(def trash eui/icon)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_trash.cljs | clojure | (ns eui.icon-trash
(:require ["@elastic/eui/lib/components/icon/assets/trash.js" :as eui]))
(def trash eui/icon)
| |
e86f2f0aeed8db398237df50c9266f0465521c58770678a5d1f2af5e3b9cf6ff | lehitoskin/ivy | main.rkt | #!/usr/bin/env racket
#lang racket/base
; main.rkt
; main file for ivy, the taggable image viewer
(require racket/class
racket/cmdline
racket/gui/base
racket/list
racket/path
riff
txexpr
xml
"base.rkt"
"config.rkt"
"db.rkt"
... | null | https://raw.githubusercontent.com/lehitoskin/ivy/e32cac3fe65ee21f3db7d117aca1f53c407f86db/main.rkt | racket | main.rkt
main file for ivy, the taggable image viewer
make sure the path provided is a proper absolute path
resize ivy-frame based on the dimensions of the image
determine the monitor dimensions
approximate canvas offset
all good, let's shrink the frame
image is the same size as the monitor
wide image
tall im... | #!/usr/bin/env racket
#lang racket/base
(require racket/class
racket/cmdline
racket/gui/base
racket/list
racket/path
riff
txexpr
xml
"base.rkt"
"config.rkt"
"db.rkt"
"embed.rkt"
"error-log.rkt"
(only-in ... |
f8aec4cdb9ad66ebc705bd8934245bfb9678d08a2f62171a7c621d1fe8aca8aa | samee/netlist | Gcil-old.hs | module Test.Gcil where
import Control.Monad.State.Strict
import Circuit.Gcil.Compiler as GC
import Data.List
import Debug.Trace
import System.IO
-- Fragile tests. Disabled for now
testAplusb = result > > = return.fst
where
expected = " .input t1 1 8\n.input t2 2 8\nt3 add t1 t2\n.output t3\n "
result = ... | null | https://raw.githubusercontent.com/samee/netlist/9fc20829f29724dc1148e54bd64fefd7e70af5ba/Test/Gcil-old.hs | haskell | Fragile tests. Disabled for now | module Test.Gcil where
import Control.Monad.State.Strict
import Circuit.Gcil.Compiler as GC
import Data.List
import Debug.Trace
import System.IO
testAplusb = result > > = return.fst
where
expected = " .input t1 1 8\n.input t2 2 8\nt3 add t1 t2\n.output t3\n "
result = compile [ 8,8 ] [ 1,2 ] ( \[a , b ]... |
d77393489bae4380d1ea6d5bddd7fc4a65825327fa2f22d1740d61995b45f7d8 | ros/roslisp_common | screws.lisp | Copyright ( c ) 2014 , < >
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list of conditions... | null | https://raw.githubusercontent.com/ros/roslisp_common/4db311da26497d84a147f190200e50c7a5b4106e/cl_transforms/src/screws.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in ... | Copyright ( c ) 2014 , < >
* Neither the name of the Institute for Artificial Intelligence/
Universitaet Bremen nor the names of its contributors may be used to
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR P... |
ff1fbeb7093e3646f6a06bfc14b24673839f41224c8ddd97b165005e9a7e3cbd | biocaml/phylogenetics | sequence_simulator.ml | open Core
module type Alphabet = sig
type t
val card : int
val of_int_exn : int -> t
val to_char : t -> char
end
module Make(A : Alphabet) = struct
type profile = Profile of {
probs : float array ;
dist : Gsl.Randist.discrete ;
}
let of_array_exn probs =
if Array.length probs <> A.car... | null | https://raw.githubusercontent.com/biocaml/phylogenetics/e225616a700b03c429c16f760dbe8c363fb4c79d/lib/sequence_simulator.ml | ocaml | open Core
module type Alphabet = sig
type t
val card : int
val of_int_exn : int -> t
val to_char : t -> char
end
module Make(A : Alphabet) = struct
type profile = Profile of {
probs : float array ;
dist : Gsl.Randist.discrete ;
}
let of_array_exn probs =
if Array.length probs <> A.car... | |
0931360e950e46b47ef8e695d97299af4ea2962ef1b93e5933bf96811e8af432 | Clojure2D/clojure2d-examples | quad.clj | (ns rt4.the-next-week.ch07a.quad
(:require [fastmath.core :as m]
[rt4.the-next-week.ch07a.hittable :as hittable]
[rt4.the-next-week.ch07a.aabb :as aabb]
[fastmath.vector :as v]
[rt4.the-next-week.ch07a.interval :as interval]
[rt4.the-next-week.ch07a.ray :as ... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch07a/quad.clj | clojure | (ns rt4.the-next-week.ch07a.quad
(:require [fastmath.core :as m]
[rt4.the-next-week.ch07a.hittable :as hittable]
[rt4.the-next-week.ch07a.aabb :as aabb]
[fastmath.vector :as v]
[rt4.the-next-week.ch07a.interval :as interval]
[rt4.the-next-week.ch07a.ray :as ... | |
d31947449f6d99175822d50c97502e617987720007640aa7a904e7d2ae0145b4 | dakk/yallo-lang | yallo.ml | open Core
open Yallo
open Helpers.Errors
let run action filename opt =
(match action with
| "compile" -> Compiler.compile filename opt
(* | "build-storage" -> *)
(* | "build-parameter" -> *)
(* | "interface-of-michelson" -> Interface_of_michelson.extract filename opt *)
| "extract-interface" -> Compile... | null | https://raw.githubusercontent.com/dakk/yallo-lang/55a1b379306c9f113bd707e78b6e0c1be81bb7be/src/yallo.ml | ocaml | | "build-storage" ->
| "build-parameter" ->
| "interface-of-michelson" -> Interface_of_michelson.extract filename opt | open Core
open Yallo
open Helpers.Errors
let run action filename opt =
(match action with
| "compile" -> Compiler.compile filename opt
| "extract-interface" -> Compiler.extract_interface filename opt
| _ -> raise @@ CompilerError ("Invalid compiler action: " ^ action)
)
let summary = ""
^ "=== actions ===... |
bd68c1a4f28dccce3a0ab861ad9ef2fe13920feab9dfc0a278fd2e9c8ce66e60 | mvaldesdeleon/aoc18 | Day21.hs | # LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Day21
( day21
) where
import Control.Lens
import Data.Bits ((.&.), (.|.))
import Data.List (find, genericLength)
import qualified Data.Map.Strict as M
import Data.Maybe (fromMaybe)
import ... | null | https://raw.githubusercontent.com/mvaldesdeleon/aoc18/1a6f6de7c482e5de264360e36f97a3c7487e2457/src/Day21.hs | haskell | # LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Day21
( day21
) where
import Control.Lens
import Data.Bits ((.&.), (.|.))
import Data.List (find, genericLength)
import qualified Data.Map.Strict as M
import Data.Maybe (fromMaybe)
import ... | |
656b2e094807dc977d3379cfa575dd134bba32b832e6649dce22764907b105b2 | jeromesimeon/Galax | print_xquery_algebra.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/ast_printer/print_xquery_algebra.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : print_xquery_algebra.ml , v 1.75 2007/10/16 01:25:34
open Error
open Gmisc
open Occurrence
open Namespace_names
open Namespace_symbols
open Datatypes
open Xquery_common_ast
open Xquery_algebra_ast
open Xquery_algebra_ast_util
o... |
cc77285d331463dfaec592801dfcc9b86414b47991c1a05e6a06cab2a4db9eba | CGenie/ray-tracer | tracing.ml | (* tracing.ml *)
open Gg.V3
open Formatters
open Algorithms
open Tracing_types
open Initials
let rec intersect ({origin=ro; direction=rd} as r:ray) wo =
(* TODO: ray direction should be normalized, add an assertion *)
let rd2 = norm2 rd in
match wo.shape with
| Ball{origin=bo; radius=br} ->
let ro_bo = ... | null | https://raw.githubusercontent.com/CGenie/ray-tracer/37a7918c38497fe5d9b52ba0795f209c1c06fa9b/02-tracing/lib/tracing.ml | ocaml | tracing.ml
TODO: ray direction should be normalized, add an assertion
middle point of image plane
lower-left point of image plane
upper-right point of image plane
[image_plane_of_camera] tests
Not illuminated -- light behind the surface -- diffuse = specular = Color.black
[phong_color] tests
light behi... |
open Gg.V3
open Formatters
open Algorithms
open Tracing_types
open Initials
let rec intersect ({origin=ro; direction=rd} as r:ray) wo =
let rd2 = norm2 rd in
match wo.shape with
| Ball{origin=bo; radius=br} ->
let ro_bo = ro - bo in
let a = rd2
and b = 2.*.(dot ro_bo rd)
and c = (norm2 ro_bo) ... |
1fe70cb04b34a9a3a489e367cff1cc68551571bd8ea5de6d9f325bdee2e73cc1 | MyDataFlow/ttalk-server | ejabberd_helper.erl | -module(ejabberd_helper).
-export([start_ejabberd/1,
stop_ejabberd/0,
use_config_file/2]).
-spec start_ejabberd(any()) -> 'ok' | {error, any()}.
start_ejabberd(_Config) ->
{ok, _} = ejabberd:start().
-spec stop_ejabberd() -> 'ok' | {error, any()}.
stop_ejabberd() ->
application:stop(ejabbe... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/test/ejabberd_helper.erl | erlang | -module(ejabberd_helper).
-export([start_ejabberd/1,
stop_ejabberd/0,
use_config_file/2]).
-spec start_ejabberd(any()) -> 'ok' | {error, any()}.
start_ejabberd(_Config) ->
{ok, _} = ejabberd:start().
-spec stop_ejabberd() -> 'ok' | {error, any()}.
stop_ejabberd() ->
application:stop(ejabbe... | |
05cccc23f6d397db4fc1e951191cb4ea1833e6435e3c6f0c872ccbcdc4a6aecb | composewell/streamly-dom | AcidRain.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
This example is adapted from pipes - concurrency package .
-- -concurrency-2.0.8/docs/Pipes-Concurrent-Tutorial.html
module Main
( main
) where
import Streamly
import Streamly.Prelude as S
import Control.Monad (void)
import Control.Monad.State (MonadState, ... | null | https://raw.githubusercontent.com/composewell/streamly-dom/42c330424bd2785684390985e3c4478de74b3908/examples/AcidRain.hs | haskell | -concurrency-2.0.8/docs/Pipes-Concurrent-Tutorial.html
-----------------------------------------------------------------------------
Streams
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Game
---------------... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
This example is adapted from pipes - concurrency package .
module Main
( main
) where
import Streamly
import Streamly.Prelude as S
import Control.Monad (void)
import Control.Monad.State (MonadState, get, modify, runStateT)
#if __GHCJS__
import AcidRain.JSI... |
508a9a07d01559373218fc6df7915e4b90e19e152fb6e98820ed4995634f0739 | EveryTian/Haskell-Codewars | categorize-new-member.hs | -- -new-member
module Codewars.Kata.Categorize where
import Codewars.Kata.Categorize.Types
data Membership = Open | Senior deriving ( Eq , Show )
openOrSenior :: [(Int, Int)] -> [Membership]
openOrSenior = map (\x -> if fst x >= 55 && snd x > 7 then Senior else Open)
| null | https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/7kyu/categorize-new-member.hs | haskell | -new-member |
module Codewars.Kata.Categorize where
import Codewars.Kata.Categorize.Types
data Membership = Open | Senior deriving ( Eq , Show )
openOrSenior :: [(Int, Int)] -> [Membership]
openOrSenior = map (\x -> if fst x >= 55 && snd x > 7 then Senior else Open)
|
4420212c8a8f7917acb6d4a377b090cb54ed3abfb9f9b9646ef23d93caf36939 | wardle/deprivare | build.clj | (ns build
(:require [clojure.tools.build.api :as b]
[deps-deploy.deps-deploy :as dd]))
(def lib 'com.eldrix/deprivare)
(def version (format "1.0.%s" (b/git-count-revs nil)))
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file (format "target/%s-%s.jar" (name ... | null | https://raw.githubusercontent.com/wardle/deprivare/16f2ffa88590744bd5db843500a135e01664a812/build.clj | clojure | (ns build
(:require [clojure.tools.build.api :as b]
[deps-deploy.deps-deploy :as dd]))
(def lib 'com.eldrix/deprivare)
(def version (format "1.0.%s" (b/git-count-revs nil)))
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file (format "target/%s-%s.jar" (name ... | |
cfe4122c8542dfdc235b3b54851e2a2f060be35fa82ffe92c6a83022120b7581 | leptonyu/guiguzi | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Main where
import API.Captcha
import Boots
import Boots.Web
import Control.Monad.IO.Class
import Data.Captcha
import Data.Text.Encoding
import ... | null | https://raw.githubusercontent.com/leptonyu/guiguzi/9b3cb22f1b0c5387964c0097ef9a789125d2daee/captcha-server/src/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Main where
import API.Captcha
import Boots
import Boots.Web
import Control.Monad.IO.Class
import Data.Captcha
import Data.Text.Encoding
import Paths_captcha_server
import ... |
da8f2034d6204cf5ff7ea3498cf3181774cb6ef7e4fc53b130257b5a075d6ddc | llvm-hs/llvm-hs-typed | CallingConvention.hs | -- | This module provides a type-safe variant of "LLVM.AST.CallingConvention".
-- It is currently a stub
module LLVM.AST.Tagged.CallingConvention (module LLVM.AST.CallingConvention) where
import LLVM.AST.CallingConvention
| null | https://raw.githubusercontent.com/llvm-hs/llvm-hs-typed/efe052cf2a7ac8e6fb8dba1879d75d036f6fcc80/src/LLVM/AST/Tagged/CallingConvention.hs | haskell | | This module provides a type-safe variant of "LLVM.AST.CallingConvention".
It is currently a stub | module LLVM.AST.Tagged.CallingConvention (module LLVM.AST.CallingConvention) where
import LLVM.AST.CallingConvention
|
99a93f8e9166145eb1ef9e85d821985f7e682fc3f3db97c05d31d24039a292bb | ocamllabs/ocaml-modular-implicits | t000.ml | (* empty file *)
*
0 ATOM0
1 SETGLOBAL T000
3 STOP
*
0 ATOM0
1 SETGLOBAL T000
3 STOP
**)
| null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t000.ml | ocaml | empty file |
*
0 ATOM0
1 SETGLOBAL T000
3 STOP
*
0 ATOM0
1 SETGLOBAL T000
3 STOP
**)
|
2652e7cdc24f732291164487ed2a77e481142ebbcc2528c0477338bb886ae1e0 | v-kolesnikov/sicp | 2_22.clj | (ns sicp.chapter02.2-22
(:require [sicp.common :as sicp]))
(defn square-list-v1
[coll]
(loop [things coll
answer nil]
(if (empty? things)
(reverse answer)
(recur (rest things)
(cons (sicp/square (first things))
answer)))))
(defn square-list-v2
[coll]
... | null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter02/2_22.clj | clojure | (ns sicp.chapter02.2-22
(:require [sicp.common :as sicp]))
(defn square-list-v1
[coll]
(loop [things coll
answer nil]
(if (empty? things)
(reverse answer)
(recur (rest things)
(cons (sicp/square (first things))
answer)))))
(defn square-list-v2
[coll]
... | |
748c92570a6e11ee2003198293d56ab2602684747480bedbd8da9941df0016ec | facebook/flow | jsdoc.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/cb708a0b1328441991c4ae1319a031196ce6ae1a/src/parser/jsdoc.ml | ocaml | ***********
accessors
***********
*********
parsing
*********
Helpers
like Base.List.Assoc.add, but maintains ordering differently:
* - if k is already in the list, keeps it in that position and updates the value
* - if k isn't in the list, adds it to the end
Parsing functions
ignore jsdoc type annotat... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
a834bb0b27f1172bb9a0a45d508b56df1bb01177cac8e14cc12bf275dfdce5dc | Feldspar/feldspar-language | UntypedRepresentation.hs | {-# LANGUAGE DeriveLift #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wall #
-- Names shadow in this module, not a big deal.
{-# OPTIONS_... | null | https://raw.githubusercontent.com/Feldspar/feldspar-language/499e4e42d462f436a5267ddf0c2f73d5741a8248/src/Feldspar/Core/UntypedRepresentation.hs | haskell | # LANGUAGE DeriveLift #
# LANGUAGE RankNTypes #
Names shadow in this module, not a big deal.
# OPTIONS_GHC -Wno-name-shadowing #
FIXME: Partial functions.
Unknown severity.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the follo... | # LANGUAGE TypeFamilies #
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wall #
# OPTIONS_GHC -Wno - incomplete - patterns #
# OPTIONS_GHC -Wno - type - defaults #
Copyright ( c ) 2019 , ERICSS... |
4ea6e845588c55550e5e6768add16fb5f2428774e0e41f41d28ec4c86a166c5e | mejgun/haskell-tdlib | ResendMessages.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Query.ResendMessages where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- |
Resends messages which failed to send . Can be called only for messages for which messageSendingStateFailed.can_retry is true and aft... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/dc380d18d49eaadc386a81dc98af2ce00f8797c2/src/TD/Query/ResendMessages.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message
| Identifiers of the messages to ... |
module TD.Query.ResendMessages where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
Resends messages which failed to send . Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.ret... |
f963665668dfdd836c466b19ae6f6964ff80da049f0e2a063f469eaa8ed3f5e1 | softlab-ntua/bencherl | class_Squirrel.erl | Copyright ( C ) 2008 - 2014 EDF R&D
This file is part of Sim - Diasca .
Sim - Diasca is free software : you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) a... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/mock-simulators/ssi-test/src/class_Squirrel.erl | erlang | it under the terms of the GNU Lesser General Public License as
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
If not, see </>.
This file is part of forest ecosystem test case, which is a Sim-Diasca
integration test example.
The objectiv... | Copyright ( C ) 2008 - 2014 EDF R&D
This file is part of Sim - Diasca .
Sim - Diasca is free software : you can redistribute it and/or modify
published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) any later version .
Sim - Diasca is distributed in the hope tha... |
e33ff4ddfecca684cbc5a9182e770f453f093f43c89bccc371ba0cb601958e75 | drathier/elm-offline | Chomp.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE Rank2Types #-}
module Terminal.Args.Chomp
( chomp
)
where
import qualified Data.List as List
import Terminal.Args.Error
import Terminal.Args.Internal
CHOMP INTERFACE
chomp :: Maybe Int -> [String] -> Args args -> Flags flags -> ( IO [String], Either Error (args, flags... | null | https://raw.githubusercontent.com/drathier/elm-offline/f562198cac29f4cda15b69fde7e66edde89b34fa/ui/terminal/src/Terminal/Args/Chomp.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE Rank2Types #
CHOMPER
ARGS
COMPLETE ARGS
REQUIRED ARGS
PARSER
FLAG
FIND FLAG
CHOMPER INSTANCES | module Terminal.Args.Chomp
( chomp
)
where
import qualified Data.List as List
import Terminal.Args.Error
import Terminal.Args.Internal
CHOMP INTERFACE
chomp :: Maybe Int -> [String] -> Args args -> Flags flags -> ( IO [String], Either Error (args, flags) )
chomp maybeIndex strings args flags =
let
... |
7204f7063595de7c3ea0754850cda19dbb3fe64d13db2edc3a473de8ebeebb15 | hopbit/sonic-pi-snippets | dp_str_trk_5.sps | # key: dp str trk 5
# point_line: 0
# point_index: 0
# --
class Track5 < Track
def initialize(samples_path)
@tempo = 80
@vocal = {
'sample' => "#{samples_path}/vocals/JoshuaDavidVocals_Mini_SP/80_F_AhhHarmonyVocal_01_621.wav",
'times' => 4,
'sample_start' => 0.0,
'sample_finish... | null | https://raw.githubusercontent.com/hopbit/sonic-pi-snippets/2232854ac9587fc2f9f684ba04d7476e2dbaa288/dp/dp_str_trk_5.sps | scheme | # key: dp str trk 5
# point_line: 0
# point_index: 0
# --
class Track5 < Track
def initialize(samples_path)
@tempo = 80
@vocal = {
'sample' => "#{samples_path}/vocals/JoshuaDavidVocals_Mini_SP/80_F_AhhHarmonyVocal_01_621.wav",
'times' => 4,
'sample_start' => 0.0,
'sample_finish... | |
12d150289697530fc2c10b9e1bdb6af70292b019b98b91119acd4337a31476b3 | csabahruska/jhc-components | Unique.hs | # OPTIONS_JHC -fffi #
module Data.Unique (
-- * Unique objects
instance ( Eq , Ord )
newUnique, -- :: IO Unique
hashUnique -- :: Unique -> Int
) where
import Foreign.Storable
import Foreign.Ptr
-- | An abstract unique object. Objects of type 'Unique' may be
-- compared for equalit... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/lib/haskell-extras/Data/Unique.hs | haskell | * Unique objects
:: IO Unique
:: Unique -> Int
| An abstract unique object. Objects of type 'Unique' may be
compared for equality and ordering and hashed into 'Int'.
| Creates a new object of type 'Unique'. The value returned will
not compare equal to any other value of type 'Unique' returned by
previous call... | # OPTIONS_JHC -fffi #
module Data.Unique (
instance ( Eq , Ord )
) where
import Foreign.Storable
import Foreign.Ptr
newtype Unique = Unique Int deriving (Eq,Ord)
newUnique :: IO Unique
newUnique = do
n <- peek c_data_unique
poke c_data_unique (n + 1)
return $ Unique n
| Hashes a ' Unique ' into... |
7622611ad028759a3ecce29bcdfbd0228578a785329dc8e1dcd8ff8ff3043077 | tuscland/lw-project-generator | package.lisp | -*- encoding : utf-8 ; mode : LISP ; syntax : COMMON - LISP ; indent - tabs - mode : nil -*-
LispWorks Project Generator .
Copyright ( c ) 2013 , . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the License.... | null | https://raw.githubusercontent.com/tuscland/lw-project-generator/21bafd22cd3fc6bb0762155df764dc5538369a9a/src/package.lisp | lisp | mode : LISP ; syntax : COMMON - LISP ; indent - tabs - mode : nil -*-
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
exp... |
LispWorks Project Generator .
Copyright ( c ) 2013 , . All rights reserved .
software distributed under the License is distributed on an " AS
(in-package "CL-USER")
(defpackage "COM.WILDORA.PROJECT-GENERATOR"
(:nicknames "PROJECT-GENERATOR")
(:export
"FIND-PROJECT-TEMPLATES"
"RUN"
"*DRY-RUN-P*... |
80e121f686ad9de61cf756549f53e698612166526c9671e78bc370a30753468a | anwarmamat/cmsc330spring19-public | public.ml | open OUnit2
open TestUtils
open Disc
let test_find_expensive ctxt =
assert_equal true (cmp_float 0.0 (find_expensive [])) ~msg:"find_expensive (1)";
assert_equal true (cmp_float 50.0 (find_expensive [{item="sofritas"; cost=50.0}; {item="chicken"; cost=50.0}; {item="guac"; cost=20.0}])) ~msg:"find_expensive (2)";
... | null | https://raw.githubusercontent.com/anwarmamat/cmsc330spring19-public/98af1e8efc3d8756972731eaca19e55fe8febb69/discussions/discussion4/test/public.ml | ocaml | open OUnit2
open TestUtils
open Disc
let test_find_expensive ctxt =
assert_equal true (cmp_float 0.0 (find_expensive [])) ~msg:"find_expensive (1)";
assert_equal true (cmp_float 50.0 (find_expensive [{item="sofritas"; cost=50.0}; {item="chicken"; cost=50.0}; {item="guac"; cost=20.0}])) ~msg:"find_expensive (2)";
... | |
1606814dfdb1e071a7e1b59918b3807601849a34c653c57c8e9ea916115d39f3 | ocaml-multicore/reagents | offer.mli |
* Copyright ( c ) 2015 , < >
* Copyright ( c ) 2015 , < >
*
* Permission to use , copy , modify , and/or distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE S... | null | https://raw.githubusercontent.com/ocaml-multicore/reagents/6721db78b21028c807fb13d0af0aaf9407c662b5/lib/offer.mli | ocaml |
* Copyright ( c ) 2015 , < >
* Copyright ( c ) 2015 , < >
*
* Permission to use , copy , modify , and/or distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE S... | |
1a66f4e8a7472fe4bca0c69067645e09db7f37853a2bf909d7526b66a5513b56 | penpot/penpot | slider_selector.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.workspace.colorpicker.slider-selector
(:require
[app.common.math :as mth]
[app.util.do... | null | https://raw.githubusercontent.com/penpot/penpot/7303d311d5f23d515fa3fcdc6cd13cf7f429d1fe/frontend/src/app/main/ui/workspace/colorpicker/slider_selector.cljs | clojure |
Copyright (c) KALEIDOS INC | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.main.ui.workspace.colorpicker.slider-selector
(:require
[app.common.math :as mth]
[app.util.dom :as dom]
[app.util.object :a... |
918962aa88d12d37168982b1f24d0dc71335635d0eda8eacd822a73347badae6 | RichiH/git-annex | Command.hs | git - annex command infrastructure
-
- Copyright 2010 - 2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010-2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command (
module Command,
module ReExported
) where
import Annex.Common as... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Command.hs | haskell | Generates a normal Command
Simple option parser that takes all non-option params as-is.
Uses the supplied option parser, which yields a deferred parse,
- and calls finishParse on the result before passing it to the
- CommandSeek constructor.
Indicates that a command doesn't need to commit any changes to
- the... | git - annex command infrastructure
-
- Copyright 2010 - 2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010-2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command (
module Command,
module ReExported
) where
import Annex.Common as... |
8d14428b7e61946f781cff4f45498ffd3c5ebfba122a9a54c33ee575683e71d5 | essandess/adblock2privoxy | ElementBlocker.hs | module ElementBlocker (
elemBlock
) where
import InputParser hiding (Policy(..))
import qualified InputParser
import PolicyTree
import qualified Data.Map as Map
import Data.Maybe
import Utils
import System.IO
import System.FilePath
import Data.List
import System.Directory
import qualified Templates
import Control.Monad... | null | https://raw.githubusercontent.com/essandess/adblock2privoxy/68affb86af325b88beaa7acda8866ad9b1d030f2/adblock2privoxy/src/ElementBlocker.hs | haskell | writeBlockTree :: String -> String -> BlockedRulesTree -> IO ()
createDirectoryIfMissing True debugPath
debugPath
| null name = debugNodePath
| otherwise = debugNodePath </> name
debugFilename = debugPath </> "ab2p.css"
writeCssFile debugFilename $ intercalate "\n" $ (++ Templates.blockCss) <$> patterns | module ElementBlocker (
elemBlock
) where
import InputParser hiding (Policy(..))
import qualified InputParser
import PolicyTree
import qualified Data.Map as Map
import Data.Maybe
import Utils
import System.IO
import System.FilePath
import Data.List
import System.Directory
import qualified Templates
import Control.Monad... |
12d9cbc233b097b7aae618e3b6a07f95e0b4f68a7b2957fe44a6a34603528b69 | logicmoo/logicmoo_nlu | fchart.lsp | ;;; % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% Example code from the book " Natural Language Processing in LISP " %
% published by %
% Copyright ( c ) 1989 , . %
;;; % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %... | null | https://raw.githubusercontent.com/logicmoo/logicmoo_nlu/c066897f55b3ff45aa9155ebcf799fda9741bf74/ext/nlp_book/lisp/fchart.lsp | lisp | % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
where c is a category and s a starting position
of the specified category starting at the specified position
start finish label found tofind
add an edge to the... | % Example code from the book " Natural Language Processing in LISP " %
% published by %
% Copyright ( c ) 1989 , . %
fchart.lsp [ Chapter 7 ] chart parser for PATR grammars
A version that does with lexical lookup bottom - up
(uses 'lisppatr)
(uses 'subsu... |
91601fc9465624d5c58f514a8373bc2ec5e1f669253e4c06a0d78f3333673d94 | tweag/linear-base | ReplicationStream.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE LinearTypes #-}
# LANGUAGE NoImplicitPrelude #
{-# OPTIONS_HADDOCK hide #-}
module Data.Replicator.Linear.Internal.ReplicationStream
( ReplicationStream (..),
consume,
duplicate,
map,
pure,
(<*>),
liftA2,
)
where
import Data.Unres... | null | https://raw.githubusercontent.com/tweag/linear-base/9d82f67f1415dda385a6349954bf55f9bfa4e62e/src/Data/Replicator/Linear/Internal/ReplicationStream.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE LinearTypes #
# OPTIONS_HADDOCK hide #
| @ReplicationStream s g dup2 c@ is the infinite linear stream
@repeat (g s)@ where @dup2@ is used to make as many copies of @s@ as
Although it isn't enforced at type level, @dup2@ should abide by the same
laws as 'Data.Unrestricted.Linear.dup2':... | # LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
module Data.Replicator.Linear.Internal.ReplicationStream
( ReplicationStream (..),
consume,
duplicate,
map,
pure,
(<*>),
liftA2,
)
where
import Data.Unrestricted.Linear.Internal.Ur
import Prelude.Linear.Internal
necessary , and @c@ ... |
36b0f91aaa42c0dc330b2563eae3ffe7ba4c5021ee7246d9f405accfcf31d2e1 | clojure-lsp/clojure-lsp | a.clj | (ns sample-test.definition.a
(:require [clojure.spec.alpha :as s]))
(def some-var 1)
(defn some-public-func [a]
a)
(defn ^:private some-private-func []
(+ 1 some-var))
(some-private-func)
(s/def ::my-key 1)
(cond-> [])
| null | https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/3108aedbd4ccd07adc42e520d6f1bd75ea1b546d/cli/integration-test/sample-test/src/sample_test/definition/a.clj | clojure | (ns sample-test.definition.a
(:require [clojure.spec.alpha :as s]))
(def some-var 1)
(defn some-public-func [a]
a)
(defn ^:private some-private-func []
(+ 1 some-var))
(some-private-func)
(s/def ::my-key 1)
(cond-> [])
| |
85af6ecef6c22d3510f7005a22cb3a0cae35a17cd6b430af94eb09bfa0c9a9a7 | jiangpengnju/htdp2e | ex45.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex45) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/fixed-size-data/how-to-design-programs/ex45.rkt | racket | about the language level of this file in a form that our tools can easily process.
Let's work through the same problem statement with a time-based data definition.
How do you think this program relates to the animate function?
A: (animate render) acts similar to (main 0), except that no end? feature.
a. "Physical... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex45) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/universe)
(require 2htdp/image)
1 . Define Cons... |
1129c7250f6b31cb21ed88a092004e8a4577893fbd5554904dec98242aeea74b | bobzhang/fan | big.ml |
let f a c =
a.{1,2,3} <- c
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/printer/big.ml | ocaml |
let f a c =
a.{1,2,3} <- c
| |
836f81e5d7059874ca24151223c9fd176aaea91a4e6df0ec557bdef99617482a | kmonad/kmonad | Keycode.hs | {-# LANGUAGE DeriveAnyClass, CPP #-}
|
Module : KMonad . Keyboard .
Description : Description of all possible keycodes .
Copyright : ( c ) , 2019
License : MIT
Maintainer :
Stability : experimental
Portability : portable
' 's are represented as a large enum lining up the keycode... | null | https://raw.githubusercontent.com/kmonad/kmonad/3413f1be996142c8ef4f36e246776a6df7175979/src/KMonad/Keyboard/Keycode.hs | haskell | # LANGUAGE DeriveAnyClass, CPP #
$typ
$names
------------------------------------------------------------------------------
$typ
headers:
-event-codes.h.
Anywhere there are missing regions in the linux headers, we've defined
Prefer the shortest, and if equal, lowercased version
-------------------------------... | |
Module : KMonad . Keyboard .
Description : Description of all possible keycodes .
Copyright : ( c ) , 2019
License : MIT
Maintainer :
Stability : experimental
Portability : portable
' 's are represented as a large enum lining up the keycodes defined in the Linux headers .
M... |
eba994ab4747e5e511fe0e8f2fce9f3a66154d221ab485f786abdae633a3af59 | potatosalad/erlang-jose | jose_curve448.erl | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
%% vim: ts=4 sw=4 ft=erlang noet
%%%-------------------------------------------------------------------
@author < >
2014 - 2022 ,
%%% @doc
%%%
%%% @end
Created : 02 Jan 2016 by < >
%%%---------------------------... | null | https://raw.githubusercontent.com/potatosalad/erlang-jose/dbc4074066080692246afe613345ef6becc2a3fe/src/jwa/curve448/jose_curve448.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
Types
====================================================================
================================================================... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
@author < >
2014 - 2022 ,
Created : 02 Jan 2016 by < >
-module(jose_curve448).
-type eddsa_public_key() :: <<_:456>>.
-type eddsa_secret_key() :: <<_:912>>.
-type eddsa_seed() :: <<_:456>>.
-type message() :: b... |
9b2304a368aba1eb8850c1d29e97af5dcdec919a247dd46876e72283f1a8702a | threatgrid/asami | memory_index_test.cljc | (ns asami.memory-index-test
#?(:clj
(:require [asami.graph :refer [graph-add resolve-pattern count-pattern]]
[asami.index :refer [empty-graph]]
[schema.test :as st :refer [deftest]]
[clojure.test :as t :refer [testing is run-tests]])
:cljs
(:require [asami.g... | null | https://raw.githubusercontent.com/threatgrid/asami/69ddbe3c263202f5bbbaf31a8c4abd7e69aa4005/test/asami/memory_index_test.cljc | clojure | (ns asami.memory-index-test
#?(:clj
(:require [asami.graph :refer [graph-add resolve-pattern count-pattern]]
[asami.index :refer [empty-graph]]
[schema.test :as st :refer [deftest]]
[clojure.test :as t :refer [testing is run-tests]])
:cljs
(:require [asami.g... | |
484cb2d5fec154b789a90c1432c68425d2db54079cd0c3b31c3e9937dbc9c7d7 | pveber/bistro | sra_toolkit.ml | open Core
open Bistro
open Bistro.Shell_dsl
let img = [ docker_image ~account:"pegi3s" ~name:"sratoolkit" ~tag:"2.10.0" () ]
type 'a output =
| Fasta
| Fastq
| Fastq_gz
type library_type = SE | PE
let fasta = Fasta
let fastq = Fastq
let fastq_gz = Fastq_gz
let sra_of_input = function
| `id id -> string id
... | null | https://raw.githubusercontent.com/pveber/bistro/49c7a0ea09baa44ad567fc558b8bf9f5cbe02c08/lib/bio/sra_toolkit.ml | ocaml | open Core
open Bistro
open Bistro.Shell_dsl
let img = [ docker_image ~account:"pegi3s" ~name:"sratoolkit" ~tag:"2.10.0" () ]
type 'a output =
| Fasta
| Fastq
| Fastq_gz
type library_type = SE | PE
let fasta = Fasta
let fastq = Fastq
let fastq_gz = Fastq_gz
let sra_of_input = function
| `id id -> string id
... | |
11054b17669d711fa2fb539fa327c7e3308e2b6f81136cb761132709bb8e0524 | gerritjvv/tcp-driver | util.clj | (ns tcp-driver.test.util
(:require [tcp-driver.io.conn :as tcp-conn]
[tcp-driver.io.stream :as tcp-stream])
(:import (java.net ServerSocket SocketException)))
(defn ^ServerSocket server-socket []
(ServerSocket. (int 0)))
(defn ^Long get-port [^ServerSocket socket]
(Long. (.getLocalPort socket)))
... | null | https://raw.githubusercontent.com/gerritjvv/tcp-driver/2a9373cda20d176bfb5b00e63f4816fa83c88591/test/tcp_driver/test/util.clj | clojure |
Public API
we need to ensure we have some bytes | (ns tcp-driver.test.util
(:require [tcp-driver.io.conn :as tcp-conn]
[tcp-driver.io.stream :as tcp-stream])
(:import (java.net ServerSocket SocketException)))
(defn ^ServerSocket server-socket []
(ServerSocket. (int 0)))
(defn ^Long get-port [^ServerSocket socket]
(Long. (.getLocalPort socket)))
... |
c589e32b65b8b7d55f8eb515632c2469dcbcf3b81d8e511df6e4d4c480adcbf8 | didier-wenzek/ocaml-kafka | kafka.mli | * OCaml bindings for
(** Version of the librdkafka library used by this binding. *)
val librdkafka_version : string
(** Handler to a cluster of kafka brokers. Either a producer or a consumer. *)
type handler
(** A handler to a kafka topic. *)
type topic
* A message queue allows the application to re - route consum... | null | https://raw.githubusercontent.com/didier-wenzek/ocaml-kafka/d4e831d400c98b9a67ce984e09665d144cc15717/lib/kafka.mli | ocaml | * Version of the librdkafka library used by this binding.
* Handler to a cluster of kafka brokers. Either a producer or a consumer.
* A handler to a kafka topic.
* Partition id, from 0 to topic partition count -1
* Offset in a partition
* A message consumed from a consumer or a queue.
topic, partition, offset, p... | * OCaml bindings for
val librdkafka_version : string
type handler
type topic
* A message queue allows the application to re - route consumed messages
from multiple topics and partitions into one single queue point .
from multiple topics and partitions into one single queue point. *)
type queue
type partit... |
5ee9effb0aeaea81989240a2bc0b10d9eda331e7aea4b8886b06aee35f567dde | mirage/ocaml-qcow | gen.ml | let output_file = ref "lib/qcow_word_size.ml"
let _ =
Arg.parse [
"-o", Arg.Set_string output_file, "output filename"
] (fun x ->
Printf.fprintf stderr "Unexpected argument: %s\n%!" x;
exit 1;
) "Auto-detect the host word size";
let oc = open_out !output_file in
begin match Sys.word_size with
... | null | https://raw.githubusercontent.com/mirage/ocaml-qcow/2418c66627dcce8420bcb06d7547db171528060a/generator/gen.ml | ocaml | let output_file = ref "lib/qcow_word_size.ml"
let _ =
Arg.parse [
"-o", Arg.Set_string output_file, "output filename"
] (fun x ->
Printf.fprintf stderr "Unexpected argument: %s\n%!" x;
exit 1;
) "Auto-detect the host word size";
let oc = open_out !output_file in
begin match Sys.word_size with
... | |
fdc650650595965bf7345009080a12cbe79016fc27d36a8bba571639a797f3f0 | zwizwa/staapl | pattern-utils.rkt | (module pattern-utils mzscheme
(provide (all-defined))
(define (process/merge-patterns meta-pattern stx)
(apply append
(map (lambda (p-stx)
(syntax->list
(meta-pattern p-stx)))
(syntax->list stx))))
)
| null | https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/coma/pattern-utils.rkt | racket | (module pattern-utils mzscheme
(provide (all-defined))
(define (process/merge-patterns meta-pattern stx)
(apply append
(map (lambda (p-stx)
(syntax->list
(meta-pattern p-stx)))
(syntax->list stx))))
)
| |
8634b6f6a0d930cff353b89fb78d96745a3b9c1fb1bcb77eedae99a6a92ec01e | dhleong/wish | util.cljs | (ns ^{:author "Daniel Leong"
:doc "View/widget utils"}
wish.views.util)
(defn dispatch-change-from-keyup
"Event handler that be used for :on-key-up
that dispatches on-change immediately."
[e]
(let [el (.-target e)]
(js/console.log e)
(js/console.log el)
(js/console.log (.-onchange el))
... | null | https://raw.githubusercontent.com/dhleong/wish/9036f9da3706bfcc1e4b4736558b6f7309f53b7b/src/cljs/wish/views/util.cljs | clojure | (ns ^{:author "Daniel Leong"
:doc "View/widget utils"}
wish.views.util)
(defn dispatch-change-from-keyup
"Event handler that be used for :on-key-up
that dispatches on-change immediately."
[e]
(let [el (.-target e)]
(js/console.log e)
(js/console.log el)
(js/console.log (.-onchange el))
... | |
7cf97e6e6565fe31f2f4204eb3f5cf7e00a4e06db647f9b24747046fd56c351c | metabase/metabase | prevent_infinite_recursive_preprocesses.clj | (ns metabase.query-processor.middleware.prevent-infinite-recursive-preprocesses
(:require
[metabase.query-processor.error-type :as qp.error-type]
[metabase.util.i18n :refer [tru]]
[metabase.util.log :as log]))
(def ^:private ^:dynamic *preprocessing-level* 1)
(def ^:private ^:const max-preprocessing-level ... | null | https://raw.githubusercontent.com/metabase/metabase/dad3d414e5bec482c15d826dcc97772412c98652/src/metabase/query_processor/middleware/prevent_infinite_recursive_preprocesses.clj | clojure | record the number of recursive preprocesses taking place to prevent infinite preprocessing loops. | (ns metabase.query-processor.middleware.prevent-infinite-recursive-preprocesses
(:require
[metabase.query-processor.error-type :as qp.error-type]
[metabase.util.i18n :refer [tru]]
[metabase.util.log :as log]))
(def ^:private ^:dynamic *preprocessing-level* 1)
(def ^:private ^:const max-preprocessing-level ... |
8c9390e755e9ea5f51fe0ee90972f929f620e121ec4ae71a1307aff1895085dc | ocaml-flambda/flambda-backend | recmodules.ml | (* TEST
flags = "-dshape"
* expect
*)
(**********)
(* Simple *)
(**********)
module rec A : sig
type t = Leaf of B.t
end = struct
type t = Leaf of B.t
end
and B
: sig type t = int end
= struct type t = int end
[%%expect{|
{
"A"[module] -> {
"t"[type] -> <.8>;
};... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/1d905beda2707698d36835ef3acd77a5992fc389/ocaml/testsuite/tests/shapes/recmodules.ml | ocaml | TEST
flags = "-dshape"
* expect
********
Simple
********
***************
***************
reduce is going to die on this.
*************************
Example from the manual
*************************
we restrict the sig to limit the bloat in the expected output. |
module rec A : sig
type t = Leaf of B.t
end = struct
type t = Leaf of B.t
end
and B
: sig type t = int end
= struct type t = int end
[%%expect{|
{
"A"[module] -> {
"t"[type] -> <.8>;
};
"B"[module] -> {
"t"[type] -> <.10>;
};
}
modu... |
2d62bd422eaac4fb8ef072b070489e691706294ad667f10e943392a3686ede91 | Ptival/language-ocaml | Variance.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Language.OCaml.PrettyPrinter.Variance
( variancePP,
)
where
import Language.OCaml.Definitions.Parsing.ASTTypes (Variance (..))
import Language.OCa... | null | https://raw.githubusercontent.com/Ptival/language-ocaml/7b07fd3cc466bb2ad2cac4bfe3099505cb63a4f4/lib/Language/OCaml/PrettyPrinter/Variance.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Language.OCaml.PrettyPrinter.Variance
( variancePP,
)
where
import Language.OCaml.Definitions.Parsing.ASTTypes (Variance (..))
import Language.OCaml.PrettyPrinter.ConstructorDeclara... |
c2660fd1b4ec96903740b73d52fb192863952e39bf520147fd0c7fbe7c6659bc | ygmpkk/house | Handle.hs | -- #hide
-----------------------------------------------------------------------------
-- |
-- Module : Window.Handle
Copyright : ( c ) 2002
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-- Window.Handle contains the internal data structure... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/ObjectIO/Graphics/UI/ObjectIO/Window/Handle.hs | haskell | #hide
---------------------------------------------------------------------------
|
Module : Window.Handle
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
Window.Handle contains the internal data structures that represent the
state of windows.
-----------... | Copyright : ( c ) 2002
module Graphics.UI.ObjectIO.Window.Handle
( ControlState, WindowHandles(..)
, Graphics.UI.ObjectIO.CommonDef.Bound(..), WindowStateHandle(..), WIDS(..)
, WindowLSHandle(..)
, ScrollInfo(..), ClipState(..)
, WindowHandle(..), WindowKind(..), WindowMode(..)
, WElementHandle(.... |
1e25190cec4c272f87b07da9e05f2a62d5a7def40d9c07aed952c23c955653d8 | bennn/iPoe | bad-syllables.rkt | #lang ipoe/villanelle
I shut mine eyes and all the world drops dead;
I lift mine lid and all is born again.
(I think I made you up inside mine head.)
The star go dancing out in blue and red,
And arbitrary blackness run again
I shut mine eyes and all the world drops dead.
I did dream that you put mine into bed
And s... | null | https://raw.githubusercontent.com/bennn/iPoe/4a988f6537fb738b4fe842c404f9d78f658ab76f/examples/villanelle/bad-syllables.rkt | racket | #lang ipoe/villanelle
I lift mine lid and all is born again.
(I think I made you up inside mine head.)
The star go dancing out in blue and red,
And arbitrary blackness run again
I shut mine eyes and all the world drops dead.
I did dream that you put mine into bed
And sung mine moon-struck, kiss mine quite again
(I... | |
42573da818a77cc9fbc58600846994c3b39578129405fba15e029624aa27b6eb | yuriy-chumak/ol | case-sensitivity_of_identifiers.scm | ; www.rosettacode.org/wiki/Case-sensitivity_of_identifiers#Ol
(define dog "Benjamin")
(define Dog "Samba")
(define DOG "Bernie")
(print "The three dogs are named " dog ", " Dog " and " DOG ".")
| null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/rosettacode/case-sensitivity_of_identifiers.scm | scheme | www.rosettacode.org/wiki/Case-sensitivity_of_identifiers#Ol |
(define dog "Benjamin")
(define Dog "Samba")
(define DOG "Bernie")
(print "The three dogs are named " dog ", " Dog " and " DOG ".")
|
59c5166952ec5864673655258e5967071e3d10496468870e3c65f6682e180906 | jeromesimeon/Galax | evaluation_expr.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/evaluation/evaluation_expr.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : evaluation_expr.ml , v 1.18 2007/03/18 21:38:01 mff Exp $
Module : Evaluation_expr
Description :
Execute the code associated to each algebraic operation
Description:
Execute the code associated to each algebrai... |
572ef3da3efa79e3c5f7547e69fccaeddb7a4588f3b5053c9b55de38af3fa32f | mbenelli/klio | binary-io#.scm | ; binary-io.scm - Binary parsing and writing.
;
Copyright ( c ) 2011 by . All rights reserved .
(##namespace
("binary-io#"
default-endian
default-float-endian
binary-port?
open-binary-input-file
open-binary-output-file
call-with-binary-input-file
call-with-binary-output-file
with-input-from-bina... | null | https://raw.githubusercontent.com/mbenelli/klio/33c11700d6080de44a22a27a5147f97899583f6e/klio/binary-io%23.scm | scheme | binary-io.scm - Binary parsing and writing.
| Copyright ( c ) 2011 by . All rights reserved .
(##namespace
("binary-io#"
default-endian
default-float-endian
binary-port?
open-binary-input-file
open-binary-output-file
call-with-binary-input-file
call-with-binary-output-file
with-input-from-binary-file
with-output-to-binary-file
read-bin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.