_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 |
|---|---|---|---|---|---|---|---|---|
df515cb60952e6129f55dc871bdc2d14caa24655be40a8a5d1d4bd9258e14834 | Simre1/hero | AllStores.hs | # LANGUAGE AllowAmbiguousTypes #
module Hero.Component.Store.AllStores where
import Control.Monad (forM_)
import Data.Coerce (coerce)
import Data.Constraint (Dict (..), withDict)
import Data.Data (Proxy (Proxy))
import Data.IORef
( IORef,
modifyIORef,
newIORef,
readIORef,
writeIORef,
)
import Data... | null | https://raw.githubusercontent.com/Simre1/hero/61e18ad87e93b349c0bc453c405bfa76feda62bc/src/Hero/Component/Store/AllStores.hs | haskell | | Gets the store associated within a component id. Remember that component ids must be used with the world
they were created with.
| Gets the component id for a component. It tries to set up the component store if it can does not exist yet and can be created automatically.
If a store does not exist and it cannot be... | # LANGUAGE AllowAmbiguousTypes #
module Hero.Component.Store.AllStores where
import Control.Monad (forM_)
import Data.Coerce (coerce)
import Data.Constraint (Dict (..), withDict)
import Data.Data (Proxy (Proxy))
import Data.IORef
( IORef,
modifyIORef,
newIORef,
readIORef,
writeIORef,
)
import Data... |
a1a68edf9f331477cc8f5d356f0d44789e24fb2de0e6e05f150694b199ba41a0 | arcusfelis/xapian-erlang-bindings | xapian_mset_info.erl | -module(xapian_mset_info).
-export([encode/2,
decode/2,
properties/0]).
-import(xapian_common, [
append_param/2,
append_stop/1,
append_string/2,
append_double/2,
read_document_count/1,
read_weight/1,
read_percent/1
]).
-import(xapian_const, [mset_info_param_id/1]).
-compi... | null | https://raw.githubusercontent.com/arcusfelis/xapian-erlang-bindings/29871b3e64d658e74701c6ba68bf59e1a9b168f1/src/xapian_mset_info.erl | erlang | @doc Return the ordered list of properties.
These properties can be accessed without an additional parameter. | -module(xapian_mset_info).
-export([encode/2,
decode/2,
properties/0]).
-import(xapian_common, [
append_param/2,
append_stop/1,
append_string/2,
append_double/2,
read_document_count/1,
read_weight/1,
read_percent/1
]).
-import(xapian_const, [mset_info_param_id/1]).
-compi... |
fabfd90974691108b13db501861ee4fca1bc5d9b58a0a83acbbd8be9b9f38e75 | hamler-lang/hamler | DTLS.erl | %%---------------------------------------------------------------------------
%% |
Module : DTLS
Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
%% License : BSD-style (see the LICENSE file)
%%
Maintainer : ,
,
%% Stability : experimental
%% Portability : ... | null | https://raw.githubusercontent.com/hamler-lang/hamler/3ba89dde3067076e112c60351b019eeed6c97dd7/lib/Network/DTLS.erl | erlang | ---------------------------------------------------------------------------
|
License : BSD-style (see the LICENSE file)
Stability : experimental
Portability : portable
The DTLS FFI module.
--------------------------------------------------------------------------- | Module : DTLS
Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
Maintainer : ,
,
-module('DTLS').
|
9020d993281da846639dae5bd66bf12353108d7f6e41aa0a9cc8fcbc2c8f3cbb | metosin/komponentit | transitions.cljs | (ns example.transitions
(:require [reagent.core :as r]
[devcards.core :as dc :include-macros true]
["react-dom/server" :as react-dom-server]
["react-transition-group/TransitionGroup" :as TransitionGroup]
["react-transition-group/Transition" :as Transition]
[... | null | https://raw.githubusercontent.com/metosin/komponentit/d962ce1d69ccc3800db0d6b4fc18fc2fd30b494a/example-src/cljs/example/transitions.cljs | clojure | or [react-transition-group :as transition-group]
Looks like :key from props doesn't work with native components
Can't move this to separate function, or reagent will add component in between and transitions break | (ns example.transitions
(:require [reagent.core :as r]
[devcards.core :as dc :include-macros true]
["react-dom/server" :as react-dom-server]
["react-transition-group/TransitionGroup" :as TransitionGroup]
["react-transition-group/Transition" :as Transition]
[... |
263ceab5d1ac69c57cbce823a4ae99d3cb1cb63fa737071c2ccf76a7c86c940e | herd/herdtools7 | code.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/319d1c8ec9f7d939e98785dd519a0da54435b606/gen/code.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2010 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
7a5027a1e6b96b04f154e34d0c850da4d9b00dd8232e1e4e132ed81037e6720a | travelping/capwap | ie_gen.erl | #!/usr/bin/env escript
%% -*- erlang -*-
%%! -smp enable
Copyright ( C ) 2013 - 2017 , Travelping GmbH < >
%% This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the L... | null | https://raw.githubusercontent.com/travelping/capwap/23e0f870ce70951f7e7233175626a242f89fed17/priv/ie_gen.erl | erlang | -*- erlang -*-
! -smp enable
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ... | #!/usr/bin/env escript
Copyright ( C ) 2013 - 2017 , Travelping GmbH < >
it under the terms of the GNU Affero 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 Affero General Public License
wlan_attr(Id, Na... |
6fa34772b43383366750c0d7f90c3d1948e8e143209012277a2c82504ac44e98 | joelburget/lvca | Binding_aware_pattern_model.ml | open Base
open Lvca_syntax
include
[%lvca.abstract_syntax_module
{|
string : *
primitive : *
list : * -> *
pattern :=
| Operator(string; list scope)
| Primitive(primitive)
| Var(string)
;
scope := Scope(list string; pattern);
|}
, { string = "Primitive.String"; primitive = "Primitive.All"; list = "List... | null | https://raw.githubusercontent.com/joelburget/lvca/dc1a9b2fbaed013c5d57d7fe63dd4a05062c93d5/del/Binding_aware_pattern_model.ml | ocaml | open Base
open Lvca_syntax
include
[%lvca.abstract_syntax_module
{|
string : *
primitive : *
list : * -> *
pattern :=
| Operator(string; list scope)
| Primitive(primitive)
| Var(string)
;
scope := Scope(list string; pattern);
|}
, { string = "Primitive.String"; primitive = "Primitive.All"; list = "List... | |
f26d23e3eb5b870a276a6df417a6c4946d2f8d3fdea02c9340357154932a44a4 | mirage/ocaml-github | gist.ml |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/ocaml-github/0196f078bfaa460f796b0512717851edf531e31b/gist/gist.ml | ocaml | Utility for working with gist files
**********************************************************************
Authorization
for now, we look it up in the cookie jar.
We could query github for it instead.
find token with gist scope
find given token
**************************************************************... |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
8f63fa9c42408578c50324037f6227f21279e2cb9397dfa4617e6f435613195f | VisionsGlobalEmpowerment/webchange | icon_classes.cljs | (ns webchange.ui-framework.components.icon.icon-classes)
(def data
[:svg {:width "36" :height "36" :viewBox "0 0 36 36" :xmlns ""
:class-name "stroke-colored"
:stroke "#F0D97F" :stroke-width "3" :stroke-linecap "round" :stroke-linejoin "round"}
[:path {:d "M3.375 31.5H32.625"}]
[:path {:d "M7... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/fba105e71bc3bf196bcb5eeb900f2742cd4f964c/src/cljs/webchange/ui_framework/components/icon/icon_classes.cljs | clojure | (ns webchange.ui-framework.components.icon.icon-classes)
(def data
[:svg {:width "36" :height "36" :viewBox "0 0 36 36" :xmlns ""
:class-name "stroke-colored"
:stroke "#F0D97F" :stroke-width "3" :stroke-linecap "round" :stroke-linejoin "round"}
[:path {:d "M3.375 31.5H32.625"}]
[:path {:d "M7... | |
d39358a49b12d0832f36debe62fc603ba899174eb5e26c57ee0b8c2369fdf3a2 | BoeingX/haskell-programming-from-first-principles | IntermissionExerciseSpec.hs | module Testing.ConventionalTesting.IntermissionExerciseSpec where
import Test.Hspec
import Testing.ConventionalTesting.IntermissionExercise
spec :: Spec
spec = do
describe "Test dividedBy and multiply" $ do
it "15 divided by 3 is 5" $ do
dividedBy 15 3 `shouldBe` (5, 0)
it "22 divided ... | null | https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/test/Testing/ConventionalTesting/IntermissionExerciseSpec.hs | haskell | module Testing.ConventionalTesting.IntermissionExerciseSpec where
import Test.Hspec
import Testing.ConventionalTesting.IntermissionExercise
spec :: Spec
spec = do
describe "Test dividedBy and multiply" $ do
it "15 divided by 3 is 5" $ do
dividedBy 15 3 `shouldBe` (5, 0)
it "22 divided ... | |
7cd3d9ba961a8645b39ffe8f79a88b192f78d9934de78be4561b8b2cf10b5290 | swaywm/wlroots-ocaml | discover.ml | open Base
open Stdio
module C = Configurator.V1
let write_sexp fn sexp =
Out_channel.write_all fn ~data:(Sexp.to_string sexp)
type config = {
name : string;
default_libs : string list;
default_cflags : string list;
package : string;
}
let discover { name; default_libs; default_cflags; package } =
C.main ... | null | https://raw.githubusercontent.com/swaywm/wlroots-ocaml/a4a36121a331c14b0f2ab363a6a59065513985e5/config/discover.ml | ocaml | open Base
open Stdio
module C = Configurator.V1
let write_sexp fn sexp =
Out_channel.write_all fn ~data:(Sexp.to_string sexp)
type config = {
name : string;
default_libs : string list;
default_cflags : string list;
package : string;
}
let discover { name; default_libs; default_cflags; package } =
C.main ... | |
bcad780042ba020fb8447f8f3ef9cbe21cf8c57454df09883e0594d2b6a1acae | kaizhang/bioinformatics-toolkit | GDC.hs | -- NIH Genomic Data Commons
{-# LANGUAGE OverloadedStrings #-}
module Bio.RealWorld.GDC
(downloadData) where
import Conduit
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import Data.Maybe (fromJust)
import Network.HTTP.Conduit
baseurl :: String
baseurl = "/"
-- ... | null | https://raw.githubusercontent.com/kaizhang/bioinformatics-toolkit/89b8d1cdf4fa7b075794c37c070cab8ac27acfaf/bioinformatics-toolkit/src/Bio/RealWorld/GDC.hs | haskell | NIH Genomic Data Commons
# LANGUAGE OverloadedStrings #
| Download data
^ UUID
^ Output dir |
module Bio.RealWorld.GDC
(downloadData) where
import Conduit
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import Data.Maybe (fromJust)
import Network.HTTP.Conduit
baseurl :: String
baseurl = "/"
-> IO FilePath
downloadData uuid dir = do
reques... |
8df3db569768cc39f35b2edb1cc6e1c839ce799896d2462d55ef790603866d48 | kappamodeler/kappa | yacc.mli | type token =
| Comment
| Init
| Obs
| Percent
| Sharp
| Single_rule
| Double_rule
| EOL
| EOF
| Direct
| Bi
| Flag
| NextLine
| IDENT of ( string )
val main :
(Lexing.lexbuf -> token) -> Lexing.lexbuf -> commented_line list
| null | https://raw.githubusercontent.com/kappamodeler/kappa/de63d1857898b1fc3b7f112f1027768b851ce14d/complx_rep/backend/parse_comment/yacc.mli | ocaml | type token =
| Comment
| Init
| Obs
| Percent
| Sharp
| Single_rule
| Double_rule
| EOL
| EOF
| Direct
| Bi
| Flag
| NextLine
| IDENT of ( string )
val main :
(Lexing.lexbuf -> token) -> Lexing.lexbuf -> commented_line list
| |
eef81dc15b208219d832fba385e356327a4b546457924a95c3ebe9eba822c981 | juxt/reap | interval.clj | Copyright © 2020 , JUXT LTD .
(ns juxt.reap.alpha.interval
(:refer-clojure :exclude [contains?])
(:require
[clojure.pprint :as pprint]
[juxt.reap.alpha.regex :as re]))
(set! *warn-on-reflection* true)
;; Intervals
(defprotocol IInterval
(beginning [_] "The beginning of the range, as an int (inclusive)... | null | https://raw.githubusercontent.com/juxt/reap/29ffc8664df26041ebd93a53f009d2606d1a5b6c/src/juxt/reap/alpha/interval.clj | clojure | Intervals
Allen's Basic Relations
whenever the first
relation is true, its converse is true also.
contains? is semantically similar to tick.core/coincident? | Copyright © 2020 , JUXT LTD .
(ns juxt.reap.alpha.interval
(:refer-clojure :exclude [contains?])
(:require
[clojure.pprint :as pprint]
[juxt.reap.alpha.regex :as re]))
(set! *warn-on-reflection* true)
(defprotocol IInterval
(beginning [_] "The beginning of the range, as an int (inclusive)")
(end [_]... |
57c0d2ba7413d364046b234f8de1bb60f3a7c10626d2bda83b959647054a91a2 | open-telemetry/opentelemetry-erlang | otel_batch_processor_SUITE.erl | -module(otel_batch_processor_SUITE).
-compile(export_all).
-include_lib("stdlib/include/assert.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("opentelemetry_api/include/opentelemetry.hrl").
all() ->
[exporting_timeout_test].
%% verifies that after the runner has to be killed for taking too lon... | null | https://raw.githubusercontent.com/open-telemetry/opentelemetry-erlang/2ff5849d01f77fc143c83aa13f1d64fe2a7e5c48/apps/opentelemetry/test/otel_batch_processor_SUITE.erl | erlang | verifies that after the runner has to be killed for taking too long
that everything is still functional and the exporter does not crash
test is to ensure we don't hit this
exporter behaviour | -module(otel_batch_processor_SUITE).
-compile(export_all).
-include_lib("stdlib/include/assert.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("opentelemetry_api/include/opentelemetry.hrl").
all() ->
[exporting_timeout_test].
exporting_timeout_test(_Config) ->
process_flag(trap_exit, true),... |
286fd0f3401c9cde58a1984531189abdfcb222ec7e23ead329bbc2cc98404b77 | snoyberg/mono-traversable | IOData.hs | # LANGUAGE CPP #
# LANGUAGE TypeFamilies #
module Data.IOData where
import Control.Monad (liftM)
import Control.Monad.IO.Class
import qualified Data.ByteString as ByteString
import qualified Data.ByteString.Char8 as ByteString8
import qualified Data.B... | null | https://raw.githubusercontent.com/snoyberg/mono-traversable/0cf673677f28b82fbb8647a14ff35ce69602c69a/chunked-data/src/Data/IOData.hs | haskell | | Data which can be read to and from files and handles.
Note that, for lazy sequences, these operations may perform | # LANGUAGE CPP #
# LANGUAGE TypeFamilies #
module Data.IOData where
import Control.Monad (liftM)
import Control.Monad.IO.Class
import qualified Data.ByteString as ByteString
import qualified Data.ByteString.Char8 as ByteString8
import qualified Data.B... |
e76f47269f0f5a9c10ed3fdd54aba841f93efb84dca282c831849591b32d32e6 | mstksg/uncertain | Correlated.hs | {-# LANGUAGE RankNTypes #-}
-- |
-- Module : Numeric.Uncertain.Correlated
Copyright : ( c ) 2016
-- License : BSD3
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
-- Provides the 'Corr' monad, which allows one to describe complex
-- relationships between random varia... | null | https://raw.githubusercontent.com/mstksg/uncertain/d68fc14bbe311f4a50df75a7e878343de6170bf0/src/Numeric/Uncertain/Correlated.hs | haskell | # LANGUAGE RankNTypes #
|
Module : Numeric.Uncertain.Correlated
License : BSD3
Stability : experimental
Portability : non-portable
Provides the 'Corr' monad, which allows one to describe complex
relationships between random variables and evaluate their propagated
uncertainties /respecting/ their in... |
Copyright : ( c ) 2016
Maintainer :
module Numeric.Uncertain.Correlated
* ' '
Corr, evalCorr
, CVar
, sampleUncert, sampleExact, constC
, resolveUncert
, liftC, liftC2, liftC3, liftC4, liftC5, liftCF
)
where
import Control.Monad.Free
import Control.Monad.Trans.State... |
2859ef74f60d45a59bc9ff9b2a4019b82133fa1468b3ee6c9d09f586384b6afe | zed-throben/erlangeos | test_lzw.erl | - compile(export_all).
- module(test_lzw).
- export([test/0,encode/1,decode/1]).
- import(lists,[reverse/1,reverse/2]).
test() ->
Str = "TOBEORNOTTOBEORTOBEORNOT",
[84,79,66,69,79,82,78,79,84,256,258,260,265,259,261,263] = encode(Str),
Str = decode(encode(Str)),
ok.
encode(Str) ->
D = init(dict:... | null | https://raw.githubusercontent.com/zed-throben/erlangeos/44e50e442f5d396c69ae90db530b0b60b01d692a/test/rosetta/test_lzw.erl | erlang | - compile(export_all).
- module(test_lzw).
- export([test/0,encode/1,decode/1]).
- import(lists,[reverse/1,reverse/2]).
test() ->
Str = "TOBEORNOTTOBEORTOBEORNOT",
[84,79,66,69,79,82,78,79,84,256,258,260,265,259,261,263] = encode(Str),
Str = decode(encode(Str)),
ok.
encode(Str) ->
D = init(dict:... | |
6c9f718dc9cf1b266d4aac34bdbcae85feba1e171ac1e192b68ad37322c40c88 | metabase/metabase | pulse_test.clj | (ns metabase-enterprise.sandbox.pulse-test
(:require
[clojure.data.csv :as csv]
[clojure.java.io :as io]
[clojure.test :refer :all]
[medley.core :as m]
[metabase-enterprise.sandbox.api.util :as mt.api.u]
[metabase-enterprise.test :as met]
[metabase.api.alert :as api.alert]
[metabase.email.mess... | null | https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/enterprise/backend/test/metabase_enterprise/sandbox/pulse_test.clj | clojure | `with-gtaps` binds the current test user; we don't want that falsely affecting results | (ns metabase-enterprise.sandbox.pulse-test
(:require
[clojure.data.csv :as csv]
[clojure.java.io :as io]
[clojure.test :refer :all]
[medley.core :as m]
[metabase-enterprise.sandbox.api.util :as mt.api.u]
[metabase-enterprise.test :as met]
[metabase.api.alert :as api.alert]
[metabase.email.mess... |
1ad5496b0ee3b2418f425910e2213349069d9f8ecdddd67465adaa4b64ad8adb | catseye/Robin | HasteMain.hs | module Main where
import Haste
import Haste.DOM
import Haste.Events
import Language.Robin.Env (mergeEnvs)
import Language.Robin.Parser (parseToplevel)
import Language.Robin.Intrinsics (robinIntrinsics)
import Language.Robin.Builtins (robinBuiltins)
import Language.Robin.TopLevel (initialWorld, destructureWorld, colle... | null | https://raw.githubusercontent.com/catseye/Robin/964ea82edef9f6a9a8e6363ee915ab48b0d2ec50/src/HasteMain.hs | haskell | module Main where
import Haste
import Haste.DOM
import Haste.Events
import Language.Robin.Env (mergeEnvs)
import Language.Robin.Parser (parseToplevel)
import Language.Robin.Intrinsics (robinIntrinsics)
import Language.Robin.Builtins (robinBuiltins)
import Language.Robin.TopLevel (initialWorld, destructureWorld, colle... | |
859878057ac9e2ae8111869add59c05c497f5ce592f18148591e69f167eacac4 | someodd/waffle | Menu.hs | {-# LANGUAGE OverloadedStrings #-}
module BrickApp.ModeAction.Menu where
import qualified Data.Map as Map
import Data.List as List
import Data.Maybe
import qualified Brick.Widgets.Dialog as D
import qualified Brick.Widgets.List as BrickList
import Brick.Wi... | null | https://raw.githubusercontent.com/someodd/waffle/71586b271878df4cb2368ae3bd6e2961cb79fa15/src/BrickApp/ModeAction/Menu.hs | haskell | # LANGUAGE OverloadedStrings #
menu that uses the updated list position.
| Jump to the next line (wraps around).
| Jump to the previous line (wraps around).
| Jump to the next link (wraps around). Basically, skips info items.
NOTE: using "find" for this feels inefficient... oh well!
Try to find a line # bigger th... |
module BrickApp.ModeAction.Menu where
import qualified Data.Map as Map
import Data.List as List
import Data.Maybe
import qualified Brick.Widgets.Dialog as D
import qualified Brick.Widgets.List as BrickList
import Brick.Widgets.Core ( txt )
imp... |
694b841a52ad0017bc2f76d7ed9d1c47b1ef03c24e83314aaf3938da0d037763 | informatimago/commands | revlines.lisp | ;;;; -*- mode:lisp; coding:iso-8859-1 -*-
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
Warning : processes iso-8859 - 1 not utf-8 arguments ! ; ;
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
(defun slurp (stream)
(loop
:for line := (read-line stream nil nil)
:while line :collect l... | null | https://raw.githubusercontent.com/informatimago/commands/65d0d6385269f3e210aed4943aefdbb5372706b9/sources/commands/revlines.lisp | lisp | -*- mode:lisp; coding:iso-8859-1 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
THE END ;;;; |
(defun slurp (stream)
(loop
:for line := (read-line stream nil nil)
:while line :collect line))
(defun barf (lines stream)
(dolist (line lines)
(write-line line stream)))
(defun main (arguments)
(declare (ignore arguments))
(barf (mapcar (function reverse) (slurp *standard-input*)) *standard-ou... |
e82e30d3b03cfa0000ebd1d44e23adb5d0578b9a951bc90730ff038e737f07c1 | stackbuilders/atomic-write | Binary.hs | -- |
-- Module : System.AtomicWrite.Writer.String.Binary
Copyright : © 2015 - 2019 Stack Builders Inc.
License : MIT
--
Maintainer : Stack Builders < >
-- Stability : experimental
-- Portability : portable
--
-- Provides functionality to dump the contents of a String
-- to a file in bin... | null | https://raw.githubusercontent.com/stackbuilders/atomic-write/50976b9d249134d05191c4e430343594fdb034fb/src/System/AtomicWrite/Writer/String/Binary.hs | haskell | |
Module : System.AtomicWrite.Writer.String.Binary
Stability : experimental
Portability : portable
Provides functionality to dump the contents of a String
to a file in binary mode.
| Creates or modifies a file atomically on POSIX-compliant
systems while preserving permissions.
^ The path where the ... | Copyright : © 2015 - 2019 Stack Builders Inc.
License : MIT
Maintainer : Stack Builders < >
module System.AtomicWrite.Writer.String.Binary (atomicWriteFile, atomicWithFile, atomicWriteFileWithMode, atomicWithFileAndMode) where
import System.AtomicWrite.Internal (closeAndRename, maybeS... |
a58512a3734d6d121cfa25fe30490e6d87c595226c5a6bb15036f4c0af092f9f | ejgallego/dualquery | mandels.ml | (**************************************************************************)
Sample use of ParMap , a simple library to perform Map computations on
(* a multi-core *)
(* *)
Author(s ):... | null | https://raw.githubusercontent.com/ejgallego/dualquery/f8355212a760ef77ad3fb07f3bb595e775bf06d2/parmap/example/mandels.ml | ocaml | ************************************************************************
a multi-core
This program is free softw... | Sample use of ParMap , a simple library to perform Map computations on
Author(s ): and
it under the terms of the GNU General Public License as
published by the Free Software Foundation , either version 2 of the
open Graphics;;
let scale = ref 1.;;
let ofx = ref 0.;;
let ofy ... |
c0b4096d9892457e6c815ee0e78a2e331e58d6c6943ed22dade209c228338cf8 | ocsigen/ocsipersist | ocsipersist.mli | * Library ( and extension for ocsigenserver ) for storing and retrieving
key / value data in a persistent manner . This module defines a unified
frontend for a number of different backends .
key/value data in a persistent manner. This module defines a unified
frontend for a number of different backe... | null | https://raw.githubusercontent.com/ocsigen/ocsipersist/142ad1248c475ccde258d113731f9ca5a7f9bbbd/src/ocsipersist.mli | ocaml | * Functorial frontent. Allows for custom (de)serialisation functions, which
keeps data human-readable in the backend.
* Table representation as generated by the functor {!Functorial.Table}
* Table representation as generated by the function {!Polymorphic.open_table} | * Library ( and extension for ocsigenserver ) for storing and retrieving
key / value data in a persistent manner . This module defines a unified
frontend for a number of different backends .
key/value data in a persistent manner. This module defines a unified
frontend for a number of different backe... |
ef61a9e01b398841da1ca498a688164d15d1c52ed190a108c985003c767194ad | anjensan/azql | integration_test.clj | (ns azql.integration-test
(:use clojure.test)
(:use [azql core emit])
(:require [clojure.java.jdbc :as jdbc])
(:use azql.test-database))
(defn sql-date [^java.util.Date x]
(java.sql.Date. (.getTime x)))
(def ^:dynamic ^:private db)
(defn populate-database
[db]
3 users , each user has 3 comments & 2 or ... | null | https://raw.githubusercontent.com/anjensan/azql/026ed6da36a41478b54dc7761747ea84e6083edf/test/azql/integration_test.clj | clojure | tests | (ns azql.integration-test
(:use clojure.test)
(:use [azql core emit])
(:require [clojure.java.jdbc :as jdbc])
(:use azql.test-database))
(defn sql-date [^java.util.Date x]
(java.sql.Date. (.getTime x)))
(def ^:dynamic ^:private db)
(defn populate-database
[db]
3 users , each user has 3 comments & 2 or ... |
549d1a91accffd6af47786b6768107b4ef426bde2dfb90cda1b8a21375930ebb | zadean/xqerl | op_string_less_than_SUITE.erl | -module('op_string_less_than_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['K-StringLT-1'/1]).
-export(['K-StringLT-2'/1]).
-export(['K-StringLT-3'/1]... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/op/op_string_less_than_SUITE.erl | erlang | -module('op_string_less_than_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['K-StringLT-1'/1]).
-export(['K-StringLT-2'/1]).
-export(['K-StringLT-3'/1]... | |
8f2665556b2f4bb77bbdf31a0d4c8b4287e4de97429f4f6f9132fb2814994739 | OCamlPro/numcaml | type.ml |
* Copyright ( c ) 2011 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/OCamlPro/numcaml/5c12b3aa62b09670ba7712006b5aa0254b8bdea3/lib/numcaml/type.ml | ocaml | XXX: we can optimize representation of 'a vector ... vector
XXX: in this case, this should be v_shape: int list
Find the smallest type consistent with t1 and t2
Float |
* Copyright ( c ) 2011 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
2b00b1393c259ad8a605485983b8b5f3ad1d8e9c4bf8d8b05955d998fafc17b7 | uncomplicate/deep-diamond | 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) or later
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be boun... | null | https://raw.githubusercontent.com/uncomplicate/deep-diamond/ad43c96c9c9c36bac4b31a4a376d8a1e0078551f/src/clojure/uncomplicate/diamond/internal/cudnn/core.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php) or later
which can be found in the file LICENSE 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 rem... | Copyright ( c ) . All rights reserved .
(ns uncomplicate.diamond.internal.cudnn.core
(:require [uncomplicate.commons
[core :refer [let-release with-release wrap extract]]
[utils :refer [dragan-says-ex enc-keyword mask]]]
[uncomplicate.clojurecuda.core :refer [mem-alloc]]
... |
ad94fdd8a03fd6939ba267df3a82b7f592070ba558da8831e617c83b664fda1e | arcfide/chez-srfi | 125.body.scm | Copyright 2015 .
;;;
;;; Permission to copy this software, in whole or in part, to use this
;;; software for any lawful purpose, and to redistribute this software
;;; is granted subject to the restriction that all copies made of this
;;; software must include this copyright and permission notice in full.
;;;
;;; I... | null | https://raw.githubusercontent.com/arcfide/chez-srfi/96fb553b6ba0834747d5ccfc08c181aa8fd5f612/%253a125/125.body.scm | scheme |
Permission to copy this software, in whole or in part, to use this
software for any lawful purpose, and to redistribute this software
is granted subject to the restriction that all copies made of this
software must include this copyright and permission notice in full.
I also request that you send me a copy of an... | Copyright 2015 .
Ten of the SRFI 125 procedures are deprecated , and another
two allow alternative arguments that are deprecated .
(define (issue-deprecated-warnings?) #t)
(define (issue-warning-deprecated name-of-deprecated-misfeature)
(if (not (memq name-of-deprecated-misfeature already-warned))
... |
9b93756c9121288129b9ef95a73a38233e1389e15af62f79de6f9761cb449ccd | well-typed-lightbulbs/rpi | peripheral.ml | module type S = sig
type t
val base : Mem.addr
val registers_size : nativeint
module type Base = sig
type nonrec t = t
val base : Mem.addr
end
end
module Make (B : sig
val base : Mem.addr
val registers_size : nativeint
end) : S = struct
type t
let base = B.base
let registers_size = B... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/rpi/29090d18e930a5c0ddb7b2d7558eb59750c613f7/src/lib/peripheral.ml | ocaml | module type S = sig
type t
val base : Mem.addr
val registers_size : nativeint
module type Base = sig
type nonrec t = t
val base : Mem.addr
end
end
module Make (B : sig
val base : Mem.addr
val registers_size : nativeint
end) : S = struct
type t
let base = B.base
let registers_size = B... | |
49451c2efacaaff470af8677a7865b3e8cb5ffecc58ccd09906710cf12cfc04d | ocsigen/js_of_ocaml | info.mli | Js_of_ocaml compiler
* /
* Copyright ( C ) 2020 Hugo Heuzard
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of th... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/6e8200a6f31c2ccfba67fdd1d5db84dd893261ae/compiler/bin-js_of_ocaml/info.mli | ocaml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2020 Hugo Heuzard
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of th... | |
570565de89046a412bf76fd706d037fff59e78ab9ac37ee16ea8a5de153ce1fe | FranklinChen/learn-you-some-erlang | oop.erl | -module(oop).
-export([animal/1, dog/1, cat/1]).
%% all the method calls need to be in tuples when they have more than
one argument so we can use functions of arity 1 for every call we make .
animal(Name) ->
fun(type) -> "living thing";
(name) -> Name;
(move) -> Name++" moves around...";... | null | https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/oop.erl | erlang | all the method calls need to be in tuples when they have more than
| -module(oop).
-export([animal/1, dog/1, cat/1]).
one argument so we can use functions of arity 1 for every call we make .
animal(Name) ->
fun(type) -> "living thing";
(name) -> Name;
(move) -> Name++" moves around...";
({eat, Item}) -> Name++" eats "++Item;
(_) -> "I'm sor... |
af326de51a53f289197741369eef5dbe86ffd08d6127938ebdbaac031dbc6d2e | zilch-lang/nstar | Core.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE StandaloneDeriving #
|
Module : Language . NStar . Typechecker . Core
Description : NStar 's typechecking core language
Copyright : ( c ) , 2020
License : : experimental
Module: Language.NStar.Typechecker.Core
Description: NStar's typechecking core language
... | null | https://raw.githubusercontent.com/zilch-lang/nstar/8a9d1d5aa19fe6493c556ae3606c758829683762/lib/nsc-core/src/Language/NStar/Typechecker/Core.hs | haskell | # LANGUAGE GADTs #
* Re-exports
| A label stripped off its context.
^ the name of the label
^ Label's scope
| An instruction with type information attached to it.
^ the typed instruction
| The core of the N* abstract machine.
| Transfers the control flow to the code address pointed by @l@.
^ > l
| Does absolu... | # LANGUAGE StandaloneDeriving #
|
Module : Language . NStar . Typechecker . Core
Description : NStar 's typechecking core language
Copyright : ( c ) , 2020
License : : experimental
Module: Language.NStar.Typechecker.Core
Description: NStar's typechecking core language
Copyright: (c) Mesablo... |
d9f39f4eb4554d9e2e54cb3a71139c6f94ec97888aa98bf898d6093dfd1409a7 | weavejester/evaljs | rhino.clj | (ns evaljs.rhino
"Functions to create a Javascript context using the Rhino library."
(:use evaljs.core)
(:import [clojure.lang ISeq Keyword]
[java.util List Map]
[org.mozilla.javascript
Context
NativeArray
NativeObject]))
(defprotocol AsClojure
(as-cloj... | null | https://raw.githubusercontent.com/weavejester/evaljs/2d1a74a221c4ea38fbac62e3ef122fc4f1bcbe1f/src/evaljs/rhino.clj | clojure | (ns evaljs.rhino
"Functions to create a Javascript context using the Rhino library."
(:use evaljs.core)
(:import [clojure.lang ISeq Keyword]
[java.util List Map]
[org.mozilla.javascript
Context
NativeArray
NativeObject]))
(defprotocol AsClojure
(as-cloj... | |
1cc38efd185934c9c7296b14b2488290618caaffda52d940a07dac15c0aa7298 | input-output-hk/plutus | Traversable.hs | -- editorconfig-checker-disable-file
# LANGUAGE TupleSections #
# OPTIONS_GHC -fno - omit - interface - pragmas #
module PlutusTx.Traversable (Traversable(..), sequenceA, mapM, sequence, for, fmapDefault, foldMapDefault) where
import Control.Applicative (Const (..))
import Data.Coerce (coerce)
import Data.Functor.Iden... | null | https://raw.githubusercontent.com/input-output-hk/plutus/c8d4364d0e639fef4d5b93f7d6c0912d992b54f9/plutus-tx/src/PlutusTx/Traversable.hs | haskell | editorconfig-checker-disable-file
All the other methods are deliberately omitted,
# INLINE for # | # LANGUAGE TupleSections #
# OPTIONS_GHC -fno - omit - interface - pragmas #
module PlutusTx.Traversable (Traversable(..), sequenceA, mapM, sequence, for, fmapDefault, foldMapDefault) where
import Control.Applicative (Const (..))
import Data.Coerce (coerce)
import Data.Functor.Identity (Identity (..))
import PlutusTx.... |
253e7c20bedaa915a17e03a78a29c5f24843a8de07048a834e79b2f12d1e52d3 | chenyukang/eopl | cps-lang.scm | (define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not #\newline))) skip)
(identifier
(letter (arbno (or letter digit "_" "-" "?")))
symbol)
(number (digit (arbno digit)) number)
(number ("-" digit (arbno digit)) number)
))
(define the-grammar
'((program (... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch6/base/cps-lang.scm | scheme | sllgen boilerplate ;;;;;;;;;;;;;;;;
grammatical specification ;;;;;;;;;;;;;;;;
sllgen boilerplate ;;;;;;;;;;;;;;;; | (define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not #\newline))) skip)
(identifier
(letter (arbno (or letter digit "_" "-" "?")))
symbol)
(number (digit (arbno digit)) number)
(number ("-" digit (arbno digit)) number)
))
(define the-grammar
'((program (... |
c5d662a34fb406e248999ca2f107a8d7a3e53522b1da45aad0a23356933180b3 | jyh/metaprl | nuprl_int_1.mli | extends Ma_well_fnd
define unfold_lelt : "lelt"[]{'"i";'"j";'"k"} <-->
"and"[]{"le"[]{'"i";'"j"};"lt"[]{'"j";'"k"}}
define unfold_lele : "lele"[]{'"i";'"j";'"k"} <-->
"and"[]{"le"[]{'"i";'"j"};"le"[]{'"j";'"k"}}
define unfold_nat_plus : "nat_plus"[]{} <-->
"set"[]{"int"[]{};"i"."lt"[]{"number"[0... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/mesa/nuprl_int_1.mli | ocaml | extends Ma_well_fnd
define unfold_lelt : "lelt"[]{'"i";'"j";'"k"} <-->
"and"[]{"le"[]{'"i";'"j"};"lt"[]{'"j";'"k"}}
define unfold_lele : "lele"[]{'"i";'"j";'"k"} <-->
"and"[]{"le"[]{'"i";'"j"};"le"[]{'"j";'"k"}}
define unfold_nat_plus : "nat_plus"[]{} <-->
"set"[]{"int"[]{};"i"."lt"[]{"number"[0... | |
5f5b9f24c34ab0b7cee494ec13bcbf74bd81d13b5972aee45c9b763dcbba8c79 | csm/s4 | amz_test.clj | (ns s4.amz-test
(:require [clojure.test :refer :all]
[s4.test-util :refer :all])
(:import (software.amazon.awssdk.auth.credentials StaticCredentialsProvider AwsBasicCredentials)
(software.amazon.awssdk.services.s3 S3Client)
(java.net URI)
(software.amazon.awssdk.regions ... | null | https://raw.githubusercontent.com/csm/s4/a09662bbd1696ee2159545523d5def34802fcc16/test/s4/amz_test.clj | clojure | (ns s4.amz-test
(:require [clojure.test :refer :all]
[s4.test-util :refer :all])
(:import (software.amazon.awssdk.auth.credentials StaticCredentialsProvider AwsBasicCredentials)
(software.amazon.awssdk.services.s3 S3Client)
(java.net URI)
(software.amazon.awssdk.regions ... | |
421e0e16126c1bc9abcfaf5d570dcb2c410e9ff3f5f44e007380d6bdddc5a64a | Nayshins/ocaml-tic-tac-toe | simpleComputerTest.ml | open Core.Std
open OUnit2
open SimpleComputer
open Token
let make_move_test test_ctxt =
assert_equal
~ctxt:test_ctxt
[X;EMPTY 1; EMPTY 2;
EMPTY 3; EMPTY 4; EMPTY 5;
EMPTY 6; EMPTY 7; EMPTY 8;]
(SimpleComputer.make_move (Board.new_board) X)
let tests =
"Simple Computer" >:::
["Make Move fil... | null | https://raw.githubusercontent.com/Nayshins/ocaml-tic-tac-toe/a177feed4938552ce7df79f0e4d09b24cdcb3667/test/simpleComputerTest.ml | ocaml | open Core.Std
open OUnit2
open SimpleComputer
open Token
let make_move_test test_ctxt =
assert_equal
~ctxt:test_ctxt
[X;EMPTY 1; EMPTY 2;
EMPTY 3; EMPTY 4; EMPTY 5;
EMPTY 6; EMPTY 7; EMPTY 8;]
(SimpleComputer.make_move (Board.new_board) X)
let tests =
"Simple Computer" >:::
["Make Move fil... | |
ee66f5de9d272e7b970a2ac9fb1389aa6f71461aa6aae66bccf687144f263e67 | K2InformaticsGmbH/imem | imem_domain.erl | -module(imem_domain).
-behavior(gen_server).
-include("imem.hrl").
-include("imem_meta.hrl").
-record(ddDomSample, %% imem helper table for domain samples, used in snapshot transforms to anonymize
{ domKey ::term()
, domPattern ::term()
... | null | https://raw.githubusercontent.com/K2InformaticsGmbH/imem/602b6cd31ea1af00041a9318119ab0c3e4d5b59a/src/imem_domain.erl | erlang | imem helper table for domain samples, used in snapshot transforms to anonymize
imem helper table for domain translations, used in snapshot transforms to anonymize
gen_server callbacks
binstr() -> {Pattern::list(),LastUnicode::integer()}
StrDomain::atom(), ChrDomain::atom(), binstr() -> RandomizedString::string()... | -module(imem_domain).
-behavior(gen_server).
-include("imem.hrl").
-include("imem_meta.hrl").
{ domKey ::term()
, domPattern ::term()
, domMin ::term()
, domMax ::t... |
ae401116c243434b960a2b9610e94c3be0fad2c2eb2a46f264817ae03a2bf897 | xapi-project/xen-api | throttle.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/xapi-project/xen-api/1b7ef7ca5b33fea6e933bb39a661a7fb1f56ed02/ocaml/xapi-aux/throttle.ml | ocaml |
* Copyright ( C ) Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking described in file LI... | |
b4c6bcf0fbbabaa7988d531a28381fcff6bc5904de6ba06bd8d4f3f2a55b00c3 | ninenines/gun | cookie_parser_result_h.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(cookie_parser_result_h).
-export([init/2]).
init(Req=#{qs := Qs}, State) ->
%% Hardcoded path, but I doubt it's going to break anytime soon.
ExpectedFile = iolist_to_binary(["../../test/wpt/cookies/", Qs, "-expected"]),
CookieHd = cowboy_req:head... | null | https://raw.githubusercontent.com/ninenines/gun/fe25965f3a2f1347529fec8c7afa981313378e31/test/handlers/cookie_parser_result_h.erl | erlang | Feel free to use, reuse and abuse the code in this file.
Hardcoded path, but I doubt it's going to break anytime soon.
We echo back the cookie header in order to log it. |
-module(cookie_parser_result_h).
-export([init/2]).
init(Req=#{qs := Qs}, State) ->
ExpectedFile = iolist_to_binary(["../../test/wpt/cookies/", Qs, "-expected"]),
CookieHd = cowboy_req:header(<<"cookie">>, Req),
case file:read_file(ExpectedFile) of
{ok, Expected} when Expected =:= <<>>; Expected =:= <<"\n">> ->... |
32a84a9d318075f3639889e6f219d6c2492be2d398cda4f05ce9b13a9c77f093 | bscarlet/llvm-general | Float.hs | -- | This module provides a sub-namespace for a type to support the various sizes of floating point
numbers supports . It is most definitely intended to be imported qualified .
module LLVM.General.AST.Float where
import Prelude as P
import Data.Data
import Data.Word (Word16, Word64)
-- | A type summing up the vari... | null | https://raw.githubusercontent.com/bscarlet/llvm-general/61fd03639063283e7dc617698265cc883baf0eec/llvm-general-pure/src/LLVM/General/AST/Float.hs | haskell | | This module provides a sub-namespace for a type to support the various sizes of floating point
| A type summing up the various float types.
N.B. Note that in the constructors with multiple fields, the lower significance bits are on the right | numbers supports . It is most definitely intended to be imported qualified .
module LLVM.General.AST.Float where
import Prelude as P
import Data.Data
import Data.Word (Word16, Word64)
- e.g. Quadruple highbits lowbits
data SomeFloat
= Half Word16
| Single Float
| Double P.Double
| Quadruple Word64 Word6... |
a9fe72a7482b2af59aac604969b32b700dc85c34467a250cb46430e8ca84b075 | google/ormolu | negation.hs | foo :: Int
foo = (-2)
bar :: Int
bar = -2
baz :: Int
baz = - 2
| null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/value/function/negation.hs | haskell | foo :: Int
foo = (-2)
bar :: Int
bar = -2
baz :: Int
baz = - 2
| |
4621cc6116d7f9bb58c0f254ffda36977ed3f55fdc3679645567f2f382285a88 | BranchTaken/Hemlock | cmper.ml | The redundancy between the .mli and .ml files can not be extracted into an interface file ,
* apparently because the phantom witness type somehow causes two incompatible - but - identical
* comparator types to exist .
* apparently because the phantom witness type somehow causes two incompatible-but-identical
... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/src/basis/cmper.ml | ocaml | The redundancy between the .mli and .ml files can not be extracted into an interface file ,
* apparently because the phantom witness type somehow causes two incompatible - but - identical
* comparator types to exist .
* apparently because the phantom witness type somehow causes two incompatible-but-identical
... | |
b7fb7ae7de1ab6b725535918816c8af5903447a8b514e6599ac6d23119898f72 | mfelleisen/RacketSchool | pcf-with-state.rkt | #lang racket
(require redex)
;; ---------------------------------------------------------------------------------------------------
the syntax : a global letrec ( called prog ) with one body expression
(define-language PCF
(p ::=
(prog (d ...) e))
(d ::= (defvar x v))
(v ::=
tt
ff
n
... | null | https://raw.githubusercontent.com/mfelleisen/RacketSchool/ada599f31d548a538a37d998b32d80aa881d699a/Plan/Code/pcf-with-state.rkt | racket | ---------------------------------------------------------------------------------------------------
<--- values
α equivalence works
let's add a 'macro'
evaluates e_1, throws away its value, and finally evaluates e_2
------------------------------------------------------------------------------------------------... | #lang racket
(require redex)
the syntax : a global letrec ( called prog ) with one body expression
(define-language PCF
(p ::=
(prog (d ...) e))
(d ::= (defvar x v))
(v ::=
tt
ff
n
(lambda (x) e))
(e ::=
(set! x e)
x
(e e)
(if e e e)
(e + e))
(n ::... |
a6b70c0ad881b80601f17510b39ac07fc941025accf1342c7d34db486c54db3a | gren-lang/compiler | Help.hs | {-# LANGUAGE OverloadedStrings #-}
module Reporting.Exit.Help
( Report,
report,
docReport,
jsonReport,
compilerReport,
reportToDoc,
reportToJson,
syntaxErrorToDoc,
toString,
toStdout,
toStderr,
)
where
import GHC.IO.Handle (hIsTerminalDevice)
import Json.Encode ((==>))
impo... | null | https://raw.githubusercontent.com/gren-lang/compiler/17b237524942c95f11106301ff6beac76b3e190b/builder/src/Reporting/Exit/Help.hs | haskell | # LANGUAGE OverloadedStrings #
REPORT
TO JSON
OUTPUT |
module Reporting.Exit.Help
( Report,
report,
docReport,
jsonReport,
compilerReport,
reportToDoc,
reportToJson,
syntaxErrorToDoc,
toString,
toStdout,
toStderr,
)
where
import GHC.IO.Handle (hIsTerminalDevice)
import Json.Encode ((==>))
import Json.Encode qualified as E
impor... |
2749c2b8308b480f934bc723a29d2f55b636c8e355718011808e37a5248d1cd1 | ghc/ghc | DocString.hs | -- | An exactprintable structure for docstrings
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
module GHC.Hs.DocString
( LHsDocString
, HsDocString(..)
, HsDocStringDecorator(..)
, HsDocStringChunk(..)
, LHsDocStringChunk
, isEmptyDocString
, u... | null | https://raw.githubusercontent.com/ghc/ghc/62b9a7b23b20f5cf0a2de14251c2096098009f10/compiler/GHC/Hs/DocString.hs | haskell | | An exactprintable structure for docstrings
# LANGUAGE DeriveDataTypeable #
| Haskell Documentation String
Rich structure to support exact printing
The location around each chunk doesn't include the decorators
Example: -- | This is a docstring for 'foo'. It is the line with the decorator '|' and is always includ... | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
module GHC.Hs.DocString
( LHsDocString
, HsDocString(..)
, HsDocStringDecorator(..)
, HsDocStringChunk(..)
, LHsDocStringChunk
, isEmptyDocString
, unpackHDSC
, mkHsDocStringChunk
, mkHsDocStringChunkUtf8ByteString
, pprHsDocSt... |
1f30119cea35d2f4c0296f4eb51caad2cdb2ac51aa6914dbdc0404de49528fb9 | kafka4beam/brod | brod_group_subscriber_SUITE.erl | %%%
Copyright ( c ) 2015 - 2021 Klarna Bank AB ( publ )
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in compliance with the License.
%%% You may obtain a copy of the License at
%%%
%%% -2.0
%%%
%%% Unless required by applicable law or... | null | https://raw.githubusercontent.com/kafka4beam/brod/ef97325545eed0ae406733bf177090b7a6a192b3/test/brod_group_subscriber_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 or implied.
See the License for the specific language g... | Copyright ( c ) 2015 - 2021 Klarna Bank AB ( publ )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@private
-module(brod_group_subscriber_SUITE).
-include("brod_test_setup.hrl").
-export([ init_per_suite/1
... |
253cb8bea8b0d78e92e63033ed48bb581896a0453b36602aec7a1d1f9180c3f6 | Mesabloo/diagnose | Spec.hs | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
#ifdef USE_AESON
import qualified Data.ByteString.Lazy as BS
#endif
import Data.HashMap.Lazy (HashMap)
import qualified Data.HashMap.Lazy as HashMap
import Error.Diagnose
( Marker (..),
Note (Hint),
Position (..),
Report(..),
addFile,
addReport,
... | null | https://raw.githubusercontent.com/Mesabloo/diagnose/c8e10f0bc0b30c95617d9d3c89e0a7f768b6e62f/test/rendering/Spec.hs | haskell | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
#ifdef USE_AESON
import qualified Data.ByteString.Lazy as BS
#endif
import Data.HashMap.Lazy (HashMap)
import qualified Data.HashMap.Lazy as HashMap
import Error.Diagnose
( Marker (..),
Note (Hint),
Position (..),
Report(..),
addFile,
addReport,
... | |
c6329027d40ab34056787e1470dfdeb1985847c5d60fa0148c6046b9f4fa5f3d | 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 NoRebindableSyntax #
{-# LANGUAGE OverloadedStrings #-}
module Duckling.N... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Numeral/GA/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 NoRebindableSyntax #
module Duckling.Numeral.GA.Rules
( rules
) where
import Data.HashMap.Strict (HashMap)
import Data.String
import Data.Text (Text)
import Prelude
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Text as Text
i... |
c7cd111c04813f56f54d180da010f85d45b9f4958db0eb65b273471fdc1e20a7 | bmeurer/ocaml-arm | ccomp.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/utils/ccomp.ml | 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 .
$ Id$
let command cmdline =
if !C... |
6c7f912a8e5a2a18da2d09cade6f4f4c4b1bc47b4ffbeb1aea42dc7e3232180c | links-lang/links | processTypes.mli |
module type NAME = sig
type t
val create : unit -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val to_string : t -> string
val of_string : string -> t
val to_json : t -> Yojson.Basic.t
val pp : Format.formatter -> t -> unit
val show : t -> string
end
module ClientID : NAME
module Proce... | null | https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/core/processTypes.mli | ocaml | Distinguished PID for main thread
Dummy client ID
Maps
Sets |
module type NAME = sig
type t
val create : unit -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val to_string : t -> string
val of_string : string -> t
val to_json : t -> Yojson.Basic.t
val pp : Format.formatter -> t -> unit
val show : t -> string
end
module ClientID : NAME
module Proce... |
34aa3138e17cbf69a83409931c2720be008b78397d2fa3c7f15d0f6cb001cc11 | mstksg/advent-of-code-2017 | Day14.hs | module AOC2017.Day14 (day14a, day14b) where
import AOC2017.Day10 (knothash)
import AOC2017.Types (Challenge)
import AOC2017.Util (strip)
import AOC2017.Util.Disjoints (Disjoints(..), disjoint)
import Data.Ix (index, range)
imp... | null | https://raw.githubusercontent.com/mstksg/advent-of-code-2017/f9e97680726e87be175cf423241da3048ef6564d/src/AOC2017/Day14.hs | haskell | module AOC2017.Day14 (day14a, day14b) where
import AOC2017.Day10 (knothash)
import AOC2017.Types (Challenge)
import AOC2017.Util (strip)
import AOC2017.Util.Disjoints (Disjoints(..), disjoint)
import Data.Ix (index, range)
imp... | |
61de30f4aef5058f43627d9e66804bda050018f590ca9bb203cb4b52d0abe756 | achin/lein-parent | project.clj | (defproject lein-parent/parent-with-managed-deps "0.0.1"
:description "Parent project that provides managed dependencies"
:managed-dependencies [[clj-time "0.5.1"]
[ring/ring-codec "1.0.1"]]) | null | https://raw.githubusercontent.com/achin/lein-parent/37630e184a37f9adc2a431f4016624b3e815f848/dev-resources/t_parent/samples/parents/with_managed_deps/project.clj | clojure | (defproject lein-parent/parent-with-managed-deps "0.0.1"
:description "Parent project that provides managed dependencies"
:managed-dependencies [[clj-time "0.5.1"]
[ring/ring-codec "1.0.1"]]) | |
6e21d9af6a9acda63382e38100113d80c714d23ce7f03fdec86fb07b786f690f | riak-haskell-client/riak-haskell-client | Value.hs | # LANGUAGE GeneralizedNewtypeDeriving , OverloadedStrings , RecordWildCards ,
StandaloneDeriving #
StandaloneDeriving #-}
-- |
-- Module: Network.Riak.Value
Copyright : ( c ) 2011 MailRank , Inc.
License : Apache
Maintainer : < > , < >
-- Stability: experimental
-- Portability: p... | null | https://raw.githubusercontent.com/riak-haskell-client/riak-haskell-client/a1eafc4c16b85a98b2d29e306165f4d93819609f/riak/src/Network/Riak/Value.hs | haskell | |
Module: Network.Riak.Value
Stability: experimental
Portability: portable
This module allows storage and retrieval of data using the
storage features than JSON, e.g. links.
The functions in this module do not perform any conflict resolution.
| Add indexes to a content value for a further put request.
... | # LANGUAGE GeneralizedNewtypeDeriving , OverloadedStrings , RecordWildCards ,
StandaloneDeriving #
StandaloneDeriving #-}
Copyright : ( c ) 2011 MailRank , Inc.
License : Apache
Maintainer : < > , < >
' IsContent ' typeclass . This provides access to more of Riak 's
module Network.... |
3e17ff79f894faa9ce07d9b5de5d22b7dc9d481cc86003d4a6b85841d0f76e7e | eeng/shevek | state.clj | (ns shevek.engine.state
(:require [mount.core :refer [defstate start stop]]
[shevek.config :refer [config]]
[shevek.engine.druid-native.impl :refer [druid-native-engine]]
; [shevek.engine.druid-sql.impl :refer [druid-sql-engine]]
[shevek.driver.http-druid :refer [http-d... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/clj/shevek/engine/state.clj | clojure | [shevek.engine.druid-sql.impl :refer [druid-sql-engine]] | (ns shevek.engine.state
(:require [mount.core :refer [defstate start stop]]
[shevek.config :refer [config]]
[shevek.engine.druid-native.impl :refer [druid-native-engine]]
[shevek.driver.http-druid :refer [http-druid-driver]]))
(defstate dw
:start (druid-native-engine (http-druid... |
f395ea17c0b1e2fee86c7094a3139773dcb17f8340ffbdbdfeccf080c72bf73d | msakai/cpl | Variance.hs | # LANGUAGE CPP #
-----------------------------------------------------------------------------
-- |
-- Module : Variance
Copyright : ( c ) 2009
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-- Variance calculation.
--
----------------------... | null | https://raw.githubusercontent.com/msakai/cpl/a83ad4479cb95f98010b4f63a06b1e0b2bfd5736/src/Variance.hs | haskell | ---------------------------------------------------------------------------
|
Module : Variance
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
Variance calculation.
---------------------------------------------------------------------------
- +
- -
- T
- ⊥
+... | # LANGUAGE CPP #
Copyright : ( c ) 2009
module Variance
( Variance(..)
, top
, bottom
, join
, meet
, joinL
, meetL
, mult
, mnemonic
) where
#if __GLASGOW_HASKELL__ >= 706
import Prelude hiding (join)
#endif
data Variance
deriving (Show,Read,Eq)
mnemonic :: Vari... |
92c239b870b1a75c26632b340de13709f78088523f68cdbcdc878db74391a182 | rescript-lang/rescript-compiler | ast_helper.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/5da6c88fb9237fbc4d61640187b82627690ccf39/jscomp/ml/ast_helper.ml | ocaml | ************************************************************************
OCaml
... | , LexiFi
Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Helpers to produce Parsetree fragments
open Asttypes
open Parsetree
open Docstrings
type lid = Longide... |
399f9a0ad567febd0a62e32c42f8c4ebf9917de13ba698f64339cd940d788d39 | alex-hhh/ActivityLog2 | inspect-graphs.rkt | #lang racket/base
;; inspect-graphs.rkt -- graphs for various data series for a session
;;
;; This file is part of ActivityLog2, an fitness activity tracker
Copyright ( C ) 2015 , 2018 , 2019 , 2020 , 2021 , 2022 < >
;;
;; This program is free software: you can redistribute it and/or modify it
under the terms of... | null | https://raw.githubusercontent.com/alex-hhh/ActivityLog2/efd2b402e846680d0e5542cde0199616477f0084/rkt/session-inspector/inspect-graphs.rkt | racket | inspect-graphs.rkt -- graphs for various data series for a session
This file is part of ActivityLog2, an fitness activity tracker
This program is free software: you can redistribute it and/or modify it
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
without even t... | #lang racket/base
Copyright ( C ) 2015 , 2018 , 2019 , 2020 , 2021 , 2022 < >
under the terms of the GNU General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option )
(require data-frame
data-frame/private/bsearch
framework
... |
41fc1a514deb3f3209e88713eb8ae920237b1332d59d4198978363172ad950f3 | RichiH/git-repair | PartialPrelude.hs | Parts of the Prelude are partial functions , which are a common source of
- bugs .
-
- This exports functions that conflict with the prelude , which avoids
- them being accidentially used .
- bugs.
-
- This exports functions that conflict with the prelude, which avoids
- them being accidentially us... | null | https://raw.githubusercontent.com/RichiH/git-repair/c61b677e7a67a286df34c0629c52aeae9be9299a/Utility/PartialPrelude.hs | haskell | init too
- Instead, use: beginning
last too
- Instead, use: end or lastMaybe
Like head but Nothing on empty list.
Like last but Nothing on empty list.
All but the last element of a list.
- (Like init, but no error on an empty list.)
Like last, but no error on an empty list. | Parts of the Prelude are partial functions , which are a common source of
- bugs .
-
- This exports functions that conflict with the prelude , which avoids
- them being accidentially used .
- bugs.
-
- This exports functions that conflict with the prelude, which avoids
- them being accidentially us... |
73dcdcfa52556690c4fa2cf3280bd93028958685dc46a4b50147be5c3855a7ee | beam-telemetry/telemetry | telemetry_test_SUITE.erl | -module(telemetry_test_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/include/assert.hrl").
all() ->
[simple_message].
init_per_suite(Config) ->
application:ensure_all_started(telemetry),
Config.
end_per_suite(_Config) ->
application:stop(telemetry).
... | null | https://raw.githubusercontent.com/beam-telemetry/telemetry/af3701351ef73146f8f2a68dfbc2d182d58063b0/test/telemetry_test_SUITE.erl | erlang | attach_event_handlers/2 works correctly. | -module(telemetry_test_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/include/assert.hrl").
all() ->
[simple_message].
init_per_suite(Config) ->
application:ensure_all_started(telemetry),
Config.
end_per_suite(_Config) ->
application:stop(telemetry).
... |
a1dac0b44c104c9e9846945c6fd359fcea8365ec75203898b65d0c8b732be38a | bobzhang/fan | mapf.mli | module type S = sig
include Map.S
val of_list: (key * 'a) list -> 'a t
val of_hashtbl: (key, 'a) Hashtbl.t -> 'a t
val elements: 'a t -> (key * 'a) list
val add_list: (key * 'a) list -> 'a t -> 'a t
val find_default: default :'a -> key -> 'a t -> 'a
val find_opt : key -> 'a t -> 'a option
val ad... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/utils/mapf.mli | ocaml | module type S = sig
include Map.S
val of_list: (key * 'a) list -> 'a t
val of_hashtbl: (key, 'a) Hashtbl.t -> 'a t
val elements: 'a t -> (key * 'a) list
val add_list: (key * 'a) list -> 'a t -> 'a t
val find_default: default :'a -> key -> 'a t -> 'a
val find_opt : key -> 'a t -> 'a option
val ad... | |
a4189b5134c25b09b38d16bc44e279c93bdf6695f8c2f2f7ecaa0a6482efe6b3 | skeeto/euler-cl | euler-13.lisp | Project Euler - Problem 13
Work out the first ten digits of the sum of the following
one - hundred 50 - digit numbers .
37107287533902102798797998220837590246510135740250
46376937677490009712648124896970078050417018260538
;; 74324986199524741059474233309513058123726617309629
91942213363574... | null | https://raw.githubusercontent.com/skeeto/euler-cl/82000252703070274e09bd13f9effdca68705404/euler-13.lisp | lisp | 74324986199524741059474233309513058123726617309629
36123272525000296071075082563815656710885258350721
17423706905851860660448207621209813287860733969412
87086987551392711854517078544161852424320693150332
59959406895756536782107074926966537676326235447210
36270218540497705585629946580636237... | Project Euler - Problem 13
Work out the first ten digits of the sum of the following
one - hundred 50 - digit numbers .
37107287533902102798797998220837590246510135740250
46376937677490009712648124896970078050417018260538
91942213363574161572522430563301811072406154908250
230675882075393... |
3163f73c7e70b0e9c36d4f63ee1e6ac0b10f6819c55d6b0feb5ec2a185f2c486 | txyyss/Project-Euler | Euler087.hs | -- The smallest number expressible as the sum of a prime square, prime
cube , and prime fourth power is 28 . In fact , there are exactly four
numbers below fifty that can be expressed in such a way :
28 = 2 ^ 2 + 2 ^ 3 + 2 ^ 4
33 = 3 ^ 2 + 2 ^ 3 + 2 ^ 4
49 = 5 ^ 2 + 2 ^ 3 + 2 ^ 4
47 = 2 ^ 2 + 3 ^ 3 + 2 ^ 4... | null | https://raw.githubusercontent.com/txyyss/Project-Euler/d2f41dad429013868445c1c9c1c270b951550ee9/Euler087.hs | haskell | The smallest number expressible as the sum of a prime square, prime | cube , and prime fourth power is 28 . In fact , there are exactly four
numbers below fifty that can be expressed in such a way :
28 = 2 ^ 2 + 2 ^ 3 + 2 ^ 4
33 = 3 ^ 2 + 2 ^ 3 + 2 ^ 4
49 = 5 ^ 2 + 2 ^ 3 + 2 ^ 4
47 = 2 ^ 2 + 3 ^ 3 + 2 ^ 4
How many numbers below fifty million can be expressed as the sum of... |
b776c09c830d4cd05bbe9c9b7414b88cb626a3e0bf914154c8d69f9e5421f3ad | webyrd/n-grams-for-synthesis | n-grams.scm | (load "pmatch.scm")
(load "prelude.scm")
(load "corpus.scm")
(define bigrams-for-expr
(lambda (expr)
(letrec ((bigrams-for-expr
(lambda (expr parent defn-name args)
(pmatch expr
[(eq? ,e1 ,e2)
(error 'bigrams-for-expr (format "unconverted eq?"))]... | null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/n-grams.scm | scheme | application | (load "pmatch.scm")
(load "prelude.scm")
(load "corpus.scm")
(define bigrams-for-expr
(lambda (expr)
(letrec ((bigrams-for-expr
(lambda (expr parent defn-name args)
(pmatch expr
[(eq? ,e1 ,e2)
(error 'bigrams-for-expr (format "unconverted eq?"))]... |
9652babd61e2126a721f301f095125fe99bba350f6db2b5776bdfad988fbc954 | alonsodomin/groot | Auth.hs | module Groot.Internal.AWS.Auth where
import Control.Lens
import Control.Monad.Trans.Maybe
import Data.Text (Text)
import Network.AWS
import qualified Network.AWS.STS as STS
import Groot.Internal.Data.Text
import Groot.Types
mfaAuth... | null | https://raw.githubusercontent.com/alonsodomin/groot/040215db2797bef27b1c336ea826a58ddd45f8de/src/Groot/Internal/AWS/Auth.hs | haskell | module Groot.Internal.AWS.Auth where
import Control.Lens
import Control.Monad.Trans.Maybe
import Data.Text (Text)
import Network.AWS
import qualified Network.AWS.STS as STS
import Groot.Internal.Data.Text
import Groot.Types
mfaAuth... | |
0a47214c7e351972746f8182d1c32b084eff830d75c189a3b260f8b9921f3a2f | donaldsonjw/bigloo | rgcexpand.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / runtime / Rgc / rgcexpand.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/runtime/Rgc/rgcexpand.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* This module implements ... | * serrano / prgm / project / bigloo / runtime / Rgc / rgcexpand.scm * /
* Author : * /
* Creation : We d Sep 9 09:21:29 1998 * /
* Last change : Thu Oct 1 21:19:05 2015 ( serrano ) * /
* T... |
5ae75718f02866a2f1990ca38a15fe899863714e5ff85db66ef7fe5235beb12d | synsem/texhs | Types.hs | {-# LANGUAGE OverloadedStrings #-}
----------------------------------------------------------------------
-- |
-- Module : Text.Doc.Types
Copyright : 2015 - 2017 ,
2015 - 2016 Language Science Press .
-- License : GPL-3
--
-- Maintainer :
-- Stability : experimental
Portabil... | null | https://raw.githubusercontent.com/synsem/texhs/9e2dce4ec8ae0b2c024e1883d9a93bab15f9a86f/src/Text/Doc/Types.hs | haskell | # LANGUAGE OverloadedStrings #
--------------------------------------------------------------------
|
Module : Text.Doc.Types
License : GPL-3
Maintainer :
Stability : experimental
--------------------------------------------------------------------
* Doc type
* Meta
** Sections
** Citations
... | Copyright : 2015 - 2017 ,
2015 - 2016 Language Science Press .
Portability : GHC
The Doc type and utility functions .
module Text.Doc.Types
Doc(..)
, docTitle
, docSubTitle
, docAuthors
, docDate
, Meta(..)
, defaultMeta
, HasMeta(..)
, SectionInfo(..)
, BookRegion... |
697e3b72269531d439adad9f8bdbe82c2e14fbe8df6755959180104a7a134ea7 | eskimor/servant-purescript | BrowserHeader.hs | -- | A header which gets sent by the browser and is thus of no concern for the client consumer of the API.
# LANGUAGE CPP #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE ... | null | https://raw.githubusercontent.com/eskimor/servant-purescript/c916e03ae9cf27b6fee59c4cf2a568bf4e8b0cfe/src/Servant/API/BrowserHeader.hs | haskell | | A header which gets sent by the browser and is thus of no concern for the client consumer of the API.
# LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveFunctor #
# LANGUAGE ConstraintKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE ... | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module Servant.API.BrowserHeader where
import Servant.Links
import Servant
import Servant.Foreign
import Servant.Subscriber.Subscribable
import ... |
6ed8ec7742f1ee309ba8354fad53e290ee0e59fb03a4658723f0f5adb81fd48d | logseq/nbb-logseq | cljs_time_format_test.cljs | (ns cljs-time-format-test
"Copied test from cljs-time.format-test for subset of API that is available"
(:require [cljs-time.format :as format :refer [formatter]]
[cljs.test :refer [deftest is]]))
(deftest parse-test
(is
(= :invalid-date
(try
(format/parse (formatter "dd/MM/yyyy") "31... | null | https://raw.githubusercontent.com/logseq/nbb-logseq/43047ed25c1dfff80e9ee7bc3caaf4f53a3b3ab1/test/cljs_time_format_test.cljs | clojure | (ns cljs-time-format-test
"Copied test from cljs-time.format-test for subset of API that is available"
(:require [cljs-time.format :as format :refer [formatter]]
[cljs.test :refer [deftest is]]))
(deftest parse-test
(is
(= :invalid-date
(try
(format/parse (formatter "dd/MM/yyyy") "31... | |
b3d21b7bc42040cca634defb3d5872c0a9dfc7e9295e3129af4f6a34cc6fe5cf | simmsb/calamity | Utils.hs | # LANGUAGE TemplateHaskell #
-- | Command handler utilities
module Calamity.Commands.Utils (
addCommands,
useConstantPrefix,
CmdInvokeFailReason (..),
CtxCommandError (..),
CommandNotFound (..),
CommandInvoked (..),
) where
import Calamity.Client.Client
import Calamity.Client.Types
import Calamity.Command... | null | https://raw.githubusercontent.com/simmsb/calamity/be310255b446e87e7432673de1fbc67ef46de3ae/calamity/Calamity/Commands/Utils.hs | haskell | | Command handler utilities
^ The groups that were successfully parsed
| A default interpretation for 'CC.ParsePrefix' that uses a single constant prefix.
ignore if context couldn't be built | # LANGUAGE TemplateHaskell #
module Calamity.Commands.Utils (
addCommands,
useConstantPrefix,
CmdInvokeFailReason (..),
CtxCommandError (..),
CommandNotFound (..),
CommandInvoked (..),
) where
import Calamity.Client.Client
import Calamity.Client.Types
import Calamity.Commands.Dsl
import Calamity.Commands.... |
c59f1454329e4aaca2acdf5dc37d4a4b42ce1a8ee8f185285de3b53ed58d6204 | keigoi/kmclib | ppx_kmclib.ml | open Ocaml_common
open Sess
open Parsetree
let bound_default = 20
type kmcspec =
{ protocol_name : string
; roles : string list
; kmc_bound : int
}
type ppx_kmclib_state =
{ kmc_specs : (string, kmcspec) Hashtbl.t
; kmc_error_traces : (string, Runkmc.kmc_result) Hashtbl.t
}
let typ_with_attr ~loc typ ... | null | https://raw.githubusercontent.com/keigoi/kmclib/f3631f6bf3dbc32578a9ed430398cca908cc7fd7/ppx/ppx_kmclib.ml | ocaml | [%kmc.gen g (r1,r2,r3)] --> (assert false)[@kmc.gen g (r1,r2,r3)]
(pat : [%kmc.check gid.role]) --> (pat : _[@kmc.check gid.role])
XXX
warning?
no errors, put the inferred type and annotate it with session types
type format errors -- put types decorated with errors
type format errors -- generate holes with... | open Ocaml_common
open Sess
open Parsetree
let bound_default = 20
type kmcspec =
{ protocol_name : string
; roles : string list
; kmc_bound : int
}
type ppx_kmclib_state =
{ kmc_specs : (string, kmcspec) Hashtbl.t
; kmc_error_traces : (string, Runkmc.kmc_result) Hashtbl.t
}
let typ_with_attr ~loc typ ... |
ee0a2b36cf81db44dbac7adde3c4318e66da5f0167698b9d09f72fffb1f83aaf | hiroshi-unno/coar | solver.ml | open Core
open Common
open Common.Ext
open Common.Util
open Ast
open Ast.LogicOld
open MuCLP.Problem
module Make (Cfg: Config.ConfigType) = struct
let config = Cfg.config
module Debug = Debug.Make (val Debug.Config.(if config.verbose then enable else disable))
module Reducer = Reducer.Make (struct let config = ... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/MuVal/solver.ml | ocaml | TODO: generate fenv
* no encoding of existential quantifiers required
Out_channel.print_endline @@ CandSol.str_of sol;
Dummy
Dummy
Dummy
Dummy
Dummy | open Core
open Common
open Common.Ext
open Common.Util
open Ast
open Ast.LogicOld
open MuCLP.Problem
module Make (Cfg: Config.ConfigType) = struct
let config = Cfg.config
module Debug = Debug.Make (val Debug.Config.(if config.verbose then enable else disable))
module Reducer = Reducer.Make (struct let config = ... |
37dfed12760d43c7156a1dbf99c65abc40bbe99bd5558cdb7b9f8cb024bdfc34 | mirage/ocaml-cohttp | cohttp_top.ml | let printers =
[ "Cohttp.Header.pp_hum"; "Cohttp.Request.pp_hum"; "Cohttp.Response.pp_hum" ]
let eval_string ?(print_outcome = false) ?(err_formatter = Format.err_formatter)
str =
let lexbuf = Lexing.from_string str in
let phrase = !Toploop.parse_toplevel_phrase lexbuf in
Toploop.execute_phrase print_outco... | null | https://raw.githubusercontent.com/mirage/ocaml-cohttp/524674e453c5eeb3be156e5046bc2fdaf5b50779/cohttp-top/src/cohttp_top.ml | ocaml | let printers =
[ "Cohttp.Header.pp_hum"; "Cohttp.Request.pp_hum"; "Cohttp.Response.pp_hum" ]
let eval_string ?(print_outcome = false) ?(err_formatter = Format.err_formatter)
str =
let lexbuf = Lexing.from_string str in
let phrase = !Toploop.parse_toplevel_phrase lexbuf in
Toploop.execute_phrase print_outco... | |
de26ca59f2fdae0ef23a7686976b517b0bae4d8b4358e56e785a419f384a25d7 | mflatt/scope-sets | in-package-scopes.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse
racket/syntax))
;; A simpler variant of `in-package` that works with
;; the set-of-scopes expander. It's simpler because a package
;; can correspond to a scope, which is exactly what we
;; want.
(begin-for-syntax... | null | https://raw.githubusercontent.com/mflatt/scope-sets/4d3ae9d8a0f6ff83aa597612d280406cb6d82f5b/in-package-scopes.rkt | racket | A simpler variant of `in-package` that works with
the set-of-scopes expander. It's simpler because a package
can correspond to a scope, which is exactly what we
want.
from the defined name:
----------------------------------------
fails if unquoted | #lang racket/base
(require (for-syntax racket/base
syntax/parse
racket/syntax))
(begin-for-syntax
(define introducers (make-hash))
( stx - > stx )
( hash - of symbol ( stx - > stx ) )
(define (get-package name)
(hash-ref! introducers
name
... |
0199594107ab381b30ac0502532b64855b0d4fbd135014fc4c930fc0048d598a | yutopp/rill | name.ml |
* Copyright 2020 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2020 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )
*)
... | null | https://raw.githubusercontent.com/yutopp/rill/375b67c03ab2087d0a2a833bd9e80f3e51e2694f/rillc/lib/sema/name.ml | ocaml |
* Copyright 2020 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2020 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )
*)
... | |
bd00e173c5c86126e98900680a1f58e61f78a5a574b507211347fa79f6e14a9e | caradoc-org/caradoc | crypto.mli | (*****************************************************************************)
(* Caradoc: a PDF parser and validator *)
Copyright ( C ) 2016 - 2017
(* *)
(* This program ... | null | https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/crypto/crypto.mli | ocaml | ***************************************************************************
Caradoc: a PDF parser and validator
This program is free software; you can redistribute it and/or modify
... | Copyright ( C ) 2016 - 2017
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation .
You should have received a copy of the GNU General Public License along
with this program ; if... |
5d4955619be7ce092ea0cb3a71a8275cf5af5bbd73966eb7e6778ac6d5c9b2ce | ghc/packages-base | ST.hs | # LANGUAGE Unsafe #
-----------------------------------------------------------------------------
-- |
Module : Control . Monad . ST
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : experimental
-... | null | https://raw.githubusercontent.com/ghc/packages-base/52c0b09036c36f1ed928663abb2f295fd36a88bb/Control/Monad/ST.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : non-portable (requires universal quantification for runST)
Jones /Lazy Functional State Threads/.
References (... | # LANGUAGE Unsafe #
Module : Control . Monad . ST
Copyright : ( c ) The University of Glasgow 2001
This library provides support for /strict/ state threads , as
described in the PLDI \'94 paper by and
provided by " Data . STRef " , and arrays are provided by
" Data . Array . ST " .
modul... |
acbfb2d66e9ec80f05d27b5b1ab59d6507606c56569785732a1e377d79055c38 | obsidiansystems/beam-automigrate | Generic.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - u... | null | https://raw.githubusercontent.com/obsidiansystems/beam-automigrate/2eae891814b0523c6c839a666eed19218985a89f/src/Database/Beam/AutoMigrate/Generic.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
Table-specific classes
Enumerations-specific classes
Column-specific classes
| Type-level witness of whether or not we have to generate an extra \"SEQUENCE\" in case the table
Deriving information about 'Enums'.
# OVERLAPS #
primary-key-wrapped types do n... | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - unticked - promoted - constructors #
module Database.Beam.Aut... |
9ea52269395af7fbfa49e48a9e7f45706b7acfcc69f8a57f206fa19c0e6f698d | kind2-mc/kind2 | stat.ml | This file is part of the Kind 2 model checker .
Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you
may not use this file except in compliance with the License . You
may obtain a copy of the License a... | null | https://raw.githubusercontent.com/kind2-mc/kind2/3059eadd878192146c54a2a388c60c76276fc9a4/src/stat.ml | ocaml | A generic statistics item
An integer statistics item
A float statistics item
An integer statistics list
A statistics item of a certain type
Create a statistics item
**********************************************************************
Accessors ... | This file is part of the Kind 2 model checker .
Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you
may not use this file except in compliance with the License . You
may obtain a copy of the License a... |
300f9f535a0a100010cdf96425aa25b6a15c0bc7146067edfa852a75421418e4 | axelarge/advent-of-code | day12_test.clj | (ns advent-of-code.y2015.day12-test
(:require [clojure.test :refer :all]
[advent-of-code.y2015.day12 :refer :all]))
(deftest test-solve1
(is (= (solve1 input) 119433)))
(deftest test-solve2
(is (= (solve2 input) 68466)))
| null | https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/test/advent_of_code/y2015/day12_test.clj | clojure | (ns advent-of-code.y2015.day12-test
(:require [clojure.test :refer :all]
[advent-of-code.y2015.day12 :refer :all]))
(deftest test-solve1
(is (= (solve1 input) 119433)))
(deftest test-solve2
(is (= (solve2 input) 68466)))
| |
77af23790867ffe59df4f8cae7dd1b79a9e620a9c631ef6dc1cbadf883d1b3ff | migae/datastore | theory_collections.clj | (ns test.theory-collections
"theory of entity-map collections"
(:refer-clojure :exclude [name hash])
(:import [com.google.appengine.api.datastore
Email
EntityNotFoundException
Link]
[com.google.appengine.tools.development.testing
LocalServiceTestHelper
... | null | https://raw.githubusercontent.com/migae/datastore/61b2fc243cfd95956d531a57c86ea58eb19af7b7/test/clj/test/theory_collections.clj | clojure |
map api
hash-map, sorted-map, sorted-map-by
get, contains?, find, keys, vals, map?
key, val
(:require [migae.migae-datastore.PersistentEntityMap])
[migae.migae-datastore :as ds]))
(defn- make-local-services-fixture-fn [services hook-helper]
(datastore)
(use-fixtures :once (fn [test-fn] (ds/get-d... | (ns test.theory-collections
"theory of entity-map collections"
(:refer-clojure :exclude [name hash])
(:import [com.google.appengine.api.datastore
Email
EntityNotFoundException
Link]
[com.google.appengine.tools.development.testing
LocalServiceTestHelper
... |
acf781b03b4b5e713c47d063a9bab687772b2650595835b4591ae36cf435ff9f | gersak/vura | jobs.clj | (ns vura.sync.jobs
(:require
[vura.core :as core]
[dreamcatcher.core
:refer [has-transition?
get-transition
get-validators
get-states]]
[dreamcatcher.core :refer :all])
(:import [java.util.concurrent LinkedBlockingQueue Executors TimeUnit SynchronousQueue]))
... | null | https://raw.githubusercontent.com/gersak/vura/a81e898de9e743205865cbfbf6465a649fcff6fa/cron/src/vura/sync/jobs.clj | clojure | TODO - include logging
Functions allow mutable job definition
Job shell returns job phases that can
be wrapped with atom, and changed over time
Real job instances are produced with job
function.
Intended for static job definition
Reason for this macro is if "I" don't wan't to make
chage to Job. data durring J... | (ns vura.sync.jobs
(:require
[vura.core :as core]
[dreamcatcher.core
:refer [has-transition?
get-transition
get-validators
get-states]]
[dreamcatcher.core :refer :all])
(:import [java.util.concurrent LinkedBlockingQueue Executors TimeUnit SynchronousQueue]))
... |
e4efe3c657e304c420b57d7660357a16f15456e282de28b8138f2183fe382f8f | tgbugs/laundry | block.rkt | #lang brag
; NOTE greater blocks that do not have a special status e.g. src blocks for babel
; can only be determined to be malformed during a later pass, not by the grammar alone
block-begin-line : /newline wsnn* blk-greater-begin
block-end-line : /newline wsnn* blk-greater-end ; FIXME paragraph vs out of place end l... | null | https://raw.githubusercontent.com/tgbugs/laundry/584da816ac12d5433114552fa5af6957e4500266/laundry/grammar/block.rkt | racket | NOTE greater blocks that do not have a special status e.g. src blocks for babel
can only be determined to be malformed during a later pass, not by the grammar alone
FIXME paragraph vs out of place end line
wsnn*? or we deal with that elsewhere ?
XXX watch out for greedy ?
if this happens, the parse results up to ... | #lang brag
block-begin-line : /newline wsnn* blk-greater-begin
blk-ex : blk-ex-begin blk-ex-contents nlpws blk-ex-end
blk-ex-begin : BEGIN-EX wsnn blk-line-contents | BEGIN-EX
XXX NOTE these WILL mispair and have to be processed in a second step
blk-greater-begin : blk-greater-type wsnn blk-line-contents | blk-gr... |
9b68673ff7f681cb66d49f5e68fa4e688a72613d411765b0beaea34e98fb97e5 | rabbitmq/osiris | osiris_app.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 ) 2007 - 2022 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(osiris_app).
-behaviour(application).
-... | null | https://raw.githubusercontent.com/rabbitmq/osiris/fd8b620588328ed873c048cc3dca61a9419494e9/src/osiris_app.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 ) 2007 - 2022 VMware , Inc. or its affiliates . All rights reserved .
-module(osiris_app).
-behaviour(application).
-export... | |
21cb38b6c2f87132a299297d16a8a1ce8965822e4ce471248d44609387d9fddd | inhabitedtype/httpaf | lwt_get.ml | open Base
open Lwt.Infix
module Arg = Caml.Arg
open Httpaf
open Httpaf_lwt_unix
let main port host =
Lwt_unix.getaddrinfo host (Int.to_string port) [Unix.(AI_FAMILY PF_INET)]
>>= fun addresses ->
let socket = Lwt_unix.socket Unix.PF_INET Unix.SOCK_STREAM 0 in
Lwt_unix.connect socket (List.hd_exn addresses).Un... | null | https://raw.githubusercontent.com/inhabitedtype/httpaf/aaeffb9ee5fcbd995801b131b892dded729640d0/examples/lwt/lwt_get.ml | ocaml | open Base
open Lwt.Infix
module Arg = Caml.Arg
open Httpaf
open Httpaf_lwt_unix
let main port host =
Lwt_unix.getaddrinfo host (Int.to_string port) [Unix.(AI_FAMILY PF_INET)]
>>= fun addresses ->
let socket = Lwt_unix.socket Unix.PF_INET Unix.SOCK_STREAM 0 in
Lwt_unix.connect socket (List.hd_exn addresses).Un... | |
cb97827aeeb3cca192483188e14eb30b258ce978a780de790d6e87494ac155f7 | alex-hhh/data-frame | gpx.rkt | #lang racket/base
;; gpx.rkt -- read and write GPX files from data frames
;;
;; This file is part of data-frame -- -hhh/data-frame
Copyright ( c ) 2018 , 2021 , 2022 < >
;;
;; This program is free software: you can redistribute it and/or modify it
;; under the terms of the GNU Lesser General Public License as pub... | null | https://raw.githubusercontent.com/alex-hhh/data-frame/6a5b2fa6f67db9a36761c23fab8b5e730dfe7b6a/private/gpx.rkt | racket | gpx.rkt -- read and write GPX files from data frames
This file is part of data-frame -- -hhh/data-frame
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
option) any later version.
This program is distributed in the ... | #lang racket/base
Copyright ( c ) 2018 , 2021 , 2022 < >
the Free Software Foundation , either version 3 of the License , or ( at your
You should have received a copy of the GNU Lesser General Public License
(require racket/contract
racket/date
racket/format
racket/match
x... |
0fc112e2de6ba50c164195e7aca746e8148a397dde33af39599a4fca42f59a80 | mlcfp/zenacy-html | Buffer.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
-- | Defines an buffer type.
module Zenacy.HTML.Internal.Buffer
( Buffer(..)
, bufferNew
, bufferCapacity
, bufferSize
, bufferRes... | null | https://raw.githubusercontent.com/mlcfp/zenacy-html/b4af86fecc6fbbe1c7501e2fa75e6aa28206ebcb/src/Zenacy/HTML/Internal/Buffer.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Defines an buffer type.
import Foreign
( castPtr
, withForeignPtr
)
import qualified Data.Vector.Storable.Mutable as U
, unsafeToForeignPtr0
)
| A type of buffer used to hold bytes.
| Makes a new buffer.
| Gets the cap... | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Zenacy.HTML.Internal.Buffer
( Buffer(..)
, bufferNew
, bufferCapacity
, bufferSize
, bufferReset
, bufferAppend
, bufferApply
, bufferTake
, bufferContains
, bufferPack
, bufferString
) where
import Ze... |
1c3ac5867c5846ed7fb995939dca739719b0b001a7086141002f96243bf161a4 | paurkedal/viz | trie.mli | Copyright ( C ) 2010 - -2016 Petter A. Urkedal < >
*
* This file is part of the Viz Compiler < / > .
*
* The Viz Compiler 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/paurkedal/viz/ab1f1071fafdc51eae69185ec55d7a6e7bb94ea9/camlviz/trie.mli | ocaml | * A Trie Implementation | Copyright ( C ) 2010 - -2016 Petter A. Urkedal < >
*
* This file is part of the Viz Compiler < / > .
*
* The Viz Compiler 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... |
15b535a98e173094395b9d4cefdeee1c0bcce193dbb96836bf4dfb49ed1a3aa9 | clojure-interop/java-jdk | SignatureMethod.clj | (ns javax.xml.crypto.dsig.SignatureMethod
"A representation of the XML SignatureMethod element
as defined in the
W3C Recommendation for XML-Signature Syntax and Processing.
The XML Schema Definition is defined as:
<element name=\"SignatureMethod\" type=\"ds:SignatureMethodType\"/>
<complexType name... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/crypto/dsig/SignatureMethod.clj | clojure | (ns javax.xml.crypto.dsig.SignatureMethod
"A representation of the XML SignatureMethod element
as defined in the
W3C Recommendation for XML-Signature Syntax and Processing.
The XML Schema Definition is defined as:
<element name=\"SignatureMethod\" type=\"ds:SignatureMethodType\"/>
<complexType name... | |
405d44a9affbac3c94bca83ad053ff827ec4cd2e338c597bdc4488bc99262764 | mathematical-systems/clml | dlanv2.lisp | ;;; Compiled by f2cl version:
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:0... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/lapack/dlanv2.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t)
(:relaxed-array-decls t) (:coerce-assigns :as-needed)
(:array-type ':array) (:array-slicing t)
(:declare-common nil) (:float-format double-float)) | ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ "
" $ I d :... |
910ff6185363f4cb90933d67035325b46db84cd2c713b469c8cff25eea823f01 | ghcjs/jsaddle-dom | DatabaseCallback.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.DatabaseCallback
(newDatabaseCallback, newDatabaseCallbackSync,
newDatabaseCallbackAsync, DatabaseCallback)... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/DatabaseCallback.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.DatabaseCallback
(newDatabaseCallback, newDatabaseCallbackSync,
newDatabaseCallbackAsync, DatabaseCallback)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, ma... |
212992f0bd41ccdb3b6306cfb0937ed952c32b8338b1c0d5c900b7935468ab99 | madvas/catlantis | main.cljs | (ns env.android.main
(:require [catlantis.android.core :as core]))
(core/init)
| null | https://raw.githubusercontent.com/madvas/catlantis/b8880ec2cab27ecfcb3c0ab30e2bbc7767db0d1c/env/prod/env/android/main.cljs | clojure | (ns env.android.main
(:require [catlantis.android.core :as core]))
(core/init)
| |
a8196ade46b07c117991c56bbb8ce2145a972f820d92b0d26975a8d6d26bf5e7 | footprintanalytics/footprint-web | testing.clj | (ns metabase.api.testing
"Endpoints for testing."
(:require [clojure.java.jdbc :as jdbc]
[clojure.string :as str]
[clojure.tools.logging :as log]
[compojure.core :refer [POST]]
[metabase.api.common :as api]
[metabase.db.connection :as mdb.connection]
... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/api/testing.clj | clojure | EVERYTHING BELOW IS FOR H2 ONLY.
acquire the application DB WRITE LOCK which will prevent any other threads from getting any new connections until
we release it. | (ns metabase.api.testing
"Endpoints for testing."
(:require [clojure.java.jdbc :as jdbc]
[clojure.string :as str]
[clojure.tools.logging :as log]
[compojure.core :refer [POST]]
[metabase.api.common :as api]
[metabase.db.connection :as mdb.connection]
... |
a66ddb5dbc26715688273507c275910ff6f630d26b710e401a6489066d639e23 | bobatkey/CS316-2020 | Week07Solutions.hs | # LANGUAGE InstanceSigs #
# LANGUAGE RebindableSyntax #
# OPTIONS_GHC -fwarn - incomplete - patterns #
module Week07Solutions where
import Prelude hiding ( Monad (..)
, Applicative (..)
, mapM
, mapM_
, (<$>))
import Data.Char ... | null | https://raw.githubusercontent.com/bobatkey/CS316-2020/21d9edca6445d4287697cad0523ffae6a5b51f23/lecture-notes/Week07Solutions.hs | haskell | The 'Maybe' monad also has a special operation called 'failure', for
representing an exception being thrown:
And a 'catch' operation that simulates an exception being caught:
And the 'search' function that may fail to find a 'k'ey:
Now we can write 'numberTree' using 'do' notation, which makes the
whole im... | # LANGUAGE InstanceSigs #
# LANGUAGE RebindableSyntax #
# OPTIONS_GHC -fwarn - incomplete - patterns #
module Week07Solutions where
import Prelude hiding ( Monad (..)
, Applicative (..)
, mapM
, mapM_
, (<$>))
import Data.Char ... |
7c1051c885eeeb32b57854b28b78e3bfe6d304f8d044317da746ccf0a7862604 | FranklinChen/hugs98-plus-Sep2006 | Directory.hs | -----------------------------------------------------------------------------
-- |
-- Module : System.Directory
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : stable
-- Portability : portable
--
--... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/base/System/Directory.hs | haskell | ---------------------------------------------------------------------------
|
Module : System.Directory
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : stable
Portability : portable
System-independent interface to directory manipulation.
------------------... | Copyright : ( c ) The University of Glasgow 2001
module System.Directory
(
, getHomeDirectory
, getAppUserDataDirectory
, getUserDocumentsDirectory
, getTemporaryDirectory
, canonicalizePath
, findExecutable
, Permissions(
Permissions,
)
: : FilePath - >... |
f58cc19688477569a26d51bcfdb68bede56dad8e999297d55ca019587958a489 | dalaing/little-languages | Infer.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
module Type.Infer where
import Control.Lens (view)
import Control.Lens.Prism (Prism')
import Control.Monad.Except
import Control.Monad.Error.Lens
import Data.Foldable (asum)
import Data.Maybe (fromMaybe)
import Loc
import Term
import Type
import Type.Error
... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/stlc-b/src/Type/Infer.hs | haskell | # LANGUAGE RankNTypes #
TODO strip ty2 of info, but in a way that allows rebuilding | # LANGUAGE FlexibleContexts #
module Type.Infer where
import Control.Lens (view)
import Control.Lens.Prism (Prism')
import Control.Monad.Except
import Control.Monad.Error.Lens
import Data.Foldable (asum)
import Data.Maybe (fromMaybe)
import Loc
import Term
import Type
import Type.Error
toTyLoc :: Functor m
... |
be69c05ab68538aa4e975763d1a36449058471f2fdb047422dcb9693dc9e004e | Clozure/ccl-tests | loop10.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Nov 16 09:07:02 2002
;;;; Contains: Tests of LOOP numeric value accumulation clauses
(in-package :cl-test)
;; Tests of COUNT, COUNTING
(deftest loop.10.1
(loop for x from 1 to 10 count (< x 5))
4)
(deftest loop.10.2
(loop for x from 1 to 10 counting (<... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/loop10.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of LOOP numeric value accumulation clauses
Tests of COUNT, COUNTING
Tests combining MINIMIZE, MAXIMIZE
Test that explicit calls to macroexpand in subforms
are done in the correct environment | Author :
Created : Sat Nov 16 09:07:02 2002
(in-package :cl-test)
(deftest loop.10.1
(loop for x from 1 to 10 count (< x 5))
4)
(deftest loop.10.2
(loop for x from 1 to 10 counting (< x 7))
6)
(deftest loop.10.3
(loop for x from 1 to 10 count (< x 5) fixnum)
4)
(deftest loop.10.4
(loop fo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.