_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 |
|---|---|---|---|---|---|---|---|---|
ede90216958fc9c7a91af68f8f367862f3a3848218d25e9e60874fa1e4ced76f | ocaml-ppx/ppx_tools_versioned | ppx_metaquot_407.ml | open Migrate_parsetree.Ast_407
(* This file is part of the ppx_tools package. It is released *)
under the terms of the MIT license ( see LICENSE file ) .
Copyright 2013 and LexiFi
A -ppx rewriter to be used to write Parsetree - generating code
( including other -ppx re... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx_tools_versioned/00a0150cdabfa7f0dad2c5e0e6b32230d22295ca/ppx_metaquot_407.ml | ocaml | This file is part of the ppx_tools package. It is released
Support for antiquotations
Support for antiquotations | open Migrate_parsetree.Ast_407
under the terms of the MIT license ( see LICENSE file ) .
Copyright 2013 and LexiFi
A -ppx rewriter to be used to write Parsetree - generating code
( including other -ppx rewriters ) using concrete syntax .
We support the following ext... |
6139365a12dcae9f7df4bc719f28725c51e097fec358fdf963c3b6dccc3bc731 | exoscale/pullq | main.cljs | (ns pullq.main
(:require
[reagent.core :as reagent]
[re-frame.core :as re-frame]
[pullq.events :as events]
[pullq.views :as views]
[pullq.config :as config]
[day8.re-frame.http-fx]))
(defn dev-setup []
(when config/debug?
(enable-console-print!)
(println "dev mode")))
(defn mount-root [... | null | https://raw.githubusercontent.com/exoscale/pullq/2277c48d2d3a833e3bd9d213f6989585f107794f/src/cljs/pullq/main.cljs | clojure | (ns pullq.main
(:require
[reagent.core :as reagent]
[re-frame.core :as re-frame]
[pullq.events :as events]
[pullq.views :as views]
[pullq.config :as config]
[day8.re-frame.http-fx]))
(defn dev-setup []
(when config/debug?
(enable-console-print!)
(println "dev mode")))
(defn mount-root [... | |
ac261b4971a3dba655a2b45a956341250b35d27b9c6d3376386f11c94684fff7 | clojure/core.match | match.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/clojure/core.match/fc54caaa0f37862eb4e3b54dab9fc0d9ad173d7e/src/main/clojure/clojure/core/match.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns clojure.core.match
(:refer-clojure :exclude [compile])
(:use [clojure.core.match.protocols])
(:require [clojure.set :as set])
(:import [java.io Writer]
[clojure.core.match.protocols IExistentialPattern IPseudoPattern]))
matching . It uses an algo... |
dd26276b84b40d3765391f3c8f6eefde0a54de58a5aa08e1a240ce1a75f2e445 | mpickering/apply-refact | Default56.hs | yes = [v | v <- xs] | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Default56.hs | haskell | yes = [v | v <- xs] | |
84980be5a6e2cd8ee8414675998391ab1975b33c2e9dd77b082b36ee67d83508 | diku-dk/futhark | Construct.hs | # LANGUAGE TypeFamilies #
-- | = Constructing Futhark ASTs
--
-- This module re-exports and defines a bunch of building blocks for
constructing fragments of ASTs . More importantly , it also
-- contains a basic introduction on how to use them.
--
-- The "Futhark.IR.Syntax" module contains the core
AST definitio... | null | https://raw.githubusercontent.com/diku-dk/futhark/ec3c95be352fd3993ed7a5566747b1fbb66832da/src/Futhark/Construct.hs | haskell | | = Constructing Futhark ASTs
This module re-exports and defines a bunch of building blocks for
contains a basic introduction on how to use them.
The "Futhark.IR.Syntax" module contains the core
own bespoke source of unique names) to manually construct
expressions, statements, and entire ASTs. In practice, thi... | # LANGUAGE TypeFamilies #
constructing fragments of ASTs . More importantly , it also
AST definition . One important invariant is that all bound names in
a program must be /globally/ unique . In principle , you
could use the facilities from " Futhark . MonadFreshNames " ( or your
blocks ( centered ar... |
827f412c308df200a518299ec53f60c94d0dab34df3919220f089d0d3f2e421c | ghcjs/ghcjs | Main.hs | 1.3
val1, val2 :: Array (Int,Int) Int
val1 = array ((1,2), (2,1)) []
val2 = array ((2,1), (1,2)) []
val3 :: Array Integer Double
val3 = array (4, -3) []
main = print ((val1 == val1) && (val2 == val2) && (val3 == val3))
| null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/programs/north_array/Main.hs | haskell | 1.3
val1, val2 :: Array (Int,Int) Int
val1 = array ((1,2), (2,1)) []
val2 = array ((2,1), (1,2)) []
val3 :: Array Integer Double
val3 = array (4, -3) []
main = print ((val1 == val1) && (val2 == val2) && (val3 == val3))
| |
e7fd74b861f545e3bc62b623465bcec0a50710689af1d64345371ba77d3ec274 | livingsocial/lein-dependency-check | dependency_check.clj | (ns leiningen.dependency-check
(:require [clojure.string :as string]
[clojure.tools.cli :refer [parse-opts]]
[leiningen.core.classpath :as cp]
[leiningen.core.eval :as eval]))
(def ^:private cli-options
"Command line options accepts:
log, throw, output-format, output-directory... | null | https://raw.githubusercontent.com/livingsocial/lein-dependency-check/6550038fdc25ea7e5ae2b3f1fa23913bac528e69/src/leiningen/dependency_check.clj | clojure | (ns leiningen.dependency-check
(:require [clojure.string :as string]
[clojure.tools.cli :refer [parse-opts]]
[leiningen.core.classpath :as cp]
[leiningen.core.eval :as eval]))
(def ^:private cli-options
"Command line options accepts:
log, throw, output-format, output-directory... | |
a1686e34fab2ef9dd59f8d5af4cbc5c0b0647fec07831f2e013e709e2152b2d5 | rabbitmq/ra | ra_system_sup.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2017 - 2022 VMware , Inc. or its affiliates . All rights reserved .
%%
%% @hidden
-module(ra_system_sup).
-behaviour(sup... | null | https://raw.githubusercontent.com/rabbitmq/ra/ac46ccc86fe84993bfe71f95c4e5dddf863d16d4/src/ra_system_sup.erl | erlang |
@hidden
API functions
Supervisor callbacks
the ra log ets process is supervised by the system to keep mem tables
alive whilst the rest of the log infra might be down | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2017 - 2022 VMware , Inc. or its affiliates . All rights reserved .
-module(ra_system_sup).
-behaviour(supervisor).
-inclu... |
8d842d8afd109b4343206fc927b602520c72e0c0b618188937d12643e5a9bd20 | guicho271828/alien | space-usage.lisp | (in-package :strips)
as you can see below , is not compacting the slots
(defparameter *a* nil)
(defstruct a0)
16 bytes , 2 words
(defstruct a1 s1)
16 bytes , 2 words
(defstruct a2 s1 s2)
32 bytes , 4 words
(defstruct a3 s1 s2 s3)
32 bytes , 4 words
(defstruct a4 s1 s2 s3 s4)
48 bytes , 6 words
(defst... | null | https://raw.githubusercontent.com/guicho271828/alien/6987d034426b8928adf67f498dc6cb06fd7f923e/check/space-usage.lisp | lisp | (in-package :strips)
as you can see below , is not compacting the slots
(defparameter *a* nil)
(defstruct a0)
16 bytes , 2 words
(defstruct a1 s1)
16 bytes , 2 words
(defstruct a2 s1 s2)
32 bytes , 4 words
(defstruct a3 s1 s2 s3)
32 bytes , 4 words
(defstruct a4 s1 s2 s3 s4)
48 bytes , 6 words
(defst... | |
c0bae35d5be3e2b6e6cc7f6df8b7c84dff9316f4490a38882725dc97967f7d37 | Butanium/monte-carlo-tree-search-TSP | File_log.ml | type debug_file = { file_name : string; file_path : string }
let create_dir_if_not_exist dir =
let dirs = String.split_on_char '/' dir in
let rec aux = function
| [] -> [ "" ]
| x :: xs ->
"" :: List.map (fun s -> if s = "" then x else x ^ "/" ^ s) (aux xs)
in
let dirs = List.tl @@ aux dirs in
... | null | https://raw.githubusercontent.com/Butanium/monte-carlo-tree-search-TSP/50cc425d4715dbff291d060d56dac8ca61c55f5c/tools/File_log.ml | ocaml | type debug_file = { file_name : string; file_path : string }
let create_dir_if_not_exist dir =
let dirs = String.split_on_char '/' dir in
let rec aux = function
| [] -> [ "" ]
| x :: xs ->
"" :: List.map (fun s -> if s = "" then x else x ^ "/" ^ s) (aux xs)
in
let dirs = List.tl @@ aux dirs in
... | |
2246883d024f5a77564e11e4ad1e4cf1e5ac9a10efe0be2077fb3a806f04ced4 | fulcro-legacy/semantic-ui-wrapper | ui_search_category.cljs | (ns fulcrologic.semantic-ui.modules.search.ui-search-category
(:require
[fulcrologic.semantic-ui.factory-helpers :as h]
["semantic-ui-react/dist/commonjs/modules/Search/SearchCategory" :default SearchCategory]))
(def ui-search-category
"
Props:
- active (bool): The item currently selected by keybo... | null | https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/modules/search/ui_search_category.cljs | clojure | (ns fulcrologic.semantic-ui.modules.search.ui-search-category
(:require
[fulcrologic.semantic-ui.factory-helpers :as h]
["semantic-ui-react/dist/commonjs/modules/Search/SearchCategory" :default SearchCategory]))
(def ui-search-category
"
Props:
- active (bool): The item currently selected by keybo... | |
c04fb8d3d54a33319ed1d560a94fd6b6a082b0f06739cf410eacf734df40c6ce | 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.Superclasses.Sized.R000 where
| null | https://raw.githubusercontent.com/well-typed/large-records/c6c2b51af11e90f30822543d7ce4d1cb28cee294/large-records-benchmarks/bench/experiments/Experiment/Superclasses/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.Superclasses.Sized.R000 where
|
9e2e24ce7120707a6d98b00b9c91159dacf888ed54b6a5b37340eb42c2cee5c4 | ha-mo-we/Racer | tracer.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : TOOLS ; Base : 10 -*-
Copyright ( c ) 1998 - 2014 ,
, , .
;;; All rights reserved.
Racer is distributed under the following BSD 3 - clause license
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are p... | null | https://raw.githubusercontent.com/ha-mo-we/Racer/d690841d10015c7a75b1ded393fcf0a33092c4de/source/tracer.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : TOOLS ; Base : 10 -*-
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright notice,
this list of c... |
Copyright ( c ) 1998 - 2014 ,
, , .
Racer is distributed under the following BSD 3 - clause license
Neither the name Racer nor the names of its contributors may be used
CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING ,
VOLKER HAARSLEV , RALF MOELLER , NOR FOR ANY
... |
bdce53da7af33bf8a4ae86eee3deecc072dddd4f7b310305008656c7d5e6bb10 | ksk/Rho | bpoly.ml | open Format
open Store
open Cycle
open Bexpr
let limit = ref 65535
type howshow =
Sum | Length | Height | Depth | Value of string | BarChart
type algo = Naive | Floyd | Brent | Gosper | Gosper2
type store = Map | Hashtbl
type display = Quiet | Verbose | Every of int | Show of howshow list
let restart_file : string ... | null | https://raw.githubusercontent.com/ksk/Rho/5025fd186d30b67b4acc93a45a85106be41c03af/bpoly.ml | ocaml | NOT RECOMMENDED
NOT RECOMMENDED
NOT RECOMMENDED
fold expr lower to higher
fold expr lower to higher
Bytes.length expr
Known results in monomial cases
;"--unbound"
;"--every"
;"--map"
;"--extreamly-easy-run"
;"-gosper2"
override to hide default help messages | open Format
open Store
open Cycle
open Bexpr
let limit = ref 65535
type howshow =
Sum | Length | Height | Depth | Value of string | BarChart
type algo = Naive | Floyd | Brent | Gosper | Gosper2
type store = Map | Hashtbl
type display = Quiet | Verbose | Every of int | Show of howshow list
let restart_file : string ... |
17dd3978329fa30ed7282cf1bdc8b0b4fb90569a41dfa027fd62039ca0934e53 | footprintanalytics/footprint-web | revision_test.clj | (ns metabase.models.revision-test
(:require [clojure.test :refer :all]
[metabase.models.card :refer [Card]]
[metabase.models.interface :as mi]
[metabase.models.revision :as revision :refer [Revision]]
[metabase.test :as mt]
[toucan.db :as db]
[to... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/models/revision_test.clj | clojure | # Default diff-* implementations
# REVISIONS + PUSH-REVISION!
# REVISIONS+DETAILS | (ns metabase.models.revision-test
(:require [clojure.test :refer :all]
[metabase.models.card :refer [Card]]
[metabase.models.interface :as mi]
[metabase.models.revision :as revision :refer [Revision]]
[metabase.test :as mt]
[toucan.db :as db]
[to... |
91d15cfcd6755c4a9fee17f0861410324594ace025e98ced0c2afbfd49b05639 | RyanGlScott/eliminators | DecideTypes.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
{-# OPTIONS_GHC -Wno-unused-foralls #-}
module DecideTypes where
import Data.Eliminator
import Data.Kind
import Data.Nat
import Data.Singletons.TH hiding (Decision(..))
impo... | null | https://raw.githubusercontent.com/RyanGlScott/eliminators/2e374acc4f451d3efcea240c37e7b165e413639b/tests/DecideTypes.hs | haskell | # OPTIONS_GHC -Wno-unused-foralls #
Due to , promoting the
Decision data type from Data.Singletons.Decide is a tad awkward. To work
around these, we define a more general Decision' data type here.
---
These newtype wrappers are needed to work around
not the same thing as (Nat -> ...). Unfortunately, it's not eas... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module DecideTypes where
import Data.Eliminator
import Data.Kind
import Data.Nat
import Data.Singletons.TH hiding (Decision(..))
import Prelude.Singletons (ConstSym1)
type ... |
07c7ba0375cd71ec12427795e0af9b6ec76345f5c913ac0ea276e924e75c5f20 | Clozure/ccl-tests | type-of.lsp | ;-*- Mode: Lisp -*-
Author :
Created : We d Jun 4 21:15:05 2003
;;;; Contains: Tests of TYPE-OF
(in-package :cl-test)
;;; It turns out I left out an important test of type-of:
;;; (type-of x) must be a recognizable subtype of every builtin type
;;; of which x is a member.
(deftest type-of.1
:no... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/type-of.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of TYPE-OF
It turns out I left out an important test of type-of:
(type-of x) must be a recognizable subtype of every builtin type
of which x is a member.
Some have objected to that (in type-of.1) interpretation
This test tests the relaxed requirement.
b. the type return... | Author :
Created : We d Jun 4 21:15:05 2003
(in-package :cl-test)
(deftest type-of.1
:notes :type-of/strict-builtins
(loop for x in *universe*
for tp = (type-of x)
for failures = (loop for tp2 in *cl-all-type-symbols*
when (and (typep x tp2)
(not (subtypep tp tp2)))
coll... |
fbc768c81cec7f4d7091b87a0c405edf15e24b42791894eb1001dd6f01a71f31 | yallop/ocaml-ctypes | types.ml |
* Copyright ( c ) 2014 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2014 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
open Ctypes
module Struct_st... | null | https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/tests/test-structs/stubs/types.ml | ocaml | missing fields
fields reordered
one struct depending on another
dependencies involving function pointers
(incomplete types are available in the present)
adding fields through views (typedefs) |
* Copyright ( c ) 2014 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2014 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
open Ctypes
module Struct_st... |
ced12cdf088fcd8c9825809f57c2acb3723bc87565ac536c35f73b2549b1a5c3 | emqx/emqx | emqx_conf_schema_tests.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%--------------------------------------------------------------------
-module(emqx_conf_schema_tests).
-include_lib("eunit/include/eunit.hrl").
doc_gen_test() ->
... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_conf/test/emqx_conf_schema_tests.erl | erlang | --------------------------------------------------------------------
--------------------------------------------------------------------
the json file too large to encode. | Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
-module(emqx_conf_schema_tests).
-include_lib("eunit/include/eunit.hrl").
doc_gen_test() ->
{
timeout,
60,
fun() ->
Dir = "tmp",
ok = filelib:ensure_dir(filename:join("tmp", foo)),
... |
b7c9ebc927d19674a66e852b4051054927d78f22c7c5f5c71678f7d020795e88 | Quid2/zm | K549f91f3b0ec.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
module Test.ZM.ADT.Sign.K549f91f3b0ec (Sign(..)) where
import qualified Prelude(Eq,Ord,Show)
import qualified GHC.Generics
import qualified Flat
import qualified Data.Model
data Sign = Positive
| Negative
deriving (Prelude.Eq, Prelude.Ord,... | null | https://raw.githubusercontent.com/Quid2/zm/02c0514777a75ac054bfd6251edd884372faddea/test/Test/ZM/ADT/Sign/K549f91f3b0ec.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric # | module Test.ZM.ADT.Sign.K549f91f3b0ec (Sign(..)) where
import qualified Prelude(Eq,Ord,Show)
import qualified GHC.Generics
import qualified Flat
import qualified Data.Model
data Sign = Positive
| Negative
deriving (Prelude.Eq, Prelude.Ord, Prelude.Show, GHC.Generics.Generic, Flat.Flat)
instance Data.Mo... |
5c68bc57872c5406682ee4d84157f191fd0f18980b683e06335b4e8358ffd887 | tibbe/hyena | Enumerator.hs | {-# LANGUAGE Rank2Types #-}
module Data.Enumerator
( -- Enumerators
bytesEnum,
chunkEnum,
partialSocketEnum,
socketEnum,
-- Combining enumerators
compose
) where
import Control.Monad (liftM)
import qualified Data.ByteString as S
import qualified Data.ByteString.Char8 as C ... | null | https://raw.githubusercontent.com/tibbe/hyena/ee349f001a6e6c6a343dbc2ef16fda9ac861fb47/Data/Enumerator.hs | haskell | # LANGUAGE Rank2Types #
Enumerators
Combining enumerators
-----------------------------------------------------------
Enumerators
| Enumerates a 'ByteString'.
| Enumerates chunks of data encoded using HTTP chunked encoding.
TODO: Ignore header.
| Maximum number of bytes sent or received in every socket
operati... |
module Data.Enumerator
bytesEnum,
chunkEnum,
partialSocketEnum,
socketEnum,
compose
) where
import Control.Monad (liftM)
import qualified Data.ByteString as S
import qualified Data.ByteString.Char8 as C (unpack)
import Data.Word (Word8)
import Network.Socket (Socket)
import Network.... |
9a65d7ce900a8ba12c81acbaf63a040fcdb679066f1a6b56cc455db5dbf9b0af | domainlanguage/time-count | relation_bounded_interval_tests.clj | (ns time-count.relation-bounded-interval-tests
(:require
[time-count.core :refer [t-sequence t-rev-sequence]] ;See TODO comment by t-sequence function.
[time-count.metajoda]
[time-count.iso8601 :refer [from-iso]]
[time-count.relation-bounded-intervals :refer :all]
[midje.sweet :refer :all]))
; re... | null | https://raw.githubusercontent.com/domainlanguage/time-count/f2d26a1e5fe1a137f5d1a01be295dde0385cc31e/test/time_count/relation_bounded_interval_tests.clj | clojure | See TODO comment by t-sequence function.
relation-bound
tuple of relation and an interval
For exact bounds, only :starts, :ends, :meets, :met-by or :equals would really work.
Other relations would constrain the interval, but wouldn't fully define it.
Alternative concept (not used here currently): relation-spec
... | (ns time-count.relation-bounded-interval-tests
(:require
[time-count.metajoda]
[time-count.iso8601 :refer [from-iso]]
[time-count.relation-bounded-intervals :refer :all]
[midje.sweet :refer :all]))
e.g. [: starts 2017 ] , meaning that , for some interval x , " 2017 starts x "
[: ends 201... |
5d8492a39410872d9ac5055f73819e610a7114ab8419f6b7fdcef338f91ea064 | biocad/openapi3 | SpecCommon.hs | module SpecCommon where
import Data.Aeson
import Data.ByteString.Builder (toLazyByteString)
import qualified Data.Foldable as F
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Vector as Vector
import Test.Hspec
(<=>) :: (Eq a, Show a, ToJSON a, FromJSON a, HasCallStack) => a -> Value -> Spec
x ... | null | https://raw.githubusercontent.com/biocad/openapi3/e1ea5fedae3d411f0e413d54bf1f8dfa44bc1a94/test/SpecCommon.hs | haskell | module SpecCommon where
import Data.Aeson
import Data.ByteString.Builder (toLazyByteString)
import qualified Data.Foldable as F
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Vector as Vector
import Test.Hspec
(<=>) :: (Eq a, Show a, ToJSON a, FromJSON a, HasCallStack) => a -> Value -> Spec
x ... | |
d80bd831ec29a123c8523458052a3503fec63ab3edbf87ae2c400d50fe510124 | ygrek/mldonkey | svg_converter.ml | Copyright 2004 b8_bavard ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at your option ) any l... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/tools/svg_converter.ml | ocaml | Copyright 2004 b8_bavard ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at your option ) any l... | |
0fd5a6a86f1c74c283f87fb22d3db0a9e919959e3b9ebb93abb994222454c091 | MyDataFlow/ttalk-server | mod_mam_con_ca_sup.erl | -module(mod_mam_con_ca_sup).
-author('').
-behaviour(supervisor).
-export([start/2, stop/1, start_link/2, init/1]).
start(Host, Config) ->
supervisor:start_child(ejabberd_sup, supervisor_spec(Host, Config)).
stop(Host) ->
Tag = {mod_mam_con_ca_sup, Host},
supervisor:terminate_child(ejabberd_sup, Tag),
... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/mod_mam_con_ca_sup.erl | erlang | -module(mod_mam_con_ca_sup).
-author('').
-behaviour(supervisor).
-export([start/2, stop/1, start_link/2, init/1]).
start(Host, Config) ->
supervisor:start_child(ejabberd_sup, supervisor_spec(Host, Config)).
stop(Host) ->
Tag = {mod_mam_con_ca_sup, Host},
supervisor:terminate_child(ejabberd_sup, Tag),
... | |
9fa776c89f719516943c6d44cdad8c038eda969ee21a5779fb9efd7982226f84 | modular-macros/ocaml-macros | t192-getfloatfield-2.ml | open Lib;;
type t = { a : float; b : float };;
if { a = 0.1; b = 0.2 }.b <> 0.2 then raise Not_found;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 GETGLOBAL 0.2
11 PUSHGETGLOBAL [ |0.1 , 0.2| ]
13 GETFLOATFIELD 1
15 C_CALL2 neq_... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/tool-ocaml/t192-getfloatfield-2.ml | ocaml | open Lib;;
type t = { a : float; b : float };;
if { a = 0.1; b = 0.2 }.b <> 0.2 then raise Not_found;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 GETGLOBAL 0.2
11 PUSHGETGLOBAL [ |0.1 , 0.2| ]
13 GETFLOATFIELD 1
15 C_CALL2 neq_... | |
717d02a6a6c093c9c8131a35772307caeda3308c5367c5be2d0050c184cd8748 | ryanpbrewster/haskell | P010Test.hs | module Problems.P010Test
( case_010_main
) where
import Problems.P010
import Test.Tasty.Discover (Assertion, (@?=))
case_010_main :: Assertion
case_010_main = solve @?= "142913828922"
| null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/tests/Problems/P010Test.hs | haskell | module Problems.P010Test
( case_010_main
) where
import Problems.P010
import Test.Tasty.Discover (Assertion, (@?=))
case_010_main :: Assertion
case_010_main = solve @?= "142913828922"
| |
3de11356f7b44a9877243fec736804d15a6059716e2114e6ef9eae8ccfea7170 | miikka/cache-metrics | core_test.clj | (ns cache-metrics.core-test
(:require [clojure.test :refer :all]
[clojure.core.cache :as cache]
[cache-metrics.core :refer [cache-size-gauge instrumented-cache-factory]])
(:import com.codahale.metrics.MetricRegistry))
(defn- get-gauge [registry name]
(get (.getGauges registry) name))
(de... | null | https://raw.githubusercontent.com/miikka/cache-metrics/7b180ba40342fbb8c38acfcdb1596d8dccfae890/test/cache_metrics/core_test.clj | clojure | (ns cache-metrics.core-test
(:require [clojure.test :refer :all]
[clojure.core.cache :as cache]
[cache-metrics.core :refer [cache-size-gauge instrumented-cache-factory]])
(:import com.codahale.metrics.MetricRegistry))
(defn- get-gauge [registry name]
(get (.getGauges registry) name))
(de... | |
cc5d14ef9bb3d946b80e63d34983f91eeab2305189be8d3a7237b1b89b4ca735 | Bodigrim/arithmoi | SmoothNumbersBench.hs | # OPTIONS_GHC -fno - warn - type - defaults #
module Math.NumberTheory.SmoothNumbersBench
( benchSuite
) where
import Test.Tasty.Bench
import Math.NumberTheory.Primes
import Math.NumberTheory.SmoothNumbers
doBench :: Int -> Int
doBench lim = sum $ take lim $ smoothOver $ fromList $ map unPrime [nextPrime 2 .. p... | null | https://raw.githubusercontent.com/Bodigrim/arithmoi/6cc9bc86b7241809ec1038c81ca0055913f156bb/benchmark/Math/NumberTheory/SmoothNumbersBench.hs | haskell | # OPTIONS_GHC -fno - warn - type - defaults #
module Math.NumberTheory.SmoothNumbersBench
( benchSuite
) where
import Test.Tasty.Bench
import Math.NumberTheory.Primes
import Math.NumberTheory.SmoothNumbers
doBench :: Int -> Int
doBench lim = sum $ take lim $ smoothOver $ fromList $ map unPrime [nextPrime 2 .. p... | |
302df2c838040326add514b8515943cc7c2b50900858ea2467425b09e91b1cbd | rabbitmq/rabbitmq-management | rabbit_mgmt_wm_feature_flags.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2019 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_mgmt_wm_feature_flags).
-export([... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-management/543906f01ccd0344aff648f21bb6b5156b2a2ca2/src/rabbit_mgmt_wm_feature_flags.erl | erlang |
--------------------------------------------------------------------
-------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2019 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mgmt_wm_feature_flags).
-export([init/2... |
9ad2ca1fcd7d8ff6a006763e090f7251d5dee9bb79c6c2d1825d4ec137003ce1 | mbutterick/aoc-racket | test.rkt | #lang reader "lang.rkt"
hijkl | null | https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2016/day17/test.rkt | racket | #lang reader "lang.rkt"
hijkl | |
1141d524ba7cf15e56f33c1db87e74efdf62ef4786484ce987718c73e2003de7 | incoherentsoftware/defect-process | Data.hs | module Player.MovementSkill.All.GrappleSkill.Data
( Overshoot(..)
, ShotReleased(..)
, ShotType(..)
, GrappleStatus(..)
, isShotGrapple
, isPullGrapple
, GrappleImages(..)
, GrappleData(..)
, mkGrappleData
, updateGrappleData
, setGrappleThrowFireDrawStateMsg
, setGrapple... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/8797aad1d93bff5aadd7226c39a48f45cf76746e/src/Player/MovementSkill/All/GrappleSkill/Data.hs | haskell | module Player.MovementSkill.All.GrappleSkill.Data
( Overshoot(..)
, ShotReleased(..)
, ShotType(..)
, GrappleStatus(..)
, isShotGrapple
, isPullGrapple
, GrappleImages(..)
, GrappleData(..)
, mkGrappleData
, updateGrappleData
, setGrappleThrowFireDrawStateMsg
, setGrapple... | |
fa8a1814d5ffc655dd1f929bec228bac1b7c6b3c8c2e9c007a7a51fef67172d5 | rcherrueau/APE | web01.rkt | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Web Applications in Racket
;; -lang.org/continue/
;;
1 . Getting Started
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#lang web-server/insta
; start: request -> dosen't return
; Consume a request a... | null | https://raw.githubusercontent.com/rcherrueau/APE/8b5302709000bd043b64d46d55642acb34ce5ba7/racket/webAppInRacket/web01.rkt | racket |
-lang.org/continue/
start: request -> dosen't return
Consume a request and return an "Under Construction" HTML page. | Web Applications in Racket
1 . Getting Started
#lang web-server/insta
(define (start request)
(response/xexpr
'(html
(head (title "My Blog"))
(body (h1 "Under construction")))))
|
f192158e68b3f31baca8169e4a1337524db89d70a21c2d3414f4080c90eb2334 | haskell-gi/haskell-gi | MainWindow.hs |
module MainWindow(MainConfiguration(..), run) where
import Data.List(intersect)
import Data.Maybe(isJust, fromMaybe)
import System.Exit(exitSuccess)
import System.FilePath((</>))
import Control.Monad(liftM)
import Control.Monad.Trans(lift, liftIO)
import Control.Monad.Trans.Maybe(MaybeT, runMaybeT)
import GI.Cairo.R... | null | https://raw.githubusercontent.com/haskell-gi/haskell-gi/60caa315c051ee6744a4fac5eeccee151aec0942/cairo/examples/hlabyrinth/src/MainWindow.hs | haskell | left mouse button
right mouse button |
module MainWindow(MainConfiguration(..), run) where
import Data.List(intersect)
import Data.Maybe(isJust, fromMaybe)
import System.Exit(exitSuccess)
import System.FilePath((</>))
import Control.Monad(liftM)
import Control.Monad.Trans(lift, liftIO)
import Control.Monad.Trans.Maybe(MaybeT, runMaybeT)
import GI.Cairo.R... |
0da612e749befa377f0c0ffaa5fbae51ff3fcab64a802fd541bd40cb1d542bf2 | BranchTaken/Hemlock | u64.ml | include Uns
| null | https://raw.githubusercontent.com/BranchTaken/Hemlock/07922d4658ca6ecf37dfd46f5aca31c8b58e06e4/bootstrap/src/basis/u64.ml | ocaml | include Uns
| |
417b6f55eebb7d698eb2ab084f6d8d26b324726d8f9afc1130b9a4139eb90d19 | UU-ComputerScience/uhc | Test.hs | f :: Int -> Int
f = undefined
g :: Int -> Int
g x = x
-- Polymorhpic version doesn't work in r1811
undefined :: Int -> Int
undefined = undefined
main = 3
| null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/tauphi/lazyfuns-3/Test.hs | haskell | Polymorhpic version doesn't work in r1811 | f :: Int -> Int
f = undefined
g :: Int -> Int
g x = x
undefined :: Int -> Int
undefined = undefined
main = 3
|
969fc701cf78c8ebfbcfd52191b9bd4cbb68d8e0b3efb6eca0620fa78ed0eb1e | LeventErkok/sbv | Lambda.hs | -----------------------------------------------------------------------------
-- |
-- Module : TestSuite.Basics.Lambda
Copyright : ( c )
-- License : BSD3
-- Maintainer:
-- Stability : experimental
--
-- Test lambda generation
-----------------------------------------------------------------------------
# LA... | null | https://raw.githubusercontent.com/LeventErkok/sbv/bf08abbfb50821276fc972b7157c32d1fae2c99d/SBVTestSuite/TestSuite/Basics/Lambda.hs | haskell | ---------------------------------------------------------------------------
|
Module : TestSuite.Basics.Lambda
License : BSD3
Maintainer:
Stability : experimental
Test lambda generation
---------------------------------------------------------------------------
# OPTIONS_GHC -Wall -Werror #
Test suite | Copyright : ( c )
# LANGUAGE OverloadedLists #
# LANGUAGE ScopedTypeVariables #
module TestSuite.Basics.Lambda(tests) where
import Prelude hiding((++), map, foldl, foldr, sum, length, zip, zipWith, all, any, concat, filter)
import qualified Prelude as P
import Control.Monad (unless)
import Data.SBV.Cont... |
53889f9caaed808355fbe5924bebe6c2b6708d521aba6bffca798a7c5b2d767f | CoNarrative/precept | rules.cljc | (ns precept.impl.rules
(:require [precept.spec.rulegen :as rulegen]
[precept.accumulators :as acc]))
;;TODO. Figure out if we can avoid a circular dependency with rules so we can use
;; positional rules syntax
(clara.rules/defrule clean-transients___impl
{:group :cleanup}
[?fact <- :all (= :tran... | null | https://raw.githubusercontent.com/CoNarrative/precept/6078286cae641b924a2bffca4ecba19dcc304dde/src/cljc/precept/impl/rules.cljc | clojure | TODO. Figure out if we can avoid a circular dependency with rules so we can use
positional rules syntax | (ns precept.impl.rules
(:require [precept.spec.rulegen :as rulegen]
[precept.accumulators :as acc]))
(clara.rules/defrule clean-transients___impl
{:group :cleanup}
[?fact <- :all (= :transient (:e this))]
=>
(clara.rules/retract! ?fact))
(clara.rules/defrule entities___impl-a
{:salience 1... |
60c93af8b065ebca5e9504ef0ebd33940d85671540cb3957e438c3a8b2f8e445 | lspitzner/brittany | Test150.hs | import {-# SOURCE #-} safe qualified "base" Data.List as L
import {-# SOURCE #-} safe qualified "base" Data.List ( )
import {-# SOURCE #-} safe qualified Data.List hiding ( )
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test150.hs | haskell | # SOURCE #
# SOURCE #
# SOURCE # | |
a3aab45d0628bdcaba282d6be7daa64d7ff0407d047a23ceb31e01a0d218b348 | faber-lang/faber | Codegen.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecursiveDo #
# LANGUAGE TupleSections #
module Codegen where
import Control.Monad
import Control.Monad.Fix
import Control.Monad.Reader
import Control.Monad.State
import qualified Data.Map as Map
import Data... | null | https://raw.githubusercontent.com/faber-lang/faber/d022f52b22f209f1f10609949495b689e886c75f/src/Codegen.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE FlexibleContexts #
# LANGUAGE RecursiveDo #
# LANGUAGE TupleSections #
module Codegen where
import Control.Monad
import Control.Monad.Fix
import Control.Monad.Reader
import Control.Monad.State
import qualified Data.Map as Map
import Data.Maybe (fromJust)
import ... |
c19648e5f0bbb151a9ca84a424448e2a4483256bebd9025860de593b7708f352 | gfngfn/SATySFi | config.ml |
open MyUtil
exception PackageNotFound of string * abs_path list
exception LibraryFileNotFound of lib_path * abs_path list
exception LibraryFilesNotFound of lib_path list * abs_path list
exception ImportedFileNotFound of string * abs_path list
let satysfi_root_dirs : (string list) ref = ref []
let initialize... | null | https://raw.githubusercontent.com/gfngfn/SATySFi/9dbd61df0ab05943b3394830c371e927df45251a/src/config.ml | ocaml |
open MyUtil
exception PackageNotFound of string * abs_path list
exception LibraryFileNotFound of lib_path * abs_path list
exception LibraryFilesNotFound of lib_path list * abs_path list
exception ImportedFileNotFound of string * abs_path list
let satysfi_root_dirs : (string list) ref = ref []
let initialize... | |
6bef657ab28d034338cb3e2d62ff29a5d985f3627bf6c064dfae9deb6da647e9 | purescript/spago | Prelude.hs | # LANGUAGE IncoherentInstances #
module Spago.Prelude
(
-- * Basic exports
module X
, Proxy(..)
, NonEmpty (..)
, Seq (..)
, Validation(..)
, first
, second
, headMay
, lastMay
, empty
, ifM
-- * Logging, errors, printing, etc
, Pretty
, pretty
, output
, outputStr
, die
, hus... | null | https://raw.githubusercontent.com/purescript/spago/678e004be05ac5126e718bb24bb2dd3870d1c66f/src/Spago/Prelude.hs | haskell | * Basic exports
* Logging, errors, printing, etc
* Lens
* Files and directories
* Running commands
* Other
| Generic Error that we throw on program exit.
We have it so that errors are displayed nicely to the user
| Suppress the 'Left' value of an 'Either'
| Code from: -lang/dhall-haskell/blob/d8f2787745bb95... | # LANGUAGE IncoherentInstances #
module Spago.Prelude
(
module X
, Proxy(..)
, NonEmpty (..)
, Seq (..)
, Validation(..)
, first
, second
, headMay
, lastMay
, empty
, ifM
, Pretty
, pretty
, output
, outputStr
, die
, hush
, surroundQuote
, withLineBuffering
, logInfo
, l... |
327ed648fcea373ff874a3e7ca0fca2ff02ba7a7a07bf3c694ea146b2d7cf932 | favonia/pulse | PropList.hs |
This file is part of Pulse , a binding to PulseAudio library .
Pulse is free software : you can redistribute it and/or modify it under
BSD-3 . You should have received a copy of the BSD-3 License along with
Pulse . If not , see < -3-clause > .
This file is part of Pulse, a Haskell binding to PulseAudio libr... | null | https://raw.githubusercontent.com/favonia/pulse/e8bbed84e4fb99c029996155a5471c789a5f1623/src/Sound/Pulse/PropList.hs | haskell | # LANGUAGE DeriveDataTypeable #
|
This module provides the high-level property list interface.
* Marshalling
in a more generalized syntax.
| A map serving the high-level interface of @pa_proplist@.
(See <>.)
| Parse a string by the built-in parser @pa_proplist_from_string@.
Users are responsible of using ... |
This file is part of Pulse , a binding to PulseAudio library .
Pulse is free software : you can redistribute it and/or modify it under
BSD-3 . You should have received a copy of the BSD-3 License along with
Pulse . If not , see < -3-clause > .
This file is part of Pulse, a Haskell binding to PulseAudio libr... |
1babd26d9f566a200b92bcaea099e106f50e47327dbe1e6c8924cf71a4f9c9fb | provinciesincijfers/gebiedsniveaus | 0 maak_elz.sps | * Encoding: windows-1252.
GET DATA
/TYPE=XLS
/FILE=
'C:\github\gebiedsniveaus\kerntabellen\gemeente_elz.xls'
/SHEET=name 'Blad1'
/CELLRANGE=FULL
/READNAMES=ON
/DATATYPEMIN PERCENTAGE=95.0.
EXECUTE.
DATASET NAME start WINDOW=FRONT.
DATASET DECLARE elz.
AGGREGATE
/OUTFILE='elz'
/BREAK=elz Nameel... | null | https://raw.githubusercontent.com/provinciesincijfers/gebiedsniveaus/84bd86174f5e155aae431010acbb7949e0be9e80/scripts/0%20maak_elz.sps | scheme | * Encoding: windows-1252.
GET DATA
/TYPE=XLS
/FILE=
'C:\github\gebiedsniveaus\kerntabellen\gemeente_elz.xls'
/SHEET=name 'Blad1'
/CELLRANGE=FULL
/READNAMES=ON
/DATATYPEMIN PERCENTAGE=95.0.
EXECUTE.
DATASET NAME start WINDOW=FRONT.
DATASET DECLARE elz.
AGGREGATE
/OUTFILE='elz'
/BREAK=elz Nameel... | |
86bc983a2daa9ba0d3b4ec32e1c9578939b635f548bf3ad11584c2df8c9b35bf | kupl/FixML | sub18.ml | type formula =
True
| False
| Neg of formula
| Or of formula * formula
| And of formula * formula
| Imply of formula * formula
| Equiv of formula * formula
let rec eval : formula -> bool
=fun f -> match f with
| True -> true
| False -> false
| Neg n -> if n = True then false else true
| Or (n1,n2) -> ... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula2/submissions/sub18.ml | ocaml | type formula =
True
| False
| Neg of formula
| Or of formula * formula
| And of formula * formula
| Imply of formula * formula
| Equiv of formula * formula
let rec eval : formula -> bool
=fun f -> match f with
| True -> true
| False -> false
| Neg n -> if n = True then false else true
| Or (n1,n2) -> ... | |
c951b4ff27705c9590c931bc3e36955600949a0963db5a20f898e43a4c1f5067 | lukaszcz/coqhammer | tacbest.mli | open Tacopts
val best_tactics : sopt_t list -> (unit Proofview.tactic * string) list list
val hbest_tactics : sopt_t list -> (unit Proofview.tactic * string) list list
val sbest_tactics : sopt_t list -> (unit Proofview.tactic * string) list list
val hammer_pretactics : unit -> (unit Proofview.tactic * string) list
v... | null | https://raw.githubusercontent.com/lukaszcz/coqhammer/fe83fb0eaf33f56da9ea1983114d0d94a2c41b9b/src/tactics/tacbest.mli | ocaml | time limit
tactic list
sauto options
success continuation
failure continuation
tactic batches to try
sauto options
tactic name ("best", "hammer", ...) | open Tacopts
val best_tactics : sopt_t list -> (unit Proofview.tactic * string) list list
val hbest_tactics : sopt_t list -> (unit Proofview.tactic * string) list list
val sbest_tactics : sopt_t list -> (unit Proofview.tactic * string) list list
val hammer_pretactics : unit -> (unit Proofview.tactic * string) list
v... |
6e5684844125a9e8f55525cc6985dbbbad200bbf10b552ce3400c64b771c2361 | brendanhay/terrafomo | Types.hs | -- This module was auto-generated. If it is modified, it will not be overwritten.
-- |
Module : . Nomad . Types
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
-- Stability : auto-generated
Portability : non - portable ( GHC ext... | null | https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-nomad/src/Terrafomo/Nomad/Types.hs | haskell | This module was auto-generated. If it is modified, it will not be overwritten.
|
Stability : auto-generated
import Formatting (Format, (%)) |
Module : . Nomad . Types
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
Portability : non - portable ( GHC extensions )
module Terrafomo.Nomad.Types where
import Data . Text ( Text )
import Terrafomo
import Terrafomo . ... |
cfc14ac541a1c2a232dc24ee7ada0a0cf88ebda5c69a952e495be9015acd6003 | ztellman/penumbra | core.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/ztellman/penumbra/db43d01c280305beab26d1004ae78b1777ab3fc7/src/penumbra/glsl/core.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns penumbra.glsl.core
(:use [penumbra.translate core])
(:use [penumbra.def :only (defvar defvar- defmacro-)])
(:use [clojure.pprint :only (pprint)])
(:import (java.text ParseException))
(:require [penumbra.translate.c :as c]))
(defn- parse-keyword
"Turns :mo... |
e3fa85043b3ede11c8fd222a543b781ee3c30422ce9b154443aa320440debd38 | danilkolikov/dfl | Ast.hs | |
Module : Frontend . Inference . Kind . Ast
Description : Modified version of AST with kind information
Copyright : ( c ) , 2019
License : MIT
Modified version of AST , produced by kind inference with included kind information
Module : Frontend.Inference.Kind.Ast
Descriptio... | null | https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/src/Frontend/Inference/Kind/Ast.hs | haskell | | A slice of a module with kind information
| Definition of a data type
^ Context of a data type
^ Name of a data type
^ Parameters of a data type
^ List of instances to derive
^ List of constructors
^ Is this type a newtype?
| Constructor of a data type
^ Name of a constructor
^ Arguments of a constructor
... | |
Module : Frontend . Inference . Kind . Ast
Description : Modified version of AST with kind information
Copyright : ( c ) , 2019
License : MIT
Modified version of AST , produced by kind inference with included kind information
Module : Frontend.Inference.Kind.Ast
Descriptio... |
427fbd55f7337d53f7e8c841fd01e423e77e214b4e9ea23af3411bc22e5a825e | screenshotbot/screenshotbot-oss | scheduler.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(defpackage :screenshotbot/web-build/scheduler
(:use #:cl)
(:nicknames :screensho... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/3757fea7f885563000370eab533a36fa335d0fe2/src/screenshotbot/web-build/scheduler.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
new style | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(defpackage :screenshotbot/web-build/scheduler
(:use #:cl)
(:nicknames :screenshotbot/pro/web-build/scheduler)
(:import-from #:screenshot... |
1452415069a75fb7808f5799387f3ed8dee36e520f136ce4db644170e0794edd | iij/lmq | lmq_hook_preserve_header.erl | -module(lmq_hook_preserve_header).
-behaviour(lmq_hook).
-export([init/0, hooks/0, activate/1, deactivate/1]).
-export([pre_http_push/2]).
init() ->
ok.
hooks() ->
[pre_http_push].
activate(Preserve) ->
{ok, Preserve}.
deactivate(_) ->
ok.
pre_http_push({MD, Content, Req}, Preserve) ->
{Hdrs, ... | null | https://raw.githubusercontent.com/iij/lmq/3f01c555af973a07a3f2b22ff95a2bc1c7930bc2/src/lmq_hook_preserve_header.erl | erlang | ==================================================================
================================================================== | -module(lmq_hook_preserve_header).
-behaviour(lmq_hook).
-export([init/0, hooks/0, activate/1, deactivate/1]).
-export([pre_http_push/2]).
init() ->
ok.
hooks() ->
[pre_http_push].
activate(Preserve) ->
{ok, Preserve}.
deactivate(_) ->
ok.
pre_http_push({MD, Content, Req}, Preserve) ->
{Hdrs, ... |
5e88188ad2f6fd1e404388a386a2360abf61bc19a550d6821cf865c0fb4a3e8f | reactiveml/rml | dot_graph.ml | Graph viewer
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , ... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/examples/graph_viewer/dot_graph.ml | ocaml | **
** | Graph viewer
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , ... |
5a9eb08fa4804fcd07e9b279aa6b3813617765e481833a81a862bbd095c4dcb6 | Enecuum/Node | TestGraph.hs |
# LANGUAGE TemplateHaskell #
module Enecuum.TestData.TestGraph where
import Enecuum.Prelude
import Data.HGraph.StringHashable (StringHash (..), StringHashable, toHash)
import Control.Lens.TH (makeLenses)
import qualified Data.ByteString.Base64 as Base64
import qualified Data.Serialize ... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/test/test-framework/Enecuum/TestData/TestGraph.hs | haskell | | Checks if new balance is valid and adds new transaction node.
Returns new node hash and new balance. |
# LANGUAGE TemplateHaskell #
module Enecuum.TestData.TestGraph where
import Enecuum.Prelude
import Data.HGraph.StringHashable (StringHash (..), StringHashable, toHash)
import Control.Lens.TH (makeLenses)
import qualified Data.ByteString.Base64 as Base64
import qualified Data.Serialize ... |
13e08478408dd0b73503151df760dac5269cd3ab5b7afcf04576da709e0be6a8 | emqx/emqtt | tcp_server.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 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 of the L... | null | https://raw.githubusercontent.com/emqx/emqtt/59bfec67c8d5b8406592e7cf1b5b52a796e5b728/test/tcp_server.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 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(tcp_server).
-export([start_link/1, stop/1]).
-export([accept/1]).
start_link(Port) ->
{... |
88b1569924369ec7496d3578ce93bef396b6515e773b8298c74584b288eafcf9 | emqx/emqx | emqx_mgmt_cluster_proto_v1.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_management/src/proto/emqx_mgmt_cluster_proto_v1.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 ) 2022 - 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_cluster_proto_v1).
-behaviour(emqx_bpapi).
-export([
introduced_in/0,
... |
e7a6a7d9df0406f4b7b2f9fe83c3fb7a0f555098784b0f1c21867f70ea1d660f | binsec/binsec | main.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/main.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
1ed31d75d16b5211f5db7b608d1fa6f41773b351447de41191aa58244c9dcbed | charlieg/Sparser | knit.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1995 -- all rights reserved
;;;
;;; File: "knit"
;;; Module: "analyzers;DA:"
Version : May 1995
initiated 5/5/95 . Packaged vertex - making calls 5/12
(in-package :sparser)
(defun knit-arc-to-prior-vertex (arc)
;... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/analyzers/DA/knit.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "knit"
Module: "analyzers;DA:"
Called from Make-new-trie.
Add the arc to the list of rightward-extensions of the vertex
that the arc lists as its left-vertex.
If there's to be a rank ordering of the arcs it's done
here. For the moment, we... | copyright ( c ) 1995 -- all rights reserved
Version : May 1995
initiated 5/5/95 . Packaged vertex - making calls 5/12
(in-package :sparser)
(defun knit-arc-to-prior-vertex (arc)
(let ((vertex (arc-left-vertex arc)))
(setf (vertex-rightward-extensions vertex)
(cons arc
... |
0e922f581eba5a1b56c1107ca4fb1c35cc1e6aa4597a3600d5cf71a67979d68a | janegca/htdp2e | Exercise-167-ListAndCons.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname Exercise-167-ListAndCons) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2h... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/02-ArbitrarilyLargeData/Exercise-167-ListAndCons.rkt | racket | about the language level of this file in a form that our tools can easily process.
Use cons and '() to construct the equivalent of the following lists:
(list 0 1 2 3 4 5)
Use check-expect to express your answers. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname Exercise-167-ListAndCons) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"... |
d03d6e6e25abbebe52f56f1e50aff3297650b103f0cab76f7b075328970196c0 | obsidiansystems/obelisk | Run.hs | # LANGUAGE CPP #
#if defined(IPROUTE_SUPPORTED)
# LANGUAGE TemplateHaskell #
#endif
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Rank2Types ... | null | https://raw.githubusercontent.com/obsidiansystems/obelisk/d779d5ab007d8ee5c3cd3400473453e1d106f5f1/lib/run/src/Obelisk/Run.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE Rank2Types #
^ Port to run the backend
^ Static asset handler
^ Backend
^ Frontend
TODO: Use Obelisk.Backend.runBackend; this will require separating the checking and running phases
Convenience wrapper to handle path segments... | # LANGUAGE CPP #
#if defined(IPROUTE_SUPPORTED)
# LANGUAGE TemplateHaskell #
#endif
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - w... |
ea9a2c55da5d1e9592253bde67a7ede9fb8508cbaeec49a3d2997e066c978ddb | MaskRay/OJHaskell | 33.hs | import Data.Ratio
main = print . denominator . product $ [x%z | x <- [1..9], y <- [1..9], z <- [1..9], 9*x*z+y*z == 10*x*y] | null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Project%20Euler/33.hs | haskell | import Data.Ratio
main = print . denominator . product $ [x%z | x <- [1..9], y <- [1..9], z <- [1..9], 9*x*z+y*z == 10*x*y] | |
12529fc487200a936e49a18f982c1bdd672252d93f325ee23225bac184fdf4ce | falgon/htcc | AST.hs | |
Module : Htcc . . AST
Description : Data types and type synonyms used during AST construction
Copyright : ( c ) roki , 2019
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
Data types and type synonyms used during AST construction
Module : Htcc.Parse... | null | https://raw.githubusercontent.com/falgon/htcc/3cef6fc362b00d4bc0ae261cba567bfd9c69b3c5/src/Htcc/Parser/AST.hs | haskell | |
Module : Htcc . . AST
Description : Data types and type synonyms used during AST construction
Copyright : ( c ) roki , 2019
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
Data types and type synonyms used during AST construction
Module : Htcc.Parse... | |
e0a9b8cec8c49e120ac3c5becbf93f65b52d91c628e83529894c9e60f53500f1 | airbus-seclab/bincat | npkcontext.ml |
C2Newspeak : compiles C code into Newspeak . Newspeak is a minimal language
well - suited for static analysis .
Copyright ( C ) 2007 , ,
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by th... | null | https://raw.githubusercontent.com/airbus-seclab/bincat/493a03890b3b472fd198ce58c7e9280abd0f9f93/ocaml/src/npk/newspeak/npkcontext.ml | ocaml | TODO:
instead of having all parameters here and having all files depend
on it,
Should have npkcontex at the end that sets the parameters of each file.
Not necessarily better ! Since some options are the same across several
different files.
----------------------
Command line options
---------------... |
C2Newspeak : compiles C code into Newspeak . Newspeak is a minimal language
well - suited for static analysis .
Copyright ( C ) 2007 , ,
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by th... |
4b52ff2007b5972d9827991e19a4da8bb3871607e0374cb7490a53e8e86d44a6 | rabbitmq/rabbit-stress | rabbit_consumer_stress_sup.erl | -module(rabbit_consumer_stress_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
Procs = [],
{ok, {{one_for_one, 1, 5}, Procs}}.
| null | https://raw.githubusercontent.com/rabbitmq/rabbit-stress/9655c700c62b6271f9d226924d983c14b95ed0c2/src/rabbit_consumer_stress_sup.erl | erlang | -module(rabbit_consumer_stress_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
Procs = [],
{ok, {{one_for_one, 1, 5}, Procs}}.
| |
2ac271e3ed0fd09288e08e2eb38155da85fe0287eed47bb9128077ac97938a95 | exercism/scheme | word-count.scm | (import (rnrs))
(define (word-count sentence)
'implement-me!)
| null | https://raw.githubusercontent.com/exercism/scheme/bad074a0b46c05820c2a0397ff922499087d8ea0/input/exercises/word-count/word-count.scm | scheme | (import (rnrs))
(define (word-count sentence)
'implement-me!)
| |
01b6ee81b2a479c6c5f50c357a950bcbfe708a158e69f83b9d30e5684e71e371 | ruhatch/mirage-oram | testable.ml | open Lwt
open Alcotest
let int64 =
let module M = struct
type t = int64
let pp fmt t = Format.fprintf fmt "%Ld" t
let equal = (=)
end in
(module M: TESTABLE with type t = M.t)
let tuple3 (type a) (type b) (type c) (a:a testable) (b:b testable) (c:c testable): (a * b * c) testable =
let module A = ... | null | https://raw.githubusercontent.com/ruhatch/mirage-oram/533a7f7726c4a499b60c71ed627b730349a3816b/tests/testable.ml | ocaml | Helper modules and functions for testing
module O = Block | open Lwt
open Alcotest
let int64 =
let module M = struct
type t = int64
let pp fmt t = Format.fprintf fmt "%Ld" t
let equal = (=)
end in
(module M: TESTABLE with type t = M.t)
let tuple3 (type a) (type b) (type c) (a:a testable) (b:b testable) (c:c testable): (a * b * c) testable =
let module A = ... |
4313c5271b30fbac0217255c6ce1136c534272077a5d9891de5f73443c0da00a | ajeetdsouza/brainfuck | Memory.hs | module Memory where
data Stream a = a :| Stream a deriving Show
data Tape a = Tape (Stream a) a (Stream a) deriving Show
moveLeft :: Tape a -> Tape a
moveLeft (Tape (l :| ls) x rs) = Tape ls l (x :| rs)
moveRight :: Tape a -> Tape a
moveRight (Tape ls x (r :| rs)) = Tape (x :| ls) r rs
move :: Int -> Tape a -> Tap... | null | https://raw.githubusercontent.com/ajeetdsouza/brainfuck/d77610b3c11b526c1b371711ba6966c140ba7425/src/Memory.hs | haskell | module Memory where
data Stream a = a :| Stream a deriving Show
data Tape a = Tape (Stream a) a (Stream a) deriving Show
moveLeft :: Tape a -> Tape a
moveLeft (Tape (l :| ls) x rs) = Tape ls l (x :| rs)
moveRight :: Tape a -> Tape a
moveRight (Tape ls x (r :| rs)) = Tape (x :| ls) r rs
move :: Int -> Tape a -> Tap... | |
c95a022fae700947c3950e4fdc0cb1e3ecde8e4c7fa3cfbc8538e7329a070979 | opencog/pln | and-bit-prior.scm | 1 . Any and - BIT has a very low probability , 0.0001 % , of being the
preproof of any target , and we have a very low confidence , 0.01 ,
;; about this probability. These numbers are made up. This should
;; be replaced by a set of more informative laws about the space of
;; proofs, so that we can for i... | null | https://raw.githubusercontent.com/opencog/pln/ea6c9bbe47cb315aded20db0fa765c3a9de82461/examples/pln/inference-control-meta-learning/and-bit-prior.scm | scheme | about this probability. These numbers are made up. This should
be replaced by a set of more informative laws about the space of
proofs, so that we can for instance infer that small and-BITs
are more likely to be preproofs than larger and-BITs, etc.
TypedVariable
Variable "$A"
Variable ... | 1 . Any and - BIT has a very low probability , 0.0001 % , of being the
preproof of any target , and we have a very low confidence , 0.01 ,
ImplicationScope < 0.0001 0.01 >
VariableList
Type " BindLink "
Predicate " URE : BC : and - BIT "
Predicate " URE : BC : target "
Predica... |
54865af80370613beecf88f87b2aa2287b5ed811dfd39abcee7b2d1c4d30d9a8 | grin-compiler/ghc-wpc-sample-programs | Net.hs | |
Module : Util . Net
Description : Utilities for Network IO .
License : : The Idris Community .
Module : Util.Net
Description : Utilities for Network IO.
License : BSD3
Maintainer : The Idris Community.
-}
module Util.Net (listenOnLocalhost, listenOnLocalhostAnyPort) where
import C... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/src/Util/Net.hs | haskell | bound to localhost interface instead of iNADDR_ANY | |
Module : Util . Net
Description : Utilities for Network IO .
License : : The Idris Community .
Module : Util.Net
Description : Utilities for Network IO.
License : BSD3
Maintainer : The Idris Community.
-}
module Util.Net (listenOnLocalhost, listenOnLocalhostAnyPort) where
import C... |
77d828795fb50643d0d984007457b2418429a20b987ff5d4beec01c2cc3d8e63 | vmware-archive/diegotaskscheduler | resubmitter_test.clj | (ns diegoscheduler.resubmitter-test
(:require [diegoscheduler.resubmitter :refer [new-resubmitter]]
[clojure.test :refer :all]
[clojure.core.async :refer [go chan >!! <!! <!]]
[com.stuartsierra.component :refer [start stop]]))
(deftest resubmitting
(testing "it resubmits failure... | null | https://raw.githubusercontent.com/vmware-archive/diegotaskscheduler/080fa07815f3e66cdbf1ce804d0944d0561812fc/test/diegoscheduler/resubmitter_test.clj | clojure | (ns diegoscheduler.resubmitter-test
(:require [diegoscheduler.resubmitter :refer [new-resubmitter]]
[clojure.test :refer :all]
[clojure.core.async :refer [go chan >!! <!! <!]]
[com.stuartsierra.component :refer [start stop]]))
(deftest resubmitting
(testing "it resubmits failure... | |
5bb9292b8c38af7808d7f8dbe2b8720892c9452c685c550dc40091809e12e6a5 | hanazuki/miniml | semantic.ml | open Syntax
open Utils
exception Error of string
let rec check_exp = function
| TypedExp (exp, _) ->
check_exp exp
| VarExp _
| UnitExp
| ILitExp _
| BLitExp _ -> ()
| TupleExp exps ->
List.iter check_exp exps
| ListExp exps ->
List.iter check_exp exps
| ConsExp (exp1, exp2) ->
check_e... | null | https://raw.githubusercontent.com/hanazuki/miniml/012f268b4d3bb91d234eaa941b0e7bf58a0dd7cc/src/semantic.ml | ocaml | open Syntax
open Utils
exception Error of string
let rec check_exp = function
| TypedExp (exp, _) ->
check_exp exp
| VarExp _
| UnitExp
| ILitExp _
| BLitExp _ -> ()
| TupleExp exps ->
List.iter check_exp exps
| ListExp exps ->
List.iter check_exp exps
| ConsExp (exp1, exp2) ->
check_e... | |
e3c6a484a7701762286c92d35669ca51c4f4ebd2a10598838e482deeac886249 | mirage/functoria | app.ml | let start =
Fmt.pr "Success: vote=%s hello=%s\n%!" Key_gen.(vote ()) Key_gen.(hello ())
| null | https://raw.githubusercontent.com/mirage/functoria/363c49bd0b805831b97efca5b733eaaeed8440b4/tests/app/app.ml | ocaml | let start =
Fmt.pr "Success: vote=%s hello=%s\n%!" Key_gen.(vote ()) Key_gen.(hello ())
| |
9cc46f5a2a22c77bea30949211d9f8e952442e7129b3b0caaeaa02e17eb113b6 | facebook/pyre-check | classInterval.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/pyre-check/536e4a2c008726d0ce5589eaef681166923b6183/source/interprocedural/classInterval.ml | ocaml |
* 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... | |
2f775ec257d07476006e822a27eea984b748ccb0197f5fb5adb243dec35c071c | GaloisInc/pate | JSONReport.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
module JSONReport (
ProofEventConsumer
, SomeProofEvent(..)
, consumeProofEvents
, sendEvent
, waitForConsumer
) where
import qualified Control.Concurrent.Async as CCA
import qualified Control.Concurrent.Chan as CCC
import ... | null | https://raw.githubusercontent.com/GaloisInc/pate/e096e9bd5d302267e19b27d940aacf6d50e1347b/tools/pate/JSONReport.hs | haskell | # LANGUAGE GADTs #
| An address for JSON reports, rendered in hex
| Turn a ground value into a string
This is unfortunately a bit verbose because 'WEG.GroundValue' is a type
family, and thus has no instances. We have to match on the type repr to
resolve the real type on each branch to take advantage of the underl... | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
module JSONReport (
ProofEventConsumer
, SomeProofEvent(..)
, consumeProofEvents
, sendEvent
, waitForConsumer
) where
import qualified Control.Concurrent.Async as CCA
import qualified Control.Concurrent.Chan as CCC
import Control.Lens ( ... |
2a6a32c8e465042d4de9efe6218af40c11f05bc56b57da89a16517f742af0e77 | c-cube/frog-utils | Problem_run.ml |
(* This file is free software, part of frog-utils. See file "license" for more details. *)
open Frog
open Result
type t = Problem.t
type path = string
module E = Misc.LwtErr
regex + mark
let m_unsat_, unsat_ = Re.(str "unsat" |> no_case |> mark)
let m_sat_, sat_ = Re.(str "sat" |> no_case |> mark)
let m_unknown_... | null | https://raw.githubusercontent.com/c-cube/frog-utils/3f68c606a7abe702f9e22a0606080191a2952b18/src/server/Problem_run.ml | ocaml | This file is free software, part of frog-utils. See file "license" for more details.
"^ #expect: (unsat|sat|unknown|error)", basically
what is expected?
sort by alphabetic order |
open Frog
open Result
type t = Problem.t
type path = string
module E = Misc.LwtErr
regex + mark
let m_unsat_, unsat_ = Re.(str "unsat" |> no_case |> mark)
let m_sat_, sat_ = Re.(str "sat" |> no_case |> mark)
let m_unknown_, unknown_ = Re.(str "unknown" |> no_case |> mark)
let m_timeout_, timeout__ = Re.(str "tim... |
7a77b6b141c0c7c90c2f526abdf8c20fec083142a71e4eeec315657580375783 | serokell/qtah | QSettings.hs | This file is part of Qtah .
--
-- Copyright 2018 The Qtah Authors.
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) any lat... | null | https://raw.githubusercontent.com/serokell/qtah/abb4932248c82dc5c662a20d8f177acbc7cfa722/qtah-generator/src/Graphics/UI/Qtah/Generator/Interface/Core/QSettings.hs | haskell |
Copyright 2018 The Qtah Authors.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without... | This file is part of Qtah .
the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
module Graphics.UI.Qtah.Generator.Interface.Core.QSettings (
aModule,
) where
import... |
78ed32b57fc9a7eb29b0dd845b83a67b351eea4a651eac1a756bd784f11df97a | spechub/Hets | Test_AS_DFOL.hs | |
Description : Test file for AS_DFOL
Description : Test file for AS_DFOL
-}
import DFOL.AS_DFOL
import Common.Id
import Common.AS_Annotation
natTok, matTok, mTok, nTok, aTok, bTok, plusTok :: NAME
natTok = Token "Nat" $ Range []
matTok = Token "Mat" $ Range []
mTok = Token "m" $ Range []
nTok = Token "n" $... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/DFOL/Tests/Test_AS_DFOL.hs | haskell | |
Description : Test file for AS_DFOL
Description : Test file for AS_DFOL
-}
import DFOL.AS_DFOL
import Common.Id
import Common.AS_Annotation
natTok, matTok, mTok, nTok, aTok, bTok, plusTok :: NAME
natTok = Token "Nat" $ Range []
matTok = Token "Mat" $ Range []
mTok = Token "m" $ Range []
nTok = Token "n" $... | |
296e6aff146ccf4a4baad547468feb321453ef8f72ebf91b07c0b9f298210e62 | kaznum/programming_in_ocaml_exercise | postord.ml | type 'a tree = Lf | Br of 'a * 'a tree * 'a tree;;
let comptree = Br(1,
Br(2, Br(4, Lf, Lf),Br(5, Lf, Lf)),
Br(3, Br(6, Lf, Lf), Br(7, Lf, Lf)));;
let rec postord t l =
match t with
Lf -> l
| Br(x, left, right) -> postord left (postord right (x::l));;
postord comptree [];;
| null | https://raw.githubusercontent.com/kaznum/programming_in_ocaml_exercise/6f6a5d62a7a87a1c93561db88f08ae4e445b7d4e/ex6.6/postord.ml | ocaml | type 'a tree = Lf | Br of 'a * 'a tree * 'a tree;;
let comptree = Br(1,
Br(2, Br(4, Lf, Lf),Br(5, Lf, Lf)),
Br(3, Br(6, Lf, Lf), Br(7, Lf, Lf)));;
let rec postord t l =
match t with
Lf -> l
| Br(x, left, right) -> postord left (postord right (x::l));;
postord comptree [];;
| |
9c06371a175a4967240a5c4c1b3c54cd4b53a7a2c75def2ad652140bf55fa832 | input-output-hk/ouroboros-network | IOManager.hs | # LANGUAGE CPP #
{-# LANGUAGE RankNTypes #-}
| A shim layer for ` Win32 - network ` 's ` IOManager `
--
module Ouroboros.Network.IOManager (module X) where
import System.IOManager as X
| null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/6c15a8093bac34091ad96af2b8b0d1f7fe54b732/ouroboros-network-framework/src/Ouroboros/Network/IOManager.hs | haskell | # LANGUAGE RankNTypes #
| # LANGUAGE CPP #
| A shim layer for ` Win32 - network ` 's ` IOManager `
module Ouroboros.Network.IOManager (module X) where
import System.IOManager as X
|
31bdd29f38752928904e4fca8ba879fe9c18b82548f45c9c514beeef712f0a17 | jacobobryant/eelchat | middleware.clj | (ns com.eelchat.middleware
(:require [xtdb.api :as xt]))
(defn wrap-redirect-signed-in [handler]
(fn [{:keys [session] :as req}]
(if (some? (:uid session))
{:status 303
:headers {"location" "/app"}}
(handler req))))
(defn wrap-signed-in [handler]
(fn [{:keys [biff/db session] :as req}]
... | null | https://raw.githubusercontent.com/jacobobryant/eelchat/8422e40abf03dd4facbfbdb07000309f39874b1c/src/com/eelchat/middleware.clj | clojure | (ns com.eelchat.middleware
(:require [xtdb.api :as xt]))
(defn wrap-redirect-signed-in [handler]
(fn [{:keys [session] :as req}]
(if (some? (:uid session))
{:status 303
:headers {"location" "/app"}}
(handler req))))
(defn wrap-signed-in [handler]
(fn [{:keys [biff/db session] :as req}]
... | |
12641740d28c8f950426632d74f898fda266194f72e5d0066f78a23cf7eac0ce | CommonDoc/common-doc | file.lisp | (in-package :common-doc.file)
(defvar *base-directory* *default-pathname-defaults*
"The directory all resources with relative paths are based from. This is
intended to be bound by a @c(let) by specific input formats.")
(defun absolute-path (pathname-or-string)
"Take a pathname or namestring. If it's absolute, ret... | null | https://raw.githubusercontent.com/CommonDoc/common-doc/66cabe67241449a1c0e2cbdc955a60c9439869e6/src/file.lisp | lisp | (in-package :common-doc.file)
(defvar *base-directory* *default-pathname-defaults*
"The directory all resources with relative paths are based from. This is
intended to be bound by a @c(let) by specific input formats.")
(defun absolute-path (pathname-or-string)
"Take a pathname or namestring. If it's absolute, ret... | |
bd91f819f2c0496b5c79f7168b6a5b200c1967a9bb42c7b4160d78096ba4e60f | openvstorage/alba | alba_client_sequence.ml |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Checksum
open Lwt.Infix
type object_name = string
type update =
| Up... | null | https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/alba_client_sequence.ml | ocaml | clear the manifest cache in error path
update manifest cache |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Checksum
open Lwt.Infix
type object_name = string
type update =
| Up... |
4378d79ca107378b3a80e9df56c2bb3e7142c895b69b35ef74122a8c20a5d931 | tezos/tezos-mirror | client_proto_rollups.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/adb9ff09cb5f0a9cae8c8d8924efee6c4764399a/src/proto_alpha/lib_client/client_proto_rollups.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 Nomadic Labs , < >
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 , WHETHER IN A... |
966b50bd38a4b5428d35aa4aa8e29dd01464798e89b637f37150ebaf114748d3 | int28h/HaskellTasks | 0008.hs |
Определите функцию , вычисляющую двойной факториал , то есть , ту же четность .
Например : 7 ! ! = 7 * 5 * 3 * 1 , 8 ! ! = 8 * 6 * 4 * 2 . Предполагается , что аргумент функции значения .
Определите функцию, вычисляющую двойной факториал, то есть произведение натуральных чисел, не превосходящих за... | null | https://raw.githubusercontent.com/int28h/HaskellTasks/38aa6c1d461ca5774350c68fa7dd631932f10f84/src/0008.hs | haskell |
Определите функцию , вычисляющую двойной факториал , то есть , ту же четность .
Например : 7 ! ! = 7 * 5 * 3 * 1 , 8 ! ! = 8 * 6 * 4 * 2 . Предполагается , что аргумент функции значения .
Определите функцию, вычисляющую двойной факториал, то есть произведение натуральных чисел, не превосходящих за... | |
a7b1ad5eb13afec59a9c03742d0e4a6d4bf6777dff986438088009bd61322291 | thelema/ocaml-community | clflags.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/utils/clflags.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2005 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 .
val objfiles : string list ref
val ccob... |
e713aa0f87ac7a070b4d057351dc4423df9e7d27c0c8c25122a8c6813ed5f170 | wdhowe/clojure-snippets | maps.clj | ;; maps - key/value lookups (dictionaries or hashes)
;; Use when: You have natural key/value lookup requirements or
;; as a useful top level structure for nested data.
; Creating maps - literal and keyword
(def jedi1
{:name "Yoda", :lightsaber "green", :height "very small", :job "Jedi Sage", :foods {:favor... | null | https://raw.githubusercontent.com/wdhowe/clojure-snippets/0c3247ce99a563312b549d03f080b8cf449b541d/data_structures/maps.clj | clojure | maps - key/value lookups (dictionaries or hashes)
Use when: You have natural key/value lookup requirements or
as a useful top level structure for nested data.
Creating maps - literal and keyword
The maps
Getting items - get and keyword
Adding/removing
Checking the map
Display just keys or values |
(def jedi1
{:name "Yoda", :lightsaber "green", :height "very small", :job "Jedi Sage", :foods {:favorite "pizza" :dislikes "spinach"}})
(def jedi2
(hash-map :name "Luke" :lightsaber "blue" :height "normal" :job "Jedi Master" :foods {:favorite "burgers" :dislikes "fish"}))
(println "Jedi 1:" jedi1)
(println "Jedi ... |
8d3aa3a8149267318c790c4cff5dded3bed447b252796bcf8481b91c545552a9 | AndrasKovacs/ELTE-func-lang | Lesson09.hs | {-# OPTIONS_GHC -Wincomplete-patterns #-}
# LANGUAGE InstanceSigs #
# LANGUAGE DeriveFunctor #
# LANGUAGE LambdaCase #
import Data.Maybe
import Data.Char
import Control.Applicative
import Control.Monad
Parser
newtype Parser a = Parser {runParser :: String -> Maybe (a, String)}
deriving Functor
-- (State String ... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/9fda7b511fade261344d51760c698e8435250c8c/2020-21-2/gyak_3/Lesson09.hs | haskell | # OPTIONS_GHC -Wincomplete-patterns #
(State String + Maybe) monad
Nothing : parse error
Just (a, s) : successful parsing with result and remaining input
No input is consumed
Executing parsers sequentially
p <|> empty = p
empty <|> p = p
Basic parsers
Read a character if it satisfies a certain criteria... | # LANGUAGE InstanceSigs #
# LANGUAGE DeriveFunctor #
# LANGUAGE LambdaCase #
import Data.Maybe
import Data.Char
import Control.Applicative
import Control.Monad
Parser
newtype Parser a = Parser {runParser :: String -> Maybe (a, String)}
deriving Functor
Parser a : function , which can modify a String state and... |
79f499698cd8d3218e600efb3ccad2a16b6aaedf0ac5b1ff1b8148ade8909265 | aprolog-lang/aprolog | check.ml | (* Check *)
(* Checks for counterexamples to a specification *)
open Util;;
open Internal;;
open Subst;;
open Types;;
open Unify;;
open Boundsolve;;
open Solve;;
module P = Perm;;
module S = Subst;;
let check_wrap pp sg idx test sc bound ans =
let names = Varset.elements (fas_t test) in
let rec falsify_test tes... | null | https://raw.githubusercontent.com/aprolog-lang/aprolog/410327a615919eb6827d71661e69de14279b8c50/src/check.ml | ocaml | Check
Checks for counterexamples to a specification
| Tatomic(a) ->
solve_wrap pp idx Dtrue (Gnot(Gatomic(a))) sc ans
TODO: Add bound names and evars to set
TODO: is this correct? | open Util;;
open Internal;;
open Subst;;
open Types;;
open Unify;;
open Boundsolve;;
open Solve;;
module P = Perm;;
module S = Subst;;
let check_wrap pp sg idx test sc bound ans =
let names = Varset.elements (fas_t test) in
let rec falsify_test test sc depth ans =
match test with
Ttrue -> ()
| T... |
52c07a4e4cae2b00a15ac098f29e145bd13ba2d02bfc6bf878ac6ca63ae6bbe6 | KMahoney/squee | RangedParsec.hs | module RangedParsec
( module RangedParsec.Parsec
, module RangedParsec.Combinators
, module RangedParsec.Pos
, module RangedParsec.Common
, module RangedParsec.Error
, module RangedParsec.Pretty
) where
import RangedParsec.Parsec
import RangedParsec.Combinators
import RangedParsec.Pos
import RangedParsec... | null | https://raw.githubusercontent.com/KMahoney/squee/b2ebad2ec6f3c866398600793d0a231edc8c23e4/lib/ranged-parsec/src/RangedParsec.hs | haskell | module RangedParsec
( module RangedParsec.Parsec
, module RangedParsec.Combinators
, module RangedParsec.Pos
, module RangedParsec.Common
, module RangedParsec.Error
, module RangedParsec.Pretty
) where
import RangedParsec.Parsec
import RangedParsec.Combinators
import RangedParsec.Pos
import RangedParsec... | |
f55c2edbdbd04544a48b58e409ec2ceece31787b6579ccd17fe8aa1de58cce5f | 6502/JSLisp | uiclock.lisp | (defun make-clock (tx ty)
(let ((clock (sprite *root*
(begin-path)
(circle 0 0 120)
(fill "#FFFFFF")
(stroke "#000000" 2))))
(dotimes (i 60)
(let ((t (/ (* 2 pi i) 60)))
(add-graphics clock
... | null | https://raw.githubusercontent.com/6502/JSLisp/9a4aa1a9116f0cfc598ec9f3f30b59d99810a728/uiclock.lisp | lisp | (defun make-clock (tx ty)
(let ((clock (sprite *root*
(begin-path)
(circle 0 0 120)
(fill "#FFFFFF")
(stroke "#000000" 2))))
(dotimes (i 60)
(let ((t (/ (* 2 pi i) 60)))
(add-graphics clock
... | |
dfdc3f26dd23fc6d0390de2e680be20a39118c67c5f7fdc41f338599aa000edd | inhabitedtype/ocaml-aws | copySnapshot.mli | open Types
type input = CopySnapshotMessage.t
type output = CopySnapshotResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/elasticache/lib/copySnapshot.mli | ocaml | open Types
type input = CopySnapshotMessage.t
type output = CopySnapshotResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
7bb61d39822732c49a3406cf840cbfd84b363033999cdfbe0052352230e386c7 | CloudI/CloudI | epgsql_cmd_update_type_cache.erl | %% @doc Special command. Executes Squery over pg_type table and updates codecs.
-module(epgsql_cmd_update_type_cache).
-behaviour(epgsql_command).
-export([init/1, execute/2, handle_message/4]).
-export_type([response/0]).
-type response() ::
{ok, [epgsql:type_name()]}
| {error, epgsql:query_error()}.
-... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_epgsql/src/epgsql_cmd_update_type_cache.erl | erlang | @doc Special command. Executes Squery over pg_type table and updates codecs. | -module(epgsql_cmd_update_type_cache).
-behaviour(epgsql_command).
-export([init/1, execute/2, handle_message/4]).
-export_type([response/0]).
-type response() ::
{ok, [epgsql:type_name()]}
| {error, epgsql:query_error()}.
-include("epgsql_protocol.hrl").
-record(upd,
{codecs :: [{epgsql_codec:... |
642e228e98b72e494f3467862eb2474b4413f463c775f66108048973dfb5ce6e | janestreet/shexp | debuggers.mli | open Shexp_sexp.Std
module type S = Debugger_intf.S
(** Log events synchronously using the given printer. *)
module Logger : sig
include S
val create : (Sexp.t -> unit) -> t
end
(** Produce a full execution trace. The order of the trace is independent of the order in
which commands are executed in different... | null | https://raw.githubusercontent.com/janestreet/shexp/635989a9065f94e309707f113d6647dc62d6932f/process-lib/src/debuggers.mli | ocaml | * Log events synchronously using the given printer.
* Produce a full execution trace. The order of the trace is independent of the order in
which commands are executed in different threads, so it is suitable for expect tests.
| open Shexp_sexp.Std
module type S = Debugger_intf.S
module Logger : sig
include S
val create : (Sexp.t -> unit) -> t
end
module Tracer : sig
include S
val create : unit -> t
val result : t -> Sexp.t
end
|
6d5f0086200707804645addc02fc79fc6a84d914bcd570df9ec748e685612754 | fetburner/Coq2SML | search.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/toplevel/search.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
General search, restricted to head ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Util
open Names
... |
305f0f4b1f6ec54d3d8a903cf7474e772557bc4186aa1dbe70fb38e178b4eb45 | juxt/shop | graphql_ws.clj | (ns edge.yada.graphql-ws
(:require
[cheshire.core :as json]
[clojure.tools.logging :as log]
[manifold.stream :as ms]))
;; -transport-ws/blob/master/PROTOCOL.md
;; From subscriptions-transport-ws/src/message-types.ts
(def ^:client GQL_CONNECTION_INIT "connection_init")
(def ^:server GQL_CONNECTION_ACK "conn... | null | https://raw.githubusercontent.com/juxt/shop/c23fc55bca1852bfbabb681a72debc12373c3a36/examples/main/src/edge/yada/graphql_ws.clj | clojure | -transport-ws/blob/master/PROTOCOL.md
From subscriptions-transport-ws/src/message-types.ts
TODO: Variables | (ns edge.yada.graphql-ws
(:require
[cheshire.core :as json]
[clojure.tools.logging :as log]
[manifold.stream :as ms]))
(def ^:client GQL_CONNECTION_INIT "connection_init")
(def ^:server GQL_CONNECTION_ACK "connection_ack")
(def ^:server GQL_CONNECTION_ERROR "connection_error")
(def ^:client GQL_CONNECTION_... |
ecd4ac670de05ee081a62c3a54d52d6f62947608790a4d0bfa1794770e04fa70 | russelldb/rabl | rabl_riak.erl | @author < >
( C ) 2017 ,
%%% @doc
%%% wrap a riak client, so we can change transport etc
%%% @end
Created : 9 May 2017 by < >
-module(rabl_riak).
-compile(export_all).
-export_type([client/0, object/0, bucket/0, key/0, bk/0]).
we do n't depend on riak_kv , but can only be run inside a riak node
-... | null | https://raw.githubusercontent.com/russelldb/rabl/9aa140ef5ec09959393adba5a98321b6df8323e1/src/rabl_riak.erl | erlang | @doc
wrap a riak client, so we can change transport etc
@end
@doc create a new client. Uses app config to connect. Returns `{ok,
Client}' where C is an opaque term to be used for other functions.
@doc put a riak_object, `Client' is obtained from `client_new/0' above.
@doc set bucket properties `Props' on `Bucket... | @author < >
( C ) 2017 ,
Created : 9 May 2017 by < >
-module(rabl_riak).
-compile(export_all).
-export_type([client/0, object/0, bucket/0, key/0, bk/0]).
we do n't depend on riak_kv , but can only be run inside a riak node
-ignore_xref({riak, local_client, 0}).
-ignore_xref({riak_object, from_bin... |
e14cca8e65ba0baa24f08177dd0a486fdc8f7424ee85229db2994cc56771fd59 | schmidt73/guidescan-web | process_test.clj | (ns guidescan-web.query.process-test
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[failjure.core :as f]
[guidescan-web.mock :as mock]
[guidescan-web.genomics.grna :as grna]
[guidescan-web.query.process :as process]))
(def test-params-good
... | null | https://raw.githubusercontent.com/schmidt73/guidescan-web/130f189c88aadcce7a2d857943d16be54f789059/test/guidescan_web/query/process_test.clj | clojure | (ns guidescan-web.query.process-test
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[failjure.core :as f]
[guidescan-web.mock :as mock]
[guidescan-web.genomics.grna :as grna]
[guidescan-web.query.process :as process]))
(def test-params-good
... | |
7ca901480c6d192bbc8f1aaa58a1c7a6d7a5a6f690bcceb23af60ccc9c6eec71 | dag/all-about-monads | example19.hs | Author :
Maintainer : < >
Time - stamp : < Mon Aug 18 15:20:18 2003 >
License : GPL
Maintainer: Jeff Newbern <>
Time-stamp: <Mon Aug 18 15:20:18 2003>
License: GPL
-}
DESCRIPTION
Example 19 - Nesting the Continuation monad within the I / O monad
Usage : Compile the ... | null | https://raw.githubusercontent.com/dag/all-about-monads/f5efbe7276a090cb1a3ce7ebb97ac28b1b13572e/examples/example19.hs | haskell | this is an IO monad block | Author :
Maintainer : < >
Time - stamp : < Mon Aug 18 15:20:18 2003 >
License : GPL
Maintainer: Jeff Newbern <>
Time-stamp: <Mon Aug 18 15:20:18 2003>
License: GPL
-}
DESCRIPTION
Example 19 - Nesting the Continuation monad within the I / O monad
Usage : Compile the ... |
f2ad0c23a2c6afa5db658b6b2484ea6b7f7cc8a8a77c4f9b1e971992500ef8fe | tz-wrapped/tezos-btc | Impl.hs | SPDX - FileCopyrightText : 2019 Bitcoin Suisse
-
- SPDX - License - Identifier : LicenseRef - MIT - BitcoinSuisse
-
- SPDX-License-Identifier: LicenseRef-MIT-BitcoinSuisse
-}
# LANGUAGE RebindableSyntax #
# OPTIONS_GHC -fno - warn - unused - do - bind #
module Lorentz.Contracts.TZBTC.V1.Impl
( Entrypoi... | null | https://raw.githubusercontent.com/tz-wrapped/tezos-btc/f646e8597bba92ce7ea9d622953ce6ff354a5209/src/Lorentz/Contracts/TZBTC/V1/Impl.hs | haskell | * Helpers
| A view entrypoint that has no arguments and returns a single
value from the storage as is.
| Burn the specified amount of tokens from redeem address. Since it
is not possible to burn from any other address, this entry point does
not have an address input. Only operators are allowed to call this entry
... | SPDX - FileCopyrightText : 2019 Bitcoin Suisse
-
- SPDX - License - Identifier : LicenseRef - MIT - BitcoinSuisse
-
- SPDX-License-Identifier: LicenseRef-MIT-BitcoinSuisse
-}
# LANGUAGE RebindableSyntax #
# OPTIONS_GHC -fno - warn - unused - do - bind #
module Lorentz.Contracts.TZBTC.V1.Impl
( Entrypoi... |
67d5bf5956f0c15fddf8504e45f34fe978f29039fe06f2e7eb9c611cf363f035 | alexprut/earth-defender | websocket_handler.erl | -module(websocket_handler).
-include("config.hrl").
%% External exports
-export([]).
%% Internal exports
-export([init/2, websocket_handle/2, websocket_info/2, terminate/3]).
-record(state, {player_id = undef, room_id = undef, room_pid = undef, player_pid = undef, ship_id = undef}).
%%% ---------------------------... | null | https://raw.githubusercontent.com/alexprut/earth-defender/5d4d8f0832fc74882a701d6a0dedee23fd494648/server/src/websocket_handler.erl | erlang | External exports
Internal exports
---------------------------------------------------
Cowboy websocket_handler.
---------------------------------------------------
Client that send messages to the server
Server that send messages to the client
Reason con be: remote, crash or normal
In case the process websoc... | -module(websocket_handler).
-include("config.hrl").
-export([]).
-export([init/2, websocket_handle/2, websocket_info/2, terminate/3]).
-record(state, {player_id = undef, room_id = undef, room_pid = undef, player_pid = undef, ship_id = undef}).
init(Req, _Opts) ->
{cowboy_websocket, Req, #state{}, ?WEBSOCKET_TIM... |
04efcb8da0ccac96812d7460a99f82e08642b1edbdd37847a83a699d64e658ea | cse-bristol/110-thermos-ui | core.clj | This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021
Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details .
(ns thermos-backend.pages.core
(:require [compojure.core :refer :all]
[compojure.coercions :refer [as-int]]
[bidi... | null | https://raw.githubusercontent.com/cse-bristol/110-thermos-ui/e13b96329f3c95e5a10bae431e8ae9bccdb475f4/src/thermos_backend/pages/core.clj | clojure | This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021
Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details .
(ns thermos-backend.pages.core
(:require [compojure.core :refer :all]
[compojure.coercions :refer [as-int]]
[bidi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.