_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 |
|---|---|---|---|---|---|---|---|---|
a5d8490766040b8d82781881e214561a8d7bf00f80fdce536e3262a237d10c45 | vmchale/atspkg | Oracles.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE TypeFamilies #-}
this is in a separate module because the TypeFamilies extension apparently
-- causes previously valid code to not typecheck... ok
module Development.Shake.Cabal.Oracles ( hsOra... | null | https://raw.githubusercontent.com/vmchale/atspkg/45be7ece6b9e9b09a7151efe53ff7e278112e84d/shake-cabal/src/Development/Shake/Cabal/Oracles.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE TypeFamilies #
causes previously valid code to not typecheck... ok
@since 0.2.1.0
| Use this to track the version of cabal globally available
@since 0.2.1.0
^ Compiler version
^ Compiler version | # LANGUAGE DeriveGeneric #
this is in a separate module because the TypeFamilies extension apparently
module Development.Shake.Cabal.Oracles ( hsOracle
, cabalOracle
, CabalOracle
, HsCompiler (... |
686512e0246e1ef1ddf15d144e1778108ae6a768ce51f4818daf107554aad862 | RallySoftware/jarvis | core.clj | (ns jarvis.core
(:require [jarvis.bot :as jarvis]
[netty.ring.adapter :as netty]
[clojure.tools.logging :as log])
(:use [compojure.core :exclude [routes]]
[compojure.route])
(:gen-class ))
(defroutes routes
(GET "/metrics/healthcheck" [] {:content-type "text/html" :status 200})
... | null | https://raw.githubusercontent.com/RallySoftware/jarvis/da38da1766c9fdbf467a034c42c48898d71bd600/src/jarvis/core.clj | clojure | (ns jarvis.core
(:require [jarvis.bot :as jarvis]
[netty.ring.adapter :as netty]
[clojure.tools.logging :as log])
(:use [compojure.core :exclude [routes]]
[compojure.route])
(:gen-class ))
(defroutes routes
(GET "/metrics/healthcheck" [] {:content-type "text/html" :status 200})
... | |
53af1656fa6b57a6ecce096740f5b76cec3d1f75e32ba690449366434f060064 | mirage/irmin | irmin_bench.ml |
* Copyright ( c ) 2013 - 2022 < >
* Copyright ( c ) 2019
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE ... | null | https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin-test/irmin_bench.ml | ocaml | cli
init: create a tree with [t.depth] levels and each levels has
[t.tree_add] files + one directory going to the next levele. |
* Copyright ( c ) 2013 - 2022 < >
* Copyright ( c ) 2019
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE ... |
8a13cfee53faa73d4b75d12f736cc183031f00e84694e4e61962b060f1ca327e | lambdacube3d/lambdacube-edsl | Spheres.hs | {-# OPTIONS -cpp #-}
# LANGUAGE OverloadedStrings , , TypeOperators , DataKinds #
import Control.Applicative hiding (Const)
import Control.Monad
import qualified Data.ByteString.Char8 as SB
import qualified Data.Trie as T
import Data.Vect hiding (reflect')
import Data.Vect.Float.Instances ()
import FRP.Elerea.Param
i... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-edsl/4347bb0ed344e71c0333136cf2e162aec5941df7/lambdacube-samples/Spheres.hs | haskell | # OPTIONS -cpp # | # LANGUAGE OverloadedStrings , , TypeOperators , DataKinds #
import Control.Applicative hiding (Const)
import Control.Monad
import qualified Data.ByteString.Char8 as SB
import qualified Data.Trie as T
import Data.Vect hiding (reflect')
import Data.Vect.Float.Instances ()
import FRP.Elerea.Param
import qualified Graph... |
2b4abacea5144a86d5c7667c7f732648211697e7fc9204e23c0866b1d99b2687 | IronScheme/IronScheme | stream.scm | ;;; -*- Mode: Scheme; scheme48-package: lazy-streams -*-
;;;; Lazy Streams
This code is written by and
;;; and placed in the Public Domain. All warranties are disclaimed.
;;;
(define-syntax stream-cons
(syntax-rules ()
((STREAM-CONS a d)
(DELAY (CONS a d)))))
(define stream-nil (delay '()))
(def... | null | https://raw.githubusercontent.com/IronScheme/IronScheme/687cde5d4e463a119e4ba28296f2af42a5c4a9df/IronScheme/IronScheme.Console/lib/wak/riastreams/private/stream.scm | scheme | -*- Mode: Scheme; scheme48-package: lazy-streams -*-
Lazy Streams
and placed in the Public Domain. All warranties are disclaimed.
** Be careful! This operation is potentially dangerous.
foof-loop iterator
Outer bindings
Loop variables
Entry bindings
Termination conditions
Body bindings
Final bindings
Optional s... |
This code is written by and
(define-syntax stream-cons
(syntax-rules ()
((STREAM-CONS a d)
(DELAY (CONS a d)))))
(define stream-nil (delay '()))
(define-syntax define-stream-unop
(syntax-rules ()
((DEFINE-STREAM-UNOP stream-op op)
(DEFINE (stream-op STREAM) (op (FORCE STREAM))))))
(de... |
d5b311c841327ef6e3dbc292eb63eae76c757595456529023e25e09d2abfdd90 | RichiH/git-annex | Chunk.hs | Chunk logs .
-
- An object can be stored in chunked for on a remote ; these logs keep
- track of the chunk size used , and the number of chunks .
-
- It 's possible for a single object to be stored multiple times on the
- same remote using different chunk sizes . So , while this is a MapLog , it
... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Logs/Chunk.hs | haskell | Chunk logs .
-
- An object can be stored in chunked for on a remote ; these logs keep
- track of the chunk size used , and the number of chunks .
-
- It 's possible for a single object to be stored multiple times on the
- same remote using different chunk sizes . So , while this is a MapLog , it
... | |
9ee0a052d239e3c3be3ee34997e887bb54053c5f8b8cc41fc1f928e82635f2e0 | janestreet/universe | incremental.mli | include Incremental_intf.Incremental
| null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/incremental/src/incremental.mli | ocaml | include Incremental_intf.Incremental
| |
57658253a2f7e71357335afacc14d90a0010834448ca3407e15a713b39cbbbfb | nibbula/yew | locate.lisp | ;;;
locate.lisp - locate files
;;;
(defpackage :locate
(:documentation "Try to somehow locate files.")
(:use :cl :dlib :dlib-misc :dtime :ppcre #| :trie |#)
(:export
#:locate
#:!locate
))
(in-package :locate)
(declaim #.`(optimize ,.(getf los-config::*config* :optimization-settings)))
( declaim ( o... | null | https://raw.githubusercontent.com/nibbula/yew/a62473dae637fb33a92aa75f260bf77b34cdbcfd/los/locate.lisp | lisp |
:trie
(entries #() :type vector)
@@@ maybe we don't need to save the type?
(defstruct file
(type nil :type (or (member :file :directory) null))
(name "" :type string))
Typical of unix shit, don't complain about unknown variables.
(warn "Unknown mlocate variable name ~s" var-name)
:collect (make-file :typ... | locate.lisp - locate files
(defpackage :locate
(:documentation "Try to somehow locate files.")
(:export
#:locate
#:!locate
))
(in-package :locate)
(declaim #.`(optimize ,.(getf los-config::*config* :optimization-settings)))
( declaim ( optimize ( speed 0 ) ( safety 3 ) ( debug 3 ) ( space 0 ) ) )
(... |
75b06a45a5fdd2e4aa79aadf221a998c7d29e6685124a2e143f08dbd00b33ed1 | micahasmith/crypto-watch | gdax_new_products_monitor_test.clj | (ns crypto.systems.gdax-new-products-monitor-test
(:require [clojure.test :refer :all]
[crypto.infra.helpers :refer :all]
[crypto.systems.gdax-new-products-monitor :p]
[clojure.core.async :as a]
[crypto.data.gdax-redis :as gdax-redis]))
(deftest run!-tests
(testing... | null | https://raw.githubusercontent.com/micahasmith/crypto-watch/265d03148a018e422513a6daee67cf6e58ac12bf/crypto/test/crypto/systems/gdax_new_products_monitor_test.clj | clojure | (ns crypto.systems.gdax-new-products-monitor-test
(:require [clojure.test :refer :all]
[crypto.infra.helpers :refer :all]
[crypto.systems.gdax-new-products-monitor :p]
[clojure.core.async :as a]
[crypto.data.gdax-redis :as gdax-redis]))
(deftest run!-tests
(testing... | |
f06354c3cd1db0fa62ce7697f8cdf0a18b5c0fe0230353afe9f8b07992177e9e | remodoy/clj-postgresql | project.clj | (defproject clj-postgresql "0.7.0"
:description "PostgreSQL helpers for Clojure projects"
:url "-postgresql"
:license {:name "Two clause BSD license"
:url "-postgresql/README.md"}
:dependencies [[org.clojure/clojure "1.10.0"]
[org.postgresql/postgresql "42.2.5"]
[ne... | null | https://raw.githubusercontent.com/remodoy/clj-postgresql/38eec16386e43504addcae4601fa36f595c81f1a/project.clj | clojure | (defproject clj-postgresql "0.7.0"
:description "PostgreSQL helpers for Clojure projects"
:url "-postgresql"
:license {:name "Two clause BSD license"
:url "-postgresql/README.md"}
:dependencies [[org.clojure/clojure "1.10.0"]
[org.postgresql/postgresql "42.2.5"]
[ne... | |
abc99ec4b15cf190211fa54f001a55c38284e8b525aebe56e8ffb3c31e93fc38 | iu-parfunc/lvars | CancelTests.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module CancelTests (tests, runTests)
where
import Control.LVish (isDet, runParDetailed, runParNonDet)
import Control.LVish... | null | https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/par-transformers/tests/CancelTests.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE RankNTypes #
------------------------------------------------------------------------------
Helpers:
new logs are just consed, reverse before use
FIXME: Logging has some problems:
- It depends on env variable DEBUG.
- However, wh... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module CancelTests (tests, runTests)
where
import Control.LVish (isDet, runParDetailed, runParNonDet)
import Control.LVish (DbgCfg (..))
import Control.LVish.CancelT
import Control.LVish.Internal
import Control.Par.Class
i... |
927e8557271f6006811dc2ddf3b4a99f33c07f21e67becbe87cb38b09a804721 | bnomis/om-next-datascript-localisation-demo | app.cljs | (ns om-next-datascript-localisation-demo.utils.app
(:require
[om.next :as om]))
(defn set-app-locale
[comp id]
(om/transact! comp `[(app.locale/set {:db/id ~id}) :app.locale]))
| null | https://raw.githubusercontent.com/bnomis/om-next-datascript-localisation-demo/be9a77e0a040896533f79f86cdbd115c19ab3c9f/src/om_next_datascript_localisation_demo/utils/app.cljs | clojure | (ns om-next-datascript-localisation-demo.utils.app
(:require
[om.next :as om]))
(defn set-app-locale
[comp id]
(om/transact! comp `[(app.locale/set {:db/id ~id}) :app.locale]))
| |
cc5c5ec5818211c5ef721d46260fc4f44d4191e4066ab6316c2d62256efd48b4 | tpapp/latex-table | examples.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Coding : utf-8 -*-
(in-package #:common-lisp-user)
(in-package #:lxt)
(table `((,(multicolumn :center "name" 2) will-be-ignored)
(1 2)
(3 4))
:rules '((0 . :top)
(1 . :middle)
(-1 . :bottom)))
(table `((,pi 3... | null | https://raw.githubusercontent.com/tpapp/latex-table/bd2d193a2d366ff7b2cc819f585a598edd321176/examples.lisp | lisp | Syntax : ANSI - Common - Lisp ; Coding : utf-8 -*- |
(in-package #:common-lisp-user)
(in-package #:lxt)
(table `((,(multicolumn :center "name" 2) will-be-ignored)
(1 2)
(3 4))
:rules '((0 . :top)
(1 . :middle)
(-1 . :bottom)))
(table `((,pi 3)
(110.7 ,(align :right 'symbol))
("text" 99.1))
... |
a61b0739951e5b376287a3edbbf8a17d90d59d7c10857afc8171fc2151ce497b | realworldocaml/book | int_repr.ml | module type T = sig
type t [@@deriving compare, equal, hash, quickcheck, sexp, typerep]
val signed : bool
val num_bits : int
val num_bytes : int
val zero : t
val min_value : t
val max_value : t
include Ppx_hash_lib.Hashable.S with type t := t
include Base.Comparisons.S with type t := t
module O :... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/int_repr/src/int_repr.ml | ocaml | "Base" conversions.
Same-signedness conversions.
Same-width conversions.
Miscellaneous
"Base" conversions.
Same-signedness conversions.
Same-width conversions.
Miscellaneous
"Base" conversions.
Same-signedness conversions.
Same-width conversions.
Miscellaneous
"Base" conversions.
Same-signedn... | module type T = sig
type t [@@deriving compare, equal, hash, quickcheck, sexp, typerep]
val signed : bool
val num_bits : int
val num_bytes : int
val zero : t
val min_value : t
val max_value : t
include Ppx_hash_lib.Hashable.S with type t := t
include Base.Comparisons.S with type t := t
module O :... |
80eba52367efd8b29308cda4eb37fd07d5944c496027bee5e1e5e693d5bd4988 | dongcarl/guix | cybersecurity.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2020 < >
Copyright © 2020 , 2021 < >
Copyright © 2021 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/cybersecurity.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2020 < >
Copyright © 2020 , 2021 < >
Copyright © 2021 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages cybersecurity)
#:use-mo... |
7598063275e10c4cd4b92b7ff93e4d56b1dafa89f90ed9e44e2d9f448d33b74e | input-output-hk/cardano-ledger | UTXOWS.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
-- | Transition system that models the ap... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/eras/byron/ledger/executable-spec/src/Byron/Spec/Ledger/STS/UTXOWS.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE StrictData #
| Transition system that models the application of multiple transactions to | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
the part of the ledger state .
module Byron.Spec.Ledger.STS.UTXOWS where
import Byron.Spec.Ledger.STS.UTXO (UTxOEnv, UTxOState)
impor... |
81453a2b1426fac051a1615f54775c51e6a83c517c22b14eb690795d89a9a681 | sadiqj/ocaml-esp32 | ctype.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/typing/ctype.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Operations on core types
open Asttypes
open Types
exception Unify of (type_expr * type_expr) list
exc... |
0df3c8857d6090fc4a91fbe9087e02a0feb5c355d398cc8e3d5ac88a3d0ef74e | thizanne/cormoran | error.ml | (*
open Batteries doesn't work with [@@deriving show]
see -batteries-team/batteries-included/issues/597
*)
open Printf
type error =
| LexingError
| SyntaxError
| TypeError
| NameError
| NotImplementedError
[@@deriving show]
type t = {
error : error;
err_loc : Location.t;
err_msg : string;
}
ex... | null | https://raw.githubusercontent.com/thizanne/cormoran/46d13330ebd1c8224a0603fd473d8e6bed48bf53/src/error.ml | ocaml |
open Batteries doesn't work with [@@deriving show]
see -batteries-team/batteries-included/issues/597
|
open Printf
type error =
| LexingError
| SyntaxError
| TypeError
| NameError
| NotImplementedError
[@@deriving show]
type t = {
error : error;
err_loc : Location.t;
err_msg : string;
}
exception Error of t
let on_loc_error error err_loc err_msg =
raise @@ Error {error; err_loc; err_msg}
le... |
b0809df5aebaed8783ae4c0b8d763ec38b1f594d90acb179a4960121c9b81807 | silkapp/rest | Post.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE
DeriveDataTypeable
, DeriveGeneric
#
DeriveDataTypeable
, DeriveGeneric
#-}
module Type.Post where
import Data.Aeson
import Data.JSON.Schema
import Data.Text (Text)
import Data.Time (UTCTime)
import Data.Typeable
import GHC.Generics
import Generics... | null | https://raw.githubusercontent.com/silkapp/rest/f0462fc36709407f236f57064d8e37c77bdf8a79/rest-example/example-api/Type/Post.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE
DeriveDataTypeable
, DeriveGeneric
#
DeriveDataTypeable
, DeriveGeneric
#-}
module Type.Post where
import Data.Aeson
import Data.JSON.Schema
import Data.Text (Text)
import Data.Time (UTCTime)
import Data.Typeable
import GHC.Generics
import Generics... | |
3d1a17936054db64f8311486669ec7d00a4e3f52c832546e9f291fb7f3052042 | matthewlisp/clj-api-template | core.clj | (ns app.core
(:require [ring.adapter.jetty :refer [run-jetty]]
[clojure.pprint :refer [pprint]]
[compojure.core :refer [routes GET POST]]
[compojure.route :refer [not-found]]
[ring.middleware.json :refer [wrap-json-response wrap-json-body]]
... | null | https://raw.githubusercontent.com/matthewlisp/clj-api-template/bcc0c503e220c0b2637af626896f8f05365093d1/src/app/core.clj | clojure | routes function: Create a Ring handler by combining several handlers into one.
Wrap middlewares to the my-routes handler
run-jetty is a ring adapter, used to convert ring handlers into running web servers. | (ns app.core
(:require [ring.adapter.jetty :refer [run-jetty]]
[clojure.pprint :refer [pprint]]
[compojure.core :refer [routes GET POST]]
[compojure.route :refer [not-found]]
[ring.middleware.json :refer [wrap-json-response wrap-json-body]]
... |
0ebbee8319612952cdbe5d5aed677b39d6f89530745e106a5776ec315fc4cdd8 | wertercatt/mrifk | Mrifk_storyfile.hs |
Mrifk , a decompiler for Glulx story files .
Copyright 2004 .
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any late... | null | https://raw.githubusercontent.com/wertercatt/mrifk/48687e5b6881cf41d4828cca2ec5dec1c5f4cad3/Mrifk_storyfile.hs | haskell | ---------
"Info"
-----------
--------
should probably bounds-check
definitely bounds-check
|
Mrifk , a decompiler for Glulx story files .
Copyright 2004 .
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any late... |
71e1d94fdb2ef295707fe5bf6f50b2b2c526d58aac4ee6328cd09e4867455f84 | blamario/grampa | Doctest.hs | import Build_doctests (flags, pkgs, module_sources)
import Test.DocTest (doctest)
main :: IO ()
main = do
doctest (flags ++ pkgs ++ module_sources)
doctest (flags ++ pkgs ++ ["-pgmL", "markdown-unlit", "-isrc", "test/README.lhs"])
doctest (flags ++ pkgs ++ ["-isrc", "test/RepMin.hs", "test/RepMinAuto.hs"])... | null | https://raw.githubusercontent.com/blamario/grampa/8a5e70123b7cf8bbefb4ac75fefa7d7e053267cb/deep-transformations/test/Doctest.hs | haskell | import Build_doctests (flags, pkgs, module_sources)
import Test.DocTest (doctest)
main :: IO ()
main = do
doctest (flags ++ pkgs ++ module_sources)
doctest (flags ++ pkgs ++ ["-pgmL", "markdown-unlit", "-isrc", "test/README.lhs"])
doctest (flags ++ pkgs ++ ["-isrc", "test/RepMin.hs", "test/RepMinAuto.hs"])... | |
768c42316c332825985bf62cfe17da85693e0eff69177caf85d2d00f17207ac2 | jonludlam/js_top_worker | rpcmarshal.ml | (* Basic type definitions *)
open Rpc.Types
type err = [ `Msg of string ]
let tailrec_map f l = List.rev_map f l |> List.rev
let ( >>| ) x f = match x with Ok x -> Ok (f x) | Error y -> Error y
let ( >>= ) x f = match x with Ok x -> f x | Error y -> Error y
let return x = Ok x
let ok x = Ok x
let rec unmarshal : typ... | null | https://raw.githubusercontent.com/jonludlam/js_top_worker/efe16a688e1609c2687bf36402edf266bda48afd/idl/rpcmarshal.ml | ocaml | Basic type definitions | open Rpc.Types
type err = [ `Msg of string ]
let tailrec_map f l = List.rev_map f l |> List.rev
let ( >>| ) x f = match x with Ok x -> Ok (f x) | Error y -> Error y
let ( >>= ) x f = match x with Ok x -> f x | Error y -> Error y
let return x = Ok x
let ok x = Ok x
let rec unmarshal : type a. a typ -> Rpc.t -> (a, er... |
5b06bc598a98196dc9c3748486aeaf7392844fd72bfd34e5576b23958280d43d | RefactoringTools/wrangler | def2.erl | @private
-module(def2).
-export([bar/1]).
bar(N) when N > 0 -> N + bar(N-1);
bar(0) -> 0.
| null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/symbolic_evaluation/tests/definitions/def2.erl | erlang | @private
-module(def2).
-export([bar/1]).
bar(N) when N > 0 -> N + bar(N-1);
bar(0) -> 0.
| |
82858f38b7b406ff217b0b14864a4651c1898d6ae6c74d4e2ad7c9df9277e92a | CardanoSolutions/ogmios | Query.hs | 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 /.
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE PatternSynonyms #
# LANGUAGE QuasiQuotes #
# LANGUAGE TypeApplications #
module Ogmios.Data.Jso... | null | https://raw.githubusercontent.com/CardanoSolutions/ogmios/d326d8839d50ff628f7be1b5552f7cd22b2f094e/server/src/Ogmios/Data/Json/Query.hs | haskell | * Types
** AdHocQuery
** Eras
** Types in queries
* Encoders
* Decoders
Types
^ Query definition, bound to a result
^ Yield results in some applicative 'f' from some type definition.
Useful when `f ~ Gen` for testing.
^ Query definition, bound to a result
^ Yield results in some applicative 'f' from some ... | 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 /.
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE PatternSynonyms #
# LANGUAGE QuasiQuotes #
# LANGUAGE TypeApplications #
module Ogmios.Data.Jso... |
7356e92d5679f0b82683b861cc7f26d37141addf2d188669965dc79418fbbe58 | ucsd-progsys/liquidhaskell | Main.hs |
From Sat Jan 11 11:56:04 1992
From : ( )
Newsgroups : comp.lang.functional
Subject : Re : some kindof benchmark
Keywords : n
Date : 10 Jan 92 21:59:05 GMT
Organization : Chalmers University of Technology
> My system ( running on a Sun - SPARC SLC )
> does it in 93 seconds and uses about
> ... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/benchmarks/nofib/imaginary/exp3_8/Main.hs | haskell | --------------------------------------------------------
was:Text
@ LIQUID "--totality" @
partain:sig
Sorry, but I havn't recompiled the compiler for any other
platforms yet.
-- Sun 4/20(SLC ): 9.8s ( 412k ) ----
Joern von Holten
Lennart Augustsson
-- Sun 4/20(SLC): 9.8s (412k) ----
Joern v... |
From Sat Jan 11 11:56:04 1992
From : ( )
Newsgroups : comp.lang.functional
Subject : Re : some kindof benchmark
Keywords : n
Date : 10 Jan 92 21:59:05 GMT
Organization : Chalmers University of Technology
> My system ( running on a Sun - SPARC SLC )
> does it in 93 seconds and uses about
> ... |
0ead1a681a450d1268b4348c33330ba1adba025a595673dd8365e5866805dc7e | Javran/advent-of-code | Day2.hs | module Javran.AdventOfCode.Y2020.Day2 (
) where
import Control.Monad
import Javran.AdventOfCode.Prelude
import Text.ParserCombinators.ReadP
data Day2 deriving (Generic)
instance Solution Day2 where
solutionRun _ SolutionContext {getInputS, answerShow} = do
rawLines <- lines <$> getInputS
answerShow . cou... | null | https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2020/Day2.hs | haskell | module Javran.AdventOfCode.Y2020.Day2 (
) where
import Control.Monad
import Javran.AdventOfCode.Prelude
import Text.ParserCombinators.ReadP
data Day2 deriving (Generic)
instance Solution Day2 where
solutionRun _ SolutionContext {getInputS, answerShow} = do
rawLines <- lines <$> getInputS
answerShow . cou... | |
118725b986c9c7378c6f986f5cb7c4fb276bbd49e299d068b02eb885e205625c | lispnik/iup | utils.lisp | (defpackage #:iup-utils
(:use #:common-lisp)
(:export #:platform))
(in-package #:iup-utils)
(defun platform ()
"Mapping from trivial-features -provided features to classesdb platform keywords."
#+windows :windows
#+linux :linux
#+(and unix (not linux)) :unix)
| null | https://raw.githubusercontent.com/lispnik/iup/f8e5f090bae47bf8f91ac6fed41ec3bc01061186/utils/utils.lisp | lisp | (defpackage #:iup-utils
(:use #:common-lisp)
(:export #:platform))
(in-package #:iup-utils)
(defun platform ()
"Mapping from trivial-features -provided features to classesdb platform keywords."
#+windows :windows
#+linux :linux
#+(and unix (not linux)) :unix)
| |
4b64d4a3be946de760c79a75b12546dd7fae4a11b7f619776dfb584a5965b0c7 | casperschipper/ocaml-cisp | cisp7.ml | open Cisp
open Midi
open Seq
(* this maps midi input msg to an output msg (raw midi) *)
let midiInputTestFun input =
(* this translates input into boolean trigger *)
let secs s = s * 44100 in
let inputTrigger =
map
(fun midiMsg ->
match midiMsg with NoteOn (_, _, _) -> true | _ -> false)
... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/954e4b71dca0d0af0786395d727b7a7cde5568a7/examples/cisp_backup/fish/cisp7.ml | ocaml | this maps midi input msg to an output msg (raw midi)
this translates input into boolean trigger
a metre boolean mask that triggers notes or rests in the pattern
dummy event
apply metre to default event, use Silence as filler
the sq state var
Slightly troublesome, this looks like a pure function (a -> b) bu... | open Cisp
open Midi
open Seq
let midiInputTestFun input =
let secs s = s * 44100 in
let inputTrigger =
map
(fun midiMsg ->
match midiMsg with NoteOn (_, _, _) -> true | _ -> false)
input
in
let pitchPattern =
boundedWalk 40
(transpose ([st 2; ch [|2; 2; 2; 2; 2; 1|]; st 14] |>... |
cd2ba3cc1223d3af7b9b6c871849b92584944ddba5d4b79ba7777261353a5dab | dwayne/eopl3 | parser.test.rkt | #lang racket
(require "./parser.rkt")
(require rackunit)
(check-equal?
(parse "1")
(a-program (const-exp 1)))
(check-equal?
(parse "x")
(a-program (var-exp 'x)))
(check-equal?
(parse "-(5, y)")
(a-program (diff-exp (const-exp 5) (var-exp 'y))))
(check-equal?
(parse "zero?(z)")
(a-program (zero?-exp (var-e... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/05-ch5/interpreters/racket/CONTINUATION-PASSING-5.8/parser.test.rkt | racket | Multiargument procedure tests | #lang racket
(require "./parser.rkt")
(require rackunit)
(check-equal?
(parse "1")
(a-program (const-exp 1)))
(check-equal?
(parse "x")
(a-program (var-exp 'x)))
(check-equal?
(parse "-(5, y)")
(a-program (diff-exp (const-exp 5) (var-exp 'y))))
(check-equal?
(parse "zero?(z)")
(a-program (zero?-exp (var-e... |
0fe91f250e641023617dbe1199456e6c5fd7f38cdd19e30feeac4fa46f9f0360 | goldfirere/units | MonoTypes.hs | # LANGUAGE TypeFamilies , TypeOperators #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Metrology.SI.MonoTypes
Copyright : ( C ) 2013
-- License : BSD-style (see LICENSE)
Maintainer : ( )
-- Stability : experimental
-- Portability : ... | null | https://raw.githubusercontent.com/goldfirere/units/4941c3b4325783ad3c5b6486231f395279d8511e/units-defs/Data/Metrology/SI/MonoTypes.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Metrology.SI.MonoTypes
License : BSD-style (see LICENSE)
Stability : experimental
Portability : non-portable
internal representation. This module /does not/ export instances of
'DefaultUnitOfDim'. Use 'Dat... | # LANGUAGE TypeFamilies , TypeOperators #
Copyright : ( C ) 2013
Maintainer : ( )
This module defines type synonyms for SI units , using a Double as the
module Data.Metrology.SI.MonoTypes where
import Data.Metrology
import qualified Data.Dimensions.SI as D
type Length = MkQu_D D.Len... |
03716edfcf4bf9f0f1ef5f5ca573a2a6d395aad5d332541bd30bc068674d07d8 | fluree/db | policy_validate.cljc | (ns fluree.db.json-ld.policy-validate
(:require [fluree.db.dbproto :as dbproto]
[fluree.db.util.async :refer [<? go-try]]
[clojure.core.async :as async]
[fluree.db.query.range :as query-range]
[fluree.db.flake :as flake]
[fluree.db.constants :as const]
... | null | https://raw.githubusercontent.com/fluree/db/dd238e8b2c5f9bd3199e5761a7f3dbade9661709/src/fluree/db/json_ld/policy_validate.cljc | clojure | remove :f/$identity - following logic will "substitute" the user's actual identity in its place
because same 'path' is likely used in many flake evaluations, keep a local cache of results so expensive lookup only happens once per query/transaction. | (ns fluree.db.json-ld.policy-validate
(:require [fluree.db.dbproto :as dbproto]
[fluree.db.util.async :refer [<? go-try]]
[clojure.core.async :as async]
[fluree.db.query.range :as query-range]
[fluree.db.flake :as flake]
[fluree.db.constants :as const]
... |
969e7ecb4a157a30f972f591b3b0c9c23a24f0c0b880454bd37060fff8269907 | theodormoroianu/SecondYearCourses | lab13-sol_20210115191101.hs |
import Data.Char
import Data.List
prelStr strin = map toUpper strin
ioString = do
strin <- getLine
putStrLn $ "Intrare\n" ++ strin
let strout = prelStr strin
putStrLn $ "Iesire\n" ++ strout
prelNo noin = sqrt noin
ioNumber = do
noin <- readLn :: IO Double
... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab13/lab13-sol_20210115191101.hs | haskell |
import Data.Char
import Data.List
prelStr strin = map toUpper strin
ioString = do
strin <- getLine
putStrLn $ "Intrare\n" ++ strin
let strout = prelStr strin
putStrLn $ "Iesire\n" ++ strout
prelNo noin = sqrt noin
ioNumber = do
noin <- readLn :: IO Double
... | |
c78daad29c93bd3efa6968f4ede9691f41769a5a923997a97a151591d29b2eb6 | EFanZh/EOPL-Exercises | exercise-4.23-test.rkt | #lang racket
(require rackunit)
(require "../solutions/exercise-4.x-statement-oriented-implicit-refs-lang.rkt")
(define (get-output string input)
(with-input-from-string input
(λ ()
(with-output-to-string
(λ ()
(run string))))))
(check-equal? (get-output "var x, y;
... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-4.23-test.rkt | racket | #lang racket
(require rackunit)
(require "../solutions/exercise-4.x-statement-oriented-implicit-refs-lang.rkt")
(define (get-output string input)
(with-input-from-string input
(λ ()
(with-output-to-string
(λ ()
(run string))))))
{
... | |
c9c59c7c59ce56b143762f2efb873d01f2b807615024e61f6a909c80a6ed0da0 | dtgoitia/civil-autolisp | _CustomShortcuts.lsp | UNDEFINE
;(command
; "_.undefine" "intersect"
; "_.undefine" "interfere"
; "_.undefine" "redraw"
; "_.undefine" "redrawall"
; "_.undefine" "fill"
; "_.undefine" "filletedge"
; "_.undefine" "surffillet"
; "_.undefine" "donut"
; "_.undefine" "donutid"
" _ .undefine " " donutod "
; "_.undefine" "targetpoint... | null | https://raw.githubusercontent.com/dtgoitia/civil-autolisp/72d68139d372c84014d160f8e4918f062356349f/_CustomShortcuts.lsp | lisp | (command
"_.undefine" "intersect"
"_.undefine" "interfere"
"_.undefine" "redraw"
"_.undefine" "redrawall"
"_.undefine" "fill"
"_.undefine" "filletedge"
"_.undefine" "surffillet"
"_.undefine" "donut"
"_.undefine" "donutid"
"_.undefine" "targetpoint"
)
Fast copy
END if
END if
v0.1 - 2017.06.01 - Pre... | UNDEFINE
" _ .undefine " " donutod "
(defun c:iso() (command "_.isolateobjects")(princ))
(defun c:iso() (command "_.isolateobjects")(princ))
(defun c:uiso() (command "_.unisolateobjects")(princ))
(defun c:c ( / ent_name )
(if (ssget "_I")
(command "_.copy" "_non" (cadr (grread 't)) "_non" pause)
(if (set... |
7f962e9f9437b391fe786ee9049490f282006f7be78e75b6142aea9dfb0d743a | cohesic/cohesic-xtdb | xtdb_test.clj | (ns com.cohesic.xtdb-test
(:require
[clojure.test :refer [deftest testing is]]
[com.cohesic.xtdb :as sut]
[xtdb.api :as xt])
(:import
java.util.Date
java.util.UUID))
(deftest history-item->put
(let [start-valid-time (Date.)
history-item #::xt{:tx-time #inst "2022-08-11T22:39:28.003-00:00"
... | null | https://raw.githubusercontent.com/cohesic/cohesic-xtdb/5b66004d896cdc29a2fc334045c93f6411c0fb80/test/com/cohesic/xtdb_test.clj | clojure | note history has to be in descending order
note history has to be in descending order
note history has to be in descending order | (ns com.cohesic.xtdb-test
(:require
[clojure.test :refer [deftest testing is]]
[com.cohesic.xtdb :as sut]
[xtdb.api :as xt])
(:import
java.util.Date
java.util.UUID))
(deftest history-item->put
(let [start-valid-time (Date.)
history-item #::xt{:tx-time #inst "2022-08-11T22:39:28.003-00:00"
... |
3a674fa2dc085285eff6967d5b7f81d6ab7ceaf1819698e8e7a8d6efa8056e40 | locusmath/locus | field_matrix.clj | (ns locus.matrix.field.field-matrix
(:refer-clojure :exclude [+ * - /])
(:require [locus.set.logic.core.set :refer :all :exclude [add]]
[locus.algebra.group.core.object :refer :all]
[locus.algebra.semigroup.monoid.object :refer :all]
[locus.additive.base.core.protocols :refer :al... | null | https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/matrix/field/field_matrix.clj | clojure | Field matrices are primarily provided by the apache commons math library. In order to make
interoperability with the apache commons math field matrices more accessible, we
present a selection of methods which will create a common framework for interoperability
Print methods
Create real and complex matrices through... | (ns locus.matrix.field.field-matrix
(:refer-clojure :exclude [+ * - /])
(:require [locus.set.logic.core.set :refer :all :exclude [add]]
[locus.algebra.group.core.object :refer :all]
[locus.algebra.semigroup.monoid.object :refer :all]
[locus.additive.base.core.protocols :refer :al... |
317ccd6450bbebbbb0a54f6aa9293c913b0190f2c41369a534a59ba6a40be6a0 | aeternity/aeternity | aestratum_deploy.erl | -module(aestratum_deploy).
%% If there is a need to redeploy the payment contract in the future.
-include_lib("aecontract/include/aecontract.hrl").
-export([deploy_payout_contract/1]).
TX creating the contract for mainnet :
deploy_payout_contract(#{public := PubKey, secret := PrivKey}) ->
{_TopHeight, Protoc... | null | https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/apps/aestratum/src/aestratum_deploy.erl | erlang | If there is a need to redeploy the payment contract in the future.
result of: aeso_compiler:from_string(ContractSourceCode, []) | -module(aestratum_deploy).
-include_lib("aecontract/include/aecontract.hrl").
-export([deploy_payout_contract/1]).
TX creating the contract for mainnet :
deploy_payout_contract(#{public := PubKey, secret := PrivKey}) ->
{_TopHeight, Protocol} = aestratum:get_onchain_env(),
DefaultGasPrice = max(aec_gove... |
32850224b3d653c096c32ff4ad692d6f2a17ed8863d79597e3e5fab13dbcbdfb | uxbox/uxbox-backend | quartz.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
Copyright ( c ) 2016 < >
(ns uxbox.util.quartz
"A lightweight abstraction layer for quartz job scheduling library."
(:import java.u... | null | https://raw.githubusercontent.com/uxbox/uxbox-backend/036c42db8424be3ac34c38be80577ee279141681/src/uxbox/util/quartz.clj | clojure |
--- Implementation
--- Public Api
Start the scheduler
TODO: add proper handling of `:delay` option that should allow | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2016 < >
(ns uxbox.util.quartz
"A lightweight abstraction layer for quartz job scheduling library."
(:import java.util... |
e68ac1626a1bba49b6f0e59736a44123bd5745d8b4dcb8b1f631dee768966d6d | broadinstitute/firecloud-ui | collapse.cljs | (ns broadfcui.components.collapse
(:require
[dmohs.react :as react]
[broadfcui.common.icons :as icons]
[broadfcui.utils :as utils]
))
(react/defc Collapse
{:get-initial-state
(fn [{:keys [props]}]
{:visible? (not (:default-hidden? props))})
:render
(fn [{:keys [props state]}]
(let [{... | null | https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/components/collapse.cljs | clojure | (ns broadfcui.components.collapse
(:require
[dmohs.react :as react]
[broadfcui.common.icons :as icons]
[broadfcui.utils :as utils]
))
(react/defc Collapse
{:get-initial-state
(fn [{:keys [props]}]
{:visible? (not (:default-hidden? props))})
:render
(fn [{:keys [props state]}]
(let [{... | |
ec947627d669c7a7becc682760f75489d20836212d93a5b6e909f21536ebbf59 | tidalcycles/tidal-midi | Output.hs | # OPTIONS_HADDOCK not - home #
{-|
A bridge between evaluated Tidal patterns and MIDI events.
This module contains functions necessary to mediate between
'Sound.Tidal.Time.Event's generated from a Tidal 'Sound.Tidal.Pattern.Pattern'
and plain MIDI events sent through 'Sound.PortMidi.PMStream'.
-}
module Sound.Tidal.MI... | null | https://raw.githubusercontent.com/tidalcycles/tidal-midi/0f806c31daee46bb54053dc3407349001a0e00b8/Sound/Tidal/MIDI/Output.hs | haskell | |
A bridge between evaluated Tidal patterns and MIDI events.
This module contains functions necessary to mediate between
'Sound.Tidal.Time.Event's generated from a Tidal 'Sound.Tidal.Pattern.Pattern'
and plain MIDI events sent through 'Sound.PortMidi.PMStream'.
* Types
* Initialization
* Scheduling
* Converters
... | # OPTIONS_HADDOCK not - home #
module Sound.Tidal.MIDI.Output (
Output(..),
OutputState,
MidiDeviceMap,
TimedNote,
makeConnection,
flushBackend,
sendevents,
store,
mkStore,
storeParams,
scheduleTime,
toMidiValue,
cutShape,
stripDefaults,
changeState,
readState,
useOutput,
displayOutp... |
14e65f08766aae8733ae1d837108b6fe6ec39cdbc2ee901eb96e751a1da68c38 | dpiponi/Moodler | supersaw.hs | do
(x0, y0) <- mouse
let (x, y) = quantise2 quantum (x0, y0)
root <- currentPlane
accumulate80 <- new' "accumulate8"
accumulate81298 <- new' "accumulate8"
audio_id1315 <- new' "audio_id"
audio_saw10 <- new' "audio_saw"
audio_saw11 <- new' "audio_saw"
audio_saw12 <- new' "... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/supersaw.hs | haskell | do
(x0, y0) <- mouse
let (x, y) = quantise2 quantum (x0, y0)
root <- currentPlane
accumulate80 <- new' "accumulate8"
accumulate81298 <- new' "accumulate8"
audio_id1315 <- new' "audio_id"
audio_saw10 <- new' "audio_saw"
audio_saw11 <- new' "audio_saw"
audio_saw12 <- new' "... | |
e004bd4b69ec12460df74e082d358f21186709287060dd26a78d090abd9bf781 | nsg-ethz/O4 | parser.rkt | #lang racket/base
Parser Backend
; ---------------------------------------
(provide parser-declaration
parser-body
parser-states
parser-transitions
parser-state
parser-block-statement
parser-transition
transition-source
simple-transition-expressi... | null | https://raw.githubusercontent.com/nsg-ethz/O4/870f6f78a6f7bb1e9e1502e29ff0048e5e1723c5/o4/backend/parser.rkt | racket | ---------------------------------------
Implementation
---------------------------------------
After compiling the parser block, we combine the parser states with its corresponding transitions.
Transition sources have to be a subset of parser states
-
We use a hash to keep track of the already seen parser states... | #lang racket/base
Parser Backend
(provide parser-declaration
parser-body
parser-states
parser-transitions
parser-state
parser-block-statement
parser-transition
transition-source
simple-transition-expression
select-transition-expression
... |
b861ee5336f7a057c7a29f5354845eb32084f237f8f3504a9ebc284b2ba38285 | c-cube/ocaml-containers | t_lazylist.ml | module Test = (val Containers_testlib.make ~__FILE__ ())
open Test
open CCLazy_list;;
q Q.(list int) (fun l -> length (of_list l) = List.length l);;
eq [ 2; 4; 6 ]
(of_list [ 1; 2; 3; 4; 5; 6; 7 ]
|> filter ~f:(fun x -> x mod 2 = 0)
|> to_list)
;;
eq [ 2; 4; 6 ]
(of_gen Gen.(1 -- max_int)
|> filter ~f:(fun... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/tests/data/t_lazylist.ml | ocaml | module Test = (val Containers_testlib.make ~__FILE__ ())
open Test
open CCLazy_list;;
q Q.(list int) (fun l -> length (of_list l) = List.length l);;
eq [ 2; 4; 6 ]
(of_list [ 1; 2; 3; 4; 5; 6; 7 ]
|> filter ~f:(fun x -> x mod 2 = 0)
|> to_list)
;;
eq [ 2; 4; 6 ]
(of_gen Gen.(1 -- max_int)
|> filter ~f:(fun... | |
8b3765a0e93e4cb908e422a3ce4e9b44871e7b2865d3ed2c2bd935a51a6c538b | cryptosense/ocaml-mock | mock.mli | *
A mock is something that can be used in place of function .
[ ( ' args , ' ret ) t ] is similar to [ ' args - > ' ret ] except that :
- its return value ( or effect ) can be configured
- it is possible to determine whether it has been called
A mock is something that can be used in place of f... | null | https://raw.githubusercontent.com/cryptosense/ocaml-mock/17c080a542d3b5b0c7a78d52e914ac49bf1475fe/src/mock.mli | ocaml | *
Build an unconfigured mock.
Calling an unconfigured mock will raise an exception that contains the name
of the mock.
* Retrieve the name of a mock.
* What a mock can evaluate to.
*
Evaluation is not possible.
[call] will raise [Mock_non_configured].
* Return a value.
* Raise an exception.
* Defin... | *
A mock is something that can be used in place of function .
[ ( ' args , ' ret ) t ] is similar to [ ' args - > ' ret ] except that :
- its return value ( or effect ) can be configured
- it is possible to determine whether it has been called
A mock is something that can be used in place of f... |
5cb6bbc33166239a506f5b801b79219adb95c98356fbe657791718404dc549ce | clojure-garden/clojure-garden | root.cljs | (ns platform.ui.pages.root
(:require
[antd.core :as antd]
[clojure.string :as str]
[platform.ui.components :as components]
[platform.ui.pages.dashboard.view :as dashboard]
[platform.ui.pages.landing.view :as landing]
[platform.ui.pages.not-found.view :as not-found]
[re-frame.core :as rf]))... | null | https://raw.githubusercontent.com/clojure-garden/clojure-garden/9c58ce33f91aeab5f7bd0d16647ecc450ba8967f/modules/frontend/src/platform/ui/pages/root.cljs | clojure | (ns platform.ui.pages.root
(:require
[antd.core :as antd]
[clojure.string :as str]
[platform.ui.components :as components]
[platform.ui.pages.dashboard.view :as dashboard]
[platform.ui.pages.landing.view :as landing]
[platform.ui.pages.not-found.view :as not-found]
[re-frame.core :as rf]))... | |
1bae93e13aa7603a46c3478bab801d53530e95fabb90c9d168c6943f849b761c | nibbula/yew | md5sum.lisp | ;;;
md5sum.lisp - MD5 message digest checksums .
;;;
(defpackage :md5sum
(:documentation "MD5 message digest checksums.")
(:use :cl :dlib :collections)
(:export
#:md5sum
#:!md5sum
))
(in-package :md5sum)
;; This is separate from checksum, so we don't have to depend on ironclad if we
;; don't need it.... | null | https://raw.githubusercontent.com/nibbula/yew/6006da88641328616411bed0d9d357d1f76dd1a0/tools/md5sum.lisp | lisp |
This is separate from checksum, so we don't have to depend on ironclad if we
don't need it.
End | md5sum.lisp - MD5 message digest checksums .
(defpackage :md5sum
(:documentation "MD5 message digest checksums.")
(:use :cl :dlib :collections)
(:export
#:md5sum
#:!md5sum
))
(in-package :md5sum)
(defun md5sum (files &key collect as-bytes)
(flet ((sum-thing (thing)
(typecase thing
(pathn... |
b13478cb1580103fbca2934812ecdcf191ce0ca7377358a8a3dfc79797d8944b | magnolia-lang/magnolia-lang | Util.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
module Magnolia.Util (
-- * Package name manipulation utils
mkPkgNameFromPath
, mkPkgPathFromName
, mkPkgPathFromStr
, isPkgPath
-- * Dependencies-related utils
, checkNoCycle
-- * Top-level manipulation utils
, lookupTopLevelRef
, topS... | null | https://raw.githubusercontent.com/magnolia-lang/magnolia-lang/ff29126a72c9f7bec7d098c25e74606fef5464e5/src/lib/Magnolia/Util.hs | haskell | # LANGUAGE OverloadedStrings #
* Package name manipulation utils
* Dependencies-related utils
* Top-level manipulation utils
* Renaming manipulation utils
* Declaration manipulation utils
* Expression manipulations utils
=== package name manipulation ===
=== top-level manipulation ===
provide a scope name:
... | # LANGUAGE TypeFamilies #
module Magnolia.Util (
mkPkgNameFromPath
, mkPkgPathFromName
, mkPkgPathFromStr
, isPkgPath
, checkNoCycle
, lookupTopLevelRef
, topSortTopLevelE
, renamingBlockToInlineRenamings
, isLocalDecl
, isValueExpr
)
where
import Control.Monad
import qualified Data.Graph as... |
398868ffa6dc9d865da319d01ad59006a1c4610426678c1fc40d68baf33bbdde | herbelin/coq-hh | ide_blob.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/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/toplevel/ide_blob.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/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ Id$
type 'a menu = 'a *... |
c5a0f028e1a8d394e20c8bad3c15fddc6e9eec532c5caa836edc0d11eff49e2c | UU-ComputerScience/uhc | Int.hs | # LANGUAGE NoImplicitPrelude , CPP #
# OPTIONS_GHC -XNoImplicitPrelude #
# EXCLUDE_IF_TARGET js #
{-# EXCLUDE_IF_TARGET cr #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Int
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/ehclib/uhcbase/Data/Int.hs | haskell | # EXCLUDE_IF_TARGET cr #
---------------------------------------------------------------------------
|
Module : Data.Int
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
Signed integer types
------------------------------... | # LANGUAGE NoImplicitPrelude , CPP #
# OPTIONS_GHC -XNoImplicitPrelude #
# EXCLUDE_IF_TARGET js #
Copyright : ( c ) The University of Glasgow 2001
module Data.Int
(
Int,
Int8, Int16, Int32, Int64,
) where
#ifdef __GLASGOW_HASKELL__
import GHC.Base ( Int )
import GHC.Int ( Int8, In... |
a5f7ee30ed0278ef20be4757dbc003cd64634d09ad4e15a95f56d1ba2a97b566 | letmaik/monadiccp | Monatron.hs |
module Control.Monatron.Monatron (
module Control.Monatron.Monad,
module Control.Monatron.AutoLift,
version
)where
import Control.Monatron.Monad
import Control.Monatron.AutoLift
version :: (Int,Int,Int)
version = (0,0,1)
| null | https://raw.githubusercontent.com/letmaik/monadiccp/fe4498e46a7b9d9e387fd5e4ed5d0749a89d0188/src/Control/Monatron/Monatron.hs | haskell |
module Control.Monatron.Monatron (
module Control.Monatron.Monad,
module Control.Monatron.AutoLift,
version
)where
import Control.Monatron.Monad
import Control.Monatron.AutoLift
version :: (Int,Int,Int)
version = (0,0,1)
| |
cad82c1a0780de8ecc64d02ffd3fdd15a4ef80e909809d102b1c1edbfcef4c8d | ocaml-sf/learn-ocaml-corpus | factor_chainr1.ml | (* The type [parser] satisfies the monad API: [delay], [return], [>>=]. *)
(* [delay p] behaves like [p()], except the construction of the monadic
computation is delayed until the moment when this computation is run. *)
let delay (p : unit -> 'a parser) : 'a parser =
fun cursor ->
NonDet.delay (fun () -> p (... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/parser_combinators/wrong/factor_chainr1.ml | ocaml | The type [parser] satisfies the monad API: [delay], [return], [>>=].
[delay p] behaves like [p()], except the construction of the monadic
computation is delayed until the moment when this computation is run.
[return a] always succeeds, consumes no input, and returns [a].
[p >>= f] is the sequential compositio... |
let delay (p : unit -> 'a parser) : 'a parser =
fun cursor ->
NonDet.delay (fun () -> p () cursor)
let return (a : 'a) : 'a parser =
fun cursor ->
NonDet.return (a, cursor)
let (>>=) (p : 'a parser) (f : 'a -> 'b parser) : 'b parser =
fun cursor ->
let open NonDet in
p cursor >>= fun (a, cur... |
04444ccad1784532d6c1ae9a07ae22bb0beb525d0220e2e303d20174e184ded5 | geneweb/geneweb | GWPARAM_ITL.mli | val init_cache :
(Config.config -> Gwdb.base -> Gwdb.iper -> int -> int -> int -> unit) ref
(** [init_cache conf base ip nb_asc from_gen_desc nb_desc] *)
val max_ancestor_level :
(Config.config -> Gwdb.base -> Gwdb.iper -> string -> int -> int -> int) ref
val max_descendant_level :
(Config.config -> Gwdb.base -... | null | https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/GWPARAM_ITL.mli | ocaml | * [init_cache conf base ip nb_asc from_gen_desc nb_desc] | val init_cache :
(Config.config -> Gwdb.base -> Gwdb.iper -> int -> int -> int -> unit) ref
val max_ancestor_level :
(Config.config -> Gwdb.base -> Gwdb.iper -> string -> int -> int -> int) ref
val max_descendant_level :
(Config.config -> Gwdb.base -> Gwdb.iper -> int -> int) ref
val tree_generation_list :
(... |
d42cd084885e14ed89260118d8fa7afd846a2ccc2b3c73f1b11f3542ae0dc9ef | AccelerateHS/accelerate-llvm | Object.hs | # LANGUAGE CPP #
-- |
-- Module : Data.Array.Accelerate.LLVM.Native.Link.Object
Copyright : [ 2017 .. 2020 ] The Accelerate Team
-- License : BSD3
--
Maintainer : < >
-- Stability : experimental
Portability : non - portable ( GHC extensions )
--
module Data.Array.Accelerate.LLVM.Native.Link.O... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/4fd0d9a91977da7382468857d08d8fafae3a341b/accelerate-llvm-native/src/Data/Array/Accelerate/LLVM/Native/Link/Object.hs | haskell | |
Module : Data.Array.Accelerate.LLVM.Native.Link.Object
License : BSD3
Stability : experimental
| The function table is a list of function names together with a pointer in
the target address space containing the corresponding executable code.
| Object code consists of a handle to dynamically loade... | # LANGUAGE CPP #
Copyright : [ 2017 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.LLVM.Native.Link.Object
where
import Data.List
import Foreign.Ptr
import Formatting
import Data.ByteString.Short.Char8 ... |
2f7579835313ca6488b573e08e392958c839af65d5696b3d69a4dad200a7ea04 | gafiatulin/codewars | Baker.hs | -- Pete, the baker
-- /
module Baker where
import Data.List (sort)
type Ingredient = String
type Amount = Int
type Recipe = [(Ingredient, Amount)]
type Storage = [(Ingredient, Amount)]
cakes :: Recipe -> Storage -> Int
cakes recipe storage | length recipe > length have = 0
| otherwis... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/5%20kyu/Baker.hs | haskell | Pete, the baker
/ |
module Baker where
import Data.List (sort)
type Ingredient = String
type Amount = Int
type Recipe = [(Ingredient, Amount)]
type Storage = [(Ingredient, Amount)]
cakes :: Recipe -> Storage -> Int
cakes recipe storage | length recipe > length have = 0
| otherwise = minimum . zipWith (\... |
ca051f200a281b9ae1ab19a998845c1f68c1f489e97c11cba4c86fb389de49ff | heralden/heckendorf | core.cljs | (ns heckendorf.styles.core
(:require [garden.units :as u]
[herb.core :include-macros true :refer [defglobal]])
(:require-macros [heckendorf.util :refer [defstyled]]))
(defglobal global
[:body {:font-family "monospace"
:background-color "black"
:overflow "hidden"}])
(def retro-fon... | null | https://raw.githubusercontent.com/heralden/heckendorf/b5d7e75f9072dddf39598aa48bb4aacfeed5fc81/src/cljs/heckendorf/styles/core.cljs | clojure | (ns heckendorf.styles.core
(:require [garden.units :as u]
[herb.core :include-macros true :refer [defglobal]])
(:require-macros [heckendorf.util :refer [defstyled]]))
(defglobal global
[:body {:font-family "monospace"
:background-color "black"
:overflow "hidden"}])
(def retro-fon... | |
30e7d27d6845502f0e81d447cdca1eaf48ce7e72c328569de3978307245b9054 | Mallku2/lua-redex-model | builtInTests.rkt | #lang racket
(require redex
"../grammar.rkt"
"../Relations/builtIn.rkt")
(define (built-in-test-suite)
; Testing just the interface between the $builtIn form and the delta function.
; ... | null | https://raw.githubusercontent.com/Mallku2/lua-redex-model/13a1b8cacbdc72a1b5cb1a1f140f21cc974d71c3/Tests/builtInTests.rkt | racket | Testing just the interface between the $builtIn form and the delta function.
; ; ;; ; ... | #lang racket
(require redex
"../grammar.rkt"
"../Relations/builtIn.rkt")
(define (built-in-test-suite)
(test-->> built-in
(term (() : ($builtIn error ("error message"))))
(term (() : (< ($err "error message") >))))
(test-->> built-in
(term (() : ($builtI... |
361661889ce6c3212e332b8ee7543ce4c2be82d6073f4cf7152d02d4c0888366 | mariari/Misc-Lisp-Scripts | chapter2-lexical-vs-dynamic.lisp | (defparameter *dyn-a* 10)
(let ((lex-test 3))
(setf lex-test 5)
(defun lexical-test (x)
(list x lex-test)))
(let ((lex-test 3))
(let ((lex-test 5))
(defun lexical-test2 (x)
(setf *dyn-a* 30)
(list x lex-test *dyn-a*))))
(defparameter *dyn-test* 1)
(defun dyn-test-1 (x)
(list x *dyn-te... | null | https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/Books/LetOverLambda/chapter2-lexical-vs-dynamic.lisp | lisp | (defparameter *dyn-a* 10)
(let ((lex-test 3))
(setf lex-test 5)
(defun lexical-test (x)
(list x lex-test)))
(let ((lex-test 3))
(let ((lex-test 5))
(defun lexical-test2 (x)
(setf *dyn-a* 30)
(list x lex-test *dyn-a*))))
(defparameter *dyn-test* 1)
(defun dyn-test-1 (x)
(list x *dyn-te... | |
ba62e0509bbe07b816a7f5b29a97a86e7679fae0d0bfded30375a6bb5086847e | hedgehogqa/haskell-hedgehog-classes | Bits.hs | # LANGUAGE ScopedTypeVariables #
module Hedgehog.Classes.Bits (bitsLaws) where
import Data.Bits
import Hedgehog
import Hedgehog.Classes.Common
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
-- | Tests the following 'Bits' laws:
--
[ _ _ Conjunction Idempotence _ _ ] : @n ' . & . ' n... | null | https://raw.githubusercontent.com/hedgehogqa/haskell-hedgehog-classes/4d97b000e915de8ba590818f551bce7bd862e7d4/src/Hedgehog/Classes/Bits.hs | haskell | | Tests the following 'Bits' laws:
[__Double Complement__]: @'complement' '.' 'complement'@ ≡ @id@
[__Set Bit__]: @'setBit' n i ≡ n '.|.' 'bit' i@ | # LANGUAGE ScopedTypeVariables #
module Hedgehog.Classes.Bits (bitsLaws) where
import Data.Bits
import Hedgehog
import Hedgehog.Classes.Common
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
[ _ _ Conjunction Idempotence _ _ ] : @n ' . & . ' n@ ≡
[ _ _ Disjunction Idempotence _ _ ... |
67e44c8caa7bd0e1c4888c31519458226475efdf3cf4948c0032b95c49e9af03 | haskell/hackage-security | TCB.hs | # LANGUAGE CPP #
module Hackage.Security.Trusted.TCB (
-- * Trusted values
Trusted(DeclareTrusted)
, trusted
, trustStatic
, trustVerified
, trustApply
, trustElems
-- * Verification errors
, VerificationError(..)
, RootUpdated(..)
, VerificationHistory
-- * Role verification
, Signatu... | null | https://raw.githubusercontent.com/haskell/hackage-security/6883381115f1d4a693ee888f349ba5dc866b107b/hackage-security/src/Hackage/Security/Trusted/TCB.hs | haskell | * Trusted values
* Verification errors
* Role verification
opaque
* Re-exports
* Fake static pointers
additional type safety, but that's okay: we can still verify the code
| Trusted values
* Anything that is statically known is trusted ('trustStatic')
* If we have "dynamic" data we can trust it once we have... | # LANGUAGE CPP #
module Hackage.Security.Trusted.TCB (
Trusted(DeclareTrusted)
, trusted
, trustStatic
, trustVerified
, trustApply
, trustElems
, VerificationError(..)
, RootUpdated(..)
, VerificationHistory
, signaturesVerified
, verifyRole'
, verifyFingerprints
#if __GLASGOW_HASKELL__ >= 71... |
c1013a7bfffcd89aa9889ea039426c6d39acbfc7669bffbb61b01492a8f9642c | bsless/contextual | core.clj | (ns contextual.core
(:refer-clojure :exclude [compile])
(:require
[contextual.impl.protocols :as p]
[contextual.impl.compile :as c]
[contextual.impl.path :as path]
[contextual.impl.validate :as v]))
(defn compile
"Compile an expression into an [[invoke]]able class structure
representing its evaluat... | null | https://raw.githubusercontent.com/bsless/contextual/c5e5a602c851a9f7cb53fe92a66e9a7e552e53f5/src/contextual/core.clj | clojure | (ns contextual.core
(:refer-clojure :exclude [compile])
(:require
[contextual.impl.protocols :as p]
[contextual.impl.compile :as c]
[contextual.impl.path :as path]
[contextual.impl.validate :as v]))
(defn compile
"Compile an expression into an [[invoke]]able class structure
representing its evaluat... | |
73dc3ce495911ed9fd0f23b4666899eb4922f2e40849077cfbe8f9fcab6c7398 | ucsd-progsys/nate | odoc.ml | (***********************************************************************)
(* OCamldoc *)
(* *)
, projet Cristal , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/ocamldoc/odoc.ml | ocaml | *********************************************************************
OCamldoc
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : odoc.ml , v 1.9 2006/09/20 11:14... |
e0a73a484bf61a30f9b91f0bad34b1e07a41ea229c9e3663c630677e53a18f4a | 2600hz-archive/whistle | riak_core_util.erl | %% -------------------------------------------------------------------
%%
%% riak_core: Core Riak Application
%%
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/riak_core-0.14.0/src/riak_core_util.erl | erlang | -------------------------------------------------------------------
riak_core: Core Riak Application
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
sp... | Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
04ec9b020b688b4761350314cce0a6f07734744119e39e62048607367f9b3e0f | ndmitchell/catch | CaseCheck.hs |
module Subst.CaseCheck(substCaseCheck) where
import Subst.Type
import Subst.Solve
import Subst.Show
import IO
import Hite
import qualified Data.Map as Map
import qualified Data.IntMap as IntMap
substCaseCheck :: String -> Handle -> Hite -> IO Bool
substCaseCheck file hndl hite =
do
prin... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Subst/CaseCheck.hs | haskell |
module Subst.CaseCheck(substCaseCheck) where
import Subst.Type
import Subst.Solve
import Subst.Show
import IO
import Hite
import qualified Data.Map as Map
import qualified Data.IntMap as IntMap
substCaseCheck :: String -> Handle -> Hite -> IO Bool
substCaseCheck file hndl hite =
do
prin... | |
0ed557b423691bfb823d1bf76be217feb9b65e6a5a8971b36ad4d84f403aa1d8 | fourier/ppath | generic-test.lisp | ;;;; generic-test.lisp
;; NOTE: To run this test file, execute `(asdf:test-system :ppath)' in your Lisp.
;;
(in-package :cl-user)
(defpackage ppath.test.generic-test
(:use :cl
:alexandria
:ppath.test.base
:prove)
(:shadowing-import-from ppath.details.generic
concat... | null | https://raw.githubusercontent.com/fourier/ppath/eb1a8173b4d1d691ea9a7699412123462f58c3ce/t/generic-test.lisp | lisp | generic-test.lisp
NOTE: To run this test file, execute `(asdf:test-system :ppath)' in your Lisp.
NOTE: To run this test file, execute `(asdf:test-system :ppath)' in your Lisp.
test nt splitext
test posix splitext |
(in-package :cl-user)
(defpackage ppath.test.generic-test
(:use :cl
:alexandria
:ppath.test.base
:prove)
(:shadowing-import-from ppath.details.generic
concat
commonprefix
splitext
wildcar... |
b9202125f79ca00c19998fd1cdc3425c38a4e15045acd44720c370e558784250 | mfoemmel/erlang-otp | wxTopLevelWindow.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxTopLevelWindow.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxTopLevelWindow).
-include("wxe.... |
fecf113508964a0198a1ccd74f4c8da56e09608f4d385fba2a55ef34fe1251aa | erlang-ls/erlang_ls | diagnostics_autoimport_disabled.erl | -module(diagnostics_autoimport_disabled).
-compile(no_auto_import).
-export([main/1]).
main(_Args) ->
fun atom_to_list/1.
| null | https://raw.githubusercontent.com/erlang-ls/erlang_ls/36bf0815e35db5d25a76e80f98f306f25fff7d8c/apps/els_lsp/priv/code_navigation/src/diagnostics_autoimport_disabled.erl | erlang | -module(diagnostics_autoimport_disabled).
-compile(no_auto_import).
-export([main/1]).
main(_Args) ->
fun atom_to_list/1.
| |
50c9977517911c08d0fdc83d67e33799d25fbdb6cf41328fa34af4a2143754bc | qitab/ace.core | switch-test.lisp | Copyright 2020 Google LLC
;;;
Use of this source code is governed by an MIT - style
;;; license that can be found in the LICENSE file or at
;;; .
;;;;
;;;; Tests the switch utility.
;;;;
(defpackage #:ace.core.switch-test
(:use #:common-lisp
#:ace.core.switch
#:ace.test))
(in-package :ace.core.... | null | https://raw.githubusercontent.com/qitab/ace.core/e6eb21ff67b0c5eaec21c9b543b6dce18d7c8e6d/switch-test.lisp | lisp |
license that can be found in the LICENSE file or at
.
Tests the switch utility.
| Copyright 2020 Google LLC
Use of this source code is governed by an MIT - style
(defpackage #:ace.core.switch-test
(:use #:common-lisp
#:ace.core.switch
#:ace.test))
(in-package :ace.core.switch-test)
(defvar *red* "RED")
(defvar *blue* "BLUE")
(defvar *green* "GREEN")
(defvar *1* 1)
(deftest... |
080baae7056fcf1747ccc20920dba442ce56bff30bbde750edbadbcdab8d6082 | amnh/phylocaml | pModel.ml | (* Types *)
type basic_tcm =
[ `Const of int (* A single cost between differing states. *)
| `Linear of int * int (* A cost between states is equal, except indel. *)
| `TCM of int array array ] (* General TCM contains a full matrix. *)
type tcm =
[ `Affine of basic_tcm * int
| basi... | null | https://raw.githubusercontent.com/amnh/phylocaml/86aebc4f2664752668b16707214b3cad099434c0/lib/pModel.ml | ocaml | Types
A single cost between differing states.
A cost between states is equal, except indel.
General TCM contains a full matrix.
Functions |
type basic_tcm =
type tcm =
[ `Affine of basic_tcm * int
| basic_tcm ]
type options =
{ tie_breaker : [ `First | `Last | `Random ];
alphabetsize : int;
level : int;
}
type s =
{ tcm : tcm;
a : Alphabet.t;
opt : options;
}
type t =
{ spec : s;
cm : int;
}
let of_spec s : t... |
e01b12ad35809e03f1fb1761bd7ae12c20aca6af2c16a7c2f71cf03b24fca8a5 | TrustInSoft/tis-kernel | wpStrategy.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/wpStrategy.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2016 ... |
e0a58ba83464bd8e2b755d6aaac93cdb6ecceeb91e5ca343a92ab604d982a688 | j-mie6/ParsleyHaskell | State.hs | # LANGUAGE DeriveFunctor ,
MultiParamTypeClasses ,
DerivingStrategies ,
CPP #
MultiParamTypeClasses,
DerivingStrategies,
CPP #-}
module Parsley.Internal.Common.State (
State, StateT,
runState, evalState, execState,
runStateT... | null | https://raw.githubusercontent.com/j-mie6/ParsleyHaskell/045ab78ed7af0cbb52cf8b42b6aeef5dd7f91ab2/parsley-core/src/ghc/Parsley/Internal/Common/State.hs | haskell | # INLINE (>>=) # | # LANGUAGE DeriveFunctor ,
MultiParamTypeClasses ,
DerivingStrategies ,
CPP #
MultiParamTypeClasses,
DerivingStrategies,
CPP #-}
module Parsley.Internal.Common.State (
State, StateT,
runState, evalState, execState,
runStateT... |
2d6abe57d610f704a19cdf002393c4e0f6d7b70bd0486814c20bf4c301e9a23b | mzp/coq-ide-for-ios | reduction.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/checker/reduction.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Compute the lift to be performed on... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : reduction.ml 9215 2... |
acbf54ed0b02e54f4ee936484ead81a20c90e8122a099445af3df91ded3d57b7 | jacquev6/General | ToStandardNumbers.ml | module type S0 = sig
type t
val to_int: t -> int
val to_float: t -> float
end
module Tests_ = struct
module Examples = struct
module type S0 = sig
type t
end
end
module Testable = struct
module type S0 = sig
include S0
end
end
module MakeMakers(MakeExamples: functor (M: Te... | null | https://raw.githubusercontent.com/jacquev6/General/5237123668e939c0cb83aa3e1c4756473336bc7e/src/Generated/Traits/ToStandardNumbers.ml | ocaml | module type S0 = sig
type t
val to_int: t -> int
val to_float: t -> float
end
module Tests_ = struct
module Examples = struct
module type S0 = sig
type t
end
end
module Testable = struct
module type S0 = sig
include S0
end
end
module MakeMakers(MakeExamples: functor (M: Te... | |
6c5e613f9ebbf53df09edede20affff9a6e9e84dad0bbd82c23f5f6bfe000a98 | syocy/a-tour-of-go-in-haskell | DefaultSelection.hs | module A_Tour_of_Go.Concurrency.DefaultSelection where
import Control.Concurrent.STM
( STM, atomically, orElse
, TQueue, newTQueue, writeTQueue, readTQueue )
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async (async, cancel)
import Control.Monad (forever, join)
select :: [STM a] -> IO a
selec... | null | https://raw.githubusercontent.com/syocy/a-tour-of-go-in-haskell/9bd6eb1d40098369b37329bc8d48ac2f27a6e7e2/src/A_Tour_of_Go/Concurrency/DefaultSelection.hs | haskell | |
>>> main
.
.
tick.
.
.
tick.
.
.
tick.
.
.
tick.
.
.
BOOM! | module A_Tour_of_Go.Concurrency.DefaultSelection where
import Control.Concurrent.STM
( STM, atomically, orElse
, TQueue, newTQueue, writeTQueue, readTQueue )
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async (async, cancel)
import Control.Monad (forever, join)
select :: [STM a] -> IO a
selec... |
5c5486536327cf63a8aef472b916412eff5e084645d5cfdcaedcf419d4672347 | open-company/open-company-auth | teams.clj | (ns oc.auth.api.teams
"Liberator API for team resources."
(:require [if-let.core :refer (if-let* when-let*)]
[defun.core :refer (defun)]
[clojure.set :as clj-set]
[taoensso.timbre :as timbre]
[compojure.core :as compojure :refer (ANY OPTIONS POST DELETE)]
... | null | https://raw.githubusercontent.com/open-company/open-company-auth/f75a48fbe78b947683e144c92a1c0668a2fb6887/src/oc/auth/api/teams.clj | clojure | ----- Validations -----
invalid update
No team for this team-id, so this will fail existence check later
----- Utility functions -----
----- Actions -----
No team to invite to!
User exists, and is a team member, but not an admin, and admin was requested in the invite
recurse
An already active team member... wh... | (ns oc.auth.api.teams
"Liberator API for team resources."
(:require [if-let.core :refer (if-let* when-let*)]
[defun.core :refer (defun)]
[clojure.set :as clj-set]
[taoensso.timbre :as timbre]
[compojure.core :as compojure :refer (ANY OPTIONS POST DELETE)]
... |
3c588a1a98cf16d249a85f9c468ef484925ca2406247b4c75431957cb3074218 | jessealama/racketcon-2018-web-devel-workshop | command.rkt | #lang racket/base
(require (only-in racket/match
match)
raco / command - name
(only-in web-server/servlet-env
serve/servlet)
(prefix-in first:
(only-in (file "first.rkt")
start))
(prefix-in second:
... | null | https://raw.githubusercontent.com/jessealama/racketcon-2018-web-devel-workshop/a115d32ee4016c05c1d2d6cc400c572c1d5456f2/command.rkt | racket | #lang racket/base
(require (only-in racket/match
match)
raco / command - name
(only-in web-server/servlet-env
serve/servlet)
(prefix-in first:
(only-in (file "first.rkt")
start))
(prefix-in second:
... | |
030ebc56230cff8c3bfc7f6b84be1ad826b6ce40e5a62cf0962a0068bdf71c04 | FranklinChen/hugs98-plus-Sep2006 | DL.hs | # OPTIONS -#include " HsPosix.h " #
Haskell Binding for dl{open , , ... } -*-haskell-*-
--
Author : < >
--
Created : 2001 - 11 - 22
--
Derived from GModule.chs by M.Weber & M.Chakravarty which is part of c2hs
-- I left the API more or less the same, mostly the flags are different.
--
-- Lice... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/fptools/hslibs/posix/DL.hs | haskell |
I left the API more or less the same, mostly the flags are different.
License: BSD
Usage:
******
offering a function
char * mogrify (char*,int)
and invoke str = mogrify("test",1):
foreign import dynamic unsafe fun__ :: FunPtr Fun -> Fun
funptr <- moduleSymbol mod "mogrify"
let fu... | # OPTIONS -#include " HsPosix.h " #
Haskell Binding for dl{open , , ... } -*-haskell-*-
Author : < >
Created : 2001 - 11 - 22
Derived from GModule.chs by M.Weber & M.Chakravarty which is part of c2hs
Let 's assume you want to open a local shared library ' foo ' ( ./libfoo.so )
type Fun =... |
e8e0a37bc125adc439fbcb35493ebe24bd10349f6e906ed5301dbd2da171363f | lojic/LearningRacket | word-frequency.rkt | #lang racket
(define text #<<HERE
Haul wind red ensign mizzenmast poop deck hearties transom lee
Brethren of the Coast hornswaggle Sea Legs. Spanish Main jolly
boat bilge reef grog hail-shot jury mast carouser rope's end
scourge of the seven seas. Nipperkin wherry hempen halter Shiver
me timbers sloop landlubber or ju... | null | https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/miscellaneous/word-frequency.rkt | racket | Accept a string and return a list of words in decreasing
order of their frequency with the count. | #lang racket
(define text #<<HERE
Haul wind red ensign mizzenmast poop deck hearties transom lee
Brethren of the Coast hornswaggle Sea Legs. Spanish Main jolly
boat bilge reef grog hail-shot jury mast carouser rope's end
scourge of the seven seas. Nipperkin wherry hempen halter Shiver
me timbers sloop landlubber or ju... |
8b94b3f8e1c5078277afb321c0c28ddee19029e2f81d557c952be5c09eda2b40 | ptaoussanis/clojure-web-server-benchmarks | servlet.clj | (ns jetty9.servlet
(:require [clojure.java.browse])
(:import (java.io PrintWriter)
(javax.servlet ServletConfig)
(javax.servlet.http HttpServletRequest HttpServletResponse))
(:gen-class :extends javax.servlet.http.HttpServlet))
(alter-var-root #'clojure.java.browse/browse-ur... | null | https://raw.githubusercontent.com/ptaoussanis/clojure-web-server-benchmarks/338614cdd46f2b5111ece79f8fdebafa3145944f/servers/jetty9/src/jetty9/servlet.clj | clojure | (ns jetty9.servlet
(:require [clojure.java.browse])
(:import (java.io PrintWriter)
(javax.servlet ServletConfig)
(javax.servlet.http HttpServletRequest HttpServletResponse))
(:gen-class :extends javax.servlet.http.HttpServlet))
(alter-var-root #'clojure.java.browse/browse-ur... | |
bcecf217174ca84d9bc551bd7c2a952c3bcac33919a5a7889f8fde7a5734aba1 | serokell/ariadne | NewWallet.hs | module Ariadne.UI.Qt.Widgets.Dialogs.NewWallet
( runNewWallet
, NewWalletParameters(..)
, NewWalletSpecifier(..)
, NewWalletResult(..)
) where
import Control.Lens (makeLensesWith)
import Data.Bits
import qualified Data.Text as T
import Graphics.UI.Qtah.Core.Types (alignHCenter, ali... | null | https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ui/qt-lib/src/Ariadne/UI/Qt/Widgets/Dialogs/NewWallet.hs | haskell | module Ariadne.UI.Qt.Widgets.Dialogs.NewWallet
( runNewWallet
, NewWalletParameters(..)
, NewWalletSpecifier(..)
, NewWalletResult(..)
) where
import Control.Lens (makeLensesWith)
import Data.Bits
import qualified Data.Text as T
import Graphics.UI.Qtah.Core.Types (alignHCenter, ali... | |
ffb8e05d75ea42dbd57e8885e3aedabf10623c1995e3b0ca21203136621f3fee | uhc/uhc | TypeErrors.hs | | Module : TypeErrors
License : GPL
Maintainer :
Stability : experimental
Portability : portable
Errors that are constructed during type inferece .
License : GPL
Maintainer :
Stability : experimental
Portability : ... | null | https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/helium/StaticAnalysis/Messages/TypeErrors.hs | haskell | range(s) of the error
oneliner messages
Hugs-like table
extra hints
overloaded function
overloaded language construct
magic number!
| | Module : TypeErrors
License : GPL
Maintainer :
Stability : experimental
Portability : portable
Errors that are constructed during type inferece .
License : GPL
Maintainer :
Stability : experimental
Portability : ... |
18aa6508e2875aa392c95f0374e3e13efc8870f3a2e4adaca2b9ba368963edce | camlspotter/ocaml-zippy-tutorial-in-japanese | types.mli | (* OCaml 4.00.0 辺りの types.mli の読み解き。間違っている可能性がある。
現在の OCaml のものとは違っている可能性がある。
*)
open Asttypes
(* Type expressions for the core language *)
type type_expr =
{ mutable desc: type_desc;
mutable level: int;
mutable id: int }
desc :
型の内容 。
level :
型が生成された let polymorphism leve... | null | https://raw.githubusercontent.com/camlspotter/ocaml-zippy-tutorial-in-japanese/c6aeabc08b6e2289a0e66c5b94a89c6723d88a6a/types.mli | ocaml | OCaml 4.00.0 辺りの types.mli の読み解き。間違っている可能性がある。
現在の OCaml のものとは違っている可能性がある。
Type expressions for the core language
タプル
メソッドがもう無い、閉じたオブジェクト型であることを示す
for copying
Polymorphic variant の型
'a . t の 'a。 Quantify されると内部の 'a も Tunivar になるようである
'a . t
kept for compatibility
1st true denotes a constant constr... |
open Asttypes
type type_expr =
{ mutable desc: type_desc;
mutable level: int;
mutable id: int }
desc :
型の内容 。
level :
型が生成された let polymorphism level 。
Quantify された型の level は
Generalization の際、型の level が現在の polymorphism current_level より
... |
ad10f1b7ca5ecb6b5b5329111fbc1f8265eb0af3541a29fa73f74067493a97be | cloudamqp/msg_store_eleveldb_index | msg_store_eleveldb_index.erl | -module(msg_store_eleveldb_index).
-include_lib("rabbit_common/include/rabbit_msg_store.hrl").
-behaviour(rabbit_msg_store_index).
-rabbit_boot_step({msg_store_eleveldb_index,
[{description, "eLevelDB backed message index storage"},
{mfa, {application, set_env,
... | null | https://raw.githubusercontent.com/cloudamqp/msg_store_eleveldb_index/0463a01e2bce506e04ac41471ab6b1867139da4f/src/msg_store_eleveldb_index.erl | erlang | -module(msg_store_eleveldb_index).
-include_lib("rabbit_common/include/rabbit_msg_store.hrl").
-behaviour(rabbit_msg_store_index).
-rabbit_boot_step({msg_store_eleveldb_index,
[{description, "eLevelDB backed message index storage"},
{mfa, {application, set_env,
... | |
ae87685e673aa3bda569833c29b2c929edfdefb7094978f225c6b6f46fb5e6cd | teh/gluon | VDom.hs | # LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE OverloadedLabels #
module Gluon.VDom
( VNode(..)
, childAt
, patch
, newDOMAPI
, DOMAPI
) where
import Protolude hiding (get, on)
import qualified GHC.Show as GS
import GI.WebKit2WebExtension (IsDOMNode, DOMDocument, DOMNode(..),... | null | https://raw.githubusercontent.com/teh/gluon/7f0725fe4f137d403ec2896cc3b462b0e215c400/lib/Gluon/VDom.hs | haskell | # LANGUAGE RankNTypes #
Show instance breaks the show/read contract, only use for
debugging!
typically dOMDocumentCreateElement
-vdom/blob/master/src/Data/VirtualDOM.purs
TODO: record stats about node addition/removal for benchmarking.
listeners cannot be removed for now, the only way to remove a
listener is to ... | # LANGUAGE ForeignFunctionInterface #
# LANGUAGE OverloadedLabels #
module Gluon.VDom
( VNode(..)
, childAt
, patch
, newDOMAPI
, DOMAPI
) where
import Protolude hiding (get, on)
import qualified GHC.Show as GS
import GI.WebKit2WebExtension (IsDOMNode, DOMDocument, DOMNode(..), dOMNodeGetChildNodes,
... |
8f6fc3bfc550e874eafd52ad53803dd10c3ab9c9a4096b189184ee0b11bce328 | ml4tp/tcoq | heap.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/lib/heap.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Heaps
* Type of functional heaps ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
module type Ordered = sig
... |
c46473e867ecda0e50a12a06e24df23f29db4e6b2001f25413038cac50c1fd0d | EduardSergeev/monad-memo | Array.hs | |
Module : Sample . Memo
Copyright : ( c ) 2013
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : experimental
Portability : non - portable
More advanced examples
Module : Sample.Memo
Copyright : (c) Eduard Sergeev 2013
License : ... | null | https://raw.githubusercontent.com/EduardSergeev/monad-memo/f941013e45c5e190ebce08935857ec10355584fd/example/Customisation/Array.hs | haskell | $UnboxedInt16TupleArray
$UnboxedInt16TupleArray
The way to memoize a tuple of Int16 values using unboxed `UArrayCache`
| A tuple of unboxed `Int16` and `Sum` of it
| `UArrayMemo` instance for our tuple
Now we can use `evalUArrayMemo` and `runUArrayMemo` methods | |
Module : Sample . Memo
Copyright : ( c ) 2013
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : experimental
Portability : non - portable
More advanced examples
Module : Sample.Memo
Copyright : (c) Eduard Sergeev 2013
License : ... |
fecc056e2c639e487ddb9cd6deccb8e48c7833996e4f96ee023077dcf8b71d05 | axelarge/advent-of-code | day13_test.clj | (ns advent-of-code.y2017.day13-test
(:require [clojure.test :refer :all]
[advent-of-code.y2017.day13 :refer :all]))
(deftest test-solve1
(is (= (solve1 test-input) 24))
(is (= (solve1 input) 1316)))
(deftest test-solve2
(is (= (solve2 test-input) 10))
(is (= (solve2 input) 3840052)))
| null | https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/test/advent_of_code/y2017/day13_test.clj | clojure | (ns advent-of-code.y2017.day13-test
(:require [clojure.test :refer :all]
[advent-of-code.y2017.day13 :refer :all]))
(deftest test-solve1
(is (= (solve1 test-input) 24))
(is (= (solve1 input) 1316)))
(deftest test-solve2
(is (= (solve2 test-input) 10))
(is (= (solve2 input) 3840052)))
| |
58c4b537aab0b8b78c3dda83d99236ebe896a97492d48e1630e899bdcc053249 | zepto-lang/zepto | FunctionPrimitives.hs | module Zepto.Primitives.FunctionPrimitives where
import Control.Monad.Except (throwError)
import Zepto.Types
functionNameDoc :: String
functionNameDoc = "get the function name as a string (does not work for\n\
macros).\n\
\n\
params:\n\
- f: the function\n\
complexity: O(1)\n\
returns: a string representing... | null | https://raw.githubusercontent.com/zepto-lang/zepto/564fc1db72530040100d55538f49fec6fd9ff300/src/Zepto/Primitives/FunctionPrimitives.hs | haskell | module Zepto.Primitives.FunctionPrimitives where
import Control.Monad.Except (throwError)
import Zepto.Types
functionNameDoc :: String
functionNameDoc = "get the function name as a string (does not work for\n\
macros).\n\
\n\
params:\n\
- f: the function\n\
complexity: O(1)\n\
returns: a string representing... | |
5e8cc14e7bc76743e7339396c4ff5346f8779f77db80559cd5dc1d9f717095ee | s-expressionists/ctype | cache.lisp | (in-package #:ctype)
;;;; TODO: Thread safety
(defmacro cached ((cache &key (nvals 1) (cache-bits '10) (mix 'logxor)
(compare 'eql) (hasher 'sxhash) (evict 't))
(&rest keys) &body computer)
(let* ((nkeys (length keys))
(gkeys (loop repeat nkeys collect (gensym "... | null | https://raw.githubusercontent.com/s-expressionists/ctype/3fdf1bc61cc6b33680abf920d534149906d4e7fd/cache.lisp | lisp | TODO: Thread safety
Hit an entry; see if the keys match
Valid. Return the vals.
redundantly check ,gentry again, who cares?
gensym not required since COMPUTER is the only user code | (in-package #:ctype)
(defmacro cached ((cache &key (nvals 1) (cache-bits '10) (mix 'logxor)
(compare 'eql) (hasher 'sxhash) (evict 't))
(&rest keys) &body computer)
(let* ((nkeys (length keys))
(gkeys (loop repeat nkeys collect (gensym "KEY")))
(gvals (... |
b9a2149a3292af7f7bb08cd8aa81bd1e5b9d8a8b2f4d879e9504961ea686343d | digitallyinduced/ihp | DeleteController.hs | module Main where
import IHP.Prelude
import qualified System.Directory as Directory
import qualified System.Posix.Env.ByteString as Posix
import IHP.IDE.CodeGen.ControllerGenerator
import IHP.IDE.CodeGen.Controller (undoPlan)
import qualified Data.Text as Text
import Main.Utf8 (withUtf8)
main :: IO ()
main = withUtf8... | null | https://raw.githubusercontent.com/digitallyinduced/ihp/5a53eff25ed3d765dc0cd5ec7425d4fcaaa25f97/exe/IHP/CLI/DeleteController.hs | haskell | module Main where
import IHP.Prelude
import qualified System.Directory as Directory
import qualified System.Posix.Env.ByteString as Posix
import IHP.IDE.CodeGen.ControllerGenerator
import IHP.IDE.CodeGen.Controller (undoPlan)
import qualified Data.Text as Text
import Main.Utf8 (withUtf8)
main :: IO ()
main = withUtf8... | |
605b485a49a9245e51bfeb5339df3870819fcd153061025c8dff4c14d12f8721 | ghcjs/ghcjs-boot | Bits.hs | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude , BangPatterns , MagicHash #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Bits
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENS... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/Data/Bits.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Bits
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
This module defines bitwise operations for signed and unsigned
integers. In... | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude , BangPatterns , MagicHash #
Copyright : ( c ) The University of Glasgow 2001
' Integer ' types are available from this module , and instances for
module Data.Bits (
Bits(
(.&.), (.|.), xor,
complement,
shift,
rotate,
zeroBits,... |
34743a30f60cff5d6ced7b03ae206450f7bdb568b38e65db6310e84ee519cb18 | exercism/babashka | phone_number.clj | (ns phone-number
(:require [clojure.string :as str]))
(defn- digits-only
[input]
(str/replace input #"\D" ""))
(defn- extract-parts
[input]
(if-let [matches (re-find #"^1?(...)(...)(....)$" input)]
(rest matches)
["000" "000" "0000"]))
(defn- parts
[input]
(-> input
digits-only
extr... | null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/phone-number/src/phone_number.clj | clojure | (ns phone-number
(:require [clojure.string :as str]))
(defn- digits-only
[input]
(str/replace input #"\D" ""))
(defn- extract-parts
[input]
(if-let [matches (re-find #"^1?(...)(...)(....)$" input)]
(rest matches)
["000" "000" "0000"]))
(defn- parts
[input]
(-> input
digits-only
extr... | |
d8ffeae440a998d321db63703b2c7999afe38df090c117b982ab1e8878eab065 | alexandroid000/improv | AllTests.hs | module Main where
import qualified MsgGen
import qualified TopicTest
import Test.Tasty
main :: IO ()
main = do genTests <- MsgGen.tests
defaultMain $ testGroup "roshask" [
testGroup "roshask executable"
[ genTests ]
, testGroup "roshask library"
[ T... | null | https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/Tests/AllTests.hs | haskell | module Main where
import qualified MsgGen
import qualified TopicTest
import Test.Tasty
main :: IO ()
main = do genTests <- MsgGen.tests
defaultMain $ testGroup "roshask" [
testGroup "roshask executable"
[ genTests ]
, testGroup "roshask library"
[ T... | |
5cda0c3e874ace865c2312ce40bd56653e31026d656aec853372641c34c5d8e6 | lspector/taggp | parity.clj | (ns taggp.examples.parity
(:use [taggp.core :exclude [-main]]))
;;; even-6-parity
;
;(def target-data
; (for [d0 [false true]
; d1 [false true]
; d2 [false true]
; d3 [false true]
; d4 [false true]
; d5 [false true]]
[ { ' d0 d0 ' d1 d1 ' d2 d2 ' d3 d3 ' d4 d4 ' d5 d5 }
... | null | https://raw.githubusercontent.com/lspector/taggp/8236236da16abdad6e0388f5cac272d2a86af162/src/taggp/examples/parity.clj | clojure | even-6-parity
(def target-data
(for [d0 [false true]
d1 [false true]
d2 [false true]
d3 [false true]
d4 [false true]
d5 [false true]]
even-4-parity
:tagged-with-args-erf)
; also include d4 and d6 for 6 - parity | (ns taggp.examples.parity
(:use [taggp.core :exclude [-main]]))
[ { ' d0 d0 ' d1 d1 ' d2 d2 ' d3 d3 ' d4 d4 ' d5 d5 }
( even ? ( count ( filter # ( do % ) [ d0 d1 d2 d3 d4 d5 ] ) ) ) ] ) )
(def target-data
(for [d0 [false true]
d1 [false true]
d2 [false true]
d3 [false true]]
... |
e4b780ae7d841448e269a96f82c747ec8c6e6eab1b0e84d974574c0b99cadfba | mcorbin/meuse | index.clj | (ns meuse.front.pages.index
(:require [meuse.db.public.crate :as public-crate]
[meuse.db.public.crate-version :as public-crate-version]
[meuse.db.public.user :as public-user]))
(defn last-updated-crates
[crate-version-db]
[:div {:class "col-12 col-md-6"}
[:h2 {:class "center"} "Last up... | null | https://raw.githubusercontent.com/mcorbin/meuse/d2b74543fce37c8cde770ae6f6097cabb509a804/src/meuse/front/pages/index.clj | clojure | (ns meuse.front.pages.index
(:require [meuse.db.public.crate :as public-crate]
[meuse.db.public.crate-version :as public-crate-version]
[meuse.db.public.user :as public-user]))
(defn last-updated-crates
[crate-version-db]
[:div {:class "col-12 col-md-6"}
[:h2 {:class "center"} "Last up... | |
ca5e118428eb9530d71d12b29d9320bfb713768931108d5aa576e4ad93a1c1af | Fresheyeball/Shpadoinkle | Sample.hs | # LANGUAGE CPP #
# LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeOperators #-}
# OPTIONS_GHC -fno - warn - redundant - constraints #
module Shpadoinkle.Disembodied.Sample where
import Servant.API
import Shpad... | null | https://raw.githubusercontent.com/Fresheyeball/Shpadoinkle/5e5fb636fb0b0e99f04bae0d75cff722a10463ae/disembodied/Shpadoinkle/Disembodied/Sample.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators # | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - redundant - constraints #
module Shpadoinkle.Disembodied.Sample where
import Servant.API
import Shpadoinkle (Html, JSM, MonadJSM)
import Shpadoinkle.... |
e64b3c9b8cc5cb636da20348e92f5ca3aaaa0935921b65e2ae10501b48117b6d | jfischoff/tmp-postgres | Internal.hs | {-# OPTIONS_HADDOCK prune #-}
|
This module provides the high level functions that are re - exported
by @Database . Postgres . Additionally it includes some
identifiers that are used for testing but are not exported .
This module provides the high level functions that are re-exported
by @Database.Postgres.Temp... | null | https://raw.githubusercontent.com/jfischoff/tmp-postgres/593e3ebcb7643afd6095f6269de3552d01c7ff40/src/Database/Postgres/Temp/Internal.hs | haskell | # OPTIONS_HADDOCK prune #
| Handle for holding temporary resources, the @postgres@ process handle
and @postgres@ connection information. The 'DB' also includes the
final plan used to start @initdb@, @createdb@ and
@postgres@.
^ Temporary resources and the final 'Plan'.
^ @postgres@ process handle and the c... | |
This module provides the high level functions that are re - exported
by @Database . Postgres . Additionally it includes some
identifiers that are used for testing but are not exported .
This module provides the high level functions that are re-exported
by @Database.Postgres.Temp@. Additionally it includes so... |
119854ff770cafa5aa2d17a3da2b24c862df13a468bdba43d8f97b33aa33ce85 | dorchard/effect-monad | Writer.hs | # LANGUAGE DataKinds , KindSignatures , TypeOperators , RebindableSyntax ,
FlexibleInstances , ConstraintKinds , FlexibleContexts ,
TypeFamilies , ScopedTypeVariables #
FlexibleInstances, ConstraintKinds, FlexibleContexts,
TypeFamilies, ScopedTypeVariables #-}
im... | null | https://raw.githubusercontent.com/dorchard/effect-monad/5750ef8438f750e528002a0a4e255514cbf3150a/examples/Writer.hs | haskell | - Polymorphism test
- Subeffecting test | # LANGUAGE DataKinds , KindSignatures , TypeOperators , RebindableSyntax ,
FlexibleInstances , ConstraintKinds , FlexibleContexts ,
TypeFamilies , ScopedTypeVariables #
FlexibleInstances, ConstraintKinds, FlexibleContexts,
TypeFamilies, ScopedTypeVariables #-}
im... |
4327c1279a1ba696c8622e900faef5bbd8a4afaa0aa2ca2b115b80d563587095 | owickstrom/komposition | Help.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GADTs #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedLabels #-}
# LANGUAGE OverloadedLists #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeO... | null | https://raw.githubusercontent.com/owickstrom/komposition/64893d50941b90f44d77fea0dc6d30c061464cf3/src/Komposition/UserInterface/Help.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE OverloadedLabels #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators # | # LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedLists #
module Komposition.UserInterface.Help where
import Komposition.Prelude
import Data.Row.Records
import Motor.FSM
import Komposition.KeyMap
import Komposition.Use... |
05c61bbf85c74dfdf1a5e97435789435d27ea08ecac509b94c53536ed0e77bc4 | pomanu/waxeye | waxeye.rkt | ;; These are tests for the 'Grammar' non-terminal
(Grammar ; <- This is the non-terminal's name
;; Following the name are pairs of input string and expected output. The
;; output is either the keyword 'pass', the keyword 'fail' or an AST. The AST
;; specifies the structure of the expected tree, the names of the nod... | null | https://raw.githubusercontent.com/pomanu/waxeye/8c2fdc7d85d7c4f87adfc8f482a311b55bfda1e2/test/grammars/waxeye.rkt | racket | These are tests for the 'Grammar' non-terminal
<- This is the non-terminal's name
Following the name are pairs of input string and expected output. The
output is either the keyword 'pass', the keyword 'fail' or an AST. The AST
specifies the structure of the expected tree, the names of the nodes and
the individual... |
"A <- 'a'"
"A"
"A <- 'a' B <- 'b'"
"A <- 'a'"
"A <- [a-z] *[a-z0-9]"
(Grammar (Definition (Identifier #\A) (LeftArrow) (Alternation *)))
"A <- 'a'"
(Grammar (Definition (Identifier #\A)
(LeftArrow) (Alternation (Sequence (Unit (Literal (LChar #\a)))))))
)
(Literal
"'in'"
(Literal (LChar... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.