_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 |
|---|---|---|---|---|---|---|---|---|
d1f4c27a5ac9bcd8ef9800165f6840e14f897e363529cacedb11b7bdd92745b6 | pietervdvn/ALGT | ToString.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Utils.ToString where
{-
Haskell has already a built-in show; but we need more.
We often want a data representation (often handily available through `deriving Show`), but we often want fancy representations, in multiple flavours.
A flavour coul... | null | https://raw.githubusercontent.com/pietervdvn/ALGT/43a2811931be6daf1362f37cb16f99375ca4999e/src/Utils/ToString.hs | haskell |
Haskell has already a built-in show; but we need more.
We often want a data representation (often handily available through `deriving Show`), but we often want fancy representations, in multiple flavours.
A flavour could be that we need some more data to accuratly show the data, a version for 'native' (e.g. in the ... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Utils.ToString where
import Data.List (intercalate)
class ToString a where
a meta - expression as if it came from a file
toParsable :: a -> String
e.g. a parsetree as if it was a meta - expression in a file
toCoParsable :: a -> Strin... |
ba96c265f80a1c2c57cf692a5e743660fc5ec6ffb5e9657b4a68c06c122c35cb | master/ejabberd | ejabberd_hooks.erl | %%%----------------------------------------------------------------------
File : ejabberd_hooks.erl
Author : < >
%%% Purpose : Manage hooks
Created : 8 Aug 2004 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or... | null | https://raw.githubusercontent.com/master/ejabberd/9c31874d5a9d1852ece1b8ae70dd4b7e5eef7cf7/src/ejabberd_hooks.erl | erlang | ----------------------------------------------------------------------
Purpose : Manage hooks
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the ... | File : ejabberd_hooks.erl
Author : < >
Created : 8 Aug 2004 by < >
ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GN... |
4814d78af6b754eebc7561904251d2c2055acf29a03d4dd7b427f78f355b67a1 | antono/guix-debian | union.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 < >
;;;
;;; 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
the Free Software Foundation ; either version... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/tests/union.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 © 2012 , 2013 , 2014 < >
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 (test-union)
#:use-module (guix store)
#:use-module (guix utils)
#:use-module ... |
c0e9448a121428f9ee4297182321abafeb6bc284242c568dfa3804f41c563f05 | mauricioszabo/repl-tooling | clojure_ui.cljs | (ns repl-tooling.integration.clojure-ui
(:require [reagent.core :as r]
[clojure.walk :as walk]
[repl-tooling.editor-integration.connection :as conn]
[repl-tooling.integration.ui-macros :as ui]
[repl-tooling.editor-integration.renderer :as render]
[repl-tooli... | null | https://raw.githubusercontent.com/mauricioszabo/repl-tooling/1cea9b411cc118d71266cb8e035e146325baf410/test/repl_tooling/integration/clojure_ui.cljs | clojure | (ui/click-link-and-assert-children | (ns repl-tooling.integration.clojure-ui
(:require [reagent.core :as r]
[clojure.walk :as walk]
[repl-tooling.editor-integration.connection :as conn]
[repl-tooling.integration.ui-macros :as ui]
[repl-tooling.editor-integration.renderer :as render]
[repl-tooli... |
296630084a0e8af44a9aa53b83b0beb1969733606dea3285b940faf948f0a06b | logicmoo/wam_common_lisp | pkg.lisp | -*-Mode : LISP ; Package:(PCL ( LISP WALKER ) ) ; ; Syntax : Common - lisp -*-
;;;
;;; *************************************************************************
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
;;; All rights reserved.
;;;
;;; Use and copying of this software and preparatio... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/pcl/pkg.lisp | lisp | Package:(PCL ( LISP WALKER ) ) ; ; Syntax : Common - lisp -*-
*************************************************************************
All rights reserved.
Use and copying of this software and preparation of derivative works
based upon this software are permitted. Any distribution of this
States export contr... | Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
software or derivative works must comply with all applicable United
This software is made available AS IS , and Xerox Corporation makes no
CommonLoops Coordinator
Xerox PARC
3333 Coyote Hill Rd .
Palo Alto , CA 94304
( o... |
4c58d2533f633e70e40d87066419da245f64b5e8f87b4d7155e87cc604caef64 | factisresearch/mq-demo | Tests.hs | # OPTIONS_GHC -fno - warn - unused - binds -fno - warn - unused - imports #
# LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
{-# LANGUAGE RankNTypes #-}
# OPTIONS_GHC -F -pgmF htfpp #
module Mgw.MessageQueue.Tests
( htf_thisModulesTests )
where
#include "src/macros.h"
--------------... | null | https://raw.githubusercontent.com/factisresearch/mq-demo/0efa1991ca647a86a8c22e516a7a1fb392ab4596/server/src/lib/Mgw/MessageQueue/Tests.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
--------------------------------------
LOCAL
--------------------------------------
--------------------------------------
SITE-PACKAGES
--------------------------------------
--------------------------------------
STDLIB
-------------------------------------- | # OPTIONS_GHC -fno - warn - unused - binds -fno - warn - unused - imports #
# LANGUAGE CPP #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -F -pgmF htfpp #
module Mgw.MessageQueue.Tests
( htf_thisModulesTests )
where
#include "src/macros.h"
import Mgw.MessageQueue.LocalBroker
import Mgw.MessageQueue.BrokerServer
impo... |
d86d30929f95b1d09bb4df996ab75343b04db2582d65cd37c56205c0f0a9e0d9 | serras/t-regex | MultiGenerics.hs | # LANGUAGE PolyKinds #
# LANGUAGE TypeOperators #
# LANGUAGE TypeFamilies #
# LANGUAGE KindSignatures #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
-- | Multirec-style generics, indexed by data kind 'k'.
-- Pattern functors should have kind @(k -> *) -> k -> *@.
module Data.MultiGenerics where
import Test.Quick... | null | https://raw.githubusercontent.com/serras/t-regex/8890f99b849baaf55b7e9ae9fbdb6d818b992ba3/src/Data/MultiGenerics.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE GADTs #
| Multirec-style generics, indexed by data kind 'k'.
Pattern functors should have kind @(k -> *) -> k -> *@.
| Multirec-style fix-point, indexed by data kind.
| A 'SingI' constraint is essentially an implicitly-passed singleton.
extension to use this method the way you wa... | # LANGUAGE PolyKinds #
# LANGUAGE TypeOperators #
# LANGUAGE TypeFamilies #
# LANGUAGE KindSignatures #
module Data.MultiGenerics where
import Test.QuickCheck.Gen
newtype Fix (f :: (k -> *) -> k -> *) (ix :: k) = Fix { unFix :: f (Fix f) ix }
| The singleton kind - indexed data family . Taken from the @singletons@... |
d3b4c2fef8cbea7885eed6faff456f2399b2df4260b09ad8f2c7c023d51d1fa9 | lpeterse/koka | Highlight.hs | ------------------------------------------------------------------------------
Copyright 2012 Microsoft Corporation .
--
-- This is free software; you can redistribute it and/or modify it under the
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the ro... | null | https://raw.githubusercontent.com/lpeterse/koka/43feefed258b9a533f07967d3f8867b02384df0e/src/Syntax/Highlight.hs | haskell | ----------------------------------------------------------------------------
This is free software; you can redistribute it and/or modify it under the
---------------------------------------------------------------------------
Syntax coloring
---------------------------------------------------------------------... | Copyright 2012 Microsoft Corporation .
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the root of this distribution .
module Syntax.Highlight( Context(..), Nesting(..), Token(..), TokenComment(..)
, highlight
... |
9bb4008b9898765c367aafb2cea1e8c6863c4452fac867e5bd10e1977f5fde7d | anoma/juvix | BackendGeb.hs | module BackendGeb where
import BackendGeb.Eval qualified as Eval
import Base
allTests :: TestTree
allTests =
testGroup
"BackendGeb tests"
[ Eval.allTests
]
| null | https://raw.githubusercontent.com/anoma/juvix/23f34403f521c0aaab481b7e4071d0736da08508/test/BackendGeb.hs | haskell | module BackendGeb where
import BackendGeb.Eval qualified as Eval
import Base
allTests :: TestTree
allTests =
testGroup
"BackendGeb tests"
[ Eval.allTests
]
| |
04ac8dca04b7c81e3704311c8c1ab6cdbac103d8ff2976b0dc8557c7a90a240e | ice1000/learn | tribonacci-sequence.hs | module Tribonacci where
tribonacci :: Num a => (a, a, a) -> Int -> [a]
tribonacci (a, b, c) n = let ret = a : b : c : (zipWith3 f ret (tail ret) $ tail $ tail ret) in take n ret
where f = \a b c -> a + b + c
--
| null | https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/tribonacci-sequence.hs | haskell | module Tribonacci where
tribonacci :: Num a => (a, a, a) -> Int -> [a]
tribonacci (a, b, c) n = let ret = a : b : c : (zipWith3 f ret (tail ret) $ tail $ tail ret) in take n ret
where f = \a b c -> a + b + c
| |
fdb12c3a619437780a4f4b8ecc3e0016389db2f07b6c16129f7428f05b91572f | kostmo/circleci-failure-tracker | BuildRetrieval.hs | {-# LANGUAGE OverloadedStrings #-}
module BuildRetrieval where
import Control.Lens hiding ((<.>))
import Control.Monad (when)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Except (ExceptT (ExceptT), except,
... | null | https://raw.githubusercontent.com/kostmo/circleci-failure-tracker/393d10a72080bd527fdb159da6ebfea23fcd52d1/app/fetcher/src/BuildRetrieval.hs | haskell | # LANGUAGE OverloadedStrings #
TODO - these are methods of parallelization:
pages <- mapConcurrently Scanning.store_log scannable
| This is CircleCI-specific
and assumes all the builds are failed builds
^ starting offset
| This is populated from the "bulk" API query which lists multiple builds.
^ starting offse... |
module BuildRetrieval where
import Control.Lens hiding ((<.>))
import Control.Monad (when)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Except (ExceptT (ExceptT), except,
runExceptT... |
f6ebc339f8cf8d569e49cef931a61296bde8dd333bc21f27c41a8473cad6d2fb | kaoskorobase/mescaline | Compiler.hs | {-# LANGUAGE DeriveDataTypeable
, FlexibleContexts #-}
module Mescaline.Pattern.Compiler (
CompileError(..)
, Bindings
, compile
) where
import Control.Applicative
import Control.Category
import Control.Exception
import Control.Monad
import Control.M... | null | https://raw.githubusercontent.com/kaoskorobase/mescaline/13554fc4826d0c977d0010c0b4fb74ba12ced6b9/lib/mescaline-patterns/src/Mescaline/Pattern/Compiler.hs | haskell | # LANGUAGE DeriveDataTypeable
, FlexibleContexts #
| A type for compilation errors.
| Compiler environment.
data Env = Env {
^Bool pattern bindings .
^Coord pattern bindings .
^Event pattern bindings .
^Scalar pattern bindings .
, : : AST.ExpMap AST.Scalar
, : : AST.ExpMap AST.Event
}
| Empty ... | module Mescaline.Pattern.Compiler (
CompileError(..)
, Bindings
, compile
) where
import Control.Applicative
import Control.Category
import Control.Exception
import Control.Monad
import Control.Monad.Error
import qualified Control.Monad.State as State
import ... |
f14f1a222c36aebb40c3fb820f2283304d6a9df693b4298e0abe3d916ca7bf7f | danhper/evm-analyzer | factDb.ml | open Core
module CI = Datalog_caml_interface
type t = {
db: CI.Logic.DB.t;
int_cache: (string, int option) Hashtbl.t;
}
let num_facts t = CI.Logic.DB.num_facts t.db
let num_clauses t = CI.Logic.DB.num_clauses t.db
module Rel4 = struct
type ('a,'b,'c,'d) t = CI.const * 'a CI.Univ.key * 'b CI.Univ.key * 'c CI.U... | null | https://raw.githubusercontent.com/danhper/evm-analyzer/9fb1cf6dc743c2f779973b2f0892047ebbd4e5fd/src/factDb.ml | ocaml | open Core
module CI = Datalog_caml_interface
type t = {
db: CI.Logic.DB.t;
int_cache: (string, int option) Hashtbl.t;
}
let num_facts t = CI.Logic.DB.num_facts t.db
let num_clauses t = CI.Logic.DB.num_clauses t.db
module Rel4 = struct
type ('a,'b,'c,'d) t = CI.const * 'a CI.Univ.key * 'b CI.Univ.key * 'c CI.U... | |
5ce990a0e86aa1bcebf315390112b40a454691bfa0301aabb4ab9973daa7d223 | ocaml-multicore/parafuzz | gpr1997.ml | (* TEST
* expect
*)
module M : sig
type 'a t
type _ typ =
| Foo : 'a -> [`Foo of 'a] typ
| Bar : string -> [`Bar] typ
val use_bar : [`Bar] t -> int
val foo : [`Foo of int] t
end = struct
type 'a t = string
type _ typ =
| Foo : 'a -> [`Foo of 'a] typ
| Bar : string -> [`Bar] typ
l... | null | https://raw.githubusercontent.com/ocaml-multicore/parafuzz/6a92906f1ba03287ffcb433063bded831a644fd5/testsuite/tests/typing-gadts/gpr1997.ml | ocaml | TEST
* expect
|
module M : sig
type 'a t
type _ typ =
| Foo : 'a -> [`Foo of 'a] typ
| Bar : string -> [`Bar] typ
val use_bar : [`Bar] t -> int
val foo : [`Foo of int] t
end = struct
type 'a t = string
type _ typ =
| Foo : 'a -> [`Foo of 'a] typ
| Bar : string -> [`Bar] typ
let foo = "foo"
let u... |
56cd9685437d0f008197dcf65f2f0c9974b4a95b95af83b3ec5cbe1327ef7653 | patoline/patotex | LatexParser.ml | SPDX - License - Identifier : GPL-3.0
* for simple LaTeX files
open Earley
open LatexAst_helper
let locate = Pa_ocaml_prelude.locate
#define LOCATE locate
type latex_syntax_error =
| Syntax_error
| Unmatched_environment of string Location.loc * string Location.loc
| Unterminated_environment of string Locati... | null | https://raw.githubusercontent.com/patoline/patotex/6023951964cca08be1548672ce69cc8f62e5cdaf/LatexParser.ml | ocaml | * Blank function for verbatim content, which does not ignore any
character
TODO better macro
handling | SPDX - License - Identifier : GPL-3.0
* for simple LaTeX files
open Earley
open LatexAst_helper
let locate = Pa_ocaml_prelude.locate
#define LOCATE locate
type latex_syntax_error =
| Syntax_error
| Unmatched_environment of string Location.loc * string Location.loc
| Unterminated_environment of string Locati... |
6e448b14ebf4db7accc6fd7619e72514dbd5783d53c4c11fb7fb4b86f2ebaac3 | ragkousism/Guix-on-Hurd | spice.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2016 < >
;;;
;;; 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
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/spice.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 © 2016 < >
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 spice)
#:use-module (gnu packages)
remove after updating usbredir to 0.7.1 +
#:... |
8cca51177e864ccbfcaafdca1571cff4b8e374ac1b1c5f2b14c7ff262e2d510e | oscarh/gen_httpd | micro_benchmark.erl | -module(micro_benchmark).
-export([
tcp_server_active/1,
tcp_server_active/2,
tcp_server_passive/1,
tcp_server_passive/2,
tcp_server_reader/1,
tcp_server_reader/2,
tcp_client/3
]).
-export([reader/2]).
-define(DATA,
<<95,160,155,31,152,85,252,58,196,5,33... | null | https://raw.githubusercontent.com/oscarh/gen_httpd/5b48e33d8fac30c70e2d89d74c56e057d570064e/test/micro_benchmark.erl | erlang | -module(micro_benchmark).
-export([
tcp_server_active/1,
tcp_server_active/2,
tcp_server_passive/1,
tcp_server_passive/2,
tcp_server_reader/1,
tcp_server_reader/2,
tcp_client/3
]).
-export([reader/2]).
-define(DATA,
<<95,160,155,31,152,85,252,58,196,5,33... | |
c7a4602bc6ab01178e5919b499c06fb44b672a8a3c7b53e5433d86cdc0ef79fd | dparis/gen-phzr | webgl_graphics.cljs | (ns phzr.pixi.webgl-graphics
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->WebGLGraphics
"A set of functions used by the webGL renderer to draw the primitive graphics data"
([]
(js/PIXI.WebGLGraphics.)))
| null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/pixi/webgl_graphics.cljs | clojure | (ns phzr.pixi.webgl-graphics
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->WebGLGraphics
"A set of functions used by the webGL renderer to draw the primitive graphics data"
([]
(js/PIXI.WebGLGraphics.)))
| |
49f33ac391ef33c907b9a6df4171e3559d8271f5e9c08df646628235e1d0f962 | satori-com/mzbench | mzb_signaler.erl | -module(mzb_signaler).
-export([start_link/0,
add_signal/1,
add_signal/2,
check_signal/1,
check_signal/2,
check_signal/3,
set_nodes/1,
get_all_signals/0,
add_local_signal/2]).
-behaviour(gen_server).
-export([init/1,
handle_call/3,
... | null | https://raw.githubusercontent.com/satori-com/mzbench/02be2684655cde94d537c322bb0611e258ae9718/node/apps/mzbench/src/mzb_signaler.erl | erlang | ===================================================================
API
===================================================================
===================================================================
gen_server callbacks
===================================================================
=====================... | -module(mzb_signaler).
-export([start_link/0,
add_signal/1,
add_signal/2,
check_signal/1,
check_signal/2,
check_signal/3,
set_nodes/1,
get_all_signals/0,
add_local_signal/2]).
-behaviour(gen_server).
-export([init/1,
handle_call/3,
... |
440bafa31e585d26248f7790c5a23adf05e13ea335e395be32023396d81f49e6 | gsakkas/rite | 2369.ml |
let rec sepConcat sep sl =
match sl with
| [] -> ""
| h::t ->
let f a x = a ^ (sep ^ x) in
let base = h in let l = t in List.fold_left f base l;;
let stringOfList f l = failwith List.map (fun x -> sepConcat "" x) l;;
fix
let rec sepConcat sep sl =
match sl with
| [ ] - > " "
| h:... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/2369.ml | ocaml |
let rec sepConcat sep sl =
match sl with
| [] -> ""
| h::t ->
let f a x = a ^ (sep ^ x) in
let base = h in let l = t in List.fold_left f base l;;
let stringOfList f l = failwith List.map (fun x -> sepConcat "" x) l;;
fix
let rec sepConcat sep sl =
match sl with
| [ ] - > " "
| h:... | |
d51f7675d5a0f56cf0d9d2b83454767cdc87ea478690d1aefb70310f9c67fa7e | i-am-tom/world-building-in-haskell | Main.hs | module Main where
import qualified Example.Noise
import qualified Example.Annealing
import qualified Example.Clustering
import qualified Example.Cave2d
import qualified Example.CaveSprites
import qualified Example.Cave3d
import qualified Example.Mountains
import qualified Example.WFC
import qualified Example.Isometric... | null | https://raw.githubusercontent.com/i-am-tom/world-building-in-haskell/fe7369b9069793ee6dd2a11e031a53b4af764d1a/app/Main.hs | haskell | strikingly different.
Examples of "annealing" - smoothing noise by repeatedly averaging a kernel
Examples of "clustering" - given some boolean noise, repeatedly assign a
the output maintains its noise.
Putting together what we now know, we can draw a simple cave and render it
in black and white.
We can even use ... | module Main where
import qualified Example.Noise
import qualified Example.Annealing
import qualified Example.Clustering
import qualified Example.Cave2d
import qualified Example.CaveSprites
import qualified Example.Cave3d
import qualified Example.Mountains
import qualified Example.WFC
import qualified Example.Isometric... |
1ddf499334de523e6bba5ebaa077bfc2e9c651f335ea25cf33cd392d5aab6e0d | kupl/LearnML | original.ml | type nat = ZERO | SUCC of nat
let rec natadd (a : nat) (b : nat) : nat =
match b with ZERO -> a | SUCC x -> SUCC (natadd a x)
let rec natmul (a : nat) (b : nat) : nat =
if a = ZERO || b = ZERO then ZERO else natadd b b
| null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/nat/sub14/original.ml | ocaml | type nat = ZERO | SUCC of nat
let rec natadd (a : nat) (b : nat) : nat =
match b with ZERO -> a | SUCC x -> SUCC (natadd a x)
let rec natmul (a : nat) (b : nat) : nat =
if a = ZERO || b = ZERO then ZERO else natadd b b
| |
42a0a1565658d64905fd2de876fef61510730be7383e7a77f081ec2c14aa0c9a | Bannerets/camlproto | Authenticator.mli | open! Base
open Types
exception AuthenticationError of string
module Make (Platform: PlatformTypes.S) (Sender: MTProtoPlainObjSender): sig
val authenticate
: Sender.t
-> ?reject_unknown_dh_params:bool
-> Math.Make(Platform).Crypto.Rsa.RsaManager.t
-> (Cstruct.t * int64 * int) Lwt.t
* Returns [ ( aut... | null | https://raw.githubusercontent.com/Bannerets/camlproto/0b31083b8c0103079ec2881176f63f8cb12abb73/src/mtproto/Authenticator.mli | ocaml | open! Base
open Types
exception AuthenticationError of string
module Make (Platform: PlatformTypes.S) (Sender: MTProtoPlainObjSender): sig
val authenticate
: Sender.t
-> ?reject_unknown_dh_params:bool
-> Math.Make(Platform).Crypto.Rsa.RsaManager.t
-> (Cstruct.t * int64 * int) Lwt.t
* Returns [ ( aut... | |
3da5054915bd2db221bd423a1394d42780954b38f7a278e0aebdd5fd82fc135d | facebook/flow | source_or_generated_id.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/7d4ce691063f70dfe00c5200ec8b17f43acae7a2/src/typing/source_or_generated_id.ml | ocaml | In order to minimize the frequency with which we unnecessarily compare
equivalent structures, we assign structures created at the top level of a
source program an id of their location instead of an int. This way, if we
see the structure twice between the merge and check phases, we consider them
equal just ... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
f00fbbdaa9026c95ddcef22a6b7c1321f3345f868cdca56f3d5f6b84e86f0242 | emqx/emqx | emqx_mgmt_api_listeners_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/3587c4c04aaf681f32e80ed2ebe6aef60549bd4c/apps/emqx_management/test/emqx_mgmt_api_listeners_SUITE.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_mgmt_api_listeners_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-inc... |
fef07dde47358de28f1a17d27acbddc5587547b9d4e35b2d911fc9e90b60f786 | chunsj/TH | cartpole-per.lisp | (defpackage :cartpole-per
(:use #:common-lisp
#:mu
#:th
#:th.layers
#:th.env
#:th.env.cartpole))
(in-package :cartpole-per)
(defun decay-schedule (v0 minv decay-ratio max-steps &key (log-start -2) (log-base 10))
(let* ((decay-steps (round (* max-steps decay-ratio)))
... | null | https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/examples/rl/cartpole-per.lisp | lisp | (defpackage :cartpole-per
(:use #:common-lisp
#:mu
#:th
#:th.layers
#:th.env
#:th.env.cartpole))
(in-package :cartpole-per)
(defun decay-schedule (v0 minv decay-ratio max-steps &key (log-start -2) (log-base 10))
(let* ((decay-steps (round (* max-steps decay-ratio)))
... | |
538cbc92e88f720b6f09e868b3583eb2d60a13eb1ee905258fea2f1d3cfc9e50 | danilkolikov/dfl | Debug.hs | |
Module : Util . Debug
Description : Functions for debug output
Copyright : ( c ) , 2019
License : MIT
Functions and types for easier debug output
Module : Util.Debug
Description : Functions for debug output
Copyright : (c) Danil Kolikov, 2019
License : MIT
Functi... | null | https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/src/Util/Debug.hs | haskell | | A type of functions which support raising exceptions and collecting
| debug information
| Executes the function and collects debug output
| A type of functions which support raising exceptions and collecting
| debug information and supports an inner monad
| Executes the function and collects debug output
| Lif... | |
Module : Util . Debug
Description : Functions for debug output
Copyright : ( c ) , 2019
License : MIT
Functions and types for easier debug output
Module : Util.Debug
Description : Functions for debug output
Copyright : (c) Danil Kolikov, 2019
License : MIT
Functi... |
919a8c39f7ec933b09617c790de583cdb1de9cd6d2e529455ccada03133e369f | appleshan/cl-http | exports.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Package : http ; Base : 10 -*-
(in-package :HTTP)
Make minimum CL - HTTP export for Allegro for UNIX .
;;; This file must be loaded after the default configuration file
;;; - OBC
;;;-------------------------------------------------------------------
;;;
;;; ACL... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/acl/obc/examples/exports.lisp | lisp | Syntax : ansi - common - lisp ; Package : http ; Base : 10 -*-
This file must be loaded after the default configuration file
- OBC
-------------------------------------------------------------------
ACL EXPORTS
Add UNIX CGI access tests
Provided for user extensions
Compile and load new exports only
|
(in-package :HTTP)
Make minimum CL - HTTP export for Allegro for UNIX .
(export-url #u"/cl-http/sources/acl/obc/-read-me-.text"
:text-file
:pathname (pathname "http:acl;-read-me-.text")
:expiration `(:interval ,(* 15. 60.))
:keywords '(:cl-http :documentation :alleg... |
b84b46cca3c1c5714327019b6caf0278c5523f2df4be2da5a2101c3e64dc02b3 | Decentralized-Pictures/T4L3NT | mockup.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_011_PtHangz2/lib_client/mockup.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
41e9db3fdda7a6567e2f6f83418cb9015f4d8bc96e977be3268bc08a36bd054b | axch/test-manager | interactions.scm | ;;; ----------------------------------------------------------------------
Copyright 2009 .
;;; ----------------------------------------------------------------------
;;; This file is part of Test Manager.
;;;
;;; Test Manager is free software; you can redistribute it and/or modify
it under the terms of the GNU ... | null | https://raw.githubusercontent.com/axch/test-manager/511922c64e189522bef02686a7b9bf050aec0ce2/interactions.scm | scheme | ----------------------------------------------------------------------
----------------------------------------------------------------------
This file is part of Test Manager.
Test Manager is free software; you can redistribute it and/or modify
(at your option) any later version.
Test Manager is distributed ... | Copyright 2009 .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
This is an MIT - Scheme specific facility for faking out the repl
( define foo 5 )... |
96a0c0da86be27259bf511829ab7f316982d05878e219fc908056c80f4d3f818 | camlp5/camlp5 | exparser.ml | (* camlp5r *)
(* exparser.ml,v *)
Copyright ( c ) INRIA 2007 - 2017
#load "q_MLast.cmo";
type spat_comp =
[ SpTrm of MLast.loc and MLast.patt and MLast.v (option MLast.expr)
| SpNtr of MLast.loc and MLast.patt and MLast.expr
| SpLet of MLast.loc and MLast.patt and MLast.expr
| SpLhd of MLast.loc and list (l... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/main/exparser.ml | ocaml | camlp5r
exparser.ml,v
Converting into AST
Streams | Copyright ( c ) INRIA 2007 - 2017
#load "q_MLast.cmo";
type spat_comp =
[ SpTrm of MLast.loc and MLast.patt and MLast.v (option MLast.expr)
| SpNtr of MLast.loc and MLast.patt and MLast.expr
| SpLet of MLast.loc and MLast.patt and MLast.expr
| SpLhd of MLast.loc and list (list MLast.patt)
| SpStr of MLast... |
db3c52dcd34ec8dd2f9466dc02316796091eec74caef0b7a52c97ff19561d67c | fulcrologic/fulcro | ui.cljs | (ns fulcro-todomvc.ui
(:require
[com.fulcrologic.fulcro.algorithms.tempid :as tmp]
[com.fulcrologic.fulcro.application :as app]
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.dom :as dom]
[com.fulcrologic.fulcro.mutations :as mut :refer [defmutation]]
[com.... | null | https://raw.githubusercontent.com/fulcrologic/fulcro/2b96c84dff84b3e925efd162c7f989d8851a22e4/src/todomvc/fulcro_todomvc/ui.cljs | clojure | FIXME: on abort, not all of the combined nodes get the aborted result
The only-refresh is used to make sure the list re-renders, as
it does a calculated rendering of the "all checked" checkbox.
(dom/div {}
(let [todo-list (raw/use-root app :root/todo-mvo TodoList {:initialize? true})]
(raw/with-fulcro ... | (ns fulcro-todomvc.ui
(:require
[com.fulcrologic.fulcro.algorithms.tempid :as tmp]
[com.fulcrologic.fulcro.application :as app]
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.dom :as dom]
[com.fulcrologic.fulcro.mutations :as mut :refer [defmutation]]
[com.... |
5ad17bc7a48ef3140b598282fef5aa55d023e740fce5c874401937acd0885e11 | imrehg/ypsilon | modifier.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gdk modifier)
(export gdk_modifier_type_get_type)
(import (rnrs) (ypsilon ffi))
(define lib-name
(cond (on-linux "libgdk-x11-2... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gdk/modifier.scm | scheme | [end] | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gdk modifier)
(export gdk_modifier_type_get_type)
(import (rnrs) (ypsilon ffi))
(define lib-name
(cond (on-linux "libgdk-x11-2... |
a09b19fdef59930535ef941a1d43f5bc9cad5447112f81bfdc727e475f2facda | achirkin/vulkan | VK_KHR_xcb_surface.hs | # OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_HADDOCK not - home #
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE MagicHash #-}
{... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_KHR_xcb_surface.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE MagicHash #
# LANGUAGE PatternSynonyms #
# LANGUAGE Strict #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
> #include "vk_platform.h"
|
Error codes: 'VK_ERRO... | # OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_HADDOCK not - home #
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE TypeApplications #
module Graphics.Vulkan.Ext.VK_KHR_xcb_surface
(AHardwareBuffer(), ANativeWindow()... |
26f45403a472049ef4625b01cd7b1c73c5a5af9c83ac00ab60e7bac3473f52c3 | geneweb/geneweb | mergeInd.ml | Copyright ( c ) 1998 - 2007 INRIA
open Def
open Gwdb
let compatible_cdates cd1 cd2 =
cd1 = cd2 || cd2 = Date.cdate_None || cd1 = Date.cdate_None
let compatible_death_reasons dr1 dr2 = dr1 = dr2 || dr2 = Unspecified
let compatible_deaths d1 d2 =
if d1 = d2 then true
else
match (d1, d2) with
| Death (... | null | https://raw.githubusercontent.com/geneweb/geneweb/7b71f8f2f75e0e847818f821a0267938f38c9cf5/lib/mergeInd.ml | ocaml | Undocumented feature... Kill someone's ancestors | Copyright ( c ) 1998 - 2007 INRIA
open Def
open Gwdb
let compatible_cdates cd1 cd2 =
cd1 = cd2 || cd2 = Date.cdate_None || cd1 = Date.cdate_None
let compatible_death_reasons dr1 dr2 = dr1 = dr2 || dr2 = Unspecified
let compatible_deaths d1 d2 =
if d1 = d2 then true
else
match (d1, d2) with
| Death (... |
fa80594c56c83e7f8f9f6b8f251c2125f950ded6e1f73f5939a4d78f89cea23d | aryx/xix | pagetable_.ml | open Types
(* todo: PageOrSwap below? use Common.either? *)
type t = {
(* opti: we use an array; faster than a list *)
length = pagetab_size = 256
(* opti: the fields below allow to avoid iterate over all entries in pagetab.
* This is useful especially for SStack where allocated pages are at the end
* of ... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/kernel/core/pagetable_.ml | ocaml | todo: PageOrSwap below? use Common.either?
opti: we use an array; faster than a list
opti: the fields below allow to avoid iterate over all entries in pagetab.
* This is useful especially for SStack where allocated pages are at the end
* of the array.
* todo: but who needs to iterate? just Pagetable.free ... | open Types
type t = {
length = pagetab_size = 256
mutable last: int;
}
let pagetab_size = 256
1 MB
|
dddb2949e95840ffde05bc01c12f2247324097614883a216abda09567f35a6e9 | well-typed/large-records | R000.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
module Experiment.ConstructWithTypeLet.Sized.R000 where | null | https://raw.githubusercontent.com/well-typed/large-records/d875b1d6a041a7a56690facb6b906d53673182be/large-records-benchmarks/bench/large-anon/Experiment/ConstructWithTypeLet/Sized/R000.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings # | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.ConstructWithTypeLet.Sized.R000 where |
d733c297b43284a6d6ddfa96b2e610035a0be102ce9143649921f8eb861759f2 | tamarit/pn_suite | pn_yuetal.erl | -module( pn_yuetal ).
-export( [
slice/2, slice_no_sim/2,
write_sdg/2,
write_sdg_sim/2,
sdg/2,
bsg/3
] ).
-include("pn.hrl").
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Slice Yu et al
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
slice(PN0, SC) ->
PN = pn_lib:new_pn_fresh_digraph(PN0),
SDG = sdg_sim(PN, SC),
... | null | https://raw.githubusercontent.com/tamarit/pn_suite/a7ce605e161d97de529bb94df736f858cc27cf2a/src/pn_yuetal.erl | erlang |
Slice Yu et al
io:format("~p\n", [{lists:sort(sets:to_list(element(1, PTs))), lists:sort(sets:to_list(element(2, PTs)))} ]),
io:format("Finished SDG construction\n"),
io:format("Finished BSG construction\n"),
io:format("~p\n", [{lists:sort(sets:to_list(element(1, PTs))), lists:sort(sets:to_list(element(2, PTs)))... | -module( pn_yuetal ).
-export( [
slice/2, slice_no_sim/2,
write_sdg/2,
write_sdg_sim/2,
sdg/2,
bsg/3
] ).
-include("pn.hrl").
slice(PN0, SC) ->
PN = pn_lib:new_pn_fresh_digraph(PN0),
SDG = sdg_sim(PN, SC),
BSG = bsg_sim(PN, SDG, SC),
write_sdg_sim(SDG, "sdg_sim.dot"),
w... |
3e383b8eae0cbb1360382b9b394cd12387327527d481537d7aede58f8b236120 | UBTECH-Walker/WalkerSimulationFor2020WAIC | SetUMap.lisp | ; Auto-generated. Do not edit!
(cl:in-package cruiser_msgs-srv)
// ! \htmlinclude
(cl:defclass <SetUMap-request> (roslisp-msg-protocol:ros-message)
((data
:reader data
:initarg :data
:type cl:string
:initform ""))
)
(cl:defclass SetUMap-request (<SetUMap-request>)
())
(cl:defmethod cl:initia... | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_18.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/srv/SetUMap.lisp | lisp | Auto-generated. Do not edit! |
(cl:in-package cruiser_msgs-srv)
// ! \htmlinclude
(cl:defclass <SetUMap-request> (roslisp-msg-protocol:ros-message)
((data
:reader data
:initarg :data
:type cl:string
:initform ""))
)
(cl:defclass SetUMap-request (<SetUMap-request>)
())
(cl:defmethod cl:initialize-instance :after ((m <SetUM... |
54dd61b61bb64d7f2a35c3e926cab9a7d2d77933e82c6c6acb323a55d642d4a1 | open-company/open-company-web | team.cljs | (ns oc.web.actions.team
(:require [clojure.string :as string]
[oc.web.api :as api]
[oc.web.router :as router]
[oc.web.utils.user :as uu]
[oc.web.dispatcher :as dis]
[oc.web.lib.utils :as utils]
[oc.web.actions.payments :as payments-actions]
... | null | https://raw.githubusercontent.com/open-company/open-company-web/deec3f67cd73196995300a097e68612173700551/src/main/oc/web/actions/team.cljs | clojure | team link may not be present for non-admins, if so they can still get team users from the roster
Reset the team-data-requested to restart the teams load
Team management view
Authors
Admins
refresh the users list once the invitation succeded
Add an admin call
Remove admin call
Add author call
Remove author cal... | (ns oc.web.actions.team
(:require [clojure.string :as string]
[oc.web.api :as api]
[oc.web.router :as router]
[oc.web.utils.user :as uu]
[oc.web.dispatcher :as dis]
[oc.web.lib.utils :as utils]
[oc.web.actions.payments :as payments-actions]
... |
8aba351e713c066e077699e12ffb915892b7dc07bac9cd98ca54ca2b7cea2cf2 | deadpendency/deadpendency | FinishRunGitHubC.hs | module RF.Effect.FinishRun.Carrier.FinishRunGitHubC
( FinishRunGithubIOC (..),
)
where
import Common.Effect.AppEventEmit.AppEventEmit
import Common.Effect.AppEventEmit.Model.AppEventAdditional
import Common.Effect.AppEventEmit.Model.AppEventMessage
import Common.Effect.GitHub.WriteChecks.Model.CheckRunUpdateReques... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/run-finalizer/src/RF/Effect/FinishRun/Carrier/FinishRunGitHubC.hs | haskell | module RF.Effect.FinishRun.Carrier.FinishRunGitHubC
( FinishRunGithubIOC (..),
)
where
import Common.Effect.AppEventEmit.AppEventEmit
import Common.Effect.AppEventEmit.Model.AppEventAdditional
import Common.Effect.AppEventEmit.Model.AppEventMessage
import Common.Effect.GitHub.WriteChecks.Model.CheckRunUpdateReques... | |
289a1be2a36eccc349b22804619a15bc4248467cc11626cf18777f44d3129260 | TerrorJack/ghc-alter | MVar.hs | # LANGUAGE Unsafe #
# LANGUAGE NoImplicitPrelude , MagicHash , UnboxedTuples #
{-# OPTIONS_GHC -funbox-strict-fields #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
Module : GHC.MVar
Copyright : ( c ) The University of Glasgow 2008
--... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/GHC/MVar.hs | haskell | # OPTIONS_GHC -funbox-strict-fields #
# OPTIONS_HADDOCK hide #
---------------------------------------------------------------------------
|
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
---------------------------------------------------------------------------
* MVars
empt... | # LANGUAGE Unsafe #
# LANGUAGE NoImplicitPrelude , MagicHash , UnboxedTuples #
Module : GHC.MVar
Copyright : ( c ) The University of Glasgow 2008
Portability : non - portable ( GHC Extensions )
The MVar type
module GHC.MVar (
MVar(..)
, newMVar
, newEmptyMVar
,... |
48bbbc3e0aaea824ab33405bb6765b078fb28e2e24a895779e8880871a6b938a | max-au/lambda | lambda_scheduler.erl | %% @doc
%% Suspending scheduler implementation.
%% Enables build systems with dynamic dependencies.
%% Concurrent startup for multiple applications can be viewed
%% as "building" set of targets.
%%
%% Current implementation does not limit concurrency, relying on
%% Erlang scheduling to do the job.
%%
%% ... | null | https://raw.githubusercontent.com/max-au/lambda/53d9ab894156f5b15bbf1ad774449bb877588144/src/lambda_scheduler.erl | erlang | @doc
Suspending scheduler implementation.
Enables build systems with dynamic dependencies.
Concurrent startup for multiple applications can be viewed
as "building" set of targets.
Current implementation does not limit concurrency, relying on
Erlang scheduling to do the job.
Usage examples:
... | 1 . Building a target , given resolver function :
Resolver = fun ( _ Sched , root ) - > 42 end ,
2 . Building a target with dependencies ( note dependencies must be a list ):
DepVal + 10 ;
42
-module(lambda_scheduler).
-export([
request/2,
reque... |
8f5001b2da801a9a7c697fda63932b15761e7ec90813d10ff9bb76db9588b90d | jimweirich/sicp-study | ex2_57_test.scm | SICP Test 2.57
(test-case "Ex 2.57 -- Augend"
(assert-equal 'b (augend '(+ a b)))
(assert-equal '(+ b c) (augend '(+ a b c))))
(test-case "Ex 2.57 -- Expanded sums"
(assert-equal '(+ a b) (make-sum 'a 'b))
(assert-equal '(+ a b c) (make-sum 'a '(+ b c)))
(asser... | null | https://raw.githubusercontent.com/jimweirich/sicp-study/bc5190e04ed6ae321107ed6149241f26efc1b8c8/scheme/chapter2/ex2_57_test.scm | scheme | SICP Test 2.57
(test-case "Ex 2.57 -- Augend"
(assert-equal 'b (augend '(+ a b)))
(assert-equal '(+ b c) (augend '(+ a b c))))
(test-case "Ex 2.57 -- Expanded sums"
(assert-equal '(+ a b) (make-sum 'a 'b))
(assert-equal '(+ a b c) (make-sum 'a '(+ b c)))
(asser... | |
02f8bdc5119ef5c663da92283d1ad3901b3d9b4735d1962edf22a129e7323e4b | aeternity/aeternity | aemon_metrics.erl | %% @doc This module provides helper functions which mask exometer and
aec_metric calls for the user .
-module(aemon_metrics).
%% generic API
-export([create/1]).
%% specific metrics
-export([ block_gas_per_tx/1
, block_gas_total/1
, block_propagation_time/2
, block_size_per_tx/1
, bl... | null | https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/apps/aemon/src/aemon_metrics.erl | erlang | @doc This module provides helper functions which mask exometer and
generic API
specific metrics
==================================================================
generic API
@doc Creates a set of metrics based on the given group identifier.
==================================================================
spe... | aec_metric calls for the user .
-module(aemon_metrics).
-export([create/1]).
-export([ block_gas_per_tx/1
, block_gas_total/1
, block_propagation_time/2
, block_size_per_tx/1
, block_time_since_prev/2
, block_tx_total/1
, chain_top_difficulty/1
, confirmation_... |
93a9608a9916333cbcf8930b426774c1fdc431d49111e9e38a75a6be981aa271 | miraj-project/miraj | project.clj | (defproject gae "0.0.1-SNAPSHOT"
:source-paths ["mod-main/src/main/clojure" "checkouts/miraj/src/clj"]
:resource {
:resource-paths [["mod-main/src/main/clojure"
{:target-path "ear/build/exploded-app/mod-main-0.1.0/WEB-INF/classes"
:includes [... | null | https://raw.githubusercontent.com/miraj-project/miraj/bf6f7d4d1c383ac9294dcdef2ad48b3863b6d84f/dev/gae/project.clj | clojure | if true only process files with src newer than dest | (defproject gae "0.0.1-SNAPSHOT"
:source-paths ["mod-main/src/main/clojure" "checkouts/miraj/src/clj"]
:resource {
:resource-paths [["mod-main/src/main/clojure"
{:target-path "ear/build/exploded-app/mod-main-0.1.0/WEB-INF/classes"
:includes [... |
f17dce956e114164c119daf4314f333a72697c8cc784cbeed3f455c325849d4b | BillHallahan/G2 | Sets9.hs | {-@ LIQUID "--no-termination" @-}
module Sets9 (prop) where
import Data.Set
@ prop : : v : Int - > s1:[Int ] - > { s2:[Int ] | listElts s2 = = ( listElts s1 ) ( Set_sng v ) } @
prop :: Int -> [Int] -> [Int]
prop = f
{-@ f :: Int -> [Int] -> [Int] @-}
f :: Int -> [Int] -> [Int]
f x xs = x:xs | null | https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/test_files/Pos/Sets9.hs | haskell | @ LIQUID "--no-termination" @
@ f :: Int -> [Int] -> [Int] @ |
module Sets9 (prop) where
import Data.Set
@ prop : : v : Int - > s1:[Int ] - > { s2:[Int ] | listElts s2 = = ( listElts s1 ) ( Set_sng v ) } @
prop :: Int -> [Int] -> [Int]
prop = f
f :: Int -> [Int] -> [Int]
f x xs = x:xs |
d9cf39e94f0f2afa62779f3ab68d1e87a1a2f269aaa56563d48257b64cf88830 | stathissideris/nuka | exec.clj | (ns nuka.exec
(:require [clojure.string :as string]
[clojure.core.async :refer [go >! <! <!! >!! go-loop chan alts! alts!! close! timeout] :as async]
[nuka.script :as script :refer [script call q chain-and raw script? call?]]
[nuka.script.java]
[nuka.script.bash]
... | null | https://raw.githubusercontent.com/stathissideris/nuka/f56ea6a4f174a941f525312f0b30cb54cfdc397e/src/nuka/exec.clj | clojure | in-writer (-> p .getOutputStream)
don't throw, just create it, otherwise it will be silent | (ns nuka.exec
(:require [clojure.string :as string]
[clojure.core.async :refer [go >! <! <!! >!! go-loop chan alts! alts!! close! timeout] :as async]
[nuka.script :as script :refer [script call q chain-and raw script? call?]]
[nuka.script.java]
[nuka.script.bash]
... |
22182993b7a032a876ae45445d97ff40a63c67db70b8696bf0047f194578b105 | Simre1/haskell-game | Physics.hs | module Scene.Level.Step.Physics (stepPhysics) where
import Control.Monad.IO.Class (MonadIO)
import ECS.Apecs (SystemT)
import qualified ECS.Physics as Physics (stepPhysics)
import Scene.Level.World (World)
stepPhysics :: MonadIO m => SystemT World m ()
stepPhysics = Physics.stepPhysics (1/60)
| null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/app/Scene/Level/Step/Physics.hs | haskell | module Scene.Level.Step.Physics (stepPhysics) where
import Control.Monad.IO.Class (MonadIO)
import ECS.Apecs (SystemT)
import qualified ECS.Physics as Physics (stepPhysics)
import Scene.Level.World (World)
stepPhysics :: MonadIO m => SystemT World m ()
stepPhysics = Physics.stepPhysics (1/60)
| |
11b764069954caf6fe2f559da087a579c69f63773d8be57e6e7363c33429f28a | rsharifnasab/my-learning | L2.hs | module L2 where
x = 7
y = 10
f = x+y | null | https://raw.githubusercontent.com/rsharifnasab/my-learning/8555583a772c96e334e3fdace5a295a21c31ea8b/haskell/2-hello/L2.hs | haskell | module L2 where
x = 7
y = 10
f = x+y | |
6fee7fd63a08ce474deceb61367b23a49c2acdb4269b0eabebe3a156c2d10470 | freizl/dive-into-haskell | TicTacToe.hs | # LANGUAGE BlockArguments #
# LANGUAGE RecordWildCards #
# OPTIONS_GHC -Wall #
module TicTacToe where
data XO = X | O
deriving (Eq, Ord, Show, Read)
data Board1 a = Board1
{ btl,
bt,
btr,
bml,
bm,
bmr,
bbl,
bb,
bbr ::
a
}
data Triple a = Triple
{ t1 :: a,
t2 :: a,
... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/readings/thinking-with-types/TicTacToe.hs | haskell | | The checkWinner from Algebra.hs doesn't seem correct.
@
, [topLeft, midLeft, botLeft]
]
@
| Is there built method to use?? | # LANGUAGE BlockArguments #
# LANGUAGE RecordWildCards #
# OPTIONS_GHC -Wall #
module TicTacToe where
data XO = X | O
deriving (Eq, Ord, Show, Read)
data Board1 a = Board1
{ btl,
bt,
btr,
bml,
bm,
bmr,
bbl,
bb,
bbr ::
a
}
data Triple a = Triple
{ t1 :: a,
t2 :: a,
... |
2d128c4426997ea28d6da21d0e83cba2601957bf29a1d7f35e0dd1cc612450fe | uwplse/Cassius | browser-style.rkt | #lang racket
(provide baseline-sheet firefox-sheet)
(define default-displays
#hash([inline
. (abbr bdo small i font label em b input br img strong a span)]
[block
. (html body p hr section footer frameset header main ol ul
option textarea div h1 h2 h3 h4 h5 h6 pre iframe f... | null | https://raw.githubusercontent.com/uwplse/Cassius/edcb8302c43b7b149280504c00672d8133219b44/src/spec/browser-style.rkt | racket | From -3.6.3.css
and -central/source/layout/style/res/html.css
Weird Firefox choice!
no color
[vertical-align text-bottom]
[white-space pre-wrap]) | #lang racket
(provide baseline-sheet firefox-sheet)
(define default-displays
#hash([inline
. (abbr bdo small i font label em b input br img strong a span)]
[block
. (html body p hr section footer frameset header main ol ul
option textarea div h1 h2 h3 h4 h5 h6 pre iframe f... |
0af5233219e9fc42631b33ab3a1d20448dc48ea7a19e7d6adac67c82de86ca14 | wireless-net/erlang-nommu | supervisor_bridge_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2011 . 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/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/stdlib/test/supervisor_bridge_SUITE.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 1996 - 2011 . 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(supervisor_bridge_SUITE).
-export([... |
4da596b3f4eecdfedf1fdbc246f8d1b83aca1cc970ed6367b44ce732303055c1 | cbaggers/skitter | sdl2.lisp | (in-package :skitter.sdl2)
;;--------------------------------------------
;; scancode lookup
(defvar *window-event-names*
#(:none :shown :hidden :exposed :moved :resized
:size-changed :minimized :maximized :restored
:enter :leave :focus-gained :focus-lost :close
:take-focus :hit-test))
(defvar *mouse-b... | null | https://raw.githubusercontent.com/cbaggers/skitter/620772ae6146d510a8d58d07cae055c06e5c8620/sdl2/sdl2.lisp | lisp | --------------------------------------------
scancode lookup
--------------------------------------------
sdl timestamp conversion
{TODO} optimize
--------------------------------------------
sdl event helpers
what should we do with clicks? (:clicks c)
what should we do with state? (:state s)
what should we do w... | (in-package :skitter.sdl2)
(defvar *window-event-names*
#(:none :shown :hidden :exposed :moved :resized
:size-changed :minimized :maximized :restored
:enter :leave :focus-gained :focus-lost :close
:take-focus :hit-test))
(defvar *mouse-button-names*
#(:0 :left :middle :right :other0 :other1 :other2 :... |
d426471cd287d973918f230844ee540a56a8d074f9e1528a4c617fc0dd2e828e | joshuamiller/map-todo-demo | main.cljs | (ns env.android.main
(:require [map-todo-demo.android.core :as core]))
(core/init)
| null | https://raw.githubusercontent.com/joshuamiller/map-todo-demo/24cfc555357401f079b709891f2d53272f88b5b2/env/prod/env/android/main.cljs | clojure | (ns env.android.main
(:require [map-todo-demo.android.core :as core]))
(core/init)
| |
2b3a3546009058804b6770c273092cfd21d119b28c77197c07d1a964ade0e69d | robert-strandh/Second-Climacs | vector-folio.lisp | (cl:in-package #:second-climacs-syntax-common-lisp-test)
;;; The CONTENTS slot contains a vector of lines, where each line is a
;;; vector of items.
(defclass vector-folio (cl-syntax:folio)
((%contents :initarg :contents :accessor contents)))
(defmethod cl-syntax:line-count
((folio vector-folio))
(length (con... | null | https://raw.githubusercontent.com/robert-strandh/Second-Climacs/1d1bc30f4431d8ea7893aea58a63464e216377a4/Code/Syntax/Common-Lisp/Test/vector-folio.lisp | lisp | The CONTENTS slot contains a vector of lines, where each line is a
vector of items. | (cl:in-package #:second-climacs-syntax-common-lisp-test)
(defclass vector-folio (cl-syntax:folio)
((%contents :initarg :contents :accessor contents)))
(defmethod cl-syntax:line-count
((folio vector-folio))
(length (contents folio)))
(defmethod cl-syntax:line-length
((folio vector-folio) line-number)
(l... |
c3bdaa743c905547324de5d38a9cde921d4ec4b88f50f73fa0cb56cef9adf33d | OCamlPro/ocp-indent | js-functor.ml | module M =
Foo (G)
(H)
module M =
Foo
(G)
(struct
let x
end)
(H)
(* To me, this looks fine as it is. The rule seems fine as "indent arguments by
2". To illustrate, with a case where the functor name is longer: *)
module M =
Functor (G)
(H)
(I)
include Foo (struct
le... | null | https://raw.githubusercontent.com/OCamlPro/ocp-indent/9e26c0a2699b7076cebc04ece59fb354eb84c11c/tests/failing-output/js-functor.ml | ocaml | To me, this looks fine as it is. The rule seems fine as "indent arguments by
2". To illustrate, with a case where the functor name is longer: | module M =
Foo (G)
(H)
module M =
Foo
(G)
(struct
let x
end)
(H)
module M =
Functor (G)
(H)
(I)
include Foo (struct
let x
end) (struct
let y
end)
include
Foo (struct
let x
end) (struct
let y
end)
include
Foo
(struct
let x
end) (str... |
e9f41c1d52463e3f991abbb69835aaa034c38360c21ff5088bff5bb13edf3896 | jackfirth/lens | struct-nested.rkt | #lang reprovide
lens/private/struct/struct-nested
| null | https://raw.githubusercontent.com/jackfirth/lens/733db7744921409b69ddc78ae5b23ffaa6b91e37/lens-unstable/unstable/lens/struct-nested.rkt | racket | #lang reprovide
lens/private/struct/struct-nested
| |
597f5d6a6a8b8bc5f6bab4728f65ab3509d97cb6bf78bf5bea8ec158f58a00a1 | mirage/ocaml-cohttp | cohttp_mirage.ml | (** IO modules *)
module IO = Io.Make
module Net = Net.Make
* The resulting { modtype : Cohttp_lwt . S.Net } module can be used to build the
low - level client interfaces with { module : Cohttp_lwt . Connection . Make } and
from that { module : Cohttp_lwt . Connection_cache . Make } .
low-level client... | null | https://raw.githubusercontent.com/mirage/ocaml-cohttp/628d8716b22bb7933863dd584673745c974707be/cohttp-mirage/src/cohttp_mirage.ml | ocaml | * IO modules
* client modules
* simple, high-level interace
* server modules |
module IO = Io.Make
module Net = Net.Make
* The resulting { modtype : Cohttp_lwt . S.Net } module can be used to build the
low - level client interfaces with { module : Cohttp_lwt . Connection . Make } and
from that { module : Cohttp_lwt . Connection_cache . Make } .
low-level client interfaces with {... |
bf5fe8fbb3e90d6a304ccc3fa59bd64140ecf11063bf87d7543ed722910b921e | xxyzz/SICP | Exercise_2_90.rkt | #lang racket/base
(define table (make-hash))
(define (put op type item)
(hash-set! table (list op type) item))
(define (get op type)
(hash-ref! table (list op type) null))
(define (attach-tag type-tag contents)
(cond [(and (eq? type-tag 'scheme-number)
(number? contents))
contents]
... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/2_Building_Abstractions_with_Data/2.5_Systems_with_Generic_Operations/Exercise_2_90.rkt | racket | internal procedures
representation of poly
representation of terms and term lists
interface to rest of the system
y + 1
x^2 + (y + 1)x + 5
'(polynomial x dense-term-list 1 2 1)
x^2 + 2x + 1
'(polynomial x dense-term-list)
-x^100 - 2x^2 + 2x
x^4 + x^2 + 2 | #lang racket/base
(define table (make-hash))
(define (put op type item)
(hash-set! table (list op type) item))
(define (get op type)
(hash-ref! table (list op type) null))
(define (attach-tag type-tag contents)
(cond [(and (eq? type-tag 'scheme-number)
(number? contents))
contents]
... |
8d10c0cdb768987a89c93b2e15eaae269b00ac9cb2de0aa15e4f6fb05b644dde | nixz/cl-vr | util.lisp | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;; ==========================================================================
;;;; util.lisp --- A set of utility functions
;;;;
Copyright ( c ) 2013 , < >
;;;; All rights reserved.
;;;;
;;;; Redistribution and use in source and binary forms, with or without
;;;; ... | null | https://raw.githubusercontent.com/nixz/cl-vr/145aa3505a09e996101972faaed6250fa1164d07/util.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
==========================================================================
util.lisp --- A set of utility functions
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditio... | Copyright ( c ) 2013 , < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
(in-package #:cl-vr... |
82b41ed0a143fbc6870ea015d3cfe21f6b5bd0ef4cf7c1a8b6ea9abb9bd65f28 | inhabitedtype/ocaml-aws | updateMaintenanceWindowTarget.ml | open Types
open Aws
type input = UpdateMaintenanceWindowTargetRequest.t
type output = UpdateMaintenanceWindowTargetResult.t
type error = Errors_internal.t
let service = "ssm"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/updateMaintenanceWindowTarget.ml | ocaml | open Types
open Aws
type input = UpdateMaintenanceWindowTargetRequest.t
type output = UpdateMaintenanceWindowTargetResult.t
type error = Errors_internal.t
let service = "ssm"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_... | |
305c61bad802a7cd3ddd555bc308b2f440097867761653c3556e820af09b32af | athensresearch/athens | common_db.cljc | (ns athens.common-db
"Common DB (Datalog) access layer.
So we execute same code in CLJ & CLJS."
(:refer-clojure :exclude [descendants])
(:require
[athens.common.logging :as log]
[athens.common.migrations :as migrations]
[athens.parser :as parser]
[clojure.data :as data]... | null | https://raw.githubusercontent.com/athensresearch/athens/cd394dc99468e5f744324bef3e39db05feaced47/src/cljc/athens/common_db.cljc | clojure | TODO: do we really still use it?
It would be nicer to have the reverse relationship here (:block/properties as a set
of children refs, instead :block/property-of as a single parent ref), but that doesn't
work with the tupleAttr below.
key is to a property what order is to a child
tupleAttrs are used here to ensur... | (ns athens.common-db
"Common DB (Datalog) access layer.
So we execute same code in CLJ & CLJS."
(:refer-clojure :exclude [descendants])
(:require
[athens.common.logging :as log]
[athens.common.migrations :as migrations]
[athens.parser :as parser]
[clojure.data :as data]... |
863d74d2b9e52e8b1160c84892c115781ca4cc652c0d1edbeb7268a560dca573 | Bogdanp/racket-dbg | common.rkt | #lang racket/base
(require racket/format
racket/gui/easy)
(provide
~addr
~shortstr
~hash)
(define (~addr n)
(~a "0x" (~r
#:base 16
#:min-width 8
#:pad-string "0"
n)))
(define (~shortstr s)
(if (> (string-length s) 70)
(~a (substring s 0 69) "…")
... | null | https://raw.githubusercontent.com/Bogdanp/racket-dbg/5b7be3a93c8f475f522a8249efc3626e99726dcf/dbg-ui/ui/common.rkt | racket | #lang racket/base
(require racket/format
racket/gui/easy)
(provide
~addr
~shortstr
~hash)
(define (~addr n)
(~a "0x" (~r
#:base 16
#:min-width 8
#:pad-string "0"
n)))
(define (~shortstr s)
(if (> (string-length s) 70)
(~a (substring s 0 69) "…")
... | |
84d90481a41da40959221bf3e9db4eb1385da2cee10f646654e6748ed9474e75 | facebook/duckling | Rules.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Duration.... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Duration/Rules.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
# LANGUAGE LambdaCase #
module Duckling.Duration.Rules
( rules
) where
import Data.String
import Prelude
import Duckling.Dimensions.Types
import Duckling.Duration.Helpers
import Duckling.Numeral.Types (NumeralData(..))
import Duckling.Types
import qualified Du... |
c6b7aaf198b5415c7476dca18ace4595d9f282199126b2b8f73c0097a1f918ae | haroldcarr/learn-haskell-coq-ml-etc | TestSpec.hs | module TestSpec where
------------------------------------------------------------------------------
import HC
------------------------------------------------------------------------------
import Test.Hspec
import Test.Hspec.Contrib.HUnit
import Test.HUnit (Test (... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/type-level/2018-02-andres-loh-type-level-and-generic/test/TestSpec.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
---------------------------------------------------------------------------- | module TestSpec where
import HC
import Test.Hspec
import Test.Hspec.Contrib.HUnit
import Test.HUnit (Test (TestList))
spec :: Spec
spec =
fromHUnitTest $ TestList $
txsum ++ tv3 ++ tvr3 ++ tva ++ tvfffvabc ++
gnpi ++ ghl ++ gchar ++ g2 ++ exj ++ hpn ++ hpk ... |
137bc3c6226ce0a057a72cda8ff17770ed90d4345fe53eb3996c48fac067f97d | hpyhacking/webtekcos | webtekcos_event.erl | -module(webtekcos_event).
-export([start_link/0, add_handler/2, delete_handler/2]).
-export([connect/0, disconnect/0, start/3]).
-export([rcv_data/1, send_data/1]).
start_link() ->
gen_event:start_link({local, ?MODULE}).
add_handler(Handler, Args) ->
gen_event:add_handler(?MODULE, Handler, Args).
delete_handler... | null | https://raw.githubusercontent.com/hpyhacking/webtekcos/cdea615d338762f58b1ff18e016bc00fd0f0b115/src/webtekcos_event.erl | erlang | -module(webtekcos_event).
-export([start_link/0, add_handler/2, delete_handler/2]).
-export([connect/0, disconnect/0, start/3]).
-export([rcv_data/1, send_data/1]).
start_link() ->
gen_event:start_link({local, ?MODULE}).
add_handler(Handler, Args) ->
gen_event:add_handler(?MODULE, Handler, Args).
delete_handler... | |
e4c692531f0261ea4e5bf3bcbf229b9df13bc61bd5b87fd810fcb9ca09611d64 | input-output-hk/cardano-wallet-legacy | Transactions.hs | module Cardano.Wallet.API.V1.Transactions where
import Cardano.Wallet.API.Request
import Cardano.Wallet.API.Response
import Cardano.Wallet.API.Types
import Cardano.Wallet.API.V1.Parameters
import Cardano.Wallet.API.V1.Types
import Servant
type API = Tag "Tr... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/src/Cardano/Wallet/API/V1/Transactions.hs | haskell | module Cardano.Wallet.API.V1.Transactions where
import Cardano.Wallet.API.Request
import Cardano.Wallet.API.Response
import Cardano.Wallet.API.Types
import Cardano.Wallet.API.V1.Parameters
import Cardano.Wallet.API.V1.Types
import Servant
type API = Tag "Tr... | |
f9e26409c5135bb63e6f992aba62d06bd1577e0a6c8b5a65ac06f0decd74e6d6 | bmeurer/ocamljit2 | expunge.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/toplevel/expunge.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 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 .
$ Id$
" Expunge " a toplevel by re... |
5db775d6b600830753ac4a59c7c73d8345137facd19a9d40ffb3811c54e8d234 | tfausak/monadoc-5 | ContextSpec.hs | module Monadoc.Type.ContextSpec where
import Monadoc.Prelude
import Test.Hspec
spec :: Spec
spec = describe "Monadoc.Type.Context" <| do
pure ()
| null | https://raw.githubusercontent.com/tfausak/monadoc-5/5361dd1870072cf2771857adbe92658118ddaa27/src/test/Monadoc/Type/ContextSpec.hs | haskell | module Monadoc.Type.ContextSpec where
import Monadoc.Prelude
import Test.Hspec
spec :: Spec
spec = describe "Monadoc.Type.Context" <| do
pure ()
| |
d8a9352b469dd352e915cff7ffb5038e21d494575e5d28f01434003c7cc61dcd | Kappa-Dev/KappaTools | export_to_json.ml | *
* export_to_KaSim.ml
* openkappa
* , projet Abstraction / Antique , INRIA Paris - Rocquencourt
*
* Creation : Aug 23 2016
* Last modification : Time - stamp : < Mar 19 2020 >
* *
*
* Copyright 2010,2011 Institut National de Recherche en Informatique et
* en Automatique . Al... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/KaSa_rep/export/export_to_json.ml | ocaml | *
* export_to_KaSim.ml
* openkappa
* , projet Abstraction / Antique , INRIA Paris - Rocquencourt
*
* Creation : Aug 23 2016
* Last modification : Time - stamp : < Mar 19 2020 >
* *
*
* Copyright 2010,2011 Institut National de Recherche en Informatique et
* en Automatique . Al... | |
fc109089f369487c7596a84bd286b683e4865d6cd6a58763eee3618f84de9581 | steinuil/xobl | elaborate_unions_to_switch.ml | (** Turn unions into switches. *)
* Since unions are a bad feature of the X11 spec and ( excluding those in xkb )
there 's only two in the entire spec , this module takes care of turning them
into proper switches simply by special - casing them .
{ 2 Why are unions bad ? }
Because they 're ef... | null | https://raw.githubusercontent.com/steinuil/xobl/36f24b03673e487e3c862555433ab7eb213738e2/compiler/elaborate_unions_to_switch.ml | ocaml | * Turn unions into switches. |
* Since unions are a bad feature of the X11 spec and ( excluding those in xkb )
there 's only two in the entire spec , this module takes care of turning them
into proper switches simply by special - casing them .
{ 2 Why are unions bad ? }
Because they 're effectively switches , but with ad -... |
29378e47698d092a329ec8e8947d531b2d007326181f4a608b789423933a633a | sigscale/rim | mod_im_rest_patch.erl | mod_im_rest_patch.erl
%%% vim: ts=3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2016 - 2021 SigScale Global Inc.
%%% @end
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in compliance with the License.
%%% You may obtain... | null | https://raw.githubusercontent.com/sigscale/rim/f806a0c52430f86bf1d54324fd0b4b6e510aea43/src/mod_im_rest_patch.erl | erlang | vim: ts=3
@end
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific langua... | mod_im_rest_patch.erl
2016 - 2021 SigScale Global Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
< div class="spec " >
< tt > patch_<Resource>(Id , ContentType , RequestBody , [ ... ] ) -> ; Result<... |
ac2432f099c33b6890e93ed4e32d8016d01c5b25822a5c0c9044546bc40f41ef | sol/interpolate | IsString.hs | # LANGUAGE TemplateHaskell #
module Data.String.Interpolate.IsString (i) where
import Data.String
import Language.Haskell.TH.Quote (QuasiQuoter(..))
import qualified Data.String.Interpolate as I
-- |
-- Like `I.i`, but constructs a value of type
--
-- > IsString a => a
i :: QuasiQuoter
i = QuasiQ... | null | https://raw.githubusercontent.com/sol/interpolate/a31cd1322665b10a6d901d6d70dd7bc35b71035d/src/Data/String/Interpolate/IsString.hs | haskell | |
Like `I.i`, but constructs a value of type
> IsString a => a | # LANGUAGE TemplateHaskell #
module Data.String.Interpolate.IsString (i) where
import Data.String
import Language.Haskell.TH.Quote (QuasiQuoter(..))
import qualified Data.String.Interpolate as I
i :: QuasiQuoter
i = QuasiQuoter {
quoteExp = \s -> [|fromString $(quoteExp I.i $ s)|]
, quotePa... |
1be2279d63396f164371031da244d2ab2563b7c352fb140e97420243a7270bfa | xvw/preface | arrow_plus.ml | module Suite
(R : Model.PROFUNCTORIAL)
(P : Preface_specs.ARROW_PLUS with type ('a, 'b) t = ('a, 'b) R.t) =
Arrow.Suite (R) (P)
| null | https://raw.githubusercontent.com/xvw/preface/84a297e1ee2967ad4341dca875da8d2dc6d7638c/lib/preface_qcheck/arrow_plus.ml | ocaml | module Suite
(R : Model.PROFUNCTORIAL)
(P : Preface_specs.ARROW_PLUS with type ('a, 'b) t = ('a, 'b) R.t) =
Arrow.Suite (R) (P)
| |
2ae74275c37603467e21074145edab257c4ff0384719a27726447d8c79eece88 | goolord/jshark | Api.hs | # language DataKinds #
# language GADTs #
# language TypeApplications #
{-# language TypeFamilies #-}
{-# language OverloadedStrings #-}
module JShark.Api where
import Topaz.Types
import Data.Text (Text)
import Data.Coerce (coerce)
import JShark.Types
import JShark.Object
import Topaz.Rec ((<:))
data Window
type ins... | null | https://raw.githubusercontent.com/goolord/jshark/fe8aff4bc70cff08555b780063d6ca26f6deac77/src/JShark/Api.hs | haskell | # language TypeFamilies #
# language OverloadedStrings # | # language DataKinds #
# language GADTs #
# language TypeApplications #
module JShark.Api where
import Topaz.Types
import Data.Text (Text)
import Data.Coerce (coerce)
import JShark.Types
import JShark.Object
import Topaz.Rec ((<:))
data Window
type instance Field Window "location.host" = 'String
window :: Effect f ... |
a241b313651268836982fb78012ea1c7d226b2803f78ec022f5cb112dc8a43c2 | bmeurer/ocamljit2 | hello.ml | let _ =
Printf.printf "Hello, %s ! My name is %s\n"
(if Array.length Sys.argv > 1 then Sys.argv.(1) else "stranger")
Sys.argv.(0)
;;
| null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/ocamlbuild/examples/example1/hello.ml | ocaml | let _ =
Printf.printf "Hello, %s ! My name is %s\n"
(if Array.length Sys.argv > 1 then Sys.argv.(1) else "stranger")
Sys.argv.(0)
;;
| |
93d11415bc556057ac45712975f6bfcb0bff94cd68ad7b489e94942d7cd77bdb | heechul/crest-z3 | llvmgen.ml | Copyright ( c ) 2008 Intel Corporation
* All rights reserved .
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* Redistributions of source code must retain the above copyright
* notice , th... | null | https://raw.githubusercontent.com/heechul/crest-z3/cfcebadddb5e9d69e9956644fc37b46f6c2a21a0/cil/src/ext/llvmgen.ml | ocaml | unique label identifying this block
predecessor blocks, use llvmDestinations to get successors
for use before SSA transformation
this could be made into a real, distinct type
True if t can be the type of an LLVM local
Return the LLVM global for global variable 'vi'
Build LLVM instruction 'res' = 'op' 'args... | Copyright ( c ) 2008 Intel Corporation
* All rights reserved .
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* Redistributions of source code must retain the above copyright
* notice , th... |
fbb3bc343e0e5eef63627724e120e17d9c1ba61c578f197a2143dfceaac5ca89 | cyga/real-world-haskell | AlgebraicVector.hs | -- file: ch03/AlgebraicVector.hs
-- x and y coordinates or lengths.
data Cartesian2D = Cartesian2D Double Double
deriving (Eq, Show)
-- Angle and distance (magnitude).
data Polar2D = Polar2D Double Double
deriving (Eq, Show)
| null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch03/AlgebraicVector.hs | haskell | file: ch03/AlgebraicVector.hs
x and y coordinates or lengths.
Angle and distance (magnitude). | data Cartesian2D = Cartesian2D Double Double
deriving (Eq, Show)
data Polar2D = Polar2D Double Double
deriving (Eq, Show)
|
7deb95074ba030416fc8150c8625ae3d1c8283aeea3324be51331ae345d8f8ef | ujamjar/hardcaml | sim.mli | open HardCaml
module B : Comb.S with type t = Bits.Comb.ArraybitsInt32.t
(** [compile_shared_lib name] compile, with gcc, [<name>.c] to [lib<name>.so] *)
val compile_shared_lib : string -> unit
(** Load the shared library (recommend using an absolute path) and create a simulator *)
val make_from_shared_lib : string ... | null | https://raw.githubusercontent.com/ujamjar/hardcaml/65f32f543348e81cbb7f6d0e77f1f1203bf4e335/csim/sim.mli | ocaml | * [compile_shared_lib name] compile, with gcc, [<name>.c] to [lib<name>.so]
* Load the shared library (recommend using an absolute path) and create a simulator
* compile and load a C simulator (default name is "tmp") | open HardCaml
module B : Comb.S with type t = Bits.Comb.ArraybitsInt32.t
val compile_shared_lib : string -> unit
val make_from_shared_lib : string -> B.t Cyclesim.Api.cyclesim
val make : ?name:string -> Circuit.t -> B.t Cyclesim.Api.cyclesim
|
cb376f1f971cfb052dc1d77bef12a491c8bfffe6fb2676bc3dd5624a4f3942b8 | ocamllabs/ocaml-modular-implicits | opttopdirs.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/toplevel/opttopdirs.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 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 .
open Format
val dir_quit : unit -> un... |
4228fcd48132193ac42051eb29fca8a5d18e0cb65dfb10bfd9ca57b6fabfba70 | inhabitedtype/ocaml-aws | describeEffectiveInstanceAssociations.ml | open Types
open Aws
type input = DescribeEffectiveInstanceAssociationsRequest.t
type output = DescribeEffectiveInstanceAssociationsResult.t
type error = Errors_internal.t
let service = "ssm"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_stri... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/describeEffectiveInstanceAssociations.ml | ocaml | open Types
open Aws
type input = DescribeEffectiveInstanceAssociationsRequest.t
type output = DescribeEffectiveInstanceAssociationsResult.t
type error = Errors_internal.t
let service = "ssm"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_stri... | |
334b1f70e4a6d83de2a4616c1df557008d10404b189364590c687ac04e365ddb | skroutz/clj-skroutz | notifications.clj | (ns clj_skroutz.notifications
"Implements user notifications endpoints
/"
(:use [clj_skroutz.core :refer [api-call]]))
(defn all
"Lists all notifications of a user.
/#list-notifications"
[& options]
(api-call :get "notifications" [] options))
(defn notification
"Gets a user notifications
/#ret... | null | https://raw.githubusercontent.com/skroutz/clj-skroutz/25c6c32f5ac8d5ea082ef4dbede6720f74d15ef0/src/clj_skroutz/notifications.clj | clojure | (ns clj_skroutz.notifications
"Implements user notifications endpoints
/"
(:use [clj_skroutz.core :refer [api-call]]))
(defn all
"Lists all notifications of a user.
/#list-notifications"
[& options]
(api-call :get "notifications" [] options))
(defn notification
"Gets a user notifications
/#ret... | |
46ad06768c4e7b6b58fb59af122218ca8927bd0c5e181d23926c119567745cd9 | discus-lang/ddc | Status.hs |
module DDC.Driver.Interface.Status
( Status (..)
, newStatus
, purgeCacheForFile
, cachedDoesFileExist
, cachedModificationTimeIfExists)
where
import Data.IORef
import Data.Map (Map)
import qualified System.Directory as System
import qualified Data.... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-driver/DDC/Driver/Interface/Status.hs | haskell | -----------------------------------------------------------------------------
| Cache of file system status.
During a single run of the compiler we assume that the files do not change
as we are running. This allows us to cache filesystem information such as
whether a file exists or not, and the modification ... |
module DDC.Driver.Interface.Status
( Status (..)
, newStatus
, purgeCacheForFile
, cachedDoesFileExist
, cachedModificationTimeIfExists)
where
import Data.IORef
import Data.Map (Map)
import qualified System.Directory as System
import qualified Data.... |
2bf46da7b1289c2831f90562fe8e61f5903bf75fe7b86bfb593563c374be9f54 | berke/aurochs | aurochs.ml | (* Aurochs *)
open Peg
open Util.Syntax
open Pffpsf
type binary = string
type ('node, 'attribute) program
type generic_program = (int, int) program
exception Parse_error of int
exception Error of string
exception Compile_error of exn
external get_choice_count : ('node, 'attribute) program -> int = "caml_aurochs_get... | null | https://raw.githubusercontent.com/berke/aurochs/637bdc0d4682772837f9e44112212e7f20ab96ff/aurochs/aurochs.ml | ocaml | Aurochs |
open Peg
open Util.Syntax
open Pffpsf
type binary = string
type ('node, 'attribute) program
type generic_program = (int, int) program
exception Parse_error of int
exception Error of string
exception Compile_error of exn
external get_choice_count : ('node, 'attribute) program -> int = "caml_aurochs_get_choice_count"... |
729f119e716d0453bfb3744e3b650745d91031ee15aca32a32c1e1734cdfa8cf | abdulapopoola/SICPBook | Ex2.28.scm | #lang planet neil/sicp
;;helpers
(define (append list1 list2)
(if (null? list1)
list2
(cons (car list1) (append (cdr list1) list2))))
(define (fringe items)
(cond ((null? items) nil)
((pair? (car items))
(append (fringe (car items))
(fringe (cdr items))))
((c... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%202/2.2/Ex2.28.scm | scheme | helpers | #lang planet neil/sicp
(define (append list1 list2)
(if (null? list1)
list2
(cons (car list1) (append (cdr list1) list2))))
(define (fringe items)
(cond ((null? items) nil)
((pair? (car items))
(append (fringe (car items))
(fringe (cdr items))))
((cons (car i... |
03582ea7e2b6a6debf477754363e14b51c7d899389c5760f093d6502337fab33 | privet-kitty/cl-competitive | write-double-float.lisp | (defpackage :cp/test/write-double-float
(:use :cl :fiveam :cp/write-double-float)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/write-double-float)
(in-suite base-suite)
(defun %make-df-string (x &key (max-decimal-places 10) (allow-trailing-point t))
(with-output-to-string (out)
(write-doub... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/write-double-float.lisp | lisp | (defpackage :cp/test/write-double-float
(:use :cl :fiveam :cp/write-double-float)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/write-double-float)
(in-suite base-suite)
(defun %make-df-string (x &key (max-decimal-places 10) (allow-trailing-point t))
(with-output-to-string (out)
(write-doub... | |
6d86ec5897ec44d6f30122ad2d857c65f190c1dbcd3aa6eda0bb38010ffac26f | troy-west/into | data.clj | (ns operativ.test.data)
' topics ' holds raw data we collect from a Cluster
;;
;; It includes information about the size in bytes of a topic spread across brokers (and directories) in a Cluster
;;
e.g. the first line in the data below has the following semantics :
;;
{ 1 { " /kfk " { : replica - info... | null | https://raw.githubusercontent.com/troy-west/into/d7a984f118660714a2c8f4ff08346650cf7cff8a/test/operativ/test/data.clj | clojure |
It includes information about the size in bytes of a topic spread across brokers (and directories) in a Cluster
* Each Broker having a single '/kfk' directory
Often we want to answer questions like:
How much data is on a Broker?
Is data evenly distributed throughout the partitions of a single topic?
To ach... | (ns operativ.test.data)
' topics ' holds raw data we collect from a Cluster
e.g. the first line in the data below has the following semantics :
{ 1 { " /kfk " { : replica - infos { { : topic " br.ch " : partition 1 } { : size 2838281 : offset - lag 0 : future ? false }
^ Broker # 1 ^ /kfk dire... |
9a64c3f8addf0d01dafbb7962bcad90df5ba2f12d24cdae5e64544b114ca33b3 | josefs/Gradualizer | map_refinement_fail.erl | -module(map_refinement_fail).
-compile([export_all, nowarn_export_all]).
%% Expected error: Nonexhaustive patterns. Empty map not covered.
-spec map_value_type_refinement(#{x => a|b}) -> ok.
map_value_type_refinement(#{x := a}) ->
ok;
map_value_type_refinement(#{x := b}) ->
ok.
| null | https://raw.githubusercontent.com/josefs/Gradualizer/770561885c92e38ec0e1584aa1ce1f0115e8625f/test/should_fail/map_refinement_fail.erl | erlang | Expected error: Nonexhaustive patterns. Empty map not covered. | -module(map_refinement_fail).
-compile([export_all, nowarn_export_all]).
-spec map_value_type_refinement(#{x => a|b}) -> ok.
map_value_type_refinement(#{x := a}) ->
ok;
map_value_type_refinement(#{x := b}) ->
ok.
|
158dfbbd9cdb3a6df1f830daf288bfc01a3f6db1a63bf37543518b5eb25a7e18 | amnh/poy5 | pdfhello.ml | \part{Examples } \chaptertitle{PdfHello}{Hello world , in PDF }
We build a font dictionary for one of the 14 standard PostScript fonts , ( which
are supported by all PDF readers ) , make a graphics stream using the [ Pdfpages ]
module , build a PDF document in memory and then write it to \texttt{hello.pdf }
ar... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/camlpdf-0.3/pdfhello.ml | ocaml | \part{Examples } \chaptertitle{PdfHello}{Hello world , in PDF }
We build a font dictionary for one of the 14 standard PostScript fonts , ( which
are supported by all PDF readers ) , make a graphics stream using the [ Pdfpages ]
module , build a PDF document in memory and then write it to \texttt{hello.pdf }
ar... | |
e3c80ab8567def3499ff4f8f2c20095a735900c86b27a6565dccb7f888c4766c | kmarekspartz/TaPL | Syntax.hs | module Language.TaPL.Boolean.Syntax (Term(..), isVal) where
import Test.QuickCheck (Arbitrary, arbitrary, sized, oneof)
import Control.Monad (liftM3)
import Control.Applicative ((<$>))
import Language.TaPL.ShowPretty (ShowPretty, showp)
data Term = TmTrue
| TmFalse
| TmIf Term Term Term
derivi... | null | https://raw.githubusercontent.com/kmarekspartz/TaPL/2f1aebf5ed370f769709852ee27020f5cb715123/src/Language/TaPL/Boolean/Syntax.hs | haskell | module Language.TaPL.Boolean.Syntax (Term(..), isVal) where
import Test.QuickCheck (Arbitrary, arbitrary, sized, oneof)
import Control.Monad (liftM3)
import Control.Applicative ((<$>))
import Language.TaPL.ShowPretty (ShowPretty, showp)
data Term = TmTrue
| TmFalse
| TmIf Term Term Term
derivi... | |
6ac6456cf46daee4a0dbb5bb0e5c6c9ccc3e53c1e3611c890f93e570ed02f64c | charlieg/Sparser | object.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1990 Content Technologies Inc.
copyright ( c ) 1992 -- all rights reserved
;;;
;;; File: "object"
Module : " : money : "
version : 1.0 December 1990 ( v1.6 )
(in-package :sparser)
(define-category a... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/core/money/archive%20--%20money/object.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "object"
:slots ((amount number)
(currency currency))
(:alist-on-slot currency)
(:hash-on-slot amount)))
------------
ancilaries
------------ | copyright ( c ) 1990 Content Technologies Inc.
copyright ( c ) 1992 -- all rights reserved
Module : " : money : "
version : 1.0 December 1990 ( v1.6 )
(in-package :sparser)
(define-category amount-of-money)
: index (: two - stage - index
(defstruct (amount-of-money
(:... |
6fd529f83310b774485f832fae08c7721d019e7af7204a24a8dc7844c49c872c | shayan-najd/NativeMetaprogramming | HpcUtils.hs | module HpcUtils where
import Trace.Hpc.Util
import qualified Data.Map as Map
import System.FilePath
dropWhileEndLE :: (a -> Bool) -> [a] -> [a]
Spec : dropWhileEndLE p = reverse . . reverse
dropWhileEndLE p = foldr (\x r -> if null r && p x then [] else x:r) []
turns into ' '
| grab 's the text behind a ;
... | null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/utils/hpc/HpcUtils.hs | haskell | module HpcUtils where
import Trace.Hpc.Util
import qualified Data.Map as Map
import System.FilePath
dropWhileEndLE :: (a -> Bool) -> [a] -> [a]
Spec : dropWhileEndLE p = reverse . . reverse
dropWhileEndLE p = foldr (\x r -> if null r && p x then [] else x:r) []
turns into ' '
| grab 's the text behind a ;
... | |
3bbb9d4dc9c04d5182705554b225b32cb76f1a3018461e9dcf9e1480f96200b1 | PearsonEducation/subpub | pe_tag_store.erl | SubPub - Copyright ( c ) 2013 Pearson . All rights reserved .
%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%
% you may not use this file except in compliance with the License.
This module is obsolete , and only exists for upgrading a database from the R1 format to R2 .
-module(... | null | https://raw.githubusercontent.com/PearsonEducation/subpub/f2275c5da24d8860d206cff81d1ce87ecd956c72/src/pe_tag_store.erl | erlang |
you may not use this file except in compliance with the License. | SubPub - Copyright ( c ) 2013 Pearson . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
This module is obsolete , and only exists for upgrading a database from the R1 format to R2 .
-module(pe_tag_store).
-export([get_by_id/1, get_all_by_id/1]).
-include("inclu... |
a300f972b10b4db9db2db566a2ef9099d7dfe0c6aa08aefd64c34a50ced846e8 | ericdrgn/drgn.nyxt | drgn-dark.lisp | (in-package #:nyxt-user)
;;configure status buffer area with only tabs and modes section
(defun my-format-status (window)
(let ((buffer (current-buffer window)))
(markup:markup
(:div :id "container"
(:div :id "tabs"
(markup:raw (format-status-tabs)))
(:div :id "modes"
... | null | https://raw.githubusercontent.com/ericdrgn/drgn.nyxt/4e965502f99237207b4c02177baa6c6226cb552a/themes/drgn-dark.lisp | lisp | configure status buffer area with only tabs and modes section
configuration window
prompt buffer
internal buffer
history tree
highlight boxes
Styling status buffer | (in-package #:nyxt-user)
(defun my-format-status (window)
(let ((buffer (current-buffer window)))
(markup:markup
(:div :id "container"
(:div :id "tabs"
(markup:raw (format-status-tabs)))
(:div :id "modes"
(markup:raw
(format-status-lo... |
aaf1445b8bb09af6cf9f74b10934d6ef9588cdcad78741db67bbd5b89bd74f9b | namin/staged-miniKanren | tests-all-bench.scm | (load "tests-bench-rel.scm")
(load "tests-doc-bench.scm")
(load "tests-double-eval.scm")
| null | https://raw.githubusercontent.com/namin/staged-miniKanren/d5013978819a7fb2f1724769e9165c0ed20cfb1f/tests-all-bench.scm | scheme | (load "tests-bench-rel.scm")
(load "tests-doc-bench.scm")
(load "tests-double-eval.scm")
| |
5fdb469a2e46b5f87a21e70fb071935321ac7e7e5264b06cc25f9e050e7cf9d4 | FPtje/glualint-web | Main.hs | {-# LANGUAGE PackageImports #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import "clay" Clay
import "base" Data.Monoid ((<>))
main :: IO ()
main = putCss styleSheet
monokaiBackground :: Color
monokaiBackground = rgb 39 40 34
monokaiText :: Color
monokaiText = rgb 208 208 208
warningBackground :: Color
w... | null | https://raw.githubusercontent.com/FPtje/glualint-web/a3a37a97f0a3df4860340f9e101deca6b8e63781/styles/src/Main.hs | haskell | # LANGUAGE PackageImports #
# LANGUAGE OverloadedStrings # | module Main where
import "clay" Clay
import "base" Data.Monoid ((<>))
main :: IO ()
main = putCss styleSheet
monokaiBackground :: Color
monokaiBackground = rgb 39 40 34
monokaiText :: Color
monokaiText = rgb 208 208 208
warningBackground :: Color
warningBackground = rgb 246 167 63
errorBackground :: Color
errorBa... |
f11989d648db1474463f228395315a7492ecea8ac1bfbfb50844cc35fde6176a | hedgehogqa/haskell-hedgehog-classes | Applicative.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE QuantifiedConstraints #
{-# LANGUAGE RankNTypes #-}
module Hedgehog.Classes.Applicative (applicativeLaws) where
import Control.Applicative (Applicative(..))
import Hedgehog
import Hedgehog.Classes.Common
-- | Tests the following 'Applicative' laws:
--
[ _ _ Identity _ _... | null | https://raw.githubusercontent.com/hedgehogqa/haskell-hedgehog-classes/4d97b000e915de8ba590818f551bce7bd862e7d4/src/Hedgehog/Classes/Applicative.hs | haskell | # LANGUAGE RankNTypes #
| Tests the following 'Applicative' laws:
[__Composition__]: @'pure' ('.') '<*>' u '<*>' v '<*>' w@ ≡ @u '<*>' (v '<*>' w)@
[__Interchange__]: @u '<*>' 'pure' y@ ≡ @'pure' ('$' y) '<*>' u@
[__LiftA2 2__]: @'liftA2' f x y@ ≡ @f '<$>' x '<*>' y@ | # LANGUAGE ScopedTypeVariables #
# LANGUAGE QuantifiedConstraints #
module Hedgehog.Classes.Applicative (applicativeLaws) where
import Control.Applicative (Applicative(..))
import Hedgehog
import Hedgehog.Classes.Common
[ _ _ Identity _ _ ] : @'pure ' ' i d ' ' < * > ' v@ ≡ @v@
[ _ _ Homomorphism _ _ ] : @'pure... |
48ec97ea021878398c7dae94f885e6e868b04a9bd38d94dbef42d16c587b0d7d | jsiek/al | list_set.ml |
Copyright and , November 11 , 2007
Permission is hereby granted , free of charge , to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license ( the " Software " ) to use , reproduce , display , distribute ,
execute , and transmit the Software , ... | null | https://raw.githubusercontent.com/jsiek/al/dfa019162daf2df45e5a50d0e47a86c32e44d25e/list_set.ml | ocaml |
Copyright and , November 11 , 2007
Permission is hereby granted , free of charge , to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license ( the " Software " ) to use , reproduce , display , distribute ,
execute , and transmit the Software , ... | |
5bc18dbfb8072dc5449d35cd0fe4a6bf35722b8b00e2756cb54240739ae8f0d1 | reflectionalist/S9fES | tree-equalp.scm | Scheme 9 from Empty Space , Function Library
By , 2010
; Placed in the Public Domain
;
( tree - equal ? procedure ) = = > boolean
;
Compare the leaves of two trees PAIR1 and PAIR2 using the predicate
PROCEDURE . TREE - EQUAL ? returns # T if the trees have the same structure
; and (procedure x1 x2) h... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/tree-equalp.scm | scheme | Placed in the Public Domain
and (procedure x1 x2) holds for their pairwise leaves.
Example: (tree-equal? (lambda (x y) #t)
'(((a . b) (c . d)) (e . f))
(tree-equal? eqv? | Scheme 9 from Empty Space , Function Library
By , 2010
( tree - equal ? procedure ) = = > boolean
Compare the leaves of two trees PAIR1 and PAIR2 using the predicate
PROCEDURE . TREE - EQUAL ? returns # T if the trees have the same structure
' ( ( ( 1 . 2 ) ( 3 . 4 ) ) ( 5 .... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.