_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 |
|---|---|---|---|---|---|---|---|---|
015caabf330b5625d3ee1985b8c3dbab3d2464e8e77e8c4ba96634a8b59e377f | solomon-b/hcatlab | Classes.hs | module Data.Compose.Classes where
import Data.Compose.Type
import Data.Function
import Typeclasses.Functor
instance (Functor f, Functor g) => Functor (Compose f g) where
fmap f (Compose fg) = Compose $ (fmap . fmap) f fg
| null | https://raw.githubusercontent.com/solomon-b/hcatlab/6fd66adb3d2d96fea6c303a9f7bdaa1785383712/src/Data/Compose/Classes.hs | haskell | module Data.Compose.Classes where
import Data.Compose.Type
import Data.Function
import Typeclasses.Functor
instance (Functor f, Functor g) => Functor (Compose f g) where
fmap f (Compose fg) = Compose $ (fmap . fmap) f fg
| |
68652215313497f135065d4d97bc922eb1b03b7366701109a7e301732407c8ab | synsem/texhs | Inheritance.hs | {-# LANGUAGE OverloadedStrings #-}
----------------------------------------------------------------------
-- |
-- Module : Text.Bib.Reader.BibTeX.Inheritance
Copyright : 2015 - 2017 ,
2015 - 2016 Language Science Press .
-- License : GPL-3
--
-- Maintainer :
-- Stability : exp... | null | https://raw.githubusercontent.com/synsem/texhs/9e2dce4ec8ae0b2c024e1883d9a93bab15f9a86f/src/Text/Bib/Reader/BibTeX/Inheritance.hs | haskell | # LANGUAGE OverloadedStrings #
--------------------------------------------------------------------
|
Module : Text.Bib.Reader.BibTeX.Inheritance
License : GPL-3
Maintainer :
Stability : experimental
resolve cross-references between BibTeX entries
(@crossref@ and @xdata@ fields).
-------------... | Copyright : 2015 - 2017 ,
2015 - 2016 Language Science Press .
Portability : GHC
BibTeX parser , layer 3 :
module Text.Bib.Reader.BibTeX.Inheritance
resolve
, inheritXData
, inheritCrossref
) where
import qualified Data.Map.Strict as M
import Data.Maybe (fromMaybe)
import qua... |
2116f0b41f2335219e690a266d4eafd54263d445670b2a37de047d55836e0408 | tezos/tezos-mirror | storage.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/5efba2a0abebcd740021f0360535cb64e02df758/src/proto_alpha/lib_protocol/storage.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2022 , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOU... |
ca4be09c23a92c0380ec5395252275f42a8758c40dd0f5cbbda052be80827c7c | c-cube/ocaml-containers | CCRingBuffer.mli | (* This file is free software, part of containers. See file "license" for more details. *)
Copyright ( C ) 2015 ,
* Circular Buffer ( )
Useful for IO , or as a bounded - size alternative to { ! Queue } when
batch operations are needed .
{ b status : experimental }
Change in the API t... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/data/CCRingBuffer.mli | ocaml | This file is free software, part of containers. See file "license" for more details.
* The abstract type for arrays
* The element type
* The type of an array instance
* Make an array of the given size, filled with dummy elements.
* [length t] gets the total number of elements currently in [t].
* [get t i] gets t... |
Copyright ( C ) 2015 ,
* Circular Buffer ( )
Useful for IO , or as a bounded - size alternative to { ! Queue } when
batch operations are needed .
{ b status : experimental }
Change in the API to provide only a bounded buffer since 1.3
@since 0.9
Useful for IO, or as a b... |
e4ac8605217ecda65f8de4bec380f9f6b7396a46a26b88eac109a505b227983b | abhinav/pinch | BuilderParserSpec.hs | # LANGUAGE CPP #
module Pinch.Internal.BuilderParserSpec (spec) where
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative
#endif
import Test.Hspec
import Test.Hspec.QuickCheck
import qualified Data.ByteString as B
import qualified Data.Serialize.IEEE754 as G
import qualified Data.Serialize.Get as G
import Pinc... | null | https://raw.githubusercontent.com/abhinav/pinch/41aa4a83e736fabf568288c15504bc0ad17da3c8/tests/Pinch/Internal/BuilderParserSpec.hs | haskell | # LANGUAGE CPP #
module Pinch.Internal.BuilderParserSpec (spec) where
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative
#endif
import Test.Hspec
import Test.Hspec.QuickCheck
import qualified Data.ByteString as B
import qualified Data.Serialize.IEEE754 as G
import qualified Data.Serialize.Get as G
import Pinc... | |
af1fa1a82e6b9143103be6fa2e9fd88e3627e5d51bb9ba4c60d15de138b3f049 | mfelleisen/Fish | game-control.rkt | #lang racket/gui
;; the actual control classes for a human player mechanism
;
;
; ;;;
; ; ... | null | https://raw.githubusercontent.com/mfelleisen/Fish/59e29c9f6d0442bf3f4fcc0c9a9c76272472ecd9/Player/game-control.rkt | racket | the actual control classes for a human player mechanism
;;;
; ... | #lang racket/gui
(require (only-in Fish/Player/game-base-control control/c controller/c))
(define initial/c (and/c (class/c [choose controller/c]) control/c))
(define turn/c (and/c (class/c [take-turn controller/c]) control/c))
(provide
(contract-out
[initial/c contract?]
[turn/c contract?]
[initial-co... |
bfdb1bcfda5860a21b4029f63c4a1c7848b6afc148ce4da096d4e71eccdbb373 | tsloughter/kuberl | kuberl_core_api.erl | -module(kuberl_core_api).
-export([get_api_versions/1, get_api_versions/2]).
-define(BASE_URL, "").
%% @doc
%% get available API versions
-spec get_api_versions(ctx:ctx()) -> {ok, kuberl_v1_api_versions:kuberl_v1_api_versions(), kuberl_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), kuberl_uti... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_core_api.erl | erlang | @doc
get available API versions | -module(kuberl_core_api).
-export([get_api_versions/1, get_api_versions/2]).
-define(BASE_URL, "").
-spec get_api_versions(ctx:ctx()) -> {ok, kuberl_v1_api_versions:kuberl_v1_api_versions(), kuberl_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), kuberl_utils:response_info()}.
get_api_versions(C... |
738891b841c9491ac1fec1c3ffdacd51efe2f717ab2a3deb89baaca5e0358106 | mroman42/mikrokosmos | Main.hs | module Main where
import Control.Monad.Trans
import Control.Monad.State
import Control.Exception
import Data.List
import Data.Foldable (forM_)
import System.Directory
import System.Console.Haskeline
import Text.ParserCombinators.Parsec hid... | null | https://raw.githubusercontent.com/mroman42/mikrokosmos/fa3f9d5ebd9d62a6be44731ae867d020aa082a69/source/Main.hs | haskell | Lambda interpreter.
The actions of the interpreter are written here. It allows to execute normal
actions (bindings and evaluation), and interpreter specific actions, as "quit"
or "load".
| Runs the interpreter with default settings and an empty context.
Uses the Options library, which requires the program to star... | module Main where
import Control.Monad.Trans
import Control.Monad.State
import Control.Exception
import Data.List
import Data.Foldable (forM_)
import System.Directory
import System.Console.Haskeline
import Text.ParserCombinators.Parsec hid... |
d08ecc3f195ad6dd8e7750156e7b51a8ec59b755ffc65a11f510efe395997f76 | rksm/clj-org-analyzer | http_server.clj | (ns org-analyzer.http-server
(:require [clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.pprint :refer [cl-format]]
[clojure.set :as set :refer [rename-keys]]
[clojure.string :as s]
[compojure.core :refer [GET POST routes]]
[compojure.handl... | null | https://raw.githubusercontent.com/rksm/clj-org-analyzer/19da62aa4dcf1090be8f574f6f2d4c7e116163a8/src/org_analyzer/http_server.clj | clojure | -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
(def org-files-and-dirs (atom nil))
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
when running as native-image resources get the protocol "resources:" which
isn't handled by the ring middlewar... | (ns org-analyzer.http-server
(:require [clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.pprint :refer [cl-format]]
[clojure.set :as set :refer [rename-keys]]
[clojure.string :as s]
[compojure.core :refer [GET POST routes]]
[compojure.handl... |
b56116679960ca4354319cf16a699837e32291c8a59e9f689637622d7bad6902 | athos/parabola | response.clj | (ns parabola.response)
(defprotocol Response
(respond [this msg]))
(extend-protocol Response
Object
(respond [this _] this)
String
(respond [content _]
{:type :message
:content content})
clojure.lang.Fn
(respond [f msg]
(respond (f msg) msg)))
| null | https://raw.githubusercontent.com/athos/parabola/b6ea2d9108a97f9470f2f107c1f5fc71ea23f7e3/src/parabola/response.clj | clojure | (ns parabola.response)
(defprotocol Response
(respond [this msg]))
(extend-protocol Response
Object
(respond [this _] this)
String
(respond [content _]
{:type :message
:content content})
clojure.lang.Fn
(respond [f msg]
(respond (f msg) msg)))
| |
02eaedc324c89d7ee5a6c1ea7be330e88bbc8ac385343d42bbd0f0401f6084c8 | jin/hindley-milner | Infer.hs | module Infer (
inferExpr,
emptyEnv
) where
import Control.Monad.State
import Data.Maybe (fromMaybe)
import Data.Map (Map, map)
import qualified Data.Map as Map
import Syntax
data InferredType = IntT
| BoolT
| StringT
| ArrowT ... | null | https://raw.githubusercontent.com/jin/hindley-milner/9624a38dfcde21393e8c1f3a68c4801c0c3d9ed0/Infer.hs | haskell | -you-a-haskell
A type environment TypeEnv is a mapping from a program variable to an inferred type.
Type substitutions
TODO(jin): verify definition of occurs | module Infer (
inferExpr,
emptyEnv
) where
import Control.Monad.State
import Data.Maybe (fromMaybe)
import Data.Map (Map, map)
import qualified Data.Map as Map
import Syntax
data InferredType = IntT
| BoolT
| StringT
| ArrowT ... |
a54b7116f3f403115dec9119fb75c17c313559dc78effa1e09a66bfd6bbab478 | ocaml/oasis | TestQuery.ml | (******************************************************************************)
OASIS : architecture for building OCaml libraries and applications
(* *)
Copyright ( C ) 2011 - 2016 ,
Copyrig... | null | https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/test/test-main/TestQuery.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | OASIS : architecture for building OCaml libraries and applications
Copyright ( C ) 2011 - 2016 ,
Copyright ( C ) 2008 - 2011 , OCamlCore SARL
the Free Software Foundation ; either version 2.1 of the License , or ( at
You s... |
dbaeee25a440b03a8e36e9711bed2deed72072714ce6ce8be593356c8b7a875a | inclojure-org/intermediate-clojure-workshop | pure_fns.clj | (ns workshop-app.pure-fns
(:require [clojure.test :refer :all]
[workshop-app.handlers.users :as wahu]
[workshop-app.middlewares.users :as wamu])
(:import (java.time LocalDate)))
(deftest pure-get-person-test
(is (= {:status 200
:headers {"content-type" "application/json"}
... | null | https://raw.githubusercontent.com/inclojure-org/intermediate-clojure-workshop/3338a476aa815a587fa9e0b8b3804aa43492d15e/save-points/7/test/workshop_app/pure_fns.clj | clojure | by using higher order functions you can also test behavior without
mutating any code. | (ns workshop-app.pure-fns
(:require [clojure.test :refer :all]
[workshop-app.handlers.users :as wahu]
[workshop-app.middlewares.users :as wamu])
(:import (java.time LocalDate)))
(deftest pure-get-person-test
(is (= {:status 200
:headers {"content-type" "application/json"}
... |
b8e70e78410a7b579c342518474c289bb4a6cba9e82a68eac83b7b6b97e0ce85 | coccinelle/coccinelle | parse_cocci.mli |
* This file is part of Coccinelle , licensed under the terms of the GPL v2 .
* See copyright.txt in the Coccinelle source code for more information .
* The Coccinelle source code can be obtained at
* This file is part of Coccinelle, licensed under the terms of the GPL v2.
* See copyright.txt in the Cocci... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/parsing_cocci/parse_cocci.mli | ocaml | rules
virtuals
metavariables
filename
iso filename
verbose?
scripts only, for compilation
negated pos vars
used after list
fresh used after list
fresh used after list seeds
positions list
non metavars in - code, for grep
non metavars in - code, for glimpse
cocci-grep/git grep result, if any
non metavars i... |
* This file is part of Coccinelle , licensed under the terms of the GPL v2 .
* See copyright.txt in the Coccinelle source code for more information .
* The Coccinelle source code can be obtained at
* This file is part of Coccinelle, licensed under the terms of the GPL v2.
* See copyright.txt in the Cocci... |
789a81b02331b39def43b7d19fc767bdce708ce1fa35f2fb1b7de8425a5d8882 | ocaml-gospel/gospel | redundant3.mli | type t = A | B of t
val f : t -> int
(*@ y = f x
ensures match x with
| A | B _ -> false
| B (B A) -> false
| _ -> true *)
{ gospel_expected|
[ 125 ] File " redundant3.mli " , line 5 , characters 12 - 86 :
5 | ............ match x with
6 | | A | B _ - > false
... | null | https://raw.githubusercontent.com/ocaml-gospel/gospel/79841c510baeb396d9a695ae33b290899188380b/test/patterns/negative/redundant3.mli | ocaml | @ y = f x
ensures match x with
| A | B _ -> false
| B (B A) -> false
| _ -> true | type t = A | B of t
val f : t -> int
{ gospel_expected|
[ 125 ] File " redundant3.mli " , line 5 , characters 12 - 86 :
5 | ............ match x with
6 | | A | B _ - > false
7 | | B ( B A ) - > false
8 | | _ - > true ...
Error : The pattern -... |
f01c6004adc33af54792926a988d5a31afe203bf9b261f003daed79e7ceccd8e | rmloveland/scheme48-0.53 | big-util.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
(define (concatenate-symbol . stuff)
(string->symbol
(apply string-append
(map (lambda (x)
(cond ((string? x) x)
((symbol? x) (symbol->string x))
((number? x) (number->string x))
(else
(error "cannot coerce ~S to a s... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/big/big-util.scm | scheme | work around a bug in the type system
guaranteed not to be in-lined
ANY? need not search in order, but it does anyway
Copying strings. | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
(define (concatenate-symbol . stuff)
(string->symbol
(apply string-append
(map (lambda (x)
(cond ((string? x) x)
((symbol? x) (symbol->string x))
((number? x) (number->string x))
(else
(error "cannot coerce ~S to a s... |
5f8858a762f3ee2c7d88fe9a9944b7d7b91c76210b145ae8f1de5855eaae7842 | tweag/asterius | LocalRegs.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Asterius.Passes.LocalRegs
( resolveLocalRegs,
localRegTable,
)
where
import Asterius.Internals.SYB
import Asterius.Passes.Common
import Asterius.Types
import Co... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/src/Asterius/Passes/LocalRegs.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# INLINEABLE localRegTable # | # LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Asterius.Passes.LocalRegs
( resolveLocalRegs,
localRegTable,
)
where
import Asterius.Internals.SYB
import Asterius.Passes.Common
import Asterius.Types
import Control.Monad.State.Strict
import qualified Data.Map.... |
150560f7645555aceb01d96d81ba0897032eb0c466dd30dfa9b0d875af8f2a64 | picty/parsifal | sslproxy.ml | open Lwt
open LwtUtil
open Unix
open Parsifal
open TlsEnums
open Tls
open Getopt
let host = ref "www.google.com"
let port = ref 443
let options = [
mkopt (Some 'h') "help" Usage "show this help";
mkopt (Some 'H') "host" (StringVal host) "host to contact";
mkopt (Some 'p') "port" (IntVal port) "port to probe"... | null | https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/ssl-tools/sslproxy.ml | ocaml | TODO: Handle exceptions in lwt code, and add timers | open Lwt
open LwtUtil
open Unix
open Parsifal
open TlsEnums
open Tls
open Getopt
let host = ref "www.google.com"
let port = ref 443
let options = [
mkopt (Some 'h') "help" Usage "show this help";
mkopt (Some 'H') "host" (StringVal host) "host to contact";
mkopt (Some 'p') "port" (IntVal port) "port to probe"... |
24e67a002935754d776fe01f38497693d559d6cfcc775d6cc471670baceecc4b | josefs/Gradualizer | gradualizer_lib.erl | @private
-module(gradualizer_lib).
-export([merge_with/3, top_sort/1, get_type_definition/3,
pick_values/2, fold_ast/3, get_ast_children/1,
empty_tenv/0, create_tenv/3,
remove_pos_typed_record_field/1,
ensure_form_list/1,
zipn/1,
cartesian_product/1]).
-export_ty... | null | https://raw.githubusercontent.com/josefs/Gradualizer/d2ea3201ee3c55695f50144ee4befcafa0756ccc/src/gradualizer_lib.erl | erlang | Type environment, passed around while comparing compatible subtypes.
Pattern macros
-- Topological sort
List of incoming edges (dependencies).
Topologically sorted strongly-connected components of a graph.
Post-order traversal of a tree/forest.
Let's check if the type is a known remote type.
Let's check if the ... | @private
-module(gradualizer_lib).
-export([merge_with/3, top_sort/1, get_type_definition/3,
pick_values/2, fold_ast/3, get_ast_children/1,
empty_tenv/0, create_tenv/3,
remove_pos_typed_record_field/1,
ensure_form_list/1,
zipn/1,
cartesian_product/1]).
-export_ty... |
cec5547cbe58cb1967115a98db704ac88c7d331ecd26f96a973c99fad5386ec8 | tail-reversion/elle | let-lam.rkt | #lang racket/base
(provide (rename-out [@%λ λ]
[@%let let])
(for-syntax procedure-header))
(require (for-syntax racket/base syntax/datum)
syntax/parse/define
elle/private/prebase/preprebase)
{begin-for-syntax
(define-splicing-syntax-class mandatory-positional-argume... | null | https://raw.githubusercontent.com/tail-reversion/elle/ed113df48d37c0481d2e6d068635e4699ea33d65/elle-lib/private/prebase/let-lam.rkt | racket | #lang racket/base
(provide (rename-out [@%λ λ]
[@%let let])
(for-syntax procedure-header))
(require (for-syntax racket/base syntax/datum)
syntax/parse/define
elle/private/prebase/preprebase)
{begin-for-syntax
(define-splicing-syntax-class mandatory-positional-argume... | |
3d5469e9f872c24da1fb5faf6415a0c2e9647e0ad684d6839153ae975c52b40a | Kakadu/fp2022 | tests.ml | * Copyright 2022 - 2023 , and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Parsetree
open Typedtree
(* ------------------------------------------------------ *)
(* --------------------- Test cases --------------------- *)
(* ------------------------------------------------------ *)
(* (... | null | https://raw.githubusercontent.com/Kakadu/fp2022/5365f2f52e3e173cdb052abcfdbfb66fc70fe799/OCamlLabeledArgs/lib/tests.ml | ocaml | ------------------------------------------------------
--------------------- Test cases ---------------------
------------------------------------------------------
(1) Factorial
(8) Labeled arguments swapped places
------------------------------------------------------
------------------------------------... | * Copyright 2022 - 2023 , and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Parsetree
open Typedtree
let test_factorial_definition = "let rec fact n = if n = 0 then 1 else n * fact (n - 1)"
let test_factorial_call = "fact 5"
let test_factorial_expression =
"let rec fact n = if n = 0 t... |
66474a494fc19ebd510ba300183e6e6eb1aa56ffcbbe5b5b56da2745da849d04 | nomnom-insights/nomnom.duckula | search.clj | (ns duckula.test.handler.search)
(defn handler
[{:keys [body] :as _req}]
TestRequest !
{:status 200
:body {:status :success
;; we can skip message field, :message "foo"
:items [{:id 1 :content (str "query: " query " order " order_by " size " size)}]}}))
| null | https://raw.githubusercontent.com/nomnom-insights/nomnom.duckula/a6c8ee965da5717c5909bfbda5745be7a287d2ce/test/duckula/test/handler/search.clj | clojure | we can skip message field, :message "foo" | (ns duckula.test.handler.search)
(defn handler
[{:keys [body] :as _req}]
TestRequest !
{:status 200
:body {:status :success
:items [{:id 1 :content (str "query: " query " order " order_by " size " size)}]}}))
|
6ab1fb7a016702b027e8e9362f9ac6a34b2dab2027b6028cfd045e128f42239d | ocurrent/ocaml-multicore-ci | cluster_build.ml | open Current.Syntax
open Capnp_rpc_lwt
open Lwt.Infix
let src =
Logs.Src.create "ocaml_multicore_ci.cluster_build"
~doc:"ocaml-ci ocluster builder"
module Log = (val Logs.src_log src : Logs.LOG)
module Image = Current_docker.Raw.Image
module Git = Current_git
let ( >>!= ) = Lwt_result.bind
type t = {
connec... | null | https://raw.githubusercontent.com/ocurrent/ocaml-multicore-ci/d46eecaf7269283a4b95ee40d2a9d6c7ec34a7bf/lib/cluster_build.ml | ocaml | The build pool to use (e.g. "linux-arm64")
The source code to build and test
The commit for the compiler build to use. If None then the one in the base image will be used.
Used to choose a build cache
The repo under test, if repo is a compiler
A unique ID for this build within the commit
A package name whic... | open Current.Syntax
open Capnp_rpc_lwt
open Lwt.Infix
let src =
Logs.Src.create "ocaml_multicore_ci.cluster_build"
~doc:"ocaml-ci ocluster builder"
module Log = (val Logs.src_log src : Logs.LOG)
module Image = Current_docker.Raw.Image
module Git = Current_git
let ( >>!= ) = Lwt_result.bind
type t = {
connec... |
42aafc8956564afae80101c0bdc7d64b4cb6650ecfae2e0593d2d1da4ab3fb50 | nunchaku-inria/nunchaku | CVC4.mli |
(* This file is free software, part of nunchaku. See file "license" for more details. *)
* { 1 Interface to CVC4 }
open Nunchaku_core
type model_term = FO.T.t
type model_ty = FO.Ty.t
type problem = (model_term, model_ty) FO.Problem.t
type processed_problem
val preprocess : problem -> processed_problem
val pp_pro... | null | https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/backends/CVC4.mli | ocaml | This file is free software, part of nunchaku. See file "license" for more details.
* test whether the solver is available (e.g. if the library is
installed, or the binary in the path)
* list of different available options, starting with "" |
* { 1 Interface to CVC4 }
open Nunchaku_core
type model_term = FO.T.t
type model_ty = FO.Ty.t
type problem = (model_term, model_ty) FO.Problem.t
type processed_problem
val preprocess : problem -> processed_problem
val pp_problem : Format.formatter -> processed_problem -> unit
val solve :
?options:string ->
... |
805f88f9381f89a170c864829b685451a7a746370847cae3967e350ab40ecc87 | tonymorris/fp-course | HandleLens.hs | module Network.Server.Common.HandleLens where
import Network.Server.Common.Lens(Lens, identityL, getL)
import System.IO(Handle, BufferMode, hGetLine, hPutStrLn, hClose, hSetBuffering)
class HandleLens a where
handleL ::
Lens a Handle
instance HandleLens Handle where
handleL =
identityL
lGetLine ::
Han... | null | https://raw.githubusercontent.com/tonymorris/fp-course/73a64c3d4d0df58654a1a9a0ee9d9b11c3818911/projects/NetworkServer/haskell/src/Network/Server/Common/HandleLens.hs | haskell | module Network.Server.Common.HandleLens where
import Network.Server.Common.Lens(Lens, identityL, getL)
import System.IO(Handle, BufferMode, hGetLine, hPutStrLn, hClose, hSetBuffering)
class HandleLens a where
handleL ::
Lens a Handle
instance HandleLens Handle where
handleL =
identityL
lGetLine ::
Han... | |
3c1c3400ff6f5baac59d5cf63797148725b1d84d31c93d115389a343b7bfc3bf | haskellari/indexed-traversable | main.hs | # LANGUAGE CPP #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module Main (main) where
import Control.Applicative (Const (..))
import Data.Foldable (toList)
import Data.Functor.Identity (Identity (..))
import Data.Monoid (Endo (..), Monoid (..))
import Test... | null | https://raw.githubusercontent.com/haskellari/indexed-traversable/b8e96df2cab75111ba98c0d5f6559d198963dd97/indexed-traversable-instances/tests/main.hs | haskell | # LANGUAGE RankNTypes #
traverseWithKey and Foldable broken before
-----------------------------------------------------------------------------
Main
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Te... | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
module Main (main) where
import Control.Applicative (Const (..))
import Data.Foldable (toList)
import Data.Functor.Identity (Identity (..))
import Data.Monoid (Endo (..), Monoid (..))
import Test.QuickCheck
(Arbitrary, CoArbi... |
29cb292bd147cc52f2bc87e6ca70f3ed638f79e5bf9839af3a6ed792e127f526 | gheber/kenzo | defstruct.lisp |
(DEFSTRUCT (matrice (:conc-name nil))
leftcol uplig)
(DEFSTRUCT (t-mat (:conc-name nil))
val ilig icol left up)
(DEFSTRUCT (CONE (:conc-name nil) (:print-function cone-print))
(conx #+allegro :type #+allegro (member 0 1))
(icon #+allegro :type #+allegro gnrt))
(DEFSTRUCT (BICN (:conc-name nil) (:print-funct... | null | https://raw.githubusercontent.com/gheber/kenzo/48e2ea398b80f39d3b5954157a7df57e07a362d7/src/kenzo-9/defstruct.lisp | lisp | In Chain-Complexes |
(DEFSTRUCT (matrice (:conc-name nil))
leftcol uplig)
(DEFSTRUCT (t-mat (:conc-name nil))
val ilig icol left up)
(DEFSTRUCT (CONE (:conc-name nil) (:print-function cone-print))
(conx #+allegro :type #+allegro (member 0 1))
(icon #+allegro :type #+allegro gnrt))
(DEFSTRUCT (BICN (:conc-name nil) (:print-funct... |
c8915273bdac875565f5cc3e532a2178082368544c4bb3ac172d19a2eb3327f3 | techascent/tech.ml.dataset | nippy.clj | (ns tech.v3.dataset.io.nippy
(:require [tech.v3.dataset.io :as ds-io]
[tech.v3.dataset.base :as ds-base]
[tech.v3.datatype.errors :as errors]
;;Support for tensor/array buffers in nippy
[tech.v3.datatype.nippy]
[tech.v3.io :as io]
[taoensso.nippy... | null | https://raw.githubusercontent.com/techascent/tech.ml.dataset/e7b02042dd0848b1de298b9ac3cff97591eda67f/src/tech/v3/dataset/io/nippy.clj | clojure | Support for tensor/array buffers in nippy | (ns tech.v3.dataset.io.nippy
(:require [tech.v3.dataset.io :as ds-io]
[tech.v3.dataset.base :as ds-base]
[tech.v3.datatype.errors :as errors]
[tech.v3.datatype.nippy]
[tech.v3.io :as io]
[taoensso.nippy :as nippy])
(:import [tech.v3.dataset.impl.dataset Da... |
93371b5514077b6ee999cea9cfcf9e9a2d46efb4989204ba23e3872c64aa87c3 | yminer/libml | check.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[ LibML - Machine Learning Library ]
Copyright ( C ) 2002 - 2003 LAGACHERIE
This program is free software ; you can redistribute it and/or
modify it under the te... | null | https://raw.githubusercontent.com/yminer/libml/1475dd87c2c16983366fab62124e8bbfbbf2161b/src/nn/init/check.ml | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[ LibML - Machine Learning Library ]
Copyright ( C ) 2002 - 2003 LAGACHERIE
This program is free software ; you can redistribute it and/or
modify it under the te... | |
ae1334da65ea17e094e3cd353f8a985dd5cbd416d85183923c6b0ddcb0757d43 | s-cerevisiae/leetcode-racket | 213-house-robber-ii.rkt | #lang racket
(define (rob-sub nums)
(for/fold ([p1 0] [p2 0]
#:result p1)
([i (in-naturals)]
[x (in-list nums)])
(values
(match i
[0 x]
[1 (max x p1)]
[_ (max p1 (+ x p2))])
p1)))
(define/match (rob nums)
[('()) 0]
[((list x)) x]
[(... | null | https://raw.githubusercontent.com/s-cerevisiae/leetcode-racket/a81da53755debd5efec2d95f7c311d230ac5b3f4/213-house-robber-ii.rkt | racket | #lang racket
(define (rob-sub nums)
(for/fold ([p1 0] [p2 0]
#:result p1)
([i (in-naturals)]
[x (in-list nums)])
(values
(match i
[0 x]
[1 (max x p1)]
[_ (max p1 (+ x p2))])
p1)))
(define/match (rob nums)
[('()) 0]
[((list x)) x]
[(... | |
ca60a3f0fc16b11111bf0d32c8a6bbb0b1404c04c363cab56a88f61400c7ca22 | dmitryvk/cl-gtk2 | gobject.ffi.package.lisp | (defpackage :gobject.ffi
(:use :cl :cffi :glib :trivial-garbage :iter)
(:export #:g-type
#:g-type-designator
#:gtype
#:gtype-id
#:gtype-name
#:g-type
#:g-type-fundamental
#:%g-type-init
#:g-type-parent
#:g-type-depth
... | null | https://raw.githubusercontent.com/dmitryvk/cl-gtk2/a3108fbc701dbab93b899e04b9637ded2f813410/glib/gobject.ffi.package.lisp | lisp | (defpackage :gobject.ffi
(:use :cl :cffi :glib :trivial-garbage :iter)
(:export #:g-type
#:g-type-designator
#:gtype
#:gtype-id
#:gtype-name
#:g-type
#:g-type-fundamental
#:%g-type-init
#:g-type-parent
#:g-type-depth
... | |
6e8f92dc9a2d05db0bb6828e4bbd324ba680e07b1ca591ce92b9f793f588ff4c | nuprl/gradual-typing-performance | setup.rkt | #lang racket
(provide create-benchmark-dirs)
;; Usage:
;; racket setup-benchmark.rkt <directory>
;; will set up benchmarks using the provided directory
(module+ main
(match (current-command-line-arguments)
[(vector path)
(create-benchmark-dirs path)]))
;; ================================================... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/benchmarks/setup.rkt | racket | Usage:
racket setup-benchmark.rkt <directory>
will set up benchmarks using the provided directory
===================================================================================================
-------------------------------------------------------------------------------------------------
CONTRACT:
Note... | #lang racket
(provide create-benchmark-dirs)
(module+ main
(match (current-command-line-arguments)
[(vector path)
(create-benchmark-dirs path)]))
(require srfi/13)
(define TYPED? "typed?")
(define TYPED "yes")
(define UNTYPED "no")
(define COMMENT (string-append ";; " (make-string 77 #\-)))
(define (cre... |
241bd36f7dd6cf4958c6604716b390ea89d3773ed0dd7bf6dda8b9e2f9a97020 | RefactoringTools/wrangler | refac_duplicated_code.erl | %% =====================================================================
%% Duplicated Code Detection.
%%
Copyright ( C ) 2010 ,
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You s... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/refac_duplicated_code.erl | erlang | =====================================================================
Duplicated Code Detection.
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved via the world wide web at /.
basis, WITHOUT WARRANTY OF ANY KIND, either... | Copyright ( C ) 2010 ,
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(refac_duplicated_code).
-export([duplicated_code/5,
dupli... |
22c0f4c5151c7026d27835ee843eb0ed66f5ebe33d045c2a39121b995c9ba24a | mstksg/servant-cli | ParseBody.hs | {-# LANGUAGE DefaultSignatures #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
-- |
-- Module : Servant.CLI.ParseBody
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
-- Provides the interface for 'Pars... | null | https://raw.githubusercontent.com/mstksg/servant-cli/f67e85ac5102a0db1bb923487a99cb1bf058d076/src/Servant/CLI/ParseBody.hs | haskell | # LANGUAGE DefaultSignatures #
|
Module : Servant.CLI.ParseBody
License : BSD3
Stability : experimental
Portability : non-portable
Provides the interface for 'ParseBody', a helper class for defining
directly how to parse request bodies.
| A helper class for defining directly how to parse request ... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
Copyright : ( c ) 2019
Maintainer :
module Servant.CLI.ParseBody (
ParseBody(..)
, defaultParseBody
) where
import Data.Char
import Options.Applicative
import Text.Printf
import Type.Reflecti... |
f35aba02c7d3328a278726e870da37872a2f42d4a24e1269cf1743f88703ae15 | samrushing/irken-compiler | 2.scm | ;; -*- Mode: Irken -*-
(include "lib/core.scm")
(define my-record {f0=#t f1="stringy" f2=1234})
(define (fun r)
(+ r.f2 34))
(printn my-record.f0)
(printn my-record.f1)
(printn fun)
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/lang/2.scm | scheme | -*- Mode: Irken -*- |
(include "lib/core.scm")
(define my-record {f0=#t f1="stringy" f2=1234})
(define (fun r)
(+ r.f2 34))
(printn my-record.f0)
(printn my-record.f1)
(printn fun)
|
b8c020c0da6290cd91f26296fe18132795942b8b1d9b6c193f50fef7209a13a5 | jonase/eastwood | core.clj | (ns reflection-example.core)
(defn- omg [x]
(.toString x))
(omg 2)
(omg "")
(defn boo []
(omg 2)
(omg ""))
(defmacro foo [x]
`(.thing ~x))
(defn bar [x]
(.refl x))
| null | https://raw.githubusercontent.com/jonase/eastwood/a515efe22c9ce3c84d73d800e23ae7ebbda4a78a/.circleci/reflection-example/src/reflection_example/core.clj | clojure | (ns reflection-example.core)
(defn- omg [x]
(.toString x))
(omg 2)
(omg "")
(defn boo []
(omg 2)
(omg ""))
(defmacro foo [x]
`(.thing ~x))
(defn bar [x]
(.refl x))
| |
a3b1c299bd9bec2aa652eb3a47029222cf83dd239dc6503bfcd2fb01af3b8d4a | ahrefs/atd | util.mli | (** Top-level utilities *)
val read_lexbuf :
?annot_schema:Annot.schema ->
?expand:bool ->
?keep_builtins:bool ->
?keep_poly:bool ->
?xdebug:bool ->
?inherit_fields:bool ->
?inherit_variants:bool ->
?pos_fname:string ->
?pos_lnum:int ->
Lexing.lexbuf -> Ast.full_module * Expand.original_types
* Rea... | null | https://raw.githubusercontent.com/ahrefs/atd/5903684f7e6af05b6c0a84af6418a1e36ee7f44a/atd/src/util.mli | ocaml | * Top-level utilities
* Read an ATD file. Options: see [read_lexbuf].
The default [pos_fname] is the given input file name.
* Read ATD data from a string. Options: see [read_lexbuf]. |
val read_lexbuf :
?annot_schema:Annot.schema ->
?expand:bool ->
?keep_builtins:bool ->
?keep_poly:bool ->
?xdebug:bool ->
?inherit_fields:bool ->
?inherit_variants:bool ->
?pos_fname:string ->
?pos_lnum:int ->
Lexing.lexbuf -> Ast.full_module * Expand.original_types
* Read an ATD file from a lexbuf... |
14efd396d84c945dc3582b283574c6ba3c2b8e41fc584629081840f2dfc0d742 | inconvergent/weird | main.lisp |
(in-package :gridfont)
; json docs -lisp.net/project/cl-json/cl-json.html
(defun -jsn-get (jsn k) (cdr (assoc k jsn)))
(defstruct (gridfont (:constructor -make-gridfont))
(scale 1f0 :type veq:ff :read-only nil)
(sp 1f0 :type veq:ff :read-only nil)
(nl 13f0 :type veq:ff :read-only nil)
(xy nil :type list :re... | null | https://raw.githubusercontent.com/inconvergent/weird/106d154ec2cd0e4ec977c3672ba717d6305c1056/src/gridfont/main.lisp | lisp | json docs -lisp.net/project/cl-json/cl-json.html
jsn is an alist
TODO: return (values paths width height) |
(in-package :gridfont)
(defun -jsn-get (jsn k) (cdr (assoc k jsn)))
(defstruct (gridfont (:constructor -make-gridfont))
(scale 1f0 :type veq:ff :read-only nil)
(sp 1f0 :type veq:ff :read-only nil)
(nl 13f0 :type veq:ff :read-only nil)
(xy nil :type list :read-only nil)
(left 0f0 :type veq:ff :read-only ni... |
69f9257d420234ecbcc8e883b3ceb80b245eaeeae6f84aa5729948844ed9cbfd | maximedenes/native-coq | sequent.mli | (************************************************************************)
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/firstorder/sequent.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Term
open Errors
open Ut... |
fff61e14fa7e94c800fbc42125cf1a78f9cd7d9ef727182f894ae7d7392f0cbb | babashka/babashka | core_tests.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by... | null | https://raw.githubusercontent.com/babashka/babashka/3dfc15f5a40efaec07cba991892c1207a352fab4/test-resources/lib_tests/core_match/core_tests.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns core-match.core-tests
(:refer-clojure :exclude [compile])
(:require [clojure.core.match :as match :refer [match defpred]]
[clojure.test :as t :refer [deftest is]]))
(set! *warn-on-reflection* true)
(deftest pattern-match-1
(is (= (let [x true
... |
48f045212ef85b86382415b70ad3773b255f115715eeb5575d9aac1556b6c3df | clj-kondo/clj-kondo | core.clj | (ns compojure.core
(:require macro foo))
(defmacro defroutes
"Define a Ring handler function from a sequence of routes. The name may
optionally be followed by a doc-string and metadata map."
[name & routes]
(let [[name routes] (macro/name-with-attributes name routes)]
`(def ~name (routes ~@routes))))
(d... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/corpus/compojure/core.clj | clojure | (ns compojure.core
(:require macro foo))
(defmacro defroutes
"Define a Ring handler function from a sequence of routes. The name may
optionally be followed by a doc-string and metadata map."
[name & routes]
(let [[name routes] (macro/name-with-attributes name routes)]
`(def ~name (routes ~@routes))))
(d... | |
8debdb21d7b7c2cc2f8048a71b7e6f85babe6df146c27922df5a4490fb0132d4 | soarlab/FPTaylor | const.ml | (* ========================================================================== *)
: A Tool for Rigorous Estimation of Round - off Errors
(* *)
Author : , University of Utah
(* ... | null | https://raw.githubusercontent.com/soarlab/FPTaylor/efbbc83970fe3c9f4cb33fafbbe1050dd18749cd/const.ml | ocaml | ==========================================================================
==========================================================================
-----------... | : A Tool for Rigorous Estimation of Round - off Errors
Author : , University of Utah
This file is distributed under the terms of the MIT license
open Num
open Interval
type t = Rat of num | Interval of interval
let of_num n = Rat n
let of_int ... |
08b2a00bb9e781b1aac696177038e89a5c1d7d977eb7f3a44775ff823ec93dd5 | cac-t-u-s/om-sharp | musicxml-import.lisp | ;============================================================================
; om#: visual programming language for computer-assisted music composition
;============================================================================
;
; This program is free software. For information on usage
; and redistribution, see... | null | https://raw.githubusercontent.com/cac-t-u-s/om-sharp/c6effa4b2b61224f19ed29ca2b42a4c186345683/src/packages/score/import-export/musicxml-import.lisp | lisp | ============================================================================
om#: visual programming language for computer-assisted music composition
============================================================================
This program is free software. For information on usage
and redistribution, see the "... | File author :
This code is adapted from OM 6.15 import-mxml-new.lisp
(in-package :om)
UTILS
(defun om-list-from-xml (stream)
#+xml(s-xml::parse-xml-dom stream :lxml)
#-xml(om-beep-msg "No support for XML"))
(defun xml-equal (a b)
(and (symbolp a) (symbolp b)
(string-equal (symbol-name a) (sy... |
533870e88e9abf9032024200ce6826aef76255c0b2e50a2cbec3dc6fece6aa43 | dmvianna/haskellbook | Ch10-theDatabase.hs | import Data.Time
data DatabaseItem = DbString String
| DbNumber Integer
| DbDate UTCTime
deriving (Eq, Ord, Show)
theDatabase :: [DatabaseItem]
theDatabase =
[ DbDate (UTCTime
(fromGregorian 1911 5 1)
(secondsToDiffTime 34123))
, DbSt... | null | https://raw.githubusercontent.com/dmvianna/haskellbook/b1fdce66283ccf3e740db0bb1ad9730a7669d1fc/src/Ch10-theDatabase.hs | haskell | --------------
myMaximumBy :: (a -> a -> Ordering) -> [a] -> a | import Data.Time
data DatabaseItem = DbString String
| DbNumber Integer
| DbDate UTCTime
deriving (Eq, Ord, Show)
theDatabase :: [DatabaseItem]
theDatabase =
[ DbDate (UTCTime
(fromGregorian 1911 5 1)
(secondsToDiffTime 34123))
, DbSt... |
75bf53838e5c2056247f8e639e1781c6d9482b9f883ede7aaa7d484742b749c3 | lspitzner/brittany | Test461.hs | -- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
import qualified Data.List
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test461.hs | haskell | brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } | import qualified Data.List
|
8bc043cb92a30053f3136adf576f65aedf9ac0bfe62a578caace73b7924aa41c | aspiwack/peppermint-prover | Unfix.hs | # LANGUAGE DefaultSignatures #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuantifiedConstraints #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE StandaloneDeri... | null | https://raw.githubusercontent.com/aspiwack/peppermint-prover/203dbabcc6392a869fca7ae71320cac1a62ecc05/unfix-binders/src/Data/Binder/Unfix.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE TypeInType #
* Functors of endofunctors
$functor1-and-pfunctor1
** Simple functors
$functor1
** Parametric functors
$pfunctor1
* Non-uniform fixed point
$fixed-points
** Simple fixed point
$mu
** Mutually recursive fixed point
* Deriving instances
$generic-deriving
** De... | # LANGUAGE DefaultSignatures #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplic... |
fbdcee70a2566f7173cfa6132f161d8949bb84970b242176c2c02512ef185ad9 | ninenines/farwest_demo | farwest_demo_config.erl | Copyright ( c ) 2019 , < >
-module(farwest_demo_config).
-export([resource_modules/0]).
resource_modules() -> [
fwd_system_r,
fwd_processes_r,
fwd_process_r,
fwd_tables_r,
fwd_table_r,
fwd_table_row_r
].
| null | https://raw.githubusercontent.com/ninenines/farwest_demo/a95e70b78ebc4c5e3aea75a87bedd9f85b002c7c/src/farwest_demo_config.erl | erlang | Copyright ( c ) 2019 , < >
-module(farwest_demo_config).
-export([resource_modules/0]).
resource_modules() -> [
fwd_system_r,
fwd_processes_r,
fwd_process_r,
fwd_tables_r,
fwd_table_r,
fwd_table_row_r
].
| |
1a370c42f3c93089f482686a1521cc204099c449a255b2e32071c3ba6bd5751e | silky/quipper | Preview.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
-- ----------------------------------------------... | null | https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/Programs/Tools/Preview.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
======================================================================
----------------------------------------------------------------------
| This tool reads a circuit from standard input and displays it... | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
the previewer . For the previewer to work , Acrobat Reader must be
be displayed . A second Ctrl - C will kill the program .
Interrupting with Ctrl - C may not work in the Windows operating system .
module Main where
import Quipper
im... |
979e42be27157541356c08716fcea310d198904c57f9cfd77731c45f6defb484 | juliangamble/clj-seesaw-examples | examplesimporter.clj | (ns seesaw.test.examples.examplesimporter
(:require [seesaw.test.examples.clock :as clock]
[seesaw.test.examples.game-of-life :as gol])
(:gen-class
:main main))
| null | https://raw.githubusercontent.com/juliangamble/clj-seesaw-examples/e26489ea7c12a752682a33dff0100f91dacfacb6/src/seesaw/test/examples/examplesimporter.clj | clojure | (ns seesaw.test.examples.examplesimporter
(:require [seesaw.test.examples.clock :as clock]
[seesaw.test.examples.game-of-life :as gol])
(:gen-class
:main main))
| |
f2fe747f701e774e88ce7664573219b48f35f30bc12a4862fc46bdbd81f2fb70 | donaldsonjw/bigloo | read.scm | ;*---------------------------------------------------------------------*/
* serrano / prgm / project / bigloo / recette / read.scm * /
;* */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/recette/read.scm | scheme | *---------------------------------------------------------------------*/
* */
* */
* Un essai de reader */
*---------------------------... | * serrano / prgm / project / bigloo / recette / read.scm * /
* Author : * /
* Creation : Fri May 22 16:17:03 1992 * /
* Last change : Sat Sep 13 09:41:49 2014 ( serrano ) * /
(module rea... |
0e57b2f7b1fbe9cc172db60931622b19cba0a1d2c5336bf459c4ca31cbb914da | aumouvantsillage/Hydromel-lang | types.mel.rkt | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
#lang racket
(require
rackunit
"types.mel")
(define-syntax-rule (test-usr-exn arg ... fn)
(test-exn arg ... exn:fail:user? fn))
(test-... | null | https://raw.githubusercontent.com/aumouvantsillage/Hydromel-lang/2dcba40cada6deb465ffa307eaf6b622fd8e4af8/hydromel/tests/types.mel.rkt | racket | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
#lang racket
(require
rackunit
"types.mel")
(define-syntax-rule (test-usr-exn arg ... fn)
(test-exn arg ... exn:fail:user? fn))
(test-... | |
82015cb032adb3aaa65b8b8e2040484a1a6a146a04cd57d1e18d8f67f0398cb0 | htm-community/sanity | sensorimotor_1d.cljs | (ns org.numenta.sanity.demos.sensorimotor-1d
(:require [org.nfrac.comportex.demos.sensorimotor-1d :as demo]
[org.numenta.sanity.demos.comportex-common :refer [all-features]]
[org.numenta.sanity.main :as main]
[org.numenta.sanity.helpers :as helpers :refer [resizing-canvas]]
... | null | https://raw.githubusercontent.com/htm-community/sanity/0eae8a9a1fe732d761f6dd0cff3dba8b24ac5231/examples/demos/org/numenta/sanity/demos/sensorimotor_1d.cljs | clojure | draw line of next position (after next saccade)
draw line of current position
draw eye | (ns org.numenta.sanity.demos.sensorimotor-1d
(:require [org.nfrac.comportex.demos.sensorimotor-1d :as demo]
[org.numenta.sanity.demos.comportex-common :refer [all-features]]
[org.numenta.sanity.main :as main]
[org.numenta.sanity.helpers :as helpers :refer [resizing-canvas]]
... |
eec6117e9c058e235da33e4b3556a82e1a1e591bcf4d4167d0b73d654858b1cf | adrieng/melitte | UniverseLevel.ml | open Sexplib.Conv
type t =
| Fin of int
| Inf
[@@deriving sexp_of]
let fin l =
if l < 0 then invalid_arg "finite";
Fin l
let inf = Inf
let max l1 l2 =
match l1, l2 with
| _, Inf | Inf, _ -> Inf
| Fin i, Fin j -> Fin (max i j)
let ( = ) (l1 : t) l2 = l1 = l2
let ( <= ) l1 l2 =
match l1, l2 with
... | null | https://raw.githubusercontent.com/adrieng/melitte/c67060bd9caa68c4666694bc80fe3ea70f3884d2/src/UniverseLevel.ml | ocaml | open Sexplib.Conv
type t =
| Fin of int
| Inf
[@@deriving sexp_of]
let fin l =
if l < 0 then invalid_arg "finite";
Fin l
let inf = Inf
let max l1 l2 =
match l1, l2 with
| _, Inf | Inf, _ -> Inf
| Fin i, Fin j -> Fin (max i j)
let ( = ) (l1 : t) l2 = l1 = l2
let ( <= ) l1 l2 =
match l1, l2 with
... | |
39717913cf8b38d4daae5262e12a8988fb07315f7c2297371f953254997d2acb | sharplispers/montezuma | disjunction-sum-scorer.lisp | (in-package #:montezuma)
(defclass disjunction-sum-scorer (scorer)
((num-scorers)
(current-doc :initform -1)
(current-score :initform nil)
(num-matchers :initform -1)
(minimum-num-matchers :initarg :minimum-num-matchers)
(sub-scorers :initarg :sub-scorers)
(scorer-queue :initform nil))
(:default-... | null | https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/src/search/disjunction-sum-scorer.lisp | lisp | (in-package #:montezuma)
(defclass disjunction-sum-scorer (scorer)
((num-scorers)
(current-doc :initform -1)
(current-score :initform nil)
(num-matchers :initform -1)
(minimum-num-matchers :initarg :minimum-num-matchers)
(sub-scorers :initarg :sub-scorers)
(scorer-queue :initform nil))
(:default-... | |
9db79db41cc59287204f15f9dfaa8c1f2c20db8d8a4ad15add1d05e3ecd8b8c3 | chowells79/lrucache | Internal.hs | # OPTIONS_HADDOCK not - home #
{-# LANGUAGE DeriveDataTypeable #-}
| This module contains a mutable wrapping of an LRU in the IO
-- monad, providing atomic access in a concurrent environment. All
calls preserve the same semantics as those in " Data . Cache . LRU " , but
-- perform updates in place.
--
-- This mod... | null | https://raw.githubusercontent.com/chowells79/lrucache/14992f1361cffb25652f4420f94438931f064890/src/Data/Cache/LRU/IO/Internal.hs | haskell | # LANGUAGE DeriveDataTypeable #
monad, providing atomic access in a concurrent environment. All
perform updates in place.
This module contains the internal implementation details. It's
possible to put an 'AtomicLRU' into a bad state with this module.
It is highly recommended that the external interface,
| The ... | # OPTIONS_HADDOCK not - home #
| This module contains a mutable wrapping of an LRU in the IO
calls preserve the same semantics as those in " Data . Cache . LRU " , but
" Data . Cache . LRU.IO " , be used instead .
module Data.Cache.LRU.IO.Internal where
import Prelude hiding ( lookup, mod, take )
import Contro... |
3318bbe9d79e3010677cf0c346b9bbc5c1f558a98d7a770802aabfc7bdb223f1 | LCBH/UKano | simplify.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/LCBH/UKano/13c046ddaca48b45d3652c3ea08e21599e051527/proverif2.01/src/simplify.ml | ocaml | ********************************************
Types of normalised process
*********************************************
[true] when precise
[true] when precise
[true] when precise
***********************************************
Display of normalized processes
********************************************... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... |
04f997a2c30a674b2d546d4d757797a9b87f8ec4cd8e79b45f3c1e7876330d34 | rtoy/ansi-cl-tests | string-capitalize.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Thu Oct 3 20:08:26 2002
;;;; Contains: Tests for STRING-CAPITALIZE
(in-package :cl-test)
(deftest string-capitalize.1
(let ((s "abCd"))
(values (string-capitalize s) s))
"Abcd"
"abCd")
(deftest string-capitalize.2
(let ((s "0adA2Cdd3wXy"))
(val... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/string-capitalize.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for STRING-CAPITALIZE
Order of evaluation tests
Error cases | Author :
Created : Thu Oct 3 20:08:26 2002
(in-package :cl-test)
(deftest string-capitalize.1
(let ((s "abCd"))
(values (string-capitalize s) s))
"Abcd"
"abCd")
(deftest string-capitalize.2
(let ((s "0adA2Cdd3wXy"))
(values (string-capitalize s) s))
"0ada2cdd3wxy"
"0adA2Cdd3wXy")
(... |
43a704d612b0f3e4511d9c36f78f0919cfe92b4efeb1b6791afb369c7c48f303 | bennn/trivial | regexp-pass.rkt | #lang typed/racket/base
;; Well-typed use of regexp
(module+ test
(require
trivial/regexp
trivial/string
trivial/define
typed/rackunit)
;; -- TODO (handle regexp . format)
; (define re:normal-name (regexp (format "~a*<([^>]*)>~a*" blank blank)))
;; -- regexps, from the world
(test-case "r... | null | https://raw.githubusercontent.com/bennn/trivial/c8fb9dcc377d1bf40ca167e34072bec90d2651e1/test/regexp-pass.rkt | racket | Well-typed use of regexp
-- TODO (handle regexp . format)
(define re:normal-name (regexp (format "~a*<([^>]*)>~a*" blank blank)))
-- regexps, from the world
from `tests/racket/contract/multi-file.rkt`
from `morse-code-table.rkt`
from html-render.rkt
from racket-doc/guide/scribblings/arith.rkt
from racket/src/w... | #lang typed/racket/base
(module+ test
(require
trivial/regexp
trivial/string
trivial/define
typed/rackunit)
(test-case "regexp-misc"
-- from ? anyway the unicode will segfault ` unsafe - string - ref `
(check-equal?
(ann (regexp-match #rx"⇒" "yolo") (U #f (List String)))
... |
12f7dfa3e009d2eaf9742f32d70492d5233dcd1eadf170ffd16781d5805d2eb9 | david-christiansen/pudding | tooltip-info.rkt | #lang racket
(provide (for-syntax tooltip-info))
(require "lift-tooltips.rkt" (for-syntax "engine/proof-state.rkt"))
(define-for-syntax (tooltip-info show)
(lambda (loc goal)
(when loc
(save-tooltip (lambda ()
(string-append (format "~a\n" (syntax->datum loc))
... | null | https://raw.githubusercontent.com/david-christiansen/pudding/ead4e1a2e8e0d77a884211adcc4466edcf65e406/tooltip-info.rkt | racket | #lang racket
(provide (for-syntax tooltip-info))
(require "lift-tooltips.rkt" (for-syntax "engine/proof-state.rkt"))
(define-for-syntax (tooltip-info show)
(lambda (loc goal)
(when loc
(save-tooltip (lambda ()
(string-append (format "~a\n" (syntax->datum loc))
... | |
3a93925e8ab68692064012e0b4aa03d81801a5ceb99d8d401ced35f28a102f57 | S8A/htdp-exercises | ex039.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex039) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex039.rkt | racket | about the language level of this file in a form that our tools can easily process.
Single point of control
Car | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex039) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ... |
1a557339048fcadacfa2ca61bf34b421f73a7a558e477d5a098df50c93c55a5b | quephird/fun-with-quil | painter.clj | (ns fun-with-quil.sketches.painter
(:use quil.core))
(def ^:constant screen-w 500)
(def ^:constant screen-h 500)
(def grid-r (atom {}))
(def grid-g (atom {}))
(def grid-b (atom {}))
; parameter to rand-int seems to make swaths wider
3rd parameter to + seems to control width of square of repetition
(defn r [x y]... | null | https://raw.githubusercontent.com/quephird/fun-with-quil/3b3a6885771f5a1a4cffeb8379f05a28048a1616/src/fun_with_quil/sketches/painter.clj | clojure | parameter to rand-int seems to make swaths wider | (ns fun-with-quil.sketches.painter
(:use quil.core))
(def ^:constant screen-w 500)
(def ^:constant screen-h 500)
(def grid-r (atom {}))
(def grid-g (atom {}))
(def grid-b (atom {}))
3rd parameter to + seems to control width of square of repetition
(defn r [x y]
(let [v (@grid-r [x y])]
(if (not (nil? v))
... |
00fbe8a45a5585e96f0eab50c754173b11ce2d2490c4f0cc3ca69bb9d4db5fdd | programaker-project/Programaker-Core | automate_logging.erl | %%%-------------------------------------------------------------------
%% @doc automate_logging public API
%% @end
%%%-------------------------------------------------------------------
-module(automate_logging).
%% Application callbacks
-export([ log_event/2
, log_signal_to_bridge_and_owner/3
, get_s... | null | https://raw.githubusercontent.com/programaker-project/Programaker-Core/080b02e3aba6d478328b7451e4d29806567d9815/backend/apps/automate_logging/src/automate_logging.erl | erlang | -------------------------------------------------------------------
@doc automate_logging public API
@end
-------------------------------------------------------------------
Application callbacks
====================================================================
Logging API
=======================================... |
-module(automate_logging).
-export([ log_event/2
, log_signal_to_bridge_and_owner/3
, get_signal_by_bridge_and_owner_history/2
, log_program_call_by_user/2
, log_call_to_bridge/5
, log_program_error/1
, add_user_generated_program_log/1
, log_platform/4
,... |
386df804857968262e1436fb95142cd5e5c4b4ebb2f90731cfc6d583142aa441 | input-output-hk/cardano-sl | AddressPool.hs | module Test.Spec.AddressPool (spec) where
import Universum
import Cardano.Wallet.Kernel.AddressPool (AddressPool,
getAddressPoolGap, getAddressPoolSize, initAddressPool,
lookupAddressPool)
import Cardano.Wallet.Kernel.AddressPoolGap (AddressPoolG... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/wallet/test/unit/Test/Spec/AddressPool.hs | haskell | | It proves that pool extension works as expected. | module Test.Spec.AddressPool (spec) where
import Universum
import Cardano.Wallet.Kernel.AddressPool (AddressPool,
getAddressPoolGap, getAddressPoolSize, initAddressPool,
lookupAddressPool)
import Cardano.Wallet.Kernel.AddressPoolGap (AddressPoolG... |
97d2460b027fda8d3dbf31a315517dfbb0c7d3f8b6fa014b9dfc80651312ff26 | UnixJunkie/rankers | bwmine.ml | Copyright ( C ) 2019 ,
laboratory ,
Department of Bioscience and Bioinformatics ,
Faculty of Computer Science and Systems Engineering ,
Kyushu Institute of Technology ,
680 - 4 Kawazu , Iizuka , Fukuoka , 820 - 8502 , Japan .
Vanishing Ranking Kernels bandwidth miner
Yamanishi lab... | null | https://raw.githubusercontent.com/UnixJunkie/rankers/46772a75192c83e1b911d25a49753cdd3c7ca4ed/src/bwmine.ml | ocaml | !!! shuffling is critical here !!!
single kernel model training and optimization
[k] xCV using [brute_n] steps
brute force using [brute_n] steps
model testing (on _never_ seen data)
Common.draw_kernel kernel k; | Copyright ( C ) 2019 ,
laboratory ,
Department of Bioscience and Bioinformatics ,
Faculty of Computer Science and Systems Engineering ,
Kyushu Institute of Technology ,
680 - 4 Kawazu , Iizuka , Fukuoka , 820 - 8502 , Japan .
Vanishing Ranking Kernels bandwidth miner
Yamanishi lab... |
9caac4cf830e87b8de79ee03e3df5fb7e1447c835963deb0dafe4ca2dac77d68 | linoscope/okasaki-book-ocaml | test_trie.ml | open Base
open Stdio
open Okasaki_book
module T = Trie.Make(Assoc_list.Make(Char))
let%expect_test "test" =
let l = [ ((String.to_list "cat"), 1);
((String.to_list "car"), 2);
((String.to_list "cart"), 3);
((String.to_list "dog", 4)); ] in
let t = List.fold l ~init:T.empty ~f:(... | null | https://raw.githubusercontent.com/linoscope/okasaki-book-ocaml/04b299fb978c75a0c4da5991dc187fef2e91d9cb/test/ch10/test_trie.ml | ocaml | open Base
open Stdio
open Okasaki_book
module T = Trie.Make(Assoc_list.Make(Char))
let%expect_test "test" =
let l = [ ((String.to_list "cat"), 1);
((String.to_list "car"), 2);
((String.to_list "cart"), 3);
((String.to_list "dog", 4)); ] in
let t = List.fold l ~init:T.empty ~f:(... | |
62538380dbf1764acad4023dd101a5753e49ba77c4fce920ffddb7c3417a679a | fyquah/hardcaml_zprize | test_kernel_for_vitis.mli | open! Core
module Make (Config : Zprize_ntt.Top_config.S) : sig
module Kernel :module type of Zprize_ntt.For_vitis.Make (Config)
module Sim : module type of Hardcaml.Cyclesim.With_interface (Kernel.I) (Kernel.O)
val random_input_coef_matrix : unit -> Z.t array array
val print_matrix : Hardcaml_ntt.Gf.Z.t arr... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/7eb1bd214908fa801781db33287eaf12691715f8/zprize/ntt/hardcaml/test/test_kernel_for_vitis.mli | ocaml | open! Core
module Make (Config : Zprize_ntt.Top_config.S) : sig
module Kernel :module type of Zprize_ntt.For_vitis.Make (Config)
module Sim : module type of Hardcaml.Cyclesim.With_interface (Kernel.I) (Kernel.O)
val random_input_coef_matrix : unit -> Z.t array array
val print_matrix : Hardcaml_ntt.Gf.Z.t arr... | |
21cd1c4921e8183713315f3298342c84ab8e04b98758b537e0e1cd4ab345d72a | TheInnerLight/dormouse | RFC3986.hs | module Dormouse.Uri.RFC3986
( isGenDelim
, isSubDelim
, isReserved
, isAsciiAlpha
, isAsciiAlphaNumeric
, isUnreserved
, isSchemeChar
, isUserInfoChar
, isRegNameChar
, isPathChar
, isPathCharNoColon
, isQueryChar
, isFragmentChar
) where
import Data.Char as C
| Checks whether a char bel... | null | https://raw.githubusercontent.com/TheInnerLight/dormouse/f2bba11c19d21e2779302bab167b9120c8179178/dormouse-uri/src/Dormouse/Uri/RFC3986.hs | haskell | module Dormouse.Uri.RFC3986
( isGenDelim
, isSubDelim
, isReserved
, isAsciiAlpha
, isAsciiAlphaNumeric
, isUnreserved
, isSchemeChar
, isUserInfoChar
, isRegNameChar
, isPathChar
, isPathCharNoColon
, isQueryChar
, isFragmentChar
) where
import Data.Char as C
| Checks whether a char bel... | |
cc361028c3146781853902536d46235847c75f110c8d3c952542de3ab22489fc | adventuring/tootsville.net | sql-utils.lisp | (in-package :oliphaunt)
(defun sql-escape (string)
"Simply replaces ' with '' in strings (that's paired/escape single
quotes). This is the right thing to do for standard SQL, but MySQL and
other servers might be naughtier than you'd like."
(check-type string string)
(regex-replace-all "\\'" string "''"))
... | null | https://raw.githubusercontent.com/adventuring/tootsville.net/985c11a91dd1a21b77d7378362d86cf1c031b22c/src/lib/oliphaunt/sql-utils.lisp | lisp | (in-package :oliphaunt)
(defun sql-escape (string)
"Simply replaces ' with '' in strings (that's paired/escape single
quotes). This is the right thing to do for standard SQL, but MySQL and
other servers might be naughtier than you'd like."
(check-type string string)
(regex-replace-all "\\'" string "''"))
... | |
d825d505a6a822826e01d4347b033cdacc31cc2f7e77cfad705f96599168ae41 | racket/compatibility | uri-codec-unit.rkt | #lang racket/base
(require racket/unit
"uri-codec-sig.rkt" net/uri-codec)
(define-unit-from-context uri-codec@ uri-codec^)
(provide uri-codec@)
| null | https://raw.githubusercontent.com/racket/compatibility/492030dac6f095045ce8a13dca75204dd5f34e32/compatibility-lib/net/uri-codec-unit.rkt | racket | #lang racket/base
(require racket/unit
"uri-codec-sig.rkt" net/uri-codec)
(define-unit-from-context uri-codec@ uri-codec^)
(provide uri-codec@)
| |
92504fd2e36afe8e5eea5571028903d34c012a5d208cfb89658a35288077a9b6 | icicle-lang/icicle-ambiata | Timer.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
module Icicle.Command.Timer (
TimerDuration(..)
, renderTimerDuration
, startTimer
, startTimer_
) where
import Control.Monad.IO.Class (MonadIO(..))
import qualified Data.Text as Text
import qualified Data.Text.IO as Text
import ... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/src/Icicle/Command/Timer.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
module Icicle.Command.Timer (
TimerDuration(..)
, renderTimerDuration
, startTimer
, startTimer_
) where
import Control.Monad.IO.Class (MonadIO(..))
import qualified Data.Text as Text
import qualified Data.Text.IO as Text
import Data.Time (getCurrentTime... |
5e36230c322c87c65fc47ae946a3a41338c961e3d93d9a49250315e5bb2d33c0 | stuartsierra/lazytest | suite.clj | (ns lazytest.suite)
(defn suite
"Sets metadata on function f identifying it as a test suite. A test
suite function must be free of side effects and must return a
test sequence (see test-seq)."
[f]
{:pre [(fn? f)]}
(vary-meta f assoc ::suite true))
(defn suite?
"True if x is a test suite."
[x]
(and ... | null | https://raw.githubusercontent.com/stuartsierra/lazytest/3b0f419ce3d6f259d2ab3cfde475fa491a4db23e/modules/lazytest/src/main/clojure/lazytest/suite.clj | clojure | (ns lazytest.suite)
(defn suite
"Sets metadata on function f identifying it as a test suite. A test
suite function must be free of side effects and must return a
test sequence (see test-seq)."
[f]
{:pre [(fn? f)]}
(vary-meta f assoc ::suite true))
(defn suite?
"True if x is a test suite."
[x]
(and ... | |
69851e2606b5af2d04de7c3c24ec0fc0f166c56fecd386977308c600510a980a | karamellpelle/grid | State.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/LevelPuzzle/Output/Plain/State.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
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
module Game.LevelPuzzle.Output.Plain.State
(
... |
b0592236bf49503516682ef937176bc3911ffbc235b2f456f0af979e9d7ec4b5 | jvf/scalaris | lease_recover.erl | 2007 - 2016 Zuse Institute Berlin
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
distribu... | null | https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/src/cp/lease_recover.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 or implied.
See the License for the specific language governing... | 2007 - 2016 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(lease_recover).
-author('').
-vsn('$Id$').
-include("scalaris.hrl").
-include("record_helpers.hrl").
-export(... |
3c597a662aee2b75a73080f9091bfa672cd32d0e0204d4157d48ed93342cf844 | Amanite/ocamlpics | images.ml |
auteur : FIL
date : janvier 2010
objet : lecture et sauvegarde de fichiers image dans différents format
( PGM , PPM , JPG , PNG , GIF , ... )
necessite l'installation de la commande convert de la suite de traitements
d'images Image Magick ( / )
auteur : FIL
date : janvier 2010
ob... | null | https://raw.githubusercontent.com/Amanite/ocamlpics/ae466444504518c2b415e80cacdfbd0c9e0f45d4/images.ml | ocaml |
auteur : FIL
date : janvier 2010
objet : lecture et sauvegarde de fichiers image dans différents format
( PGM , PPM , JPG , PNG , GIF , ... )
necessite l'installation de la commande convert de la suite de traitements
d'images Image Magick ( / )
auteur : FIL
date : janvier 2010
ob... | |
e0dbf452ff07d60d0efcf65529d89823b029ac6fa9b7b00954e88811cd4601fa | cedlemo/OCaml-libmpdclient | Client.ml |
* Copyright 2017 - 2018 ,
* This file is part of .
*
* OCaml - libmpdclient 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
* any later versio... | null | https://raw.githubusercontent.com/cedlemo/OCaml-libmpdclient/49922f4fa0c1471324c613301675ffc06ff3147c/lib/Client.ml | ocaml | * Remove one or more tags from the list of tag types the client is
* interested in. These will be omitted from responses to this client.
* Re-enable one or more tags from the list of tag types for this client.
* These will no longer be hidden from responses to this client.
* Clear the list of tag types this client ... |
* Copyright 2017 - 2018 ,
* This file is part of .
*
* OCaml - libmpdclient 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
* any later versio... |
a8eb5703b4a1085ac3987a4a8635f222bbbd785d57a3ce69bef042a733f152a0 | amosr/folderol | Sink.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ExistentialQuantification #
module Folderol.Sink where
import P
import System.IO (IO)
import Data.IORef
import qualified Data.Vector.Generic as Generic
import qualified Data.Vector.Generic.Mutable as MGeneric
import quali... | null | https://raw.githubusercontent.com/amosr/folderol/9b8c0cd30cfb798dadaa404cc66404765b1fc4fe/src/Folderol/Sink.hs | haskell | # LANGUAGE BangPatterns # | # LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ExistentialQuantification #
module Folderol.Sink where
import P
import System.IO (IO)
import Data.IORef
import qualified Data.Vector.Generic as Generic
import qualified Data.Vector.Generic.Mutable as MGeneric
import qualified Data.Vector as Vector
imp... |
9a7c4419e39af17f91a9cebce879696e69d452815b09c66653d13cb032338a19 | robert-strandh/Second-Climacs | search.lisp | (cl:in-package #:second-climacs-base)
(defun exchange-cursor-positions (cursor1 cursor2)
(let ((line1 (cluffer:line cursor1))
(position1 (cluffer:cursor-position cursor1))
(line2 (cluffer:line cursor2))
(position2 (cluffer:cursor-position cursor2)))
(cluffer:detach-cursor cursor1)
(cl... | null | https://raw.githubusercontent.com/robert-strandh/Second-Climacs/3caf3edd20eb38b5382f247ded1a7c2d73c09f81/Code/Base/search.lisp | lisp |
This function implements the essence of the command
SEARCH-FORWARD.
We have a complete match of STRING.
We reached the end of the buffer without any
match.
We have a match of the next character in
STRING.
We do not have a match, and we have not matched
anything so far.
We do not have a match, but we have al... | (cl:in-package #:second-climacs-base)
(defun exchange-cursor-positions (cursor1 cursor2)
(let ((line1 (cluffer:line cursor1))
(position1 (cluffer:cursor-position cursor1))
(line2 (cluffer:line cursor2))
(position2 (cluffer:cursor-position cursor2)))
(cluffer:detach-cursor cursor1)
(cl... |
28e172352fa5bd5989891d345f47d18eb2722f0d085e21c30daab534707c4444 | theodormoroianu/SecondYearCourses | HaskellChurch_20210415162816.hs | {-# LANGUAGE RankNTypes #-}
module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = show $ cIf b True False
The boolean constant true always chooses the ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415162816.hs | haskell | # LANGUAGE RankNTypes #
The boolean negation switches the alternatives
The boolean conjunction can be built as a conditional
The boolean disjunction can be built as a conditional
a pair is a way to compute something based on the values
contained within the pair.
a function to be applied on the values, it will apply i... | module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = show $ cIf b True False
The boolean constant true always chooses the first alternative
cTrue :: C... |
9207d37e47b9a3e55500bc00c5bfcdffb57a954ed77983e6cbb0c3c0bb43d894 | GaloisInc/semmc | Internal.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeFamilyDependencies #
-- | This module is an internal implementation detail and is just here to break
an import cycle around a few definitions that were formerly in Architecture .
module SemMC.Architecture.Internal (
Instruction,
Operand,
IsOperand,... | null | https://raw.githubusercontent.com/GaloisInc/semmc/4dc4439720b3b0de8812a68f8156dc89da76da57/semmc/src/SemMC/Architecture/Internal.hs | haskell | | This module is an internal implementation detail and is just here to break
| Type of operands for a given architecture.
| Class containing methods we want on operands. (Nothing for now.)
| Type of opcodes for a given architecture.
| Class containing methods we want on opcodes. (Nothing for now.)
| Mapping from ... | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeFamilyDependencies #
an import cycle around a few definitions that were formerly in Architecture .
module SemMC.Architecture.Internal (
Instruction,
Operand,
IsOperand,
Opcode,
IsOpcode,
OperandType,
IsOperandTypeRepr(..)
) where
import ... |
1455267d0ff733e19ace26af5da94215e5c81b9d63431a42e505fb63c0128f61 | iu-parfunc/lvars | Set.hs | # LANGUAGE CPP #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
| Provide instances for parallel handling of common , pure data structures .
module Data.Par.Set
() where
import Data.Splittable.Class (Split(..))
import qualified Control.Par.Class as PC
import q... | null | https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/par-collections/Data/Par/Set.hs | haskell | # LANGUAGE BangPatterns #
------------------------------------------------------------------------------
instance PC.ParFoldable (M.Map k v) where
pmapFold = Sp.pmapReduce
instance PC.ParFoldable (M.Map k v) where | # LANGUAGE CPP #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
| Provide instances for parallel handling of common , pure data structures .
module Data.Par.Set
() where
import Data.Splittable.Class (Split(..))
import qualified Control.Par.Class as PC
import qualified Data.Set as S
import ... |
a1c7ad2af556be42bdaf6f056b123528f64a4ffaaa3fc4f3acf7c40221fdf89c | expipiplus1/vulkan | VK_EXT_image_2d_view_of_3d.hs | {-# language CPP #-}
-- | = Name
--
-- VK_EXT_image_2d_view_of_3d - device extension
--
-- == VK_EXT_image_2d_view_of_3d
--
-- [__Name String__]
-- @VK_EXT_image_2d_view_of_3d@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
394
--
-- [__Revision__]
1
--
-- [__... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_EXT_image_2d_view_of_3d.hs | haskell | # language CPP #
| = Name
VK_EXT_image_2d_view_of_3d - device extension
== VK_EXT_image_2d_view_of_3d
[__Name String__]
@VK_EXT_image_2d_view_of_3d@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
device-... | 394
1
- Requires support for Vulkan 1.0
- Requires @VK_KHR_maintenance1@ to be enabled for any
- < -extensions/html/vkspec.html#extendingvulkan-compatibility-specialuse OpenGL \/ ES support >
-
2022 - 02 - 22
- , Valve
- , NVIDIA
- ... |
325a3240ea6e895783cfba3946dc795d122c6571961fdb5b0bc5c198f0ba10ce | dyzsr/ocaml-selectml | testrandom.ml | (* TEST
include testing
*)
open Random
let _ =
for i = 0 to 20 do
print_char ' '; print_int (int 1000);
done;
print_newline (); print_newline ();
for i = 0 to 20 do
print_char ' '; print_float (float 1000.);
done
let _ = exit 0
| null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/basic-more/testrandom.ml | ocaml | TEST
include testing
|
open Random
let _ =
for i = 0 to 20 do
print_char ' '; print_int (int 1000);
done;
print_newline (); print_newline ();
for i = 0 to 20 do
print_char ' '; print_float (float 1000.);
done
let _ = exit 0
|
0afc1f41972c8ecba0c518bf5457b7055e5e00bffcadd52cdb572a72e84f1c1d | rcherrueau/APE | hotedge-scope.rkt | #lang reader "../lang.rkt"
;; Type def
(class FlatNet)
(class VM)
(class ListVMs)
Model OS services
(class Network
(field [flatNet : app/FlatNet]))
(class Compute
(def (bootVM [net : app/FlatNet] -> VM) ???)
(def (listVMs -> ListVMs) ???))
(class OS-SDK
(field [network : app/Network])
(field [compute : ... | null | https://raw.githubusercontent.com/rcherrueau/APE/8b5302709000bd043b64d46d55642acb34ce5ba7/racket/CPN98/examples/hotedge-scope.rkt | racket | Type def
> well-typed
> ill-typed
Boot VM with Compute at Site1 and Network at Site1
> well-typed
It is now clear for me that the object oriented programming is
not the best tool for this | #lang reader "../lang.rkt"
(class FlatNet)
(class VM)
(class ListVMs)
Model OS services
(class Network
(field [flatNet : app/FlatNet]))
(class Compute
(def (bootVM [net : app/FlatNet] -> VM) ???)
(def (listVMs -> ListVMs) ???))
(class OS-SDK
(field [network : app/Network])
(field [compute : app/Compute]... |
849d5024a36fcc667b33765139b2ecf2d823b3b2c39cb5e47ec6608fbd15712c | jordwalke/rehp | lwt_js_events.mli | Js_of_ocaml library
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking ... | null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/lib/lwt/lwt_js_events.mli | ocaml | * Programming mouse or keyboard events handlers using Lwt
* [make_event ev target] creates a Lwt thread that waits
for the event [ev] to happen on [target] (once).
This thread isa cancellable using [Lwt.cancel].
If you set the optional parameter [~use_capture:true],
the event will be caught during the ... | Js_of_ocaml library
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking ... |
45ce8b9d774ce01cb8fad27dc6036bedd42b9186b6cf25a8f5a0b45463615d5f | angavrilov/cl-linux-debug | package.lisp | ;;; -*- mode: Lisp; indent-tabs-mode: nil; -*-
(in-package :common-lisp-user)
(defpackage :cl-linux-debug.gui
(:use :common-lisp
:alexandria :anaphora :metabang-bind
:hu.dwim.def
:hu.dwim.defclass-star
:cl-linux-debug.code-info
:cl-linux-debug
:cl-linux-debug.field-na... | null | https://raw.githubusercontent.com/angavrilov/cl-linux-debug/879da2dcd14918bb8ffab003e934f4b01fba12ff/gui/package.lisp | lisp | -*- mode: Lisp; indent-tabs-mode: nil; -*- |
(in-package :common-lisp-user)
(defpackage :cl-linux-debug.gui
(:use :common-lisp
:alexandria :anaphora :metabang-bind
:hu.dwim.def
:hu.dwim.defclass-star
:cl-linux-debug.code-info
:cl-linux-debug
:cl-linux-debug.field-names
:cl-linux-debug.data-defs
:... |
e4a8ca81727112e394e5a92974990a08dab19d8e263be2ed65cd73d76c670d16 | Apress/beg-haskell | Main.hs | module Main where
main::IO()
main = undefined | null | https://raw.githubusercontent.com/Apress/beg-haskell/aaacbf047d553e6177c38807e662cc465409dffd/chapter1/src/Main.hs | haskell | module Main where
main::IO()
main = undefined | |
c8ff4c2031e42d30582cdf5a633dbf707a0394978d221d0b8589b24c46f90667 | stevenvar/OMicroB | solilet.ml | (*************************************************************************)
(* *)
(* OMicrob *)
(* *)
(* ... | null | https://raw.githubusercontent.com/stevenvar/OMicroB/e4324d0736ac677b3086741dfdefb0e46775642b/targets/pic32/tests/lchip/solilet/solilet.ml | ocaml | ***********************************************************************
OMicrob
... | This file is distributed under the terms of the CeCILL license .
open Pic32
let ignore x = () ;;
type peg = Out | Empty | Peg ;;
exception Found;;
let toggleGreen n =
for i = 1 to n do
digital_write PIN82 HIGH;
delay 500;
digital_write PIN82 LOW;
delay 500;
done
;;
let to... |
5e5ce63f74b92c479cf6fbff41b48a34c06ab969760f1498eed7ee4646099b67 | oxidizing/sihl | sihl_user.ml | include Sihl.Contract.User
let log_src = Logs.Src.create ("sihl.service." ^ Sihl.Contract.User.name)
module Logs = (val Logs.src_log log_src : Logs.LOG)
module Make (Repo : User_repo.Sig) : Sihl.Contract.User.Sig = struct
let find_opt = Repo.get
let find ?ctx user_id =
let%lwt m_user = find_opt ?ctx user_id... | null | https://raw.githubusercontent.com/oxidizing/sihl/d7388dee6711a4f9cf76e939301a697756b8a128/sihl-user/src/sihl_user.ml | ocaml | Re-fetch user to make sure that we have an up-to-date model | include Sihl.Contract.User
let log_src = Logs.Src.create ("sihl.service." ^ Sihl.Contract.User.name)
module Logs = (val Logs.src_log log_src : Logs.LOG)
module Make (Repo : User_repo.Sig) : Sihl.Contract.User.Sig = struct
let find_opt = Repo.get
let find ?ctx user_id =
let%lwt m_user = find_opt ?ctx user_id... |
9c387006f13e8f36b1b39e616f371e5c467eb049123bdb49d92edbd9eecd8aa1 | 3b/3bil | cl-late.lisp | (in-package #:avm2-compiler)
;; random stuff that uses LOOP
(let ((*symbol-table* *cl-symbol-table*))
(c3* (gensym)
#++
(defun member (item list #++ &key #++ key #++ test #++ test-not)
(loop for tail on list
do (when (eql item (car tail))
(return-from member tail))))
(d... | null | https://raw.githubusercontent.com/3b/3bil/c852181848bedf476373e901869ca29471f926ee/lib/cl-late.lisp | lisp | random stuff that uses LOOP
(ftrace (+ "= " a " " b))
(ftrace (s+ " === " i " . " r " / " j ". " r2))
todo: (equal false nil) => ?
(ftrace (+ "= " a " " b))
(ftrace (s+ " === " i " . " r " / " j ". " r2))
todo: (equal false nil) => ?
todo: element-type
todo: fill-pointer/adjustable stuff?
(not sure those need any... | (in-package #:avm2-compiler)
(let ((*symbol-table* *cl-symbol-table*))
(c3* (gensym)
#++
(defun member (item list #++ &key #++ key #++ test #++ test-not)
(loop for tail on list
do (when (eql item (car tail))
(return-from member tail))))
(defun equal (a b)
(%t-or-ni... |
ac83c352d38867a00a7a0fcc950ce4cef0950ee7bb8d07f39597168c0cbe6d74 | elaforge/karya | Control.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
-- | Basic calls for control tracks.
module Derive.C.Prelude.Control (library) where
import qualified Data.List.NonEmpty as NonEmpty
import qualified Data.Map as Map
import qualified Uti... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Derive/C/Prelude/Control.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Basic calls for control tracks.
misc
not sure which one I'll like better
| This is a special pattern for control tracks that lets you directly type
a number, and have that be interpreted as setting the co... | Copyright 2013
module Derive.C.Prelude.Control (library) where
import qualified Data.List.NonEmpty as NonEmpty
import qualified Data.Map as Map
import qualified Util.Doc as Doc
import qualified Util.Num as Num
import qualified Derive.Args as Args
import qualified Derive.Call as Call
import qualified Derive.Call.C... |
391b1c25091b6dd959beba979d1e93f5c4fa63482354d0b364ea825eeae6603f | Gbury/dolmen | vec.mli |
(* This file is free software, part of dolmen. See file "LICENSE" for more information *)
(** Resieable arrays
This is a minimalistic implementation of resizeable arrays. *)
* { 1 Type and array creation }
type 'a t
(** Abstract type of vectors of 'a *)
val make : int -> 'a -> 'a t
* [ make cap dummy ] creat... | null | https://raw.githubusercontent.com/Gbury/dolmen/55566c8db8a9c7636743b49a8c0bfaa061bbeb0c/src/standard/vec.mli | ocaml | This file is free software, part of dolmen. See file "LICENSE" for more information
* Resieable arrays
This is a minimalistic implementation of resizeable arrays.
* Abstract type of vectors of 'a
* Create a fresh vector.
* Fresh copy
* Size of the vector, aka number of elements in the vector.
* Is the vecto... |
* { 1 Type and array creation }
type 'a t
val make : int -> 'a -> 'a t
* [ make cap dummy ] creates a new vector filled with [ dummy ] . The vector
is initially empty but its underlying array has capacity [ cap ] .
[ dummy ] will stay alive as long as the vector
is initially empty but its underlyi... |
18b7b9103dcd4a8fd15c5ce6d4221f1bfbf1794ddf1e676a5613d4b58a2f513b | thattommyhall/offline-4clojure | p38.clj | ;; Maximum value - Easy
;; Write a function which takes a variable number of parameters and returns the maximum value.
;; tags - core-functions
;; restricted - max:max-key
(ns offline-4clojure.p38
(:use clojure.test))
(def __
;; your solution here
)
(defn -main []
(are [soln] soln
(= (__ 1 8 3 4) 8)
(= (__ 30 20)... | null | https://raw.githubusercontent.com/thattommyhall/offline-4clojure/73e32fc6687816aea3c514767cef3916176589ab/src/offline_4clojure/p38.clj | clojure | Maximum value - Easy
Write a function which takes a variable number of parameters and returns the maximum value.
tags - core-functions
restricted - max:max-key
your solution here | (ns offline-4clojure.p38
(:use clojure.test))
(def __
)
(defn -main []
(are [soln] soln
(= (__ 1 8 3 4) 8)
(= (__ 30 20) 30)
(= (__ 45 67 11) 67)
))
|
4aa55b8d03e73f00b4c9799dd0e5e9128839af03cb8ab9df453054b85334d197 | lamdu/lamdu | Definition.hs | module Lamdu.GUI.Definition
( make
, module Lamdu.GUI.Definition.Result
) where
import qualified Control.Lens as Lens
import Control.Monad.Writer (MonadWriter(..))
import Data.CurAndPrev (CurPrevTag(..), fallbackToPrev, curPrevTag)
import GUI.Momentu (Responsive)
import qualif... | null | https://raw.githubusercontent.com/lamdu/lamdu/5b15688e53ccbf7448ff11134b3e51ed082c6b6c/src/Lamdu/GUI/Definition.hs | haskell | -|) <- Glue.mkPoly ?? Glue.Vertical
-| hDescLabel (vspace |---|)
-|) <- Glue.mkGlue ?? Glue.Vertical
-| fromMaybe M.empty mPresentationEdit) <&> Responsive.fromWithTextPos
types to avoid confusing forall's: | module Lamdu.GUI.Definition
( make
, module Lamdu.GUI.Definition.Result
) where
import qualified Control.Lens as Lens
import Control.Monad.Writer (MonadWriter(..))
import Data.CurAndPrev (CurPrevTag(..), fallbackToPrev, curPrevTag)
import GUI.Momentu (Responsive)
import qualif... |
315c8d63ec6a4d8c59bd1f99656532d2fbb564ab185cabdee50a91556c97d21d | erlang/otp | dialyzer_utils.erl | -*- erlang - indent - level : 2 -*-
%%
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
distr... | null | https://raw.githubusercontent.com/erlang/otp/01723d597fb72ca087b690a15ab834d7339d53c7/lib/dialyzer/src/dialyzer_utils.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 or implied.
See the License for the specific language governing perm... | -*- erlang - indent - level : 2 -*-
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author : < >
Created : 5 Dec 2006 by >
-module(dialyzer_utils).
-export([
format_sig/1,
format_sig/2,
get_core_from_... |
6304fd625f1668bc01a08be52a0cdf563f350732217519483d7cec51e99c0eaa | gusenov/stepik-functional-programming-hs | Demo.hs | module Demo where
class Enum a where
ôóíêöèè äâèæåíèÿ ïî ïåðå÷èñëèòåëüíîìó òèïó
succ, pred :: a -> a
âñåì ïåðå÷èñëåíèÿì ìîæåò áûòü ñîïîñòàâëåí íåêîòîðûé íîìåð
toEnum :: Int -> a
fromEnum :: a -> Int
Bounded ñëóæèò ÷òîáû óêàçûâàòü íèæíþþ ãðàíèöû .
class Bounded a where
minBound, maxBound :: a
| null | https://raw.githubusercontent.com/gusenov/stepik-functional-programming-hs/904164012b9b842a15d5ba3af05cfe589295fa5c/Enum/Demo.hs | haskell | module Demo where
class Enum a where
ôóíêöèè äâèæåíèÿ ïî ïåðå÷èñëèòåëüíîìó òèïó
succ, pred :: a -> a
âñåì ïåðå÷èñëåíèÿì ìîæåò áûòü ñîïîñòàâëåí íåêîòîðûé íîìåð
toEnum :: Int -> a
fromEnum :: a -> Int
Bounded ñëóæèò ÷òîáû óêàçûâàòü íèæíþþ ãðàíèöû .
class Bounded a where
minBound, maxBound :: a
| |
8217963898f588c9cffb20dd8df564907b4b3d9b74210929ec97249832b80cf7 | sjl/advent | day-05.lisp | (advent:defpackage* :advent/2017/05)
(in-package :advent/2017/05)
(defun compute (data modification-function)
(iterate
(with maze = (fresh-vector data))
(with bound = (1- (length maze)))
(with address = 0)
(while (<= 0 address bound))
(counting t)
(for offset = (aref maze address))
(callf... | null | https://raw.githubusercontent.com/sjl/advent/dc3debda9bd1a0570a6ab06919b1af7b285413dc/src/2017/days/day-05.lisp | lisp | (advent:defpackage* :advent/2017/05)
(in-package :advent/2017/05)
(defun compute (data modification-function)
(iterate
(with maze = (fresh-vector data))
(with bound = (1- (length maze)))
(with address = 0)
(while (<= 0 address bound))
(counting t)
(for offset = (aref maze address))
(callf... | |
766d3ba7abcfaec42225140e6548d3c5fd3e512e8ca16324a06fbac4497fd6ac | habit-lang/alb | XMPEG.hs | # LANGUAGE DeriveDataTypeable , FlexibleInstances , MultiParamTypeClasses #
module Syntax.XMPEG (module Syntax.Common, module Syntax.XMPEG) where
import Data.Generics
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe
import Syntax.Common
import qualified Syntax.IMPEG as I
import qualified Utils.... | null | https://raw.githubusercontent.com/habit-lang/alb/567d4c86194a884cc1ceeffca9663211de2d554c/src/Syntax/XMPEG.hs | haskell | ------------------------------------------------------------------------------
Types
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Expressions
---------------------------------------------------------------... | # LANGUAGE DeriveDataTypeable , FlexibleInstances , MultiParamTypeClasses #
module Syntax.XMPEG (module Syntax.Common, module Syntax.XMPEG) where
import Data.Generics
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe
import Syntax.Common
import qualified Syntax.IMPEG as I
import qualified Utils.... |
937f31e4abe89bb147ed730f74c443b8dee43b853e7e08fda13fd320b5477db0 | haskell-fswatch/hfsnotify | EventTests.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ImplicitParams #
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE FlexibleContexts #
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
{-# HLINT ignore "Redundant multi-way if" #-}
module FSNotify.Test.Even... | null | https://raw.githubusercontent.com/haskell-fswatch/hfsnotify/7e0802a8e2599c15baf4df0683d1f4c7072370c1/test/FSNotify/Test/EventTests.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE MultiWayIf #
# LANGUAGE RankNTypes #
# OPTIONS_GHC -Wno-unrecognised-pragmas #
# HLINT ignore "Redundant multi-way if" #
withParallelSemaphore $
modification time, so it won't catch an unrelated file attribute change | # LANGUAGE ImplicitParams #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleContexts #
module FSNotify.Test.EventTests where
import Control.Exception.Safe (MonadThrow)
import Control.Monad
import Control.Monad.IO.Class
import Data.Monoid
import FSNotify.Test.Util
import Prelude hiding (FilePat... |
064eb18bb21e2aeb3ee27fb6877bb7cb45b93f07bd3e9ea6755cd4b9ff91111c | avh4/elm-format | MaybeF.hs | module ElmFormat.AST.PublicAST.MaybeF where
import Data.Coapplicative
data MaybeF f a
= JustF (f a)
| NothingF a
deriving (Functor)
instance Prelude.Foldable f => Prelude.Foldable (MaybeF f) where
foldMap f (JustF fa) = Prelude.foldMap f fa
foldMap f (NothingF a) = f a
instance Traversable f => ... | null | https://raw.githubusercontent.com/avh4/elm-format/57f77ee0a667869ceed3a61a0f4eeaca56a3964f/elm-format-lib/src/ElmFormat/AST/PublicAST/MaybeF.hs | haskell | module ElmFormat.AST.PublicAST.MaybeF where
import Data.Coapplicative
data MaybeF f a
= JustF (f a)
| NothingF a
deriving (Functor)
instance Prelude.Foldable f => Prelude.Foldable (MaybeF f) where
foldMap f (JustF fa) = Prelude.foldMap f fa
foldMap f (NothingF a) = f a
instance Traversable f => ... | |
dd6eff56522245fbfd5237b2a3d7d43cba16a24779d557f5b39d84fe6e553963 | jappeace/bulmex | Odd.hs | # LANGUAGE GADTs #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
-- | Odd tag helpers, these have uncommen html attributes
-- They don't fit in the 'normal' pattern of Abstract
module Reflex.Bulmex.Tag.Odd
( image
, imageClass
-- * Lin... | null | https://raw.githubusercontent.com/jappeace/bulmex/cd4571e918a4ff70568da075b79edb60d265d330/bulmex/src/Reflex/Bulmex/Tag/Odd.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| Odd tag helpers, these have uncommen html attributes
They don't fit in the 'normal' pattern of Abstract
* Link
* Space
* Prevent browser default
| kindoff hard to set an image tag in reflex
| a html tag that accepts any text into it's href val... | # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
module Reflex.Bulmex.Tag.Odd
( image
, imageClass
, ahref
, ahref'
, ahrefDyn
, textSpace
, elDynAttrPrevDef
, elDynAttrModConf
)
where
import Control.Lens ( (%~)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.