_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 |
|---|---|---|---|---|---|---|---|---|
2eee94a6e94c8cae548ba217181e5a7a93a1a17bee1792fda5036e1c116bb5cb | diagrams/diagrams-lib | Names.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE MonoLocalBinds #-}
# OPTIONS_GHC -fno - warn - unused - imports #
for Data . Semigroup
-----------------------------------------------------------------------------
-- |
-- Module : Diagrams.Names
Copyright : ( c ) 2013 diagr... | null | https://raw.githubusercontent.com/diagrams/diagrams-lib/6f66ce6bd5aed81d8a1330c143ea012724dbac3c/src/Diagrams/Names.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE MonoLocalBinds #
---------------------------------------------------------------------------
|
Module : Diagrams.Names
License : BSD-style (see LICENSE)
Maintainer :
Names can be given to subdiagrams, and subdiagrams can later be
queried by name. This modu... | # LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - unused - imports #
for Data . Semigroup
Copyright : ( c ) 2013 diagrams - lib team ( see LICENSE )
module Diagrams.Names
AName, Name, IsName(..), (.>)
, Qualifiable(..)
, Subdiagram, mkSubdiagram, subPoint, getSub, rawSub, location
... |
5ed5ecd394a3611e291dc7ccbcd42b1ce49eed0356889b59542fcd42f9050b40 | uwplse/PUMPKIN-PATCH | abstractionconfig.mli | open Environ
open Evd
open Constr
open Abstracters
open Candidates
open Proofdiff
open Cutlemma
open Stateutils
(* --- Configuring Abstraction --- *)
Caller configuration for abstraction
type abstraction_config =
{
env : env;
args_base : types list;
args_goal : types list;
cs : candidates;
f_b... | null | https://raw.githubusercontent.com/uwplse/PUMPKIN-PATCH/73fd77ba49388fdc72702a252a8fa8f071a8e1ea/plugin/src/core/components/abstraction/abstractionconfig.mli | ocaml | --- Configuring Abstraction ---
--- Defaults ---
* Given an environment, a difference in goal types, and a list of candidates,
* configure the default configuration for abstraction of arguments
--- Cut Lemmas ---
* These configuration functions are for when you cut search by a certain lemma,
* so the type... | open Environ
open Evd
open Constr
open Abstracters
open Candidates
open Proofdiff
open Cutlemma
open Stateutils
Caller configuration for abstraction
type abstraction_config =
{
env : env;
args_base : types list;
args_goal : types list;
cs : candidates;
f_base : types;
f_goal : types;
s... |
1b70d5bcaa89b568b808229aecb267fd1e5d4ee0825c821dd14148c5c7e25d2f | ngless-toolkit/ngless | Tests.hs | Copyright 2013 - 2021 NGLess Authors
- License : MIT
- License: MIT
-}
# LANGUAGE TemplateHaskell , QuasiQuotes #
-- | Unit tests are their own programme.
--
Unit tests written in have less overhead than full integration tests
-- in the tests/ directory, but are not always as convenient.
module Main where... | null | https://raw.githubusercontent.com/ngless-toolkit/ngless/c69baf7e00e807a82ec1b1276763f74f4a5411b2/Tests-Src/Tests.hs | haskell | | Unit tests are their own programme.
in the tests/ directory, but are not always as convenient.
The main test driver sets up the config options then uses the automatically
generated function
Test Tokens module
Test Types
Type Validate pre process operations
_parseGffAttributes
- Unique.hs | Copyright 2013 - 2021 NGLess Authors
- License : MIT
- License: MIT
-}
# LANGUAGE TemplateHaskell , QuasiQuotes #
Unit tests written in have less overhead than full integration tests
module Main where
import Test.Tasty
import Test.Tasty.TH
import Test.Tasty.HUnit
import Text.Parsec (parse)
import Text.Pa... |
1d1b9df1b8abbc094af201d530ad5a5a574fd6c893dbd475b29dfd59a98b2329 | geophf/1HaskellADay | Exercise.hs | module Y2020.M08.D31.Exercise where
-
" Yesterday , " * ...
* where " yesterday " is " our last working day where we , the workers , get
weekends off"-yesterday .
... " yesterday " we discovered that is is
, because they all wrote the word : " the . "
Yay ! Everything is related to everything , a... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2020/M08/D31/Exercise.hs | haskell | }
}
}
} | module Y2020.M08.D31.Exercise where
-
" Yesterday , " * ...
* where " yesterday " is " our last working day where we , the workers , get
weekends off"-yesterday .
... " yesterday " we discovered that is is
, because they all wrote the word : " the . "
Yay ! Everything is related to everything , a... |
e517e034894d596e36469432185c8afce2885922cd3003c3a1bf3c8d9c4e87f0 | facebook/infer | timer.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/b3a229f872003fe020455807668bc7a8edd22d5c/sledge/nonstdlib/timer.ml | ocaml | * Timers for runtime statistics |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
0da7f207c1413ccf1434010a485ae8dbcce7dae1feab7a5f0d4ae8de23a833c1 | mmontone/fmt | package.lisp | (defpackage fmt-test
(:use :cl :fmt :fiveam)
(:export #:run-tests))
| null | https://raw.githubusercontent.com/mmontone/fmt/ecb0443fe595638e46c06a5dfea9a3e8c353d7df/t/package.lisp | lisp | (defpackage fmt-test
(:use :cl :fmt :fiveam)
(:export #:run-tests))
| |
d178dea71726772477be0a29e1b35e34c94c98ebf689e35079fafa93bfc0d346 | blockapps/eth-pruner | ExtendedWord.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
{-# OPTIONS -fno-warn-orphans #-}
module Prune.ExtendedWord
(
Word64, Word160,
word64ToBytes, bytesToWord64,
word160ToBytes, bytesToWord160,
) where
import Data.Binary
import Data.Bits
import Data.Doub... | null | https://raw.githubusercontent.com/blockapps/eth-pruner/513fcc884c93974a29b380ca80669dc0aebec125/src/Prune/ExtendedWord.hs | haskell | # LANGUAGE TypeSynonymInstances #
# OPTIONS -fno-warn-orphans # | # LANGUAGE FlexibleInstances #
module Prune.ExtendedWord
(
Word64, Word160,
word64ToBytes, bytesToWord64,
word160ToBytes, bytesToWord160,
) where
import Data.Binary
import Data.Bits
import Data.DoubleWord (Word160)
word64ToBytes :: Word64 -> [Word8]
word64ToBytes word ... |
024fd069d1d21f40f57771dace6f4dde307dc8de7104aa4fcd7c912cbd7b7501 | hgoes/smtlib2 | Nat.hs | module Language.SMTLib2.Internals.Type.Nat where
import Data.Typeable
import Data.Constraint
import Data.GADT.Compare
import Data.GADT.Show
import Language.Haskell.TH
-- | Natural numbers on the type-level.
data Nat = Z | S Nat deriving Typeable
| A concrete representation of the ' ' type .
data Natural (n::Nat) ... | null | https://raw.githubusercontent.com/hgoes/smtlib2/c35747f2a5a9ec88dc7b1db41a5aab6e98c0458d/Language/SMTLib2/Internals/Type/Nat.hs | haskell | | Natural numbers on the type-level.
| Get a static representation for a dynamically created natural number.
Example:
>>> reifyNat (S (S Z)) show
| A template haskell function to create nicer looking numbers.
Example:
| A template haskell function to create nicer looking number types.
Example:
| module Language.SMTLib2.Internals.Type.Nat where
import Data.Typeable
import Data.Constraint
import Data.GADT.Compare
import Data.GADT.Show
import Language.Haskell.TH
data Nat = Z | S Nat deriving Typeable
| A concrete representation of the ' ' type .
data Natural (n::Nat) where
Zero :: Natural Z
Succ :: Natu... |
901d22b5924d19e89e4818dc2c1860c9bc18b5a677625b4c1203c9bfe0dc6965 | ejlilley/AbstractMusic | Scales.hs | # LANGUAGE GADTs ,
MultiParamTypeClasses #
MultiParamTypeClasses #-}
module Scales where
import Music (Scale(..),
AbstractPitch1(..), AbstractInt1(..),
AbstractPitch2(..), AbstractInt2(..),
Interval(..), Pitch(..), Transpose(..),
fa... | null | https://raw.githubusercontent.com/ejlilley/AbstractMusic/815ab33ee204dd3ebf29076bde330bfdf6938677/Scales.hs | haskell | Melodic minor scales:
Double harmonic scales:
Modal:
modeIII
modeIV
modeV
modeVI
modeVII
modeVIII
(measured in semitones) | # LANGUAGE GADTs ,
MultiParamTypeClasses #
MultiParamTypeClasses #-}
module Scales where
import Music (Scale(..),
AbstractPitch1(..), AbstractInt1(..),
AbstractPitch2(..), AbstractInt2(..),
Interval(..), Pitch(..), Transpose(..),
fa... |
4334c917df03600fe4bc5b69fa6d4753eecd9212c198584a1338f1cdf69c8635 | wireapp/wire-server | LoginCodeTimeout_user.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/c428355b7683b7b7722ea544eba314fc843ad8fa/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/LoginCodeTimeout_user.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Test.Wire.API.Golden.Gene... |
fda824638f00f901fff07c3d841fe20e3d74f88bcb96a5618e0e8f8a7399cbe3 | pixlsus/registry.gimp.org_static | imageFormula.scm | Berengar W. Lehr ( )
Medical Physics Group , Department of Diagnostic and Interventional Radiology
Jena University Hospital , 07743 Jena , Thueringen , Germany
;
; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Fre... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/imageFormula.scm | scheme |
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR... | Berengar W. Lehr ( )
Medical Physics Group , Department of Diagnostic and Interventional Radiology
Jena University Hospital , 07743 Jena , Thueringen , Germany
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation ,... |
ca6fbc55dbc633d43fd86357cc03670aed906c971bb96557a02605f13a8006ee | tarides/dune-release | test_uri_helpers.ml | let uri =
let open Dune_release.Uri_helpers in
Alcotest.testable pp_uri equal_uri
let test_parse =
let make_test ~input ~expected =
let name = Printf.sprintf "parse: %s" input in
let test_fun () =
let actual = Dune_release.Uri_helpers.parse input in
Alcotest.(check (option uri)) name expected... | null | https://raw.githubusercontent.com/tarides/dune-release/6bfed0f299b82c0931c78d4e216fd0efedff0673/tests/lib/test_uri_helpers.ml | ocaml | let uri =
let open Dune_release.Uri_helpers in
Alcotest.testable pp_uri equal_uri
let test_parse =
let make_test ~input ~expected =
let name = Printf.sprintf "parse: %s" input in
let test_fun () =
let actual = Dune_release.Uri_helpers.parse input in
Alcotest.(check (option uri)) name expected... | |
0952b667f624c1223a23eda7bfcab19a5432f56ca9e41606159e78b7ed3fb00f | coccinelle/coccinelle | bytes.mli | external length : bytes -> int = "%bytes_length"
external get : bytes -> int -> char = "%bytes_safe_get"
external set : bytes -> int -> char -> unit = "%bytes_safe_set"
external create : int -> bytes = "caml_create_bytes"
val make : int -> char -> bytes
val init : int -> (int -> char) -> bytes
val empty : bytes
val cop... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.14/bytes.mli | ocaml | external length : bytes -> int = "%bytes_length"
external get : bytes -> int -> char = "%bytes_safe_get"
external set : bytes -> int -> char -> unit = "%bytes_safe_set"
external create : int -> bytes = "caml_create_bytes"
val make : int -> char -> bytes
val init : int -> (int -> char) -> bytes
val empty : bytes
val cop... | |
e630d785c7eb19022fd29d985fd6ec87464723b761e4880cf0910396dde054f5 | mzp/coq-for-ipad | taquin.ml | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of Objective Caml
(* *)
, , and ... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/otherlibs/labltk/examples_labltk/taquin.ml | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of Objective Caml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
17f7a9f22550e67fd48befc1b8e85f48a2d14089123d09a9e5c38e061751251f | may-liu/qtalk | http_add_muc_user.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(http_add_muc_user).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-include("logger.hrl").
-include("http_req.hrl").
-include("ejb_http_server.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
{Meth... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/scripts/ejb_http_server/src/http_add_muc_user.erl | erlang | Feel free to use, reuse and abuse the code in this file. |
-module(http_add_muc_user).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-include("logger.hrl").
-include("http_req.hrl").
-include("ejb_http_server.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
{Method, _} = cowboy_req:method(Req),
case Method of
<<"GET">>... |
3f253c683e34125c1c01239715773c31690e607e11f5ef9db88b8ed1a8e069a6 | UU-ComputerScience/uhc | t2.hs | module Main where
ids :: [forall a . a -> a]
ids = []
h1 = (\x -> x) : ids
h2 :: [forall a . a -> a]
h2 = (\x -> x) : ids
h3 = id ids
main = return ()
| null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/lucilia/t2.hs | haskell | module Main where
ids :: [forall a . a -> a]
ids = []
h1 = (\x -> x) : ids
h2 :: [forall a . a -> a]
h2 = (\x -> x) : ids
h3 = id ids
main = return ()
| |
ba562e507cb8250be5ea19e5f2afb70206ff093ef0269979bbf722592e74dc99 | realworldocaml/book | action.mli | (** Actions defined in dune files.
All constructors correspond to actions the user may write in dune files.
Eventually, these are all desugared into [Action.t], which are actions
executed by the build system. *)
open Stdune
open Dune_sexp
module Action_plugin : sig
val syntax : Syntax.t
end
module Dif... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_lang/action.mli | ocaml | * Actions defined in dune files.
All constructors correspond to actions the user may write in dune files.
Eventually, these are all desugared into [Action.t], which are actions
executed by the build system.
* no diffing, just raw comparison
* diffing after newline normalization
* Both Stdout and Stderr ... |
open Stdune
open Dune_sexp
module Action_plugin : sig
val syntax : Syntax.t
end
module Diff : sig
module Mode : sig
type t =
end
type ('path, 'target) t =
{ optional : bool
; mode : Mode.t
; file1 : 'path
; file2 : 'target
}
val map : ('p, 't) t -> path:('p -> 'x) -> target:('t ->... |
cb4b92e7e21f947917d25fb0065d59e8c9f7b24260e6ae462137ff83fe338848 | LeventErkok/hArduino | Setup.hs | -----------------------------------------------------------------------------
-- |
-- Module : Main
Copyright : ( c )
-- License : BSD3
-- Maintainer :
-- Stability : experimental
--
Setup module for the hArduino library
-----------------------------------------------------------------------... | null | https://raw.githubusercontent.com/LeventErkok/hArduino/ee04988ad9ef3d4384d7ce7a8670518ce8b0a34c/Setup.hs | haskell | ---------------------------------------------------------------------------
|
Module : Main
License : BSD3
Maintainer :
Stability : experimental
--------------------------------------------------------------------------- | Copyright : ( c )
Setup module for the hArduino library
# OPTIONS_GHC -Wall #
module Main(main) where
import Distribution.Simple
main :: IO ()
main = defaultMain
|
5c32ae59b4d739747294968ce2f44fc0ea4b221d69658a7909f07f9af30b3e8c | clojurewerkz/cassaforte | types.clj | (ns clojurewerkz.cassaforte.query.types
(:import [com.datastax.driver.core TupleType DataType ProtocolVersion CodecRegistry]))
;;
;; Types
;;
(def primitive-types
{:ascii (DataType/ascii)
:bigint (DataType/bigint)
:blob (DataType/blob)
:boolean (DataType/cboolean)
:counter (DataType/co... | null | https://raw.githubusercontent.com/clojurewerkz/cassaforte/bd0b3ff44c5d7f993798270032aa41be0e8209c2/src/clojure/clojurewerkz/cassaforte/query/types.clj | clojure |
Types
| (ns clojurewerkz.cassaforte.query.types
(:import [com.datastax.driver.core TupleType DataType ProtocolVersion CodecRegistry]))
(def primitive-types
{:ascii (DataType/ascii)
:bigint (DataType/bigint)
:blob (DataType/blob)
:boolean (DataType/cboolean)
:counter (DataType/counter)
:deci... |
2b94c1a341d091155e96a107de8037ddaf0406739da641c51356d3854a6fdee8 | clj-easy/graal-config | core.clj | (ns example.core
(:require
[io.pedestal.log :as log])
(:gen-class))
(defn -main
[& _args]
(log/error :in 'my-fn :message "this is a message")
(log/error :hello "world")
(log/info :hello "world"))
| null | https://raw.githubusercontent.com/clj-easy/graal-config/2462e9f730c7a283796694c4e7786093c1192016/config/org.slf4j/slf4j-simple/example/src/example/core.clj | clojure | (ns example.core
(:require
[io.pedestal.log :as log])
(:gen-class))
(defn -main
[& _args]
(log/error :in 'my-fn :message "this is a message")
(log/error :hello "world")
(log/info :hello "world"))
| |
5c04821fd8b06bfce5c4b2d561a71289d7fb65553994fd4af8ea47a6998807ee | iamaleksey/common_lib | common_lib.erl | Copyright ( C ) 2009 ,
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions are met:
%%%
%%% o Redistributions of source code must retain the above copyright notice,
%%% this list of conditions ... | null | https://raw.githubusercontent.com/iamaleksey/common_lib/250d965d5accaad8aa1e2c7bbf4ac691aa94ca93/src/common_lib.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
o Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
o Redistributions ... | Copyright ( C ) 2009 ,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY ,... |
d157a63149042db3468419f7247874769da42f5532356333a6d91d0b3b5fa8b7 | qfpl/reflex-tutorial | Solution.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
module Ex03.Solution (
attachEx03
) where
import Language.Javascript.JSaddle (JSM)
import qualified Data.Map as Map
import Reflex
import Util.Attach
#ifndef ghcjs_HOST_OS
import Util.Run
#endif
import Ex03.Common
import Ex03.Run
ex03 ::
Reflex t =>
In... | null | https://raw.githubusercontent.com/qfpl/reflex-tutorial/07c1e6fab387cbeedd031630ba6a5cd946cc612e/code/exercises/src/Ex03/Solution.hs | haskell | # LANGUAGE OverloadedStrings #
We put our products in a list:
We write a helper function to get from a `Product` to a `Map Text (Behavior t Product)`
We use this helper to turn our products into a `Map` and then combine the `Map`s, using `foldMap`:
We have a `Map` of `Behavior`s that we want to turn into a `Behavio... | # LANGUAGE CPP #
module Ex03.Solution (
attachEx03
) where
import Language.Javascript.JSaddle (JSM)
import qualified Data.Map as Map
import Reflex
import Util.Attach
#ifndef ghcjs_HOST_OS
import Util.Run
#endif
import Ex03.Common
import Ex03.Run
ex03 ::
Reflex t =>
Inputs t ->
Outputs t
ex03 (Inputs ... |
b5317b17fb56d4c77afae99c39be3e05c7f45a2656a782c49961b6b4516cd4b8 | input-output-hk/cardano-ledger | Utxos.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Cardano.Ledger.Conway.Rules.Utxos (ConwayUTXOS) where
import Cardano.Ledger.Alonzo.Rules (
AlonzoUtxoEvent (..),
AlonzoUtxoPredF... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/ac405a977557a7c58ce1cf69d3c2a0bf148cf19f/eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Utxos.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Cardano.Ledger.Conway.Rules.Utxos (ConwayUTXOS) where
import Cardano.Ledger.Alonzo.Rules (
AlonzoUtxoEvent (..),
AlonzoUtxoPredF... | |
13b08cd1ae231341aa0785e37a2a7c55845bb975dbcff3fc896a44495239347c | xvw/muhokama | env.mli | (** Provide the [Env] through HTTP request. *)
val set : Lib_common.Env.t -> Dream.middleware
val get : Dream.request -> (Lib_common.Env.t -> 'a) -> 'a
| null | https://raw.githubusercontent.com/xvw/muhokama/c6f4dbe0459d9dc5f9fb9921a05a3bba93a06ce7/lib/service/env.mli | ocaml | * Provide the [Env] through HTTP request. |
val set : Lib_common.Env.t -> Dream.middleware
val get : Dream.request -> (Lib_common.Env.t -> 'a) -> 'a
|
edb771153958ea88bc302010e45190da828039b571e9f06848d77b10b19dc1c1 | jacquev6/JsOfOCairo | draw_in_browser.ml | Copyright 2017 < >
module Drawings = Drawings.Make(JsOfOCairo)
let () = Js_of_ocaml.Js.export "draw" (fun canvas ->
Drawings.draw (JsOfOCairo.create canvas)
)
| null | https://raw.githubusercontent.com/jacquev6/JsOfOCairo/a00a31000b1a7cabe6ac74e48e86b52ec4699cff/demo/draw_in_browser.ml | ocaml | Copyright 2017 < >
module Drawings = Drawings.Make(JsOfOCairo)
let () = Js_of_ocaml.Js.export "draw" (fun canvas ->
Drawings.draw (JsOfOCairo.create canvas)
)
| |
614ba85d34f7ae256dbf9c40f4e994e5967a1774889f6394f5df48ccc19e556c | Andromedans/andromeda | substitution.ml | module MetaMap = Map.Make(struct
type t = Mlty.meta
let compare = compare
end)
type t = Mlty.ty MetaMap.t
let lookup m s =
try Some (MetaMap.find m s)
with Not_found -> None
let domain s =
MetaMap.fold (fun m _ ms -> Mlty.MetaSet.add m ms) s Mlty.MetaSet.empty
let apply (s : t) t =
if MetaMap.is_empty... | null | https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/src/typing/substitution.ml | ocaml | module MetaMap = Map.Make(struct
type t = Mlty.meta
let compare = compare
end)
type t = Mlty.ty MetaMap.t
let lookup m s =
try Some (MetaMap.find m s)
with Not_found -> None
let domain s =
MetaMap.fold (fun m _ ms -> Mlty.MetaSet.add m ms) s Mlty.MetaSet.empty
let apply (s : t) t =
if MetaMap.is_empty... | |
e3d908eb870e8abc3099f901278592ee19e78085ada2066cf1b0ee3969c3e5a7 | serokell/servant-util | Postgres.hs | module Servant.Util.Beam.Postgres
( module M
) where
import Servant.Util.Beam.Postgres.Filtering as M
import Servant.Util.Beam.Postgres.Pagination as M
import Servant.Util.Beam.Postgres.Sorting as M
| null | https://raw.githubusercontent.com/serokell/servant-util/21ce12e9bdbf37e06498e2387429a30d4a4ba992/servant-util-beam-pg/src/Servant/Util/Beam/Postgres.hs | haskell | module Servant.Util.Beam.Postgres
( module M
) where
import Servant.Util.Beam.Postgres.Filtering as M
import Servant.Util.Beam.Postgres.Pagination as M
import Servant.Util.Beam.Postgres.Sorting as M
| |
2bdbf7556bab5e8c21b3f2302e2018d51eb00203b4531f6adebf05bd18bc500f | takuto-h/yuzu | typeInfo.ml | type t =
| Variant of ((Names.ctor_name * (TypeExpr.t) option * TypeExpr.t)) list
| Record of ((bool * Names.val_name * TypeExpr.t * TypeExpr.t)) list
| null | https://raw.githubusercontent.com/takuto-h/yuzu/e6bef0964d87c1ced65280083505448f56e5cf29/typeInfo.ml | ocaml | type t =
| Variant of ((Names.ctor_name * (TypeExpr.t) option * TypeExpr.t)) list
| Record of ((bool * Names.val_name * TypeExpr.t * TypeExpr.t)) list
| |
a11b795b611fa38211667a48c5fb6c0aa79d0060515f2d0fee7f08b7194eeccd | ekmett/rope | Branded.hs | # LANGUAGE TypeOperators , Rank2Types , EmptyDataDecls ,
MultiParamTypeClasses , FunctionalDependencies ,
FlexibleContexts , FlexibleInstances , UndecidableInstances ,
IncoherentInstances , OverlappingInstances #
MultiParamTypeClasses, FunctionalDependencies,
... | null | https://raw.githubusercontent.com/ekmett/rope/418b895e4895f566d726ca17688c428bcc95aa25/Data/Rope/Branded.hs | haskell | :: (s `Branded` Rope) a -> Bool
* Unpacking Ropes
:: Unpackable t => (s `Branded` Rope) a -> t
:: Unpackable t => (s `Branded` Rope) a -> t
:: Unpackable t => (s `Branded` Rope) a -> [t]
* MonadWriter
MonadWriter terminology for 'context'
> sample :: Branded Unsafe Rope ()
> sample = do pack "Hello"
> ... | # LANGUAGE TypeOperators , Rank2Types , EmptyDataDecls ,
MultiParamTypeClasses , FunctionalDependencies ,
FlexibleContexts , FlexibleInstances , UndecidableInstances ,
IncoherentInstances , OverlappingInstances #
MultiParamTypeClasses, FunctionalDependencies,
... |
68ac82da956c64301e44939fdeb784435ecb6c135ed5e80de9515e190af07594 | yokolet/clementine | tagged_literals.clj | (ns cljs.tagged-literals
(:require [clojure.instant :as inst]))
(defn read-queue
[form]
(assert (vector? form) "Queue literal expects a vector for its elements.")
(list 'cljs.core/into 'cljs.core.PersistentQueue/EMPTY form))
(defn read-uuid
[form]
(assert (string? form) "UUID literal expects a string as i... | null | https://raw.githubusercontent.com/yokolet/clementine/b26c2318625e49606b5cc3b95cc9e1f5085ac309/ext/clojure-clojurescript-bef56a7/src/clj/cljs/tagged_literals.clj | clojure | (ns cljs.tagged-literals
(:require [clojure.instant :as inst]))
(defn read-queue
[form]
(assert (vector? form) "Queue literal expects a vector for its elements.")
(list 'cljs.core/into 'cljs.core.PersistentQueue/EMPTY form))
(defn read-uuid
[form]
(assert (string? form) "UUID literal expects a string as i... | |
bcacf7656377ebae3a72c46691639cc13babb89d1cd0f8158d7e7f9140ce7abc | programaker-project/Programaker-Core | automate_rest_api_programs_root.erl | %%% @doc
%%% REST endpoint to manage knowledge collections.
%%% @end
-module(automate_rest_api_programs_root).
-export([init/2]).
-export([ allowed_methods/2
, options/2
, is_authorized/2
, content_types_provided/2
, content_types_accepted/2
, resource_exists/2
]).
-exp... | null | https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_rest_api/src/automate_rest_api_programs_root.erl | erlang | @doc
REST endpoint to manage knowledge collections.
@end
CORS
Authentication
Don't do authentication if it's just asking for options
Non matching username
POST handler
GET handler |
-module(automate_rest_api_programs_root).
-export([init/2]).
-export([ allowed_methods/2
, options/2
, is_authorized/2
, content_types_provided/2
, content_types_accepted/2
, resource_exists/2
]).
-export([ accept_json_create_program/2
, to_json/2
]).
-... |
3e91bd156ee353ae6dcae09638eebdc353745581e96bd946f077acdcb57ed946 | tqtezos/stablecoin | Metadata.hs | SPDX - FileCopyrightText : 2021 Oxhead Alpha
SPDX - License - Identifier : MIT
| This module contains the TZIP-16 metadata and off - chain - views for the
-- @stablecoin.tz@ contract.
module Lorentz.Contracts.Stablecoin.Metadata
( MetadataUri(..)
, ParsedMetadataUri(..)
, metadataJSON
, metadataMap
, p... | null | https://raw.githubusercontent.com/tqtezos/stablecoin/48012781d6c2d46d4cb8f0508a8ca1576481a561/haskell/src/Lorentz/Contracts/Stablecoin/Metadata.hs | haskell | @stablecoin.tz@ contract.
> Unless otherwise-specified, the encoding of the values must be the direct stream
> of bytes of the data being stored. (...)
> quoting mechanism.
See: </-/blob/eb1da57684599a266334a73babd7ba82dbbbce66/proposals/tzip-16/tzip-16.md#contract-storage>
as argument here so that we can use ... | SPDX - FileCopyrightText : 2021 Oxhead Alpha
SPDX - License - Identifier : MIT
| This module contains the TZIP-16 metadata and off - chain - views for the
module Lorentz.Contracts.Stablecoin.Metadata
( MetadataUri(..)
, ParsedMetadataUri(..)
, metadataJSON
, metadataMap
, parseMetadataUri
) where
im... |
c60778b40b33f7fb79d2a9709dce55e351e071f4a3aa3b5f42e5de6f1b83ea90 | jordanthayer/ocaml-search | queue_set.ml | * A queue that does n't allow for duplicates .
@author eaburns
@since 2010 - 02 - 15
@author eaburns
@since 2010-02-15
*)
type 'a t = {
q : 'a Queue.t;
on_q : ('a, bool) Hashtbl.t;
}
let create ?(hash_size=100) () =
(** [create ?hash_size=100 ()] creates a new queue. *)
{ q = Queue.cre... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/structs/queue_set.ml | ocaml | * [create ?hash_size=100 ()] creates a new queue.
* [push q elm] pushes an element onto the queue if it is not there
already.
* [push_all q elms] pushes a list of elements onto the queue.
* [of_list elms] creates a queue populated with the given list of
elements.
* [take q] takes an element off of the f... | * A queue that does n't allow for duplicates .
@author eaburns
@since 2010 - 02 - 15
@author eaburns
@since 2010-02-15
*)
type 'a t = {
q : 'a Queue.t;
on_q : ('a, bool) Hashtbl.t;
}
let create ?(hash_size=100) () =
{ q = Queue.create (); on_q = Hashtbl.create hash_size }
let push q el... |
3ccb0b985ee27a52df95f9801794cc172356640307b52798d2780d6b8813ab6c | clojurewerkz/statistiker | distribution_test.clj | (ns clojurewerkz.statistiker.distribution-test
(:import [org.apache.commons.math3.distribution EnumeratedRealDistribution])
(:require [clojure.test :refer :all]))
| null | https://raw.githubusercontent.com/clojurewerkz/statistiker/f056f68c975cf3d6e0f1c8212aef9114d4eb657c/test/clj/clojurewerkz/statistiker/distribution_test.clj | clojure | (ns clojurewerkz.statistiker.distribution-test
(:import [org.apache.commons.math3.distribution EnumeratedRealDistribution])
(:require [clojure.test :refer :all]))
| |
0d4bb2ad27ce99030d7a9afad627d1b6a36740235b0804912d3403bc883e9f45 | jtanguy/hmacaroons | Internal.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : Crypto . Macaroon . Internal
Copyright : ( c ) 2015
License : BSD3
Maintainer :
Stability : experimental
Portability : portable
Internal representation of a macaroon
Module : Crypto.Macaroon.Internal
Copyright : (c) 2015 Julie... | null | https://raw.githubusercontent.com/jtanguy/hmacaroons/6fbca87836a4baef171c5ffc774387766c709fbf/src/Crypto/Macaroon/Internal.hs | haskell | # LANGUAGE OverloadedStrings #
| Main structure of a macaroon
^ Target location
^ List of caveats
| show instance conforming to the @inspect@ "specification"
| NFData instance for use in the benchmark
| Caveat structure
^ Caveat identifier
^ Caveat verification key identifier
^ Caveat target location
| show i... | |
Module : Crypto . Macaroon . Internal
Copyright : ( c ) 2015
License : BSD3
Maintainer :
Stability : experimental
Portability : portable
Internal representation of a macaroon
Module : Crypto.Macaroon.Internal
Copyright : (c) 2015 Julien Tanguy
License : BSD3
Mainta... |
c7623163614ecdf92dc787eac0547274dbb396cb98a7f26de785b6e0ab6fbdda | spawnfest/eep49ers | z.erl | -module(z).
| null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/tools/test/cover_SUITE_data/compile_beam/z.erl | erlang | -module(z).
| |
941b7697a6c36a58bb0b3a613ae9a214170540f4cf571ff34db636715b83dbc4 | themetaschemer/malt | test-D-extend.rkt | (module+ test
(require rackunit)
(define r0-td 3.0)
(define r1-td (tensor 3.0 4.0 5.0))
(define r2-td (tensor (tensor 3.0 4.0 5.0) (tensor 7.0 8.0 9.0)))
(define test-shape (list 2 2 3))
(check-equal? (tmap (λ (x) (+ x 1)) r1-td) (tensor 4.0 5.0 6.0))
(check-true (rank> r2-td r1-td))
(check-false (ra... | null | https://raw.githubusercontent.com/themetaschemer/malt/78a04063a5a343f5cf4332e84da0e914cdb4d347/nested-tensors/tensors/test/test-D-extend.rkt | racket | (module+ test
(require rackunit)
(define r0-td 3.0)
(define r1-td (tensor 3.0 4.0 5.0))
(define r2-td (tensor (tensor 3.0 4.0 5.0) (tensor 7.0 8.0 9.0)))
(define test-shape (list 2 2 3))
(check-equal? (tmap (λ (x) (+ x 1)) r1-td) (tensor 4.0 5.0 6.0))
(check-true (rank> r2-td r1-td))
(check-false (ra... | |
e2f8eab211e1a6224014c5d93f70c18b95aea3cc53662de67dfd39f4f505a78e | foretspaisibles/cl-kaputt | package.lisp | package.lisp — A Testsuite for the Kaputt Test Framework
( -kaputt )
This file is part of Kaputt .
;;;;
Copyright © 2019–2021
;;;; All rights reserved.
This software is governed by the CeCILL - B license under French law and
;;;; abiding by the rules of distribution of free software. You can use,
mo... | null | https://raw.githubusercontent.com/foretspaisibles/cl-kaputt/94ff2a96ced6576e3995b445b78ab2a4bf09c57f/testsuite/package.lisp | lisp |
All rights reserved.
abiding by the rules of distribution of free software. You can use,
"-B_V1-en.txt" | package.lisp — A Testsuite for the Kaputt Test Framework
( -kaputt )
This file is part of Kaputt .
Copyright © 2019–2021
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribute the software under the terms of the CeCILL - B
license as circulated by CEA , ... |
0ab94e5af00ff101f55075615168f9e11765a704f938ab19a629db61ddf851de | bvaugon/ocapic | lazies.ml | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/tests/lazies/lazies.ml | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
let sleep () = Sys.sleep 4000;;
Display.write_string "a";;
sleep ();;
let x = lazy (
Display.write_string "Hello";
sleep ();
42
);;
Gc.run ();;
Display.write_string "b";;
slee... |
99076db6d811049d85539b8ba9de254ce5f2d8d0b00596828345691c9ac8a7b8 | deepfire/holotype | ghc-repro-16095-2.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
module Repro
where
import Generics.SOP
recover :: forall a xs.
(Code a ~ '[xs], HasDatatypeInfo a)
... | null | https://raw.githubusercontent.com/deepfire/holotype/d33052f588b74616560b81616ffc4a0142f8a617/doc/ghc-repro-16095-2.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
module Repro
where
import Generics.SOP
recover :: forall a xs.
(Code a ~ '[xs], HasDatatypeInfo a)
=> a
recover =
... |
0bee15e1dc847d6a798ccc0deb1d9a8d1d2a6aa1a6e57ec7fa94db8f6ec5f6b3 | bn-d/ppx_pyformat | utils.ml | open Ppx_pyformat.Types
let format_spec = String_format { fill = None }
let make_field ?index ?conversion ?(format_spec = format_spec) arg =
Field (make_replacement_field ~arg ?index ?conversion ~format_spec ())
let make_string = make_string_format_of_format_spec
let make_int = make_int_format_of_format_spec
let m... | null | https://raw.githubusercontent.com/bn-d/ppx_pyformat/bcb0031cf9fbce12d54d0e8d927ecf41ff3cab97/test/parser/utils.ml | ocaml | open Ppx_pyformat.Types
let format_spec = String_format { fill = None }
let make_field ?index ?conversion ?(format_spec = format_spec) arg =
Field (make_replacement_field ~arg ?index ?conversion ~format_spec ())
let make_string = make_string_format_of_format_spec
let make_int = make_int_format_of_format_spec
let m... | |
c4f8e65bcae28f56fbc7ac3396f9eedb859e2164072897b39dbfb9aede530c58 | c-cube/funarith | Rat.mli |
* { 1 Interface for Rationals }
* This abstracts over a type and operation for rationals .
A possible implementation for arbitrary precision numbers
is Zarith , with module { ! Q }
A possible implementation for arbitrary precision numbers
is Zarith, with module {!Q}
*)
module type S = Rat_int... | null | https://raw.githubusercontent.com/c-cube/funarith/1c86ac45e9608efaa761e3f14455402730885339/src/Rat.mli | ocaml |
* { 1 Interface for Rationals }
* This abstracts over a type and operation for rationals .
A possible implementation for arbitrary precision numbers
is Zarith , with module { ! Q }
A possible implementation for arbitrary precision numbers
is Zarith, with module {!Q}
*)
module type S = Rat_int... | |
5f09c90a296fbb537e634ec62a50a338e537d1dab7d70a31be5dffa0eb69f2a2 | input-output-hk/cardano-wallet | WalletState.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedLabels #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
-- |
Copyright : © 2022 IOHK
-- License: Apache-2.0
--
-- Pure data type which represents the entire wallet state,
-- including all checkpoints.
--
-- FIXME during ADP-1043: ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/ce8843fa0cc82a3b19863e2263abfdc332c4c63a/lib/wallet/src/Cardano/Wallet/DB/WalletState.hs | haskell | |
License: Apache-2.0
Pure data type which represents the entire wallet state,
including all checkpoints.
FIXME during ADP-1043: Actually include everything,
* Wallet state
* Multiple wallets
------------------------------------------------------------------------------
Wallet Checkpoint
------------------... | # LANGUAGE DeriveGeneric #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedLabels #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
Copyright : © 2022 IOHK
e.g. TxHistory , Pending transactions , …
module Cardano.Wallet.DB.WalletState
WalletState (..)
, fromGenesis
, getLatest
, findN... |
51a2475952511c7139894b91c67d82196a2e09a5f5dcc12e7f0100065fe3b952 | janestreet/vcaml | vcaml.mli | module Unshadow_buffer := Buffer
module Unshadow_command := Command
open Core
open Async
module Api_version = Nvim_internal.Api_version
module Buffer = Unshadow_buffer
module Channel_info = Channel_info
module Client_info = Client_info
module Color = Color
module Command = Unshadow_command
module Error_type = Nvim_inte... | null | https://raw.githubusercontent.com/janestreet/vcaml/b02fc56c48746fa18a6bc9a0f8fb85776db76977/src/vcaml.mli | ocaml | Default: [true]
* Close the client and release the underlying file descriptors. Can be called safely
multiple times.
* Wraps a [Type.t] to be used as the rightmost (return) type of this function.
These functions are exported solely for the vcaml_plugin library's use. Clients should
not call them. | module Unshadow_buffer := Buffer
module Unshadow_command := Command
open Core
open Async
module Api_version = Nvim_internal.Api_version
module Buffer = Unshadow_buffer
module Channel_info = Channel_info
module Client_info = Client_info
module Color = Color
module Command = Unshadow_command
module Error_type = Nvim_inte... |
77279677c720d7471fa1748beb7091a17863ff034d928d540b636882e2cf0eda | softwarelanguageslab/maf | fjt-seq.scm | Adapted from Savina benchmarks ( " Fork Join ( throughput ) " benchmark , coming from JGF )
(letrec ((N 10)
(A 3)
(perform-computation (lambda (theta)
(let ((sint (+ 1 theta)))
(* sint sint))))
(throughput-actor
(ac... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/be58e02c63d25cab5b48fdf7b737b68b882e9dca/test/concurrentScheme/actors/contracts/savina/fjt-seq.scm | scheme | Adapted from Savina benchmarks ( " Fork Join ( throughput ) " benchmark , coming from JGF )
(letrec ((N 10)
(A 3)
(perform-computation (lambda (theta)
(let ((sint (+ 1 theta)))
(* sint sint))))
(throughput-actor
(ac... | |
e30f60e71558cf501e974fc4f3fddb5648dcc68d3e69574d9d133fbcc23f548f | slipstream/SlipStreamServer | module_component.cljc | (ns com.sixsq.slipstream.ssclj.resources.spec.module-component
(:require
[clojure.spec.alpha :as s]
[com.sixsq.slipstream.ssclj.resources.spec.common :as c]
[com.sixsq.slipstream.ssclj.resources.spec.core :as cimi-core]
[com.sixsq.slipstream.ssclj.resources.spec.module :as module]
[com.sixsq.slips... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/src/com/sixsq/slipstream/ssclj/resources/spec/module_component.cljc | clojure | parameter keywords are used in components and application parameter mappings | (ns com.sixsq.slipstream.ssclj.resources.spec.module-component
(:require
[clojure.spec.alpha :as s]
[com.sixsq.slipstream.ssclj.resources.spec.common :as c]
[com.sixsq.slipstream.ssclj.resources.spec.core :as cimi-core]
[com.sixsq.slipstream.ssclj.resources.spec.module :as module]
[com.sixsq.slips... |
e15035599a6380b10a4827530ae252656ef43797cb32c43c2bcc29f5c112a1b4 | ijvcms/chuanqi_dev | map_20003.erl | -module(map_20003).
-export([
range/0,
data/0
]).
range() -> {48, 32}.
data() ->
{
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/map_data/map_20003.erl | erlang | -module(map_20003).
-export([
range/0,
data/0
]).
range() -> {48, 32}.
data() ->
{
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1... | |
4f92ee014a9c4c558f20b5ed1564e9f0eedf43a4338b108267b0273e6ccecaaf | clojure/core.async | ex-async.clj | (require '[clojure.core.async :as async :refer [<!! >!! timeout chan alt!!]])
(defn fake-search [kind]
(fn [c query]
(future
(<!! (timeout (rand-int 100)))
(>!! c [kind query]))))
(def web1 (fake-search :web1))
(def web2 (fake-search :web2))
(def image1 (fake-search :image1))
(def image2 (fake-search ... | null | https://raw.githubusercontent.com/clojure/core.async/edc3e16c034106f06e861ffbf91ba0ea87107208/examples/ex-async.clj | clojure | (require '[clojure.core.async :as async :refer [<!! >!! timeout chan alt!!]])
(defn fake-search [kind]
(fn [c query]
(future
(<!! (timeout (rand-int 100)))
(>!! c [kind query]))))
(def web1 (fake-search :web1))
(def web2 (fake-search :web2))
(def image1 (fake-search :image1))
(def image2 (fake-search ... | |
e357ca830a1da35f5a85da475df29f12b9b60d650073e5983a7a2d8c16c57008 | OCamlPro/freeton_ocaml_sdk | ton_abi.mli | (**************************************************************************)
(* *)
Copyright ( c ) 2021 OCamlPro SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/freeton_ocaml_sdk/42a0d95252ed19c647fa86e9728af15d557fc5e3/src/freeton_base_lib/ton_abi.mli | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2021 OCamlPro SAS
Public License version 2.1 , with the special exception on linking
val read : string -> Ton_types.AbiContract.t
val write : string -> Ton_types.AbiContract.t -> unit
|
af371d15686741e68c314c0f5f0e8ccffb378ce7ad85b9a51ecd2eb6578285e7 | ghcjs/ghcjs-boot | Types.hs | # LANGUAGE MagicHash , NoImplicitPrelude , TypeFamilies , UnboxedTuples ,
RoleAnnotations #
RoleAnnotations #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Types
Copyright : ( c ) The University of Glasgow 2009
License ... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/ghc-prim/GHC/Types.hs | haskell | ---------------------------------------------------------------------------
|
Module : GHC.Types
Maintainer :
Stability : internal
Use GHC.Exts from the base package instead of importing this
module directly.
---------------------------------------------------------------------------
# CTYPE "HsCha... | # LANGUAGE MagicHash , NoImplicitPrelude , TypeFamilies , UnboxedTuples ,
RoleAnnotations #
RoleAnnotations #-}
Copyright : ( c ) The University of Glasgow 2009
License : see libraries / ghc - prim / LICENSE
Portability : non - portable ( GHC Extensions )
GHC type defin... |
6166e6daf54e8bc9614b0d83acd98bf04e0ca98b463a73b9d7ce297cd92a446c | sionescu/iolib | buffer.lisp | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;
;;; --- Foreign memory buffers.
;;;
(in-package :iolib/streams)
;;;; Foreign Buffers
(defconstant +bytes-per-iobuf+ (* 4 1024))
;;; FIXME: make this right
;;; probably not all SIMPLE-ARRAYs are admissible
;;; on all implementations
(deftype compatible-lisp-array ()... | null | https://raw.githubusercontent.com/sionescu/iolib/dac715c81db55704db623d8b2cfc399ebcf6175f/src/streams/gray/buffer.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
--- Foreign memory buffers.
Foreign Buffers
FIXME: make this right
probably not all SIMPLE-ARRAYs are admissible
on all implementations
that must be done by their callers |
(in-package :iolib/streams)
(defconstant +bytes-per-iobuf+ (* 4 1024))
(deftype compatible-lisp-array ()
'(simple-array * (*)))
(defun allocate-iobuf (&optional (size +bytes-per-iobuf+))
(let ((b (%make-iobuf)))
(setf (iobuf-data b) (foreign-alloc :uint8 :count size)
(iobuf-size b) size)
(val... |
7ea0b5c807b5dc701f555319c3a90e8778f5fd897f3720c6901d9e9dd1c3473b | tkych/lisp-dojo | 003.lisp | Last modified : 2013 - 10 - 15 18:58:20 tkych
(define-practice
:id 003
:name my-last
:level 0
:problem "
MY-LAST list => cons/null
Make function MY-LAST.
It returns the last cons of a `list'. If `list' is (), returns ().
Examples:
(my-last '()) => NIL
(my-last '(a b c d... | null | https://raw.githubusercontent.com/tkych/lisp-dojo/ba83d025bc03101eec43ec6be44585d7b076caf6/practices/003.lisp | lisp | Last modified : 2013 - 10 - 15 18:58:20 tkych
(define-practice
:id 003
:name my-last
:level 0
:problem "
MY-LAST list => cons/null
Make function MY-LAST.
It returns the last cons of a `list'. If `list' is (), returns ().
Examples:
(my-last '()) => NIL
(my-last '(a b c d... | |
42bce414c88dd7b08e779e082b37b52964193fb07d84bcc68c200526e9af91fc | glguy/advent | 16.hs | # Language QuasiQuotes , BlockArguments , LambdaCase #
|
Module : Main
Description : Day 16 solution
Copyright : ( c ) , 2021
License : ISC
Maintainer :
< >
We 're given facts about a bunch of different /Sues/ and asked to
check which one matches what we know about the one true /Su... | null | https://raw.githubusercontent.com/glguy/advent/7ab9f9e47208fd5720e36bac33fee2b78d4ec50b/solutions/src/2015/16.hs | haskell | | Predicate for properties that match exactly.
| Predicate like 'matchesClues1' but with special cases for
/cats/, /trees/, /pomeranians/, and /goldfish/.
| Match a list of properties against the known hints.
^ comparison selector
^ list of properties
^ properties match clues
| Returns the given hint value f... | # Language QuasiQuotes , BlockArguments , LambdaCase #
|
Module : Main
Description : Day 16 solution
Copyright : ( c ) , 2021
License : ISC
Maintainer :
< >
We 're given facts about a bunch of different /Sues/ and asked to
check which one matches what we know about the one true /Su... |
a046c7fc99575fc486be2a0693067edf71f5657c55d545365139174c233463b8 | yellowbean/Hastructure | Util.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Util
(mulBR,mulBIR,mulBI,mulBInt,mulBInteger,lastN,yearCountFraction,genSerialDates
,getValByDate,getValByDates,projDatesByPattern
,genSerialDatesTill,genSerialDatesTill2,subDates,getTsDates,sliceDates,SliceType(..)
,calcI... | null | https://raw.githubusercontent.com/yellowbean/Hastructure/ff1eb0c223b418c18ab6328012701864a6edc651/src/Util.hs | haskell | # LANGUAGE OverloadedStrings #
-count-conventions
TODO -16-field-22f.htm
`debug` ("DIFF Days"++show(_diffDays))
`debug` ("German"++show(_sday)++"<>"++show _eday)
-16-field-22f.htm
Ratio Integer
`debug` ("Num"++show num)
T.DayOfMonth
T.DayOfWeek
`debug` ("Getting rate "++show(_d)++show(v))
`debug` ("Getting 0 ... | # LANGUAGE ScopedTypeVariables #
module Util
(mulBR,mulBIR,mulBI,mulBInt,mulBInteger,lastN,yearCountFraction,genSerialDates
,getValByDate,getValByDates,projDatesByPattern
,genSerialDatesTill,genSerialDatesTill2,subDates,getTsDates,sliceDates,SliceType(..)
,calcInt,calcIntRate,calcIntRateCurve
... |
a920c3f7b78d5c279e7fb172e79450183e3d5184395db5cbf8faa3f4442e26a3 | diffusionkinetics/open | TestPlotly.hs | {-# LANGUAGE OverloadedStrings #-}
import Lucid
import Lucid.Html5
import Graphics.Plotly
import Graphics.Plotly.Lucid
import Lens.Micro
import qualified Data.Text.Lazy as T
import qualified Data.Text.Lazy.IO as T
main =
T.writeFile "test.html" $ renderText $ doctypehtml_ $ do
head_ $ do meta_ [charset_ "utf-... | null | https://raw.githubusercontent.com/diffusionkinetics/open/673d9a4a099abd9035ccc21e37d8e614a45a1901/plotlyhs/TestPlotly.hs | haskell | # LANGUAGE OverloadedStrings # |
import Lucid
import Lucid.Html5
import Graphics.Plotly
import Graphics.Plotly.Lucid
import Lens.Micro
import qualified Data.Text.Lazy as T
import qualified Data.Text.Lazy.IO as T
main =
T.writeFile "test.html" $ renderText $ doctypehtml_ $ do
head_ $ do meta_ [charset_ "utf-8"]
plotlyCDN
bo... |
b2ed567a044ed0a57371e0f06e7dde6964ba592e265306fdd8a3f0d80a8b340d | siraben/zkeme80 | interrupt.scm | (define interrupt-asm
`((label sys-interrupt)
(di)
,@(push* '(af bc de hl ix iy))
(exx)
((ex af afs))
,@(push* '(af bc de hl))
(jp usb-interrupt)
(label interrupt-resume)
(in a (4))
(bit 0 a)
(jr nz int-handle-on)
(bit 1 a)
(jr nz int-handle-timer1)
(bit 2 a)
(j... | null | https://raw.githubusercontent.com/siraben/zkeme80/ab49d496cac6797e6e3264ee027f96040eaf0492/src/interrupt.scm | scheme | (define interrupt-asm
`((label sys-interrupt)
(di)
,@(push* '(af bc de hl ix iy))
(exx)
((ex af afs))
,@(push* '(af bc de hl))
(jp usb-interrupt)
(label interrupt-resume)
(in a (4))
(bit 0 a)
(jr nz int-handle-on)
(bit 1 a)
(jr nz int-handle-timer1)
(bit 2 a)
(j... | |
f911167c9183315dcf0214ddedf797377d1551917c5942ea00408d8f6421faee | hoelzl/Clicc | read.lisp | ;;;-----------------------------------------------------------------------------
Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany
;;;-----------------------------------------------------------------------------
Projekt : APPLY - A Practicable And Portable Lisp Implementation
;;; ... | null | https://raw.githubusercontent.com/hoelzl/Clicc/cea01db35301144967dc74fd2f96dd58aa52d6ea/src/runtime/lisp/read.lisp | lisp | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
------------------------------------------------------
- Backquote-Reader + Simplifier
- READ
- READ-PRESERVING-WHIT... | Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany
Projekt : APPLY - A Practicable And Portable Lisp Implementation
Funktion : Laufzeitsystem
- Readtables ,
( - READ - CHAR , UNREAD - CHAR -- > file.lisp )
- PARSE - INTEGER
$ Revision : 1.14 $... |
3b7373c471208622a7f376793e32630fe3e79122e56617925f7ce22a3f5cb293 | dalong0514/ITstudy | 0101Utils-DumpObjectV1-2.lisp | Dump Object -
Lists the ActiveX properties & methods of a supplied VLA - Object
or VLA - Object equivalent of a supplied ename , handle , or DXF data list
;; obj - [vla/ent/lst/str] VLA-Object, Entity Name, DXF List, or Handle
(defun c:dump nil (LM:dump (car (entsel))))
(defun c:dumpn nil (LM:dum... | null | https://raw.githubusercontent.com/dalong0514/ITstudy/8a7f1708d11856a78016795268da67b6a7521115/004%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/07AutoLisp/04LeeMac-Library/0101Utils-DumpObjectV1-2.lisp | lisp | obj - [vla/ent/lst/str] VLA-Object, Entity Name, DXF List, or Handle
| Dump Object -
Lists the ActiveX properties & methods of a supplied VLA - Object
or VLA - Object equivalent of a supplied ename , handle , or DXF data list
(defun c:dump nil (LM:dump (car (entsel))))
(defun c:dumpn nil (LM:dump (car (nentsel))))
(defun LM:dump ( arg )
(cond
( (= ... |
f861ebde6a4576846e6553f31480aa0eb2e161427b412c331049ed9f2a2e0c47 | jakemcc/sicp-study | ex4_13.clj | Exercise 4.13
Functionality has been added to environment.clj , environment_test.clj ,
; section4.clj and section4_test.clj
; I decided to only have the variable become unbound in the current
scope ( whatever the first frame of the environment is ) . This seems to make
; the most sense to me. Being able to trav... | null | https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section4.1/src/ex4_13.clj | clojure | section4.clj and section4_test.clj
I decided to only have the variable become unbound in the current
the most sense to me. Being able to traverse all the frames to remove
a binding seems like the wrong thing. Especially when you consider that
a variable could be bound at different frames. | Exercise 4.13
Functionality has been added to environment.clj , environment_test.clj ,
scope ( whatever the first frame of the environment is ) . This seems to make |
8dfed27ed46bfdec984c175d23b2d079a605ff84be05e313610eba810497fd8b | lilactown/dom | dom.clj | (ns town.lilac.dom
"Macros for creating DOM expressions. See `$` for usage.
Additional macros like `div`, `input`, `button` allow quick & easy creation of
specific tags.
The code emitted by `$` and friends is side effecting. You do not need to keep
the value returned by `$` or any of the specific DOM macros.... | null | https://raw.githubusercontent.com/lilactown/dom/eed9f4db8777bc9f32a300523404654d5496cc16/src/town/lilac/dom.clj | clojure | async runtime | (ns town.lilac.dom
"Macros for creating DOM expressions. See `$` for usage.
Additional macros like `div`, `input`, `button` allow quick & easy creation of
specific tags.
The code emitted by `$` and friends is side effecting. You do not need to keep
the value returned by `$` or any of the specific DOM macros.... |
50b1c9625b3183a5c5d4f730f515ed27ece5f79f3fc099ddaa5a35efe5cbdb10 | acieroid/scala-am | car-counter.scm | (define foldr
(lambda (f base lst)
(define foldr-aux
(lambda (lst)
(if (null? lst)
base
(f (car lst) (foldr-aux (cdr lst))))))
(foldr-aux lst)))
(define result '())
(define display2 (lambda (i) (set! result (cons i result))))
(define newline2 (lambda () (set! result (cons... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/scp1/car-counter.scm | scheme | (define foldr
(lambda (f base lst)
(define foldr-aux
(lambda (lst)
(if (null? lst)
base
(f (car lst) (foldr-aux (cdr lst))))))
(foldr-aux lst)))
(define result '())
(define display2 (lambda (i) (set! result (cons i result))))
(define newline2 (lambda () (set! result (cons... | |
576bd9c3f6be6baeb4ec19dd38f75c37987c7c778c19f13832e46848edd790f3 | Eventuria/demonstration-gsd | Streaming.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
module Eventuria.Libraries.PersistedStreamEngine.Instances.EventStore.Read.Streaming (
streamFromR... | null | https://raw.githubusercontent.com/Eventuria/demonstration-gsd/5c7692b310086bc172d3fd4e1eaf09ae51ea468f/src/Eventuria/Libraries/PersistedStreamEngine/Instances/EventStore/Read/Streaming.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TypeFamilies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
module Eventuria.Libraries.PersistedStreamEngine.Instances.EventStore.Read.Streaming (
streamFromRangeInclusive,
streamFromOffsetIn... |
1c5ab6a9289d810665e7d466888f1c0dbf708efdeb91517a2186c6c84ef8591e | Zilliqa/scilla | Config.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/eec5d1c686f3a000de14707d0fe5245f0c430e0b/src/merge/Config.ml | ocaml | * Identifier that should be replaced. |
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... |
8900c1548a2ae695bd98eacb3c7e2e57d8c831b147d18c9494649f0e31a40eb1 | typelead/intellij-eta | IElementType.hs | module FFI.Com.IntelliJ.Psi.Tree.IElementType where
import P
# CLASS " com.intellij.psi.tree . IElementType " #
IElementType = IElementType (Object# IElementType)
deriving Class
foreign import java unsafe getIndex :: IElementType -> Short
instance Ord IElementType where
x <= y = getIndex x <= getIndex y
inst... | null | https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/main/eta/FFI/Com/IntelliJ/Psi/Tree/IElementType.hs | haskell | # CLASS "com.intellij.psi.tree.IElementType[]" # | module FFI.Com.IntelliJ.Psi.Tree.IElementType where
import P
# CLASS " com.intellij.psi.tree . IElementType " #
IElementType = IElementType (Object# IElementType)
deriving Class
foreign import java unsafe getIndex :: IElementType -> Short
instance Ord IElementType where
x <= y = getIndex x <= getIndex y
inst... |
0c365ab00845a9f9abd782814a91e9423a1c25e9ca5e9681b0044851403a17d0 | serioga/webapp-clojure-2020 | component.cljc | (ns app.rum.impl.component)
#?(:clj (set! *warn-on-reflection* true)
:cljs (set! *warn-on-infer* true))
••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
(defmulti create-component
"Component constructor by ID keyword."
:app.rum/component-id)
(defmethod creat... | null | https://raw.githubusercontent.com/serioga/webapp-clojure-2020/91a7170a1be287bbfa5b9279d697208f7f806f9b/src/app/rum/impl/component.cljc | clojure | (ns app.rum.impl.component)
#?(:clj (set! *warn-on-reflection* true)
:cljs (set! *warn-on-infer* true))
••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
(defmulti create-component
"Component constructor by ID keyword."
:app.rum/component-id)
(defmethod creat... | |
ec9e699c0e3de284d6d1874efd8fffd7e61fcdab8563e9e56b071de70cf11244 | tanakh/ICFP2011 | Y2CAtkQbMadan.hs | # LANGUAGE CPP #
{-# OPTIONS -Wall #-}
import Control.Applicative
import qualified Control.Exception.Control as E
import Control.Monad
import Control.Monad.State
import Data.Maybe
import Data.List
import Data.Vector ((!))
import qualified Data.Vector as V
import LTG
getFirstWorthEnemy :: Int -> LTG (Maybe Int)
getF... | null | https://raw.githubusercontent.com/tanakh/ICFP2011/db0d670cdbe12e9cef4242d6ab202a98c254412e/ai/Y2CAtkQbMadan.hs | haskell | # OPTIONS -Wall #
dec
S (K f) (K g)
f1, f2: temp
f4
target: zombie target
reuse field 0 to speed up
I know it's ugly
v[f4] <- S (S Help I) (lazyApply Copy f8)
S (S Help I)
v[f2] <- (lazyApply Copy f8)
v[f2] <- S (S Help I) v[f8]; loop body
num: kill f4
S (S Help I) (S (K copy) (K 8))
num: gen f2
v[f2] <... | # LANGUAGE CPP #
import Control.Applicative
import qualified Control.Exception.Control as E
import Control.Monad
import Control.Monad.State
import Data.Maybe
import Data.List
import Data.Vector ((!))
import qualified Data.Vector as V
import LTG
getFirstWorthEnemy :: Int -> LTG (Maybe Int)
getFirstWorthEnemy dmg = d... |
ee683717327469cd0f779b62ca7e3c5d687b43eedc8968f8a8e82178b5df5638 | timbertson/passe | lock.mli | type lock
type proof
exception Stale_lock
val create : unit -> lock
val is_empty : lock -> bool
val use : ?proof:proof -> lock -> (proof -> 'a Lwt.t) -> 'a Lwt.t
module Map (Ord: OrderedType.S) ( ) : sig
val acquire : Ord.t -> ?proof:proof -> (proof -> 'a Lwt.t) -> 'a Lwt.t
end
| null | https://raw.githubusercontent.com/timbertson/passe/467a79ea0cd7b08a97b52be3bd1307a3bdf55799/src/server/lock.mli | ocaml | type lock
type proof
exception Stale_lock
val create : unit -> lock
val is_empty : lock -> bool
val use : ?proof:proof -> lock -> (proof -> 'a Lwt.t) -> 'a Lwt.t
module Map (Ord: OrderedType.S) ( ) : sig
val acquire : Ord.t -> ?proof:proof -> (proof -> 'a Lwt.t) -> 'a Lwt.t
end
| |
2068fda2bce652566dc4d4ac35907cdd9d9b59c1fcecdb9d46b997665dbc22d5 | cloudant-labs/dreyfus | dreyfus_blacklist_await_test.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/cloudant-labs/dreyfus/243d451a1f8c941bdfbeceb983419cba8e540c0b/test/dreyfus_blacklist_await_test.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(dreyfus_blacklist_await_test).
-include_lib("couch/include/couch_db.hrl").
-include_lib("dreyfus/include/dreyfus.hrl").
-include_lib("eunit/include... |
4e4b5ada1bbb4f3fbf623ed7dc1cc3602dd34ab1fd1a4e08a667860807c37ad4 | pink-gorilla/goldly | bindings_static.cljc | (ns goldly.sci.bindings-static
(:require
[clojure.walk :as walk]))
#_(def bindings-static
{'println println})
(def ns-static
{'walk {'postwalk walk/postwalk
'prewalk walk/prewalk
'keywordize-keys walk/keywordize-keys
'walk walk/walk
'postwalk-replace walk/postwalk-re... | null | https://raw.githubusercontent.com/pink-gorilla/goldly/c65f789671cedfc5f115191a2a4b51d787492ae5/goldly/src/goldly/sci/bindings_static.cljc | clojure | (ns goldly.sci.bindings-static
(:require
[clojure.walk :as walk]))
#_(def bindings-static
{'println println})
(def ns-static
{'walk {'postwalk walk/postwalk
'prewalk walk/prewalk
'keywordize-keys walk/keywordize-keys
'walk walk/walk
'postwalk-replace walk/postwalk-re... | |
8f17bda76e1c959cd61c0be921a2e4f0749b581dc242b6ed83e6d47f9f5eea37 | macchiato-framework/macchiato-core | params.cljs | (ns macchiato.test.middleware.params
(:require
[cljs.nodejs :as node]
[macchiato.middleware.params :refer [wrap-params]]
[macchiato.test.mock.request :refer [header request]]
[macchiato.test.mock.util :refer [mock-handler raw-response ok-response]]
[cljs.test :refer-macros [is are deftest testing ... | null | https://raw.githubusercontent.com/macchiato-framework/macchiato-core/14eac3dbc561927ee61b6127f30ef0b0269b2af6/test/macchiato/test/middleware/params.cljs | clojure | (ns macchiato.test.middleware.params
(:require
[cljs.nodejs :as node]
[macchiato.middleware.params :refer [wrap-params]]
[macchiato.test.mock.request :refer [header request]]
[macchiato.test.mock.util :refer [mock-handler raw-response ok-response]]
[cljs.test :refer-macros [is are deftest testing ... | |
bc91a72faba9ee660fea5b1320a5d221faa2457d62a7e5ce0e54d4a874316a5d | finnsson/hs2graphviz | Main.hs | module Main where
import Hs2Dot.Src
import System.Environment (getArgs)
import System.IO (FilePath)
import Control.Monad (filterM)
import System.Directory (doesFileExist)
main :: IO ()
main = do
args <- getArgs
files <- filterM doesFileExist args
code <- files2dot (conf args) files
putStr $ if null files t... | null | https://raw.githubusercontent.com/finnsson/hs2graphviz/64969b6552c8408c5079e29c999c8fa968e7a08d/src/Main.hs | haskell | Architecture:
Main
All IO
Hs2Dot.Src
Primary convertion-flow.
Every 1-1-relation between functions and boxes and lines in the dot-file.
Hs2Dot.Dot
Functions to create dot-code.
Helper-functions to create dot-code. Makes use of Hs2Dot.Dot
Hs2Dot.Helper | module Main where
import Hs2Dot.Src
import System.Environment (getArgs)
import System.IO (FilePath)
import Control.Monad (filterM)
import System.Directory (doesFileExist)
main :: IO ()
main = do
args <- getArgs
files <- filterM doesFileExist args
code <- files2dot (conf args) files
putStr $ if null files t... |
47b185cdb319ebb4f5a2b5758bb86fc1efba96fc62c09c554d26762b871979cf | protz/mezzo | Exports.mli | (*****************************************************************************)
(* Mezzo, a programming language based on permissions *)
Copyright ( C ) 2011 , 2012 and
(* *)
(* This program is free softwar... | null | https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/typing/Exports.mli | ocaml | ***************************************************************************
Mezzo, a programming language based on permissions
This program is free software: you can redistribute it and/or modify
(at your optio... | Copyright ( C ) 2011 , 2012 and
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
* From a very high - level perspectiv... |
6314950e9b31a74c0904e3338d22a3b9b1450d9ba45f2a28f4255c9167f4d363 | bollu/cellularAutomata | GameOfLife.hs | # LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
module GameOfLife where
import Cellular
import Control.Comonad
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
import Diagrams.TwoD.Layout.Grid
import Control.Monad
import Data.Active
import qualified Data.Vector as V
i... | null | https://raw.githubusercontent.com/bollu/cellularAutomata/1c77ff5d6d59678a845bde7e1747d45d0ca0989f/app/GameOfLife.hs | haskell | # LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
module GameOfLife where
import Cellular
import Control.Comonad
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
import Diagrams.TwoD.Layout.Grid
import Control.Monad
import Data.Active
import qualified Data.Vector as V
i... | |
81ccd12e5b2b6b9c3cb64f3ced3ce2a36dda5c4a6ee1a91913e28500e3a91a70 | oofp/Beseder | IORefStateProv.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies ... | null | https://raw.githubusercontent.com/oofp/Beseder/a0f5c5e3138938b6fa18811d646535ee6df1a4f4/src/Beseder/Resources/State/Impl/IORefStateProv.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE ScopedTypeVariables # | # LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Beseder.Resources.State.Im... |
a44c2a9486327056857c24a835c79bc43cc14b1d84984ff8d5bdf2d6464647c3 | openmusic-project/OMChroma | init-chroma.lisp | (in-package :cr)
(defvar *cr-root* (ensure-directories-exist (merge-pathnames "Documents/Chroma/" (user-homedir-pathname))) )
(defparameter *cr-out-dir* (ensure-directories-exist (merge-pathnames "cr-out/" *cr-root*)))
(defparameter *cr-csfun-dir* (ensure-directories-exist (merge-pathnames "cr-fun/" *cr-root*)))
(de... | null | https://raw.githubusercontent.com/openmusic-project/OMChroma/5ded34f22b59a1a93ea7b87e182c9dbdfa95e047/sources/chroma/init-chroma.lisp | lisp | Definition of helper-functions with implementation-dependent or external dependencies: | (in-package :cr)
(defvar *cr-root* (ensure-directories-exist (merge-pathnames "Documents/Chroma/" (user-homedir-pathname))) )
(defparameter *cr-out-dir* (ensure-directories-exist (merge-pathnames "cr-out/" *cr-root*)))
(defparameter *cr-csfun-dir* (ensure-directories-exist (merge-pathnames "cr-fun/" *cr-root*)))
(de... |
f288f960c4522b48468fd06d118099f3ed881605a13505f0a672ba1711b93c98 | zero-one-group/geni-performance-benchmark | script.clj | (ns geni.script
(:require
[zero-one.geni.core :as g]))
(comment
(time
(-> (g/read-parquet! "/data/performance-benchmark-data")
;(-> (g/read-parquet! "/data/performance-benchmark-data/part-00000-0cf99dad-6d07-4025-a5e9-f425bb9532b9-c000.snappy.parquet")
(g/with-column :sales (g/* :price :quantit... | null | https://raw.githubusercontent.com/zero-one-group/geni-performance-benchmark/ea3d92c69d78335e3e4d5f9d6772cb3e9c10b6b7/geni/src/geni/script.clj | clojure | (-> (g/read-parquet! "/data/performance-benchmark-data/part-00000-0cf99dad-6d07-4025-a5e9-f425bb9532b9-c000.snappy.parquet") | (ns geni.script
(:require
[zero-one.geni.core :as g]))
(comment
(time
(-> (g/read-parquet! "/data/performance-benchmark-data")
(g/with-column :sales (g/* :price :quantity))
(g/group-by :member-id)
(g/agg {:total-spend (g/sum :sales)
:avg-basket-size (g/mean :sales)
... |
d8b3624c9907f0585ed650c9671724ca8c59536a8bd283d3a38602cacc98ab95 | Peaker/git-mediate | Opts.hs | # LANGUAGE LambdaCase #
-- | Option parser
module Opts
( Options(..)
, getOpts
) where
import Control.Applicative (Alternative(..))
import qualified Options.Applicative as O
import PPDiff (ColorEnable(..))
import System.Exit (exitSuccess)
import Version (versionStri... | null | https://raw.githubusercontent.com/Peaker/git-mediate/06a70285f16e8548e6b19bad393913450493adbf/src/Opts.hs | haskell | | Option parser | # LANGUAGE LambdaCase #
module Opts
( Options(..)
, getOpts
) where
import Control.Applicative (Alternative(..))
import qualified Options.Applicative as O
import PPDiff (ColorEnable(..))
import System.Exit (exitSuccess)
import Version (versionString)
data Options =... |
e17bd8dc1afe818c1626efa73e67f2e02c6ef962743dc384df1fd3c428b37ac9 | metabase/toucan | hydrate.clj | (ns toucan.hydrate
"Functions for deserializing and hydrating fields in objects fetched from the DB."
(:require [toucan
[db :as db]
[models :as models]]))
Counts Destructuring & Restructuring
;;; =====================================================... | null | https://raw.githubusercontent.com/metabase/toucan/29a921750f3051dce350255cfbd33512428bc3f8/src/toucan/hydrate.clj | clojure | ==================================================================================================================
or why. It generates a sort of path that records the wacky ways in which objects in a collection are nested,
and how they fit into sequences; it then returns a flattened sequence of desired objects for... | (ns toucan.hydrate
"Functions for deserializing and hydrating fields in objects fetched from the DB."
(:require [toucan
[db :as db]
[models :as models]]))
Counts Destructuring & Restructuring
# # # # * DISCLAIMER *
This I wrote this code at 4 A... |
83eb64181406b5657fb6565f14cd3215dc23165b10e71587d6c5e1e82192ab51 | GaloisInc/ivory | Struct.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
# LANGUAGE CPP #
module Ivory.Language.Struct where
import Ivory.Language.Area
import Ivory.Language.Proxy
import Ivory.Language.Ref
import ... | null | https://raw.githubusercontent.com/GaloisInc/ivory/53a0795b4fbeb0b7da0f6cdaccdde18849a78cd6/ivory/src/Ivory/Language/Struct.hs | haskell | Structs ---------------------------------------------------------------------
| Struct field labels.
| Label indexing in a structure. | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
# LANGUAGE CPP #
module Ivory.Language.Struct where
import Ivory.Language.Area
import Ivory.Language.Proxy
import Ivory.Language.Ref
import ... |
b40c946aec47c88c8e7274621497e011c62c452832c53d56507161441dec6151 | mvoidex/hsdev | Lisp.hs | module Data.Lisp (
Lisp(..),
lisp,
encodeLisp, decodeLisp
) where
import Prelude hiding (String, Bool)
import qualified Prelude as P (String, Bool)
import Data.Aeson (ToJSON(..), FromJSON(..), (.=))
import qualified Data.Aeson as A
import Data.Aeson.Types (parseMaybe, parseEither)
import Data.ByteString.Lazy (Byt... | null | https://raw.githubusercontent.com/mvoidex/hsdev/016646080a6859e4d9b4a1935fc1d732e388db1a/src/Data/Lisp.hs | haskell | module Data.Lisp (
Lisp(..),
lisp,
encodeLisp, decodeLisp
) where
import Prelude hiding (String, Bool)
import qualified Prelude as P (String, Bool)
import Data.Aeson (ToJSON(..), FromJSON(..), (.=))
import qualified Data.Aeson as A
import Data.Aeson.Types (parseMaybe, parseEither)
import Data.ByteString.Lazy (Byt... | |
15bd10e9b8f065095e57f45b75dabc4dc7e574ac75ef39167e5adc7529c0f46a | adam-james-v/scripts | scripter.clj | (ns scripter.core
(:require [babashka.classpath :refer [add-classpath]]
[clojure.string :as st]
[clojure.java.shell :refer [sh]]))
(defn split-fname
[fname]
(let [sf (st/split fname #"\.")]
[(apply str (drop-last sf))
(last sf)]))
(defn split-folders
[name]
(let [sf (st/spli... | null | https://raw.githubusercontent.com/adam-james-v/scripts/d91dc28b6e4946233fe675cc306af3343cc11204/scripter.clj | clojure | (ns scripter.core
(:require [babashka.classpath :refer [add-classpath]]
[clojure.string :as st]
[clojure.java.shell :refer [sh]]))
(defn split-fname
[fname]
(let [sf (st/split fname #"\.")]
[(apply str (drop-last sf))
(last sf)]))
(defn split-folders
[name]
(let [sf (st/spli... | |
515f245e8e90a9a4447ff3fa94edd6a723835bc4f2694c0100a42211f1d426f5 | well-typed/large-records | R070.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
{-# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #-}
module Experiment.ConstructNoTypeLet.Sized.R070 where
import Data.Record.Anon.Simple ... | null | https://raw.githubusercontent.com/well-typed/large-records/78d0966e4871847e2c17a0aa821bacf38bdf96bc/large-records-benchmarks/bench/large-anon/Experiment/ConstructNoTypeLet/Sized/R070.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings #
# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #
00 .. 09 | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.ConstructNoTypeLet.Sized.R070 where
import Data.Record.Anon.Simple (Record)
import Bench.Types
import Common.RowOfSize.Row070
record :: Word -> Record ExampleRow
record x = ANON {
t00 = MkT x
, t01 = MkT x
, t02 = MkT x
, t03... |
efd4111f8be070a5d90b0c392d8b2c389b3ff5979452f68909990076ca6c7cec | runtimeverification/haskell-backend | OnePathClaim.hs | |
Copyright : ( c ) Runtime Verification , 2020 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2020-2021
License : BSD-3-Clause
-}
module Kore.Reachability.OnePathClaim (
OnePathClaim (..),
onePathRuleToTerm,
mkOnePathClaim,
Rule (..),
) where
import Control... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/4b04a36a24bc9188401230e7937b577ea83484af/kore/src/Kore/Reachability/OnePathClaim.hs | haskell | | One-Path-Claim claim pattern.
| Converts a 'OnePathClaim' into its term representation.
This is intended to be used only in unparsing situations,
as some of the variable information related to the
rewriting algorithm is lost.
| |
Copyright : ( c ) Runtime Verification , 2020 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2020-2021
License : BSD-3-Clause
-}
module Kore.Reachability.OnePathClaim (
OnePathClaim (..),
onePathRuleToTerm,
mkOnePathClaim,
Rule (..),
) where
import Control... |
ba3f3eb7ea764b4542cfbebf45efb54213b26f742cd26e2357b8e41e5b1f8a11 | vehicle-lang/vehicle | Check.hs | module Vehicle.Check
( CheckOptions (..),
check,
)
where
import Control.Exception (IOException, catch)
import Control.Monad.Trans (MonadIO (liftIO))
import Data.List.NonEmpty (NonEmpty (..))
import Vehicle.Prelude
import Vehicle.Resource
import Vehicle.Verify.ProofCache (ProofCache (..), readProofCache)
import... | null | https://raw.githubusercontent.com/vehicle-lang/vehicle/ca99b8da9e5aabde2c94b758bb4141fbe53ebed5/vehicle/src/Vehicle/Check.hs | haskell | ------------------------------------------------------------------------------
Checking
If the user has specificied no logging target for check mode then
default to command-line. | module Vehicle.Check
( CheckOptions (..),
check,
)
where
import Control.Exception (IOException, catch)
import Control.Monad.Trans (MonadIO (liftIO))
import Data.List.NonEmpty (NonEmpty (..))
import Vehicle.Prelude
import Vehicle.Resource
import Vehicle.Verify.ProofCache (ProofCache (..), readProofCache)
import... |
4567a0e2567771853f883bafe6ccf7ac262b2732b3fa2aa34acc385828f69c8a | input-output-hk/plutus-apps | Common.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DerivingStrategies #
# LANGUAGE ExplicitNamespaces #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Control.Monad.Freer.Extras.Beam.Common where
import Cardano.BM.Data.Trace... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/b7f0e250a32387c8320ddd7fb19a21057b466a27/freer-extras/src/Control/Monad/Freer/Extras/Beam/Common.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings # | # LANGUAGE DerivingStrategies #
# LANGUAGE ExplicitNamespaces #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
module Control.Monad.Freer.Extras.Beam.Common where
import Cardano.BM.Data.Tracer (ToObject (..))
import Control.Exception (Exception)
import Data.Aeson (FromJSON, ToJSON)
import Data.Text... |
e763abbbbd7801fc77d19a7f284245fe1b912506b89012960c3cfed2aa126835 | commercialhaskell/stack | Main.hs | import StackTest
main :: IO ()
main = do
stackCleanFull
stack ["build", "acme-dont-copy"]
stack ["test"]
| null | https://raw.githubusercontent.com/commercialhaskell/stack/255cd830627870cdef34b5e54d670ef07882523e/test/integration/tests/4783-doctest-deps/Main.hs | haskell | import StackTest
main :: IO ()
main = do
stackCleanFull
stack ["build", "acme-dont-copy"]
stack ["test"]
| |
e2ccc1bb671ea7018241001a7d6915c86588f8e8c59c810377ef17a8658417f8 | ogaml/ogaml | drawMode.mli | (** GL draw modes enum *)
type t =
| TriangleStrip
| TriangleFan
| Triangles
| Lines
| null | https://raw.githubusercontent.com/ogaml/ogaml/5e74597521abf7ba2833a9247e55780eabfbab78/src/graphics/vertex/drawMode.mli | ocaml | * GL draw modes enum | type t =
| TriangleStrip
| TriangleFan
| Triangles
| Lines
|
971128d97b6daf6d261c385080c9829539b914f93d7bc02f3b607c7856d929d0 | wilbowma/cur | ML-rewrite-2.rkt | #lang cur
(require (rename-in (except-in cur/stdlib/equality == refl)
[ML-= ==]
[ML-refl refl])
cur/stdlib/sugar
cur/stdlib/nat
cur/ntac/base
cur/ntac/standard
cur/ntac/ML-rewrite
"rackunit-ntac.rkt")
;; tests rewrite
;;plus... | null | https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-test/cur/tests/ntac/ML-rewrite-2.rkt | racket | tests rewrite
plus-0-n raw term
mult-0-plus
- uses rewrite
raw term
raw term, directly | #lang cur
(require (rename-in (except-in cur/stdlib/equality == refl)
[ML-= ==]
[ML-refl refl])
cur/stdlib/sugar
cur/stdlib/nat
cur/ntac/base
cur/ntac/standard
cur/ntac/ML-rewrite
"rackunit-ntac.rkt")
(define plus-0-n-term ... |
845e17bed67db59b6ed122087568d7d922be5fc3aa4625f2c12989b378e2eb7e | lesguillemets/sicp-haskell | 1.12.hs | module OneTwelve where
Write a procedure that computes elements of 's triangle by means
-- of a recursive process.
-- Not sure what the expected input is..
pascalAt :: Int -> Int -> Int
pascalAt row column
| column == 0 || column == row = 1
| column < 0 || row < column = 0
| otherwise = pascalAt (row-1... | null | https://raw.githubusercontent.com/lesguillemets/sicp-haskell/df524a1e28c45fb16a56f539cad8babc881d0431/exercise/chap01/sect2/1.12.hs | haskell | of a recursive process.
Not sure what the expected input is..
| Let's check, anyway.
>>> pascalAt 2 1
[1,3,3,1]
[1,4,6,4,1] | module OneTwelve where
Write a procedure that computes elements of 's triangle by means
pascalAt :: Int -> Int -> Int
pascalAt row column
| column == 0 || column == row = 1
| column < 0 || row < column = 0
| otherwise = pascalAt (row-1) column + pascalAt (row-1) (column-1)
> > > pascalAt 0 0
1
2... |
5fa4b8a1a9216c3eac0173e2369f250cb6a71c0e1844f6dbaeb30453ed44ad7f | emqx/emqx | emqx_persistent_session_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/test/emqx_persistent_session_SUITE.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_persistent_session_SUITE).
-include_lib("stdlib/include/assert.hrl").
-include_lib... |
118306fa4ac7ea77927680a1dc3cc45178215b1d2555263bcc6b152cf9d24f5b | gsakkas/rite | 20060308-17:49:12-350bb6231959f879ee62f44461de9e70.seminal.ml |
exception Unimplemented
let char2str c = String.make 1 c
let rec getStr str count =
if count = -1 then
""
else
(char2str (String.get str count)) ^ (getStr str (count-1))
let reverse str =
let count = (String.length str)-1 in
getStr str count
let rec map_helper f str index =
if... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060308-17%3A49%3A12-350bb6231959f879ee62f44461de9e70.seminal.ml | ocaml |
exception Unimplemented
let char2str c = String.make 1 c
let rec getStr str count =
if count = -1 then
""
else
(char2str (String.get str count)) ^ (getStr str (count-1))
let reverse str =
let count = (String.length str)-1 in
getStr str count
let rec map_helper f str index =
if... | |
3e675e445623369f89026f464172e5af01f46a252c7946b68401aeee9cc3ebe3 | racket/drracket | pict-snip.rkt | #lang racket/base
(require racket/snip
racket/class
racket/match
racket/draw
file/convertible
racket/format
wxme
(prefix-in r: racket/base))
(module+ test (require rackunit))
(provide pict-snip% snip-class reader)
(define convertible<%>
(interface* () (... | null | https://raw.githubusercontent.com/racket/drracket/d2760acb76ef77046e7de788d26156f77330ab03/drracket/drracket/private/pict-snip.rkt | racket | this snip is created on the user's space,
parse-pict-snip-from-bytes : bytes -> (or/c (is-a?/c pict-snip%) #f) | #lang racket/base
(require racket/snip
racket/class
racket/match
racket/draw
file/convertible
racket/format
wxme
(prefix-in r: racket/base))
(module+ test (require rackunit))
(provide pict-snip% snip-class reader)
(define convertible<%>
(interface* () (... |
f1f2454428ab978c588acc535ede372bad6e13621e5b57b306ac45e944ee25a5 | couchbase/couchdb | couch_os_process.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 " A... | null | https://raw.githubusercontent.com/couchbase/couchdb/8a75fd2faa89f95158de1776354ceccf3e762753/src/couchdb/couch_os_process.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... | 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(couch_os_process).
-behaviour(gen_server).
-export([start_link/1, start_link/2, start_link/3, stop/1]).
-export([set_timeout/2, prompt/2, prompt_ma... |
b491d966aaa96d8895b8dc996d95e5fc9c34c1faa445c31edde740cc2d2b33a4 | np/ling | Session.hs | # LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
module Ling.Session
(module Ling.Session
,module Ling.Session.Core) where
import Ling.Session.Core
import Ling.Defs
import Ling.Norm
import Ling.Prelude hiding (subst1)
import Ling.Scoped
import Prelude hid... | null | https://raw.githubusercontent.com/np/ling/ca942db83ac927420d1ae5e24b4da164394ddbbe/Ling/Session.hs | haskell | Should be length preserving
so far is that all sessions should be annotated
See flatRSession in Ling.Reduce
-} | # LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
module Ling.Session
(module Ling.Session
,module Ling.Session.Core) where
import Ling.Session.Core
import Ling.Defs
import Ling.Norm
import Ling.Prelude hiding (subst1)
import Ling.Scoped
import Prelude hid... |
71ffa4a96042abe894cb073fe475bc414f0c6b3c1ca4c3343815082087547b84 | LexiFi/menhir | unionFind.ml | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/unionFind.ml | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
04dc7f1d917e7f0dbb2acc24431da26cc816aa863d18eb118da6ddfd7af0b591 | inhabitedtype/ocaml-aws | getAccessKeyInfo.mli | open Types
type input = GetAccessKeyInfoRequest.t
type output = GetAccessKeyInfoResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/sts/lib/getAccessKeyInfo.mli | ocaml | open Types
type input = GetAccessKeyInfoRequest.t
type output = GetAccessKeyInfoResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
ac60b0389c16cdc7b9ef60347587c6da7a57051eea51fc1257d2cc383d5b9304 | clojure-interop/java-jdk | HTMLEditorKit$InsertHTMLTextAction.clj | (ns javax.swing.text.html.HTMLEditorKit$InsertHTMLTextAction
"InsertHTMLTextAction can be used to insert an arbitrary string of HTML
into an existing HTML document. At least two HTML.Tags need to be
supplied. The first Tag, parentTag, identifies the parent in
the document to add the elements to. The second tag,... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/text/html/HTMLEditorKit%24InsertHTMLTextAction.clj | clojure | (ns javax.swing.text.html.HTMLEditorKit$InsertHTMLTextAction
"InsertHTMLTextAction can be used to insert an arbitrary string of HTML
into an existing HTML document. At least two HTML.Tags need to be
supplied. The first Tag, parentTag, identifies the parent in
the document to add the elements to. The second tag,... | |
82487bd76956b040e408f53e6e3bf1c3caa6157b51d13d3962e0cff5f411f0ca | quil-lang/magicl | shape.lisp | ;;;; shapes.lisp
;;;;
Author :
(in-package #:magicl)
;;; Shapes
;; Predicates
(declaim (inline valid-shape-p))
(defun valid-shape-p (shape)
(and (typep shape 'list)
(plusp (length shape))
(cl:every (lambda (x) (typep x 'alexandria:positive-fixnum)) shape)))
(declaim (inline square-shape-p))
(de... | null | https://raw.githubusercontent.com/quil-lang/magicl/45eae6e60329e8312496d25f1abfbf15274f4c89/src/high-level/shape.lisp | lisp | shapes.lisp
Shapes
Predicates
Types
Assertions | Author :
(in-package #:magicl)
(declaim (inline valid-shape-p))
(defun valid-shape-p (shape)
(and (typep shape 'list)
(plusp (length shape))
(cl:every (lambda (x) (typep x 'alexandria:positive-fixnum)) shape)))
(declaim (inline square-shape-p))
(defun square-shape-p (shape)
(and (valid-shape-... |
9d36e09f1e63ae2cab66edafcbfc2f38ccdb2ed9b61fd9feab92e1641a9f71b5 | noinia/hgeometry | SlowSeq.hs | module Data.SlowSeq where
import Control.Lens (bimap)
import qualified Data . FingerTree as FT
-- import Data.FingerTree hiding (null, viewl, viewr)
import Data.FingerTree(ViewL(..),ViewR(..))
import qualified Data.Foldable as F
import Data.Maybe
import qualified Data.Sequenc... | null | https://raw.githubusercontent.com/noinia/hgeometry/a6abecb1ce4a7fd96b25cc1a5c65cd4257ecde7a/hgeometry-old/remove-by-2021-06-01/src/Data/SlowSeq.hs | haskell | import Data.FingerTree hiding (null, viewl, viewr)
------------------------------------------------------------------------------
instance Show a => Show (Elem a) where
instance Measured (Key a) (Elem a) where
| Insert into a monotone OrdSeq.
pre: the comparator maintains monotonicity
\(O(\log^2 n)\)
... | module Data.SlowSeq where
import Control.Lens (bimap)
import qualified Data . FingerTree as FT
import Data.FingerTree(ViewL(..),ViewR(..))
import qualified Data.Foldable as F
import Data.Maybe
import qualified Data.Sequence as S
import qualified Data.Sequence.Util as SU
data Key a ... |
e02af7dddbe35e0c3c8357b94767d863dba30370553e2ed43de0d60d4f5099ae | maximedenes/native-coq | fourier.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/fourier/fourier.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Méthode d'élimination de Fourier
... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Référence :
Auteur(s ) : ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.