_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 |
|---|---|---|---|---|---|---|---|---|
89fe80c7d193321ce2764bd5692d910969dd3467771315fa2e579ea9a54691d2 | ertugrulcetin/herfi | rock.cljs | (ns herfi.scene.entity.rock
(:require
[applied-science.js-interop :as j]
[herfi.scene.api :as api]
[herfi.scene.db :as db]
[herfi.scene.ecs :as ecs]))
(defn create-rock-instanced-mesh [environment-map id type]
(let [obj (api/find-asset type)
data (:rock environment-map)
_ (j/call (j... | null | https://raw.githubusercontent.com/ertugrulcetin/herfi/b5384d56c3e56c29ed82deafc4e56ad19ec12a60/src/cljs/herfi/scene/entity/rock.cljs | clojure | (ns herfi.scene.entity.rock
(:require
[applied-science.js-interop :as j]
[herfi.scene.api :as api]
[herfi.scene.db :as db]
[herfi.scene.ecs :as ecs]))
(defn create-rock-instanced-mesh [environment-map id type]
(let [obj (api/find-asset type)
data (:rock environment-map)
_ (j/call (j... | |
3766c3a4695aee1890cb5c8819b636523b72c2bd270152c19f2de98399b2f7a9 | pflanze/chj-schemelib | dot.scm | Copyright 2018 - 2021 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
;; Display S... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/dot.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
Display Scheme data structures as directed graphs using the "dot"
apt install xdot # or imagemagick
original objects)
objects into a string representation), print that to a file and
run "display" ... | Copyright 2018 - 2021 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
tool from graphviz via " xdot " , or " display " from imagemagick .
apt install graphviz
(require easy
bag
(cj-... |
bf1b894552fccc9bd868b0118227560c0b9df4226eeeda9e1959cff8bbf8fb76 | jackdoe/bzzz | bool.clj | (ns bzzz.queries.bool
(:import (org.apache.lucene.search BooleanClause BooleanClause$Occur
BooleanQuery Query)))
(defn parse
[generic input analyzer]
(let [{:keys [must must-not should minimum-should-match boost]
:or {minimum-should-match 0 should [] must [] must-not ... | null | https://raw.githubusercontent.com/jackdoe/bzzz/ae98708056e39ada28f22aad9e43ea91695b346b/src/bzzz/queries/bool.clj | clojure | (ns bzzz.queries.bool
(:import (org.apache.lucene.search BooleanClause BooleanClause$Occur
BooleanQuery Query)))
(defn parse
[generic input analyzer]
(let [{:keys [must must-not should minimum-should-match boost]
:or {minimum-should-match 0 should [] must [] must-not ... | |
e4eaf967dcabde0f12367b6ba71a723631cf227cb96e6d9a61771054eec510b1 | Interlisp/medley | fsc.lisp | -*- Package : CLOS ; Syntax : Common - Lisp ; Base : 10 -*-
. Copyright ( c ) 1991 by Venue
(in-package "CLOS")
;;; This file contains the
definition of the FUNCALLABLE - STANDARD - CLASS metaclass . Much of the implementation of this
;;; metaclass is actually defined on the class STD-CLASS. What appears in t... | null | https://raw.githubusercontent.com/Interlisp/medley/f0b9ce3daeef95543e452ea4c59cb8e683295035/clos/fsc.lisp | lisp | Syntax : Common - Lisp ; Base : 10 -*-
This file contains the
metaclass is actually defined on the class STD-CLASS. What appears in this file is a modest
number of simple methods related to the low-level differences in the implementation of standard
and funcallable-standard instances. As it happens, none of these... |
. Copyright ( c ) 1991 by Venue
(in-package "CLOS")
definition of the FUNCALLABLE - STANDARD - CLASS metaclass . Much of the implementation of this
(defmethod wrapper-fetcher ((class funcallable-standard-class))
'fsc-instance-wrapper)
(defmethod slots-fetcher ((class funcallable-standard-class))
... |
56d89a1ff54ccb0f2a631c9720f334f6009c02f354b3488303da3a937873482f | melange-re/melange | lam_constant.mli | Copyright ( C ) 2018- Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version ... | null | https://raw.githubusercontent.com/melange-re/melange/b595c2647a285e8bb8b16f109d0ab0fbfa22afa3/jscomp/common/lam_constant.mli | ocaml | use record later
eventually we can remove it, since we know
[constant] is [undefined] or not
| Copyright ( C ) 2018- Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version ... |
e3b3532f40f7f351f8f7c2842ec6365664b2a2eaf1a7129daa53072c305a2aca | replikativ/konserve | core_test.clj | (ns konserve.core-test
(:require [clojure.test :refer :all]
[clojure.core.async :refer [<!!] :as async]
[konserve.compliance-test :refer [compliance-test]]
[konserve.memory :refer [new-mem-store]]))
(deftest memory-store-compliance-test
(compliance-test (<!! (new-mem-store))))
| null | https://raw.githubusercontent.com/replikativ/konserve/da09c0fcc066d0e13d6eded673a83382bb9f9e33/test/konserve/core_test.clj | clojure | (ns konserve.core-test
(:require [clojure.test :refer :all]
[clojure.core.async :refer [<!!] :as async]
[konserve.compliance-test :refer [compliance-test]]
[konserve.memory :refer [new-mem-store]]))
(deftest memory-store-compliance-test
(compliance-test (<!! (new-mem-store))))
| |
cd6887260a1b6cf22eeab326e7b82cdbdc2b5d3eaf9aa4e2bdc3fb5ce6dbf050 | burgerdev/ocaml-rfc7748 | test_rfc7748.ml | open OUnit
open Rfc7748
Simple input - to - output tests based on RFC 7748 , Section 5.2 .
type case = {priv: string; pub: string; exp: string}
It would be nice to use Hex.to_bytes , but this is only supported after
* Hex > = 1.3.0 . Alternatively , we could [ opam update ] in the integration
* tests , bu... | null | https://raw.githubusercontent.com/burgerdev/ocaml-rfc7748/ed034213ff02cd55870ae1387e91deebc9838eb4/test/test_rfc7748.ml | ocaml | implementation is too slow to run this within a reasonable time frame
; { start="0500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
; iter=1000000
; exp="077f453681caca3693198420bbe515cae0002472519b3e67661a7e89cab94695c8f4bcd66e61b9b9c... | open OUnit
open Rfc7748
Simple input - to - output tests based on RFC 7748 , Section 5.2 .
type case = {priv: string; pub: string; exp: string}
It would be nice to use Hex.to_bytes , but this is only supported after
* Hex > = 1.3.0 . Alternatively , we could [ opam update ] in the integration
* tests , bu... |
c17b984b287680835f595b2aa2f2482d2199655568687771ae51cd24a4eb835b | matteobusi/incremental-mincaml | inprod.ml | let rec getx (v : (float*float*float)) : float = (let (x, y, z) = v in x) in
let rec gety (v : (float*float*float)) : float = (let (x, y, z) = v in y) in
let rec getz (v : (float*float*float)) : float = (let (x, y, z) = v in z) in
let rec inprod (v1 : (float*float*float)) (v2 : (float*float*float)) : float =
getx v1 ... | null | https://raw.githubusercontent.com/matteobusi/incremental-mincaml/aebbaf3b918bab4b0398edbf01b43c63d8b7820d/src/fun/examples/inprod.ml | ocaml | let rec getx (v : (float*float*float)) : float = (let (x, y, z) = v in x) in
let rec gety (v : (float*float*float)) : float = (let (x, y, z) = v in y) in
let rec getz (v : (float*float*float)) : float = (let (x, y, z) = v in z) in
let rec inprod (v1 : (float*float*float)) (v2 : (float*float*float)) : float =
getx v1 ... | |
939235b94d14da49ee86bda50bcbb68dd0e48fcd977f6be4702b32bfc451d88c | mirage/mirage-channel | test.ml |
* Copyright ( c ) 2013 < >
*
* 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/mirage-channel/c3582876040c3eba8067b89b98115f85a8b72faf/test/test.ml | ocaml |
* Copyright ( c ) 2013 < >
*
* 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... | |
44b658b6f8dea7a35348cfb8a5981f81a5f9c97caa250267bf237934ef4eca83 | ocaml-multicore/multicoretests | stm_tests.ml | open QCheck
open STM
* parallel STM tests of Float . Array
module FAConf =
struct
type cmd =
| Length
| Get of int
| Set of int * float
STM do n't support floatarray type for the moment
(* | Sub of int * int
| Copy *)
| Fill of int * int * float
| To_list
| Mem of float
| Sor... | null | https://raw.githubusercontent.com/ocaml-multicore/multicoretests/3e0f2ceb72eaf334e97252140ae5d40bf6461b96/src/floatarray/stm_tests.ml | ocaml | | Sub of int * int
| Copy
hack: reusing int_gen for length
| Sub (_,_) -> s
| Copy -> s
| Copy, Res ((Float.Array Float,_),r) -> Float.Array.to_list r = s | open QCheck
open STM
* parallel STM tests of Float . Array
module FAConf =
struct
type cmd =
| Length
| Get of int
| Set of int * float
STM do n't support floatarray type for the moment
| Fill of int * int * float
| To_list
| Mem of float
| Sort
| To_seq
[@@deriving show { with... |
b8f5efefb165d1cc8eef03ba327fe916ab0d2c5e98b1baf7672c051592fe180b | kevinlynx/erlang-tcpserver | tserver.erl | %%
%% tserver.erl
%% 05.03.2013
%%
-module(tserver).
-behaviour(gen_server).
-export([init/1, handle_info/2, handle_cast/2, handle_call/3, code_change/3, terminate/2]).
-export([start_link/3]).
-compile(export_all).
-record(state, {lsock, mod, arg, parent}).
start_link(M, LSock, Arg) ->
gen_server:start_link(?... | null | https://raw.githubusercontent.com/kevinlynx/erlang-tcpserver/d27db8694cc14d21741cb6e56be3d02ffac72bbf/src/tserver.erl | erlang |
tserver.erl
05.03.2013
|
-module(tserver).
-behaviour(gen_server).
-export([init/1, handle_info/2, handle_cast/2, handle_call/3, code_change/3, terminate/2]).
-export([start_link/3]).
-compile(export_all).
-record(state, {lsock, mod, arg, parent}).
start_link(M, LSock, Arg) ->
gen_server:start_link(?MODULE, [LSock, M, Arg, self()], []... |
4b14897bb74448baaa2c91c6ab0c3b2865c414cf259dfae3ebe6a65e945b8906 | erlang/otp | global_group_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1998 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/5094e517c9a112d1070bbd1aba621add0a79dc90/lib/kernel/test/global_group_SUITE.erl | erlang |
%CopyrightBegin%
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 lan... | Copyright Ericsson AB 1998 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(global_group_SUITE).
-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2,
init_per_suite/1,... |
d8ddabd98340beea0beb9766b694c9dbba2a140ada48e439bc2fc7d46e3fbbf2 | originrose/think.image | image.clj | (ns think.image.image
(:require [think.image.protocols :as ip]
[mikera.image.core :as imagez]
[think.image.pixel :as pixel]
[think.image.image-util :refer :all]
[clojure.core.matrix.macros :refer [c-for]])
(:import [java.awt.image BufferedImage]
[java.util ... | null | https://raw.githubusercontent.com/originrose/think.image/0179d104d5fa74977890942858b44e1349457514/src/clj/think/image/image.clj | clojure | Wrappers around the protocol to simplify usage to clients and to
provide type hints
Optional accelerated image ops implementations with defaults
Copy to a sub-rect of dest from a sub-rect of source.
returns dest-img
If we are resizing up which is inherently going to cause visual corruption
then if the amount is small e... | (ns think.image.image
(:require [think.image.protocols :as ip]
[mikera.image.core :as imagez]
[think.image.pixel :as pixel]
[think.image.image-util :refer :all]
[clojure.core.matrix.macros :refer [c-for]])
(:import [java.awt.image BufferedImage]
[java.util ... |
7fc112799a771867f0d0d14fbb212d1b519266f80aaeb94a04960571874580d3 | emqx/emqx | emqx_bridge.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/37c17b120f8d54d7a50f5aec3f2e330f5bb04677/apps/emqx_bridge/src/emqx_bridge.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_bridge).
-behaviour(emqx_config_handler).
-include_lib("emqx/include/emqx.hrl").
-in... |
c6663bd28ef7b928afb80e068deb45fec13633ccca0b6fc394647f516602dcb1 | avsm/ocaml-ssh | myocamlbuild.ml | OASIS_START
DO NOT EDIT ( digest : 437e0c006223bf2c61d4b1337beb474f )
module OASISGettext = struct
# 21 "/Users/avsm/src/darcs/oasis/src/oasis/OASISGettext.ml"
let ns_ str =
str
let s_ str =
str
let f_ (str : ('a, 'b, 'c, 'd) format4) =
str
let fn_ fmt1 fmt2 n =
if n = 1 then
... | null | https://raw.githubusercontent.com/avsm/ocaml-ssh/26577d1501e7a43e4b520239b08da114c542eda4/myocamlbuild.ml | ocaml | these functions are not really officially exported
this lists all supported packages
this is supposed to list available syntaxes, but I don't know how to do it.
ocamlfind command
by using Before_options one let command line options have an higher priority
on the contrary using After_options will guarantee to... | OASIS_START
DO NOT EDIT ( digest : 437e0c006223bf2c61d4b1337beb474f )
module OASISGettext = struct
# 21 "/Users/avsm/src/darcs/oasis/src/oasis/OASISGettext.ml"
let ns_ str =
str
let s_ str =
str
let f_ (str : ('a, 'b, 'c, 'd) format4) =
str
let fn_ fmt1 fmt2 n =
if n = 1 then
... |
0ab567c6f895dc916857ac2659f33035f52141e052b3507ff62ec0dfd7a1d1ad | ocaml-flambda/flambda-backend | closure_conversion.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/14e94c382a2ea09956a217c1ffb25ad5c24e3c89/middle_end/flambda2/from_lambda/closure_conversion.ml | ocaml | ************************************************************************
OCaml
... | , OCamlPro
and ,
Copyright 2014 - -2019 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
[@@@ocaml.warning "-fragile-match"]
open! Int_replace_polymorphic_c... |
0120e061f09c3475b37a651a85b62b7da48d218c5f40bb702ef3f287ed5880b7 | bamarco/onyx-sim | db.cljs | (ns onyx.sim.components.db
(:require [com.stuartsierra.component :as component]
[taoensso.timbre :as log]
[onyx.sim.core :as sim]
[posh.reagent :as posh]
[onyx.sim.dat-view :as dat.view]
[datascript.core :as d]))
(defn create-conn []
(let [conn (d/create-... | null | https://raw.githubusercontent.com/bamarco/onyx-sim/5c911eec3540db7ba5e6681fe405070e03ecb4de/src/cljs/onyx/sim/components/db.cljs | clojure | (ns onyx.sim.components.db
(:require [com.stuartsierra.component :as component]
[taoensso.timbre :as log]
[onyx.sim.core :as sim]
[posh.reagent :as posh]
[onyx.sim.dat-view :as dat.view]
[datascript.core :as d]))
(defn create-conn []
(let [conn (d/create-... | |
1e00540d0c5e68489275b50fee023d4cc540411094047c3bd8b195e5ec232df4 | tsloughter/kuberl | kuberl_v1_node_condition.erl | -module(kuberl_v1_node_condition).
-export([encode/1]).
-export_type([kuberl_v1_node_condition/0]).
-type kuberl_v1_node_condition() ::
#{ 'lastHeartbeatTime' => kuberl_date_time:kuberl_date_time(),
'lastTransitionTime' => kuberl_date_time:kuberl_date_time(),
'message' => binary(),
'reason' ... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_node_condition.erl | erlang | -module(kuberl_v1_node_condition).
-export([encode/1]).
-export_type([kuberl_v1_node_condition/0]).
-type kuberl_v1_node_condition() ::
#{ 'lastHeartbeatTime' => kuberl_date_time:kuberl_date_time(),
'lastTransitionTime' => kuberl_date_time:kuberl_date_time(),
'message' => binary(),
'reason' ... | |
fb562185039ae14f608751db9564976f54756f5f1058a106bc9e15a5f02b1d5c | manuel-serrano/bigloo | server.scm | (module server)
(let ((socket (make-server-socket)))
(print "socket: " socket)
(print "port-number: " (socket-port-number socket))
(let ((c (socket-accept socket)))
(let ((obj (read (socket-input c))))
(print "read [" obj "]")
(socket-close c)
(socket-shutdown socket))))
| null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/examples/ClientServer/server.scm | scheme | (module server)
(let ((socket (make-server-socket)))
(print "socket: " socket)
(print "port-number: " (socket-port-number socket))
(let ((c (socket-accept socket)))
(let ((obj (read (socket-input c))))
(print "read [" obj "]")
(socket-close c)
(socket-shutdown socket))))
| |
44505a844eb9eef9739d9c8cb5b44efd53a738ad6780581ece0912cda009bd0b | singleheart/programming-in-haskell | ex8.hs | find :: Eq a => a -> [(a, b)] -> [b]
find k t = [v | (k', v) <- t, k == k']
positions :: Eq a => a -> [a] -> [Int]
positions x xs = find x (zip xs [0 ..])
| null | https://raw.githubusercontent.com/singleheart/programming-in-haskell/80c7efc0425babea3cd982e47e121f19bec0aba9/ch05/ex8.hs | haskell | find :: Eq a => a -> [(a, b)] -> [b]
find k t = [v | (k', v) <- t, k == k']
positions :: Eq a => a -> [a] -> [Int]
positions x xs = find x (zip xs [0 ..])
| |
afa716b4a375a7db795bb30220018838d58073ec0a522969e5300a353e149df4 | gmr/influxdb-storage-exchange | influxdb_storage_parameters.erl | %%==============================================================================
@author < >
2014 - 2015 AWeber Communications
%% @end
%%==============================================================================
%% @doc define the runtime parameters and validators to setup policies
%% @end
-module(influx... | null | https://raw.githubusercontent.com/gmr/influxdb-storage-exchange/681ccc41b7df0bad2245bf58cdaec165e0c7a0b8/src/influxdb_storage_parameters.erl | erlang | ==============================================================================
@end
==============================================================================
@doc define the runtime parameters and validators to setup policies
@end | @author < >
2014 - 2015 AWeber Communications
-module(influxdb_storage_parameters).
-behaviour(rabbit_policy_validator).
-export([register/0,
unregister/0,
validate_policy/1]).
-define(RUNTIME_PARAMETERS,
[{policy_validator, <<"influxdb-scheme">>},
{policy_validator, <... |
587cad0568f34c9d4f97640bc3c222621dcb3283cb3320d75f6d169e23f57dbd | icicle-lang/icicle-ambiata | Time.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - orphans #
module Icicle.Test.Data.Time where
import Icicle.Data.Time
import qualified Icicle.Internal.Pretty as PP
import Icicle.Test.Sea.Utils
import Icicle.Test.Arb... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/test/Icicle/Test/Data/Time.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - orphans #
module Icicle.Test.Data.Time where
import Icicle.Data.Time
import qualified Icicle.Internal.Pretty as PP
import Icicle.Test.Sea.Utils
import Icicle.Test.Arbitrary
import Control.Mo... |
61f3398875ce6ae2ad35523a1a40134c3fd6c1c5655cbb98ecfe8dcaa2cfe16f | yannham/mechaml | cookiejar.ml | { { { Copyright ( C ) 2016 , < >
Permission to use , copy , modify , and/or 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 AUTHOR DI... | null | https://raw.githubusercontent.com/yannham/mechaml/1efeb59e21ed72bc36e2421a96a52e807065b3d6/src/cookiejar.ml | ocaml | let domain_match host dom =
let delta = host_length - dom_length in
host=dom
&& String.sub host delta (host_length-delta) = dom | { { { Copyright ( C ) 2016 , < >
Permission to use , copy , modify , and/or 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 AUTHOR DI... |
0173b2ffabf0f7b7927772b169ed10981b44e08d0121864d6de485f17aff047e | JanAhrens/yesod-oauth-demo | Application.hs | # OPTIONS_GHC -fno - warn - orphans #
module Application
( makeApplication
, getApplicationDev
, makeFoundation
) where
import Import
import Settings
import Yesod.Auth
import Yesod.Default.Config
import Yesod.Default.Main
import Yesod.Default.Handlers
import Network.Wai.Middleware.RequestLogger (logStd... | null | https://raw.githubusercontent.com/JanAhrens/yesod-oauth-demo/0966dc7907c35ce483f4842752dd89e8da84c542/Application.hs | haskell | Import all relevant handler modules here.
Don't forget to add new modules to your cabal file! | # OPTIONS_GHC -fno - warn - orphans #
module Application
( makeApplication
, getApplicationDev
, makeFoundation
) where
import Import
import Settings
import Yesod.Auth
import Yesod.Default.Config
import Yesod.Default.Main
import Yesod.Default.Handlers
import Network.Wai.Middleware.RequestLogger (logStd... |
a649598119cc1459e916d6a4ae756750bd6b1532013ab067afde0c741c4b96f5 | awslabs/s2n-bignum | records.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/common/records.ml | ocaml | =========================================================================
Definition of record types, defining standard components for the fields.
=========================================================================
-------------------------------------------------------------------------
Get the compone... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
let parse_record_specification =
let ptype src =
let pty,rst ... |
a220765029c02cf4d0d66128ab1c4682cd1a4dec27b93da5b19b849c6f8b382b | tanakh/cless | Main.hs | # LANGUAGE RecordWildCards #
module Main (main) where
import Control.Exception
import Control.Monad
import Data.Char
import Data.Maybe
import Data.Monoid
import Data.String
import Data.Version
import Options.Applicative
import S... | null | https://raw.githubusercontent.com/tanakh/cless/90754e81e1aac9c2d2f0d9d2e9c96528de364165/src/Main.hs | haskell | help\" for help)"
to raise error eagerly
determin using language:
2. filename
detect language from shebang | # LANGUAGE RecordWildCards #
module Main (main) where
import Control.Exception
import Control.Monad
import Data.Char
import Data.Maybe
import Data.Monoid
import Data.String
import Data.Version
import Options.Applicative
import S... |
f86c229f86ba730ba20a692e95f1b5df2b90430c0f7a36798661f6af15790195 | charlieg/Sparser | loader.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1992,1993,1994 -- all rights reserved
;;;
;;; File: "loader"
;;; Module: "corpus;Sparser-drivers:"
Version : January 1994
initiated 3/19/92
1/25/94 v2.3 added [ menu data ] . 3/30 moved whole directory to int... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/interface/corpus/loader.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "loader"
Module: "corpus;Sparser-drivers:"
| copyright ( c ) 1992,1993,1994 -- all rights reserved
Version : January 1994
initiated 3/19/92
(in-package :sparser)
(lload "corpus-data;logicals")
(lload "corpus-data;Who's News logicals")
(lload "corpus-data;doc streams")
(lload "corpus-data;menu data")
|
051352dbd5151e440dddd2e44df334a993df0263cf18993b42e17085028bce8d | smucclaw/dsl | BasicTypesSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module LS.BasicTypesSpec (spec) where
import Test.Hspec
import LS.Types
import Data.List.NonEmpty
import AnyAll
import Test.QuickCheck
import qualified Data.Text as T
import Data.Text.Arbitrary
import Test.QuickCheck.Arbitrary.Generic
instance Arbitrary MyToken where
arbitrary = g... | null | https://raw.githubusercontent.com/smucclaw/dsl/e06c3f4b5ffe74774908116219940d80c92c3fdc/lib/haskell/natural4/test/LS/BasicTypesSpec.hs | haskell | # LANGUAGE OverloadedStrings # | module LS.BasicTypesSpec (spec) where
import Test.Hspec
import LS.Types
import Data.List.NonEmpty
import AnyAll
import Test.QuickCheck
import qualified Data.Text as T
import Data.Text.Arbitrary
import Test.QuickCheck.Arbitrary.Generic
instance Arbitrary MyToken where
arbitrary = genericArbitrary
shrink = genericS... |
8019e2be99818d6c7ea0da0e8fb75fdc9bd60261d6fadf8ca90dcc5500e11542 | CloudI/CloudI | cloudi_json_rpc.erl | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et nomod :
%%%
%%%------------------------------------------------------------------------
%%% @doc
= = CloudI JSON RPC==
%%% Implementation based on the version 2.0 of the JSON-RPC spec... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/lib/cloudi_service_api_requests/src/cloudi_json_rpc.erl | erlang |
------------------------------------------------------------------------
@doc
Implementation based on the version 2.0 of the JSON-RPC specification.
Named parameters are not supported to ensure parameters always have
an implicit order. Batch requests are not supported.
@end
Permission is hereby granted, free... | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et nomod :
= = CloudI JSON RPC==
MIT License
Copyright ( c ) 2011 - 2020 < mjtruog at protonmail dot com >
to deal in the Software without restriction , including without limitat... |
74a7611cea2a5e2bbe0655a34a80d4b570b17ec4ca686a142f1a32332966e67b | funkywork/yourbones | tez.ml | MIT License
Copyright ( c ) 2023 funkywork
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
to... | null | https://raw.githubusercontent.com/funkywork/yourbones/ffcb27a0e9647d2e0cbc36c4b53b764ba02f07a8/lib/common/tez.ml | ocaml | MIT License
Copyright ( c ) 2023 funkywork
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
to... | |
1d9184e3c56169d7f4c4b3d88b8322c3947d8b9abd9ae7f8fc1738e17fd30e7a | transient-haskell/transient | Base.hs | # LANGUAGE ScopedTypeVariables #
-----------------------------------------------------------------------------
--
-- Module : Base
-- Copyright :
License : MIT
--
-- Maintainer :
-- Stability :
-- Portability :
--
-- | Transient provides high level concurrency allowing you to do concurrent
-- proc... | null | https://raw.githubusercontent.com/transient-haskell/transient/301831888887fb199e9f9bfaba2502389e73bc93/src/Transient/Base.hs | haskell | ---------------------------------------------------------------------------
Module : Base
Copyright :
Maintainer :
Stability :
Portability :
| Transient provides high level concurrency allowing you to do concurrent
processing without requiring any knowledge of threads or synchronization.
From th... | # LANGUAGE ScopedTypeVariables #
License : MIT
distributed map - reduce problems . If you are considering Apache Spark or
The ' TransientIO ' monad allows you to :
You can think of ' TransientIO ' as a concurrent list transformer monad with
In its non - concurrent form , the ' TransientIO ' monad beh... |
a99294259769091f0f870f98570ae983f75c34b81220e397ccd9c597598ddd3f | poroh/ersip | ersip_proxy_stateless_test.erl | %%
Copyright ( c ) 2018 Dmitry Poroh
%% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%%
%% Identifiers test
%%
-module(ersip_proxy_stateless_test).
-include_lib("eunit/include/eunit.hrl").
%%%===================================================================
%%% C... | null | https://raw.githubusercontent.com/poroh/ersip/f1b0d3c5713fb063a6cc327ea493f06cff6a6e5e/test/proxy/ersip_proxy_stateless_test.erl | erlang |
All rights reserved.
Identifiers test
===================================================================
Cases
===================================================================
Request to be sent
Adding branch to the message
Message is not changed:
Request to be sent
Adding branch to the message
Action i... | Copyright ( c ) 2018 Dmitry Poroh
Distributed under the terms of the MIT License . See the LICENSE file .
-module(ersip_proxy_stateless_test).
-include_lib("eunit/include/eunit.hrl").
-define(crlf, "\r\n").
branch_generation_rfc3261_test() ->
Msg1 = <<"INVITE sip: SIP/2.0"
?crlf "Via: SIP/2.0/... |
bdd03966fc55e545c6cbe85d0c9ec8df99e497def2db8b955b0fcc49cdde01db | mirage/spamtacus | bayesianBody_000.ml | open Database
let db =
Map.empty
|> Map.add "0,,1" { in_spam = 0; in_ham = 9 }
|> Map.add "0.00" { in_spam = 0; in_ham = 19 }
|> Map.add "0.000" { in_spam = 0; in_ham = 11 }
|> Map.add "0.01" { in_spam = 0; in_ham = 15 }
|> Map.add "0.02" { in_spam = 0; in_ham = 8 }
|> Map.add "0.03" { in_spam = 0; in_ha... | null | https://raw.githubusercontent.com/mirage/spamtacus/9d9882d67b2b24292f7134e7ba87715c3555dae9/bayesian_filter/database/bayesianBody_000.ml | ocaml | open Database
let db =
Map.empty
|> Map.add "0,,1" { in_spam = 0; in_ham = 9 }
|> Map.add "0.00" { in_spam = 0; in_ham = 19 }
|> Map.add "0.000" { in_spam = 0; in_ham = 11 }
|> Map.add "0.01" { in_spam = 0; in_ham = 15 }
|> Map.add "0.02" { in_spam = 0; in_ham = 8 }
|> Map.add "0.03" { in_spam = 0; in_ha... | |
5a5f5aa8ed63e42c95477380e182eb5c954b32a840a6df5416b6cb0427ef70ce | haskell-openal/OpenAL | String.hs | {-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Sound.OpenAL.ALC.String
Copyright : ( c ) 2003 - 2016
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
----------------... | null | https://raw.githubusercontent.com/haskell-openal/OpenAL/5131984f172dffc43ca8b482f215d120523fb137/src/Sound/OpenAL/ALC/String.hs | haskell | # OPTIONS_HADDOCK hide #
------------------------------------------------------------------------------
|
Module : Sound.OpenAL.ALC.String
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
----------------------... | Copyright : ( c ) 2003 - 2016
Maintainer : < >
module Sound.OpenAL.ALC.String (
withALCString, peekALCString, peekALCStrings
) where
import Foreign.C.String ( withCString, peekCString )
import Foreign.Marshal.Array ( lengthArray0 )
import Foreign.Ptr ( Ptr, castPtr, plusPtr )
import Sound.OpenAL... |
f9340c4d6676edc9337072016e0ca44c0550c563fbd26023e396c2d4ff2052f4 | exercism/common-lisp | report.lisp | (in-package :test-exercises)
(defun make-totals (&key (pass 0) (fail 0) (errors 0))
(list :pass pass :fail fail :errors errors))
(defun add-totals (totals delta)
(incf (getf totals :pass) (getf delta :pass))
(incf (getf totals :fail) (getf delta :fail))
(incf (getf totals :errors) (getf delta :errors))
tota... | null | https://raw.githubusercontent.com/exercism/common-lisp/f3cdf6cf7e607138d1bb4d26c57999d4364af243/src/test-exercises/report.lisp | lisp | (in-package :test-exercises)
(defun make-totals (&key (pass 0) (fail 0) (errors 0))
(list :pass pass :fail fail :errors errors))
(defun add-totals (totals delta)
(incf (getf totals :pass) (getf delta :pass))
(incf (getf totals :fail) (getf delta :fail))
(incf (getf totals :errors) (getf delta :errors))
tota... | |
c1fc5aac7d3c32071db1184e501c0b2011da458f9d308a8b2a56ce823c689f0f | pfdietz/ansi-test | host-namestring.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Sep 12 06:22:40 2004
;;;; Contains: Tests of HOST-NAMESTRING
(deftest host-namestring.1
(let* ((vals (multiple-value-list
(host-namestring "host-namestring.txt")))
(s (first vals)))
(if (and (null (cdr vals))
... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/pathnames/host-namestring.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of HOST-NAMESTRING
(equal (host-namestring s) s)
Error tests | Author :
Created : Sun Sep 12 06:22:40 2004
(deftest host-namestring.1
(let* ((vals (multiple-value-list
(host-namestring "host-namestring.txt")))
(s (first vals)))
(if (and (null (cdr vals))
(or (null s)
(stringp s)
... |
23efdb51cf335f5877e03a4e5a6b25ae1e3859bff4f2712ff300a3de4a10159f | c-cube/stimsym | Completion.ml |
(* This file is free software. See file "license" for more details. *)
(** {1 Completion} *)
module E = Expr
type completion = {
text: string; (* the completed text *)
summary: string option; (* short description of this particular completion *)
}
type 'a within_ctx = {
start: int; (* offset at which complet... | null | https://raw.githubusercontent.com/c-cube/stimsym/38c744b5f770b52980abbfe7636a0dc2b91bbeb7/src/core/Completion.ml | ocaml | This file is free software. See file "license" for more details.
* {1 Completion}
the completed text
short description of this particular completion
offset at which completion starts
offset at which completion ends
find if there is a part of [str.[0 .. cursor_pos]]
that looks like the beginning of an id... |
module E = Expr
type completion = {
}
type 'a within_ctx = {
l : 'a list;
}
let find_suffix_id ~cursor_pos (s:string): (int * string * int) option =
let is_ok_char =
function 'A'..'Z' | 'a'..'z' | '0'..'9' -> true | _ -> false
in
let len = min cursor_pos (String.length s) in
let i = ref (len-1) in
... |
a3531035ae862733b9b94fd29571b4ddc42a39daaa57869ff182cf6347c44c2a | Beluga-lang/Beluga | lex_dump.ml | *
* usage : lex_dump FILE
* synopsis : pretty - prints the output of the lexer run on FILE .
* usage: lex_dump FILE
* synopsis: pretty-prints the output of the Beluga lexer run on FILE.
*)
open Support
open Beluga
module Loc = Location
let print_loc ppf l =
Format.fprintf ppf "L %d C %d-%d" (Loc.start_l... | null | https://raw.githubusercontent.com/Beluga-lang/Beluga/43dbf613ed7158372ad21e52bdd53841ea31505e/src/beluga/lex_dump.ml | ocaml | *
* usage : lex_dump FILE
* synopsis : pretty - prints the output of the lexer run on FILE .
* usage: lex_dump FILE
* synopsis: pretty-prints the output of the Beluga lexer run on FILE.
*)
open Support
open Beluga
module Loc = Location
let print_loc ppf l =
Format.fprintf ppf "L %d C %d-%d" (Loc.start_l... | |
4c53b0a21e19139decaedc08764d9eb7ae43901f4ef26ace543eb252b42ca415 | dpiponi/Moodler | xmidi13.hs |
do
(x0, y0) <- mouse
let (x, y) = quantise2 quantum (x0, y0)
root <- currentPlane
keyboard13 <- new' "input"
alias "keyboard13" keyboard13
trigger13 <- new' "input"
alias "trigger13" trigger13
modulation13 <- new' "input"
alias "modulation13" modulation13
bend13 <- new' "inp... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/xmidi13.hs | haskell |
do
(x0, y0) <- mouse
let (x, y) = quantise2 quantum (x0, y0)
root <- currentPlane
keyboard13 <- new' "input"
alias "keyboard13" keyboard13
trigger13 <- new' "input"
alias "trigger13" trigger13
modulation13 <- new' "input"
alias "modulation13" modulation13
bend13 <- new' "inp... | |
c8b88e47a7f216781f485ad8d74e469251f9dc461d81c74dc2fa9649e09a232a | gedge-platform/gedge-platform | rabbit_mgmt_db_handler.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 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_mgmt_db_handler).
-include_lib("r... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_management_agent/src/rabbit_mgmt_db_handler.erl | erlang |
Make sure our database is hooked in *before* listening on the network or
recovering queues (i.e. so there can't be any events fired before it starts).
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------... | 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 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mgmt_db_handler).
-include_lib("rabbit_... |
cff11f42c7f43c5175c0eb119992e28e141d01ed352a77dea95502a7e9e73361 | Idorobots/spartan | macros.rkt | #lang racket
Macro - expander tests .
(require "../testing.rkt")
(require "../../src/compiler/ast.rkt")
(require "../../src/compiler/passes/macro-expander.rkt")
(define bm (make-builtin-macros))
(define (l n) (location n n))
(describe
"built-in macros"
(it "let* macro works"
(assert (expand-macros (make-a... | null | https://raw.githubusercontent.com/Idorobots/spartan/ef3b032906655585d284f1c9a33a58f1e35cb180/test/compiler/macros.rkt | racket | #lang racket
Macro - expander tests .
(require "../testing.rkt")
(require "../../src/compiler/ast.rkt")
(require "../../src/compiler/passes/macro-expander.rkt")
(define bm (make-builtin-macros))
(define (l n) (location n n))
(describe
"built-in macros"
(it "let* macro works"
(assert (expand-macros (make-a... | |
2bdd3bdcd83acbdf1bc3c4174beb4209b4df55dc0635ec07a06b5815579e17bf | leo-zz-shuu/mfc | Ast.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Macaf.Ast where
import Data.Char (chr)
import Data.Text (Text)
import Prettyprinter
data UnOp = Not deriving (Eq, Show)
-- Binary operators
data BinOp = Add | Sub | Mul | Div deriving (Eq, Show)
data Typ... | null | https://raw.githubusercontent.com/leo-zz-shuu/mfc/aa690563307c1073162a9a5eae7955fc069674ec/src/Macaf/Ast.hs | haskell | # LANGUAGE OverloadedStrings #
Binary operators
FUNCTION FunctionName
data EndFunctionStmt =
END [FUNCTION [FunctionName]]
------------------------------------------
Pretty instances
------------------------------------------ | # LANGUAGE LambdaCase #
module Macaf.Ast where
import Data.Char (chr)
import Data.Text (Text)
import Prettyprinter
data UnOp = Not deriving (Eq, Show)
data BinOp = Add | Sub | Mul | Div deriving (Eq, Show)
data Type = TyInteger | TyReal deriving (Eq, Show)
data Bind =... |
f380e9c6aefb7e4a4318f1a169fc2379dd0fb6bc63d05bd111ba9ab1abbac1c2 | cedlemo/OCaml-GI-ctypes-bindings-generator | Wrap_mode.ml | open Ctypes
open Foreign
type t = None | Char | Word | Word_char
let of_value v =
if v = Unsigned.UInt32.of_int 0 then None
else if v = Unsigned.UInt32.of_int 1 then Char
else if v = Unsigned.UInt32.of_int 2 then Word
else if v = Unsigned.UInt32.of_int 3 then Word_char
else raise (Invalid_argument "Unexpect... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Wrap_mode.ml | ocaml | open Ctypes
open Foreign
type t = None | Char | Word | Word_char
let of_value v =
if v = Unsigned.UInt32.of_int 0 then None
else if v = Unsigned.UInt32.of_int 1 then Char
else if v = Unsigned.UInt32.of_int 2 then Word
else if v = Unsigned.UInt32.of_int 3 then Word_char
else raise (Invalid_argument "Unexpect... | |
4d45415b5d38c377646fcf3de991b9ec13c9cd18389b9557781a00dd908406ac | autotaker/smopeck | TypeUtil.hs | # LANGUAGE DataKinds #
module Smopeck.Spec.TypeUtil where
import qualified Data.Map as M
import Smopeck.Mock.Location
import Smopeck.Spec.Exp
import Smopeck.Spec.Lattice
import Smopeck.Spec.TypeExp
fPrim :: Primitive -> TypeExtension 'Desugar -> TypeRefine 'Desugar... | null | https://raw.githubusercontent.com/autotaker/smopeck/7e4ab8bf716125783ccaaf84076c992c2bca5c7f/test/Smopeck/Spec/TypeUtil.hs | haskell | # LANGUAGE DataKinds #
module Smopeck.Spec.TypeUtil where
import qualified Data.Map as M
import Smopeck.Mock.Location
import Smopeck.Spec.Exp
import Smopeck.Spec.Lattice
import Smopeck.Spec.TypeExp
fPrim :: Primitive -> TypeExtension 'Desugar -> TypeRefine 'Desugar... | |
01f80f3fcc297f4f95a68d26b531414814d7af8d4c24125b636638d7ea91afd3 | Andromedans/andromeda | common.ml | type name = string
type debruijn = int
let next =
(* Hide the counter in the closure *)
let counter = ref 0 in
fun () -> (incr counter ; string_of_int (!counter))
| null | https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/archive/old-andromeda/common.ml | ocaml | Hide the counter in the closure | type name = string
type debruijn = int
let next =
let counter = ref 0 in
fun () -> (incr counter ; string_of_int (!counter))
|
99511be944ca80421b180794544e6ed97e0a25cca9e04244ff56e6ed24f1c186 | s-expressionists/Cleavir | default-augmentation-classes.lisp | (cl:in-package #:cleavir-environment)
;;;; This file contains classes that can be used to augment an
;;;; environment with local information. Existing implementations can
;;;; not use these classes, because the existing macro expander must
;;;; know how to deal with them. They can be used in new
;;;; implementations... | null | https://raw.githubusercontent.com/s-expressionists/Cleavir/e0293780d356a9d563af9abf9317019f608b4e1d/Environment/default-augmentation-classes.lisp | lisp | This file contains classes that can be used to augment an
environment with local information. Existing implementations can
not use these classes, because the existing macro expander must
know how to deal with them. They can be used in new
implementations where the creator does not have any particular
opinion ab... | (cl:in-package #:cleavir-environment)
this one supplied by Cleavir .
instance has a NEXT slot that refers to the less specific
have first - class global environments must still create a dummy
(defclass entry ()
((%next :initarg :next :reader next)))
(defclass lexical-variable (entry)
((%name :initarg :nam... |
4d66ed3b28e057593e74b0ddfa351e68d5d33e434bf7d37512405e3558650c82 | yuriy-chumak/ol | list.scm | (define-library (scheme list)
(version 1.0)
(license MIT/LGPL3)
(keywords (scheme ol list))
(description "
List processing functions.")
(import
(scheme core))
(export
map for-each
fold foldr
has? ; * ol specific, fast version of member
)
(begin
(define (... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/9dc9df03d1158905403a386d8d337b8792697084/libraries/scheme/list.scm | scheme | * ol specific, fast version of member
(define (has? lst x)
(unless (null? lst)
(if (eq? (car lst) x)
#true
(has? (cdr lst) x))))
procedure: (map proc list1 list2 ...)
possible speedup:
((f a b c) (let loop ((a a)(b b)(c c))
(if (null? a)
#null
... | (define-library (scheme list)
(version 1.0)
(license MIT/LGPL3)
(keywords (scheme ol list))
(description "
List processing functions.")
(import
(scheme core))
(export
map for-each
fold foldr
)
(begin
(define (has? lst x)
(unless (null? lst)
(or ... |
17fb5bf21c1429bffaa0b73157ee3e462bde8b094678ac088095392300a8cede | facebook/duckling | Corpus.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 OverloadedStrings #-}
module Duckling.Ordinal.JA.Corpus
( corpus ) where
import Prelude
imp... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Ordinal/JA/Corpus.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 OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Ordinal.JA.Corpus
( corpus ) where
import Prelude
import Data.String
import Duckling.Locale
import Duckling.Ordinal.Types
import Duckling.Resolve
import Duckling.Testing.Types
corpus :: Corpus
corpus = (testContext {locale = makeLocale JA Nothin... |
fecf0bda5f0a2c8f498f0672b82002646b730321b0f9fbb9648382b9768f0336 | purescript/purescript | TestUtils.hs | module TestUtils where
import Prelude
import qualified Language.PureScript as P
import qualified Language.PureScript.CST as CST
import qualified Language.PureScript.AST as AST
import qualified Language.PureScript.Names as N
import Language.PureScript.Interactive.IO (findNodeProcess)
import Control.Arrow ((***), (>>>... | null | https://raw.githubusercontent.com/purescript/purescript/02bd6ae60bcd18cbfa892f268ef6359d84ed7c9b/tests/TestUtils.hs | haskell | |
should then be checked in, so that npm/bower etc is not required to run the
tests.
Simply rerun this (via ghci is probably easiest) when the support code needs
updating.
We skip the update if: `.last_updated` exists,
... and the needed directories exist,
... and everything else in `tests/support` is at leas... | module TestUtils where
import Prelude
import qualified Language.PureScript as P
import qualified Language.PureScript.CST as CST
import qualified Language.PureScript.AST as AST
import qualified Language.PureScript.Names as N
import Language.PureScript.Interactive.IO (findNodeProcess)
import Control.Arrow ((***), (>>>... |
d210fc7ad818e3ebd69c2cb64f1aad5c32e02be5ad35311cfbad9148baeee4d4 | bracevac/corrl | Parse.hs | ------------------------------------------------------------------------------
Copyright 2012 Microsoft Corporation .
--
-- This is free software; you can redistribute it and/or modify it under the
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the ro... | null | https://raw.githubusercontent.com/bracevac/corrl/416cd107087ac070a6bcabf8e7937211b6f415bb/koka/src/Syntax/Parse.hs | haskell | ----------------------------------------------------------------------------
This is free software; you can redistribute it and/or modify it under the
---------------------------------------------------------------------------
Parse concrete syntax.
--------------------------------------------------------------... | Copyright 2012 Microsoft Corporation .
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the root of this distribution .
module Syntax.Parse( parseProgramFromFile
, parseValueDef
, parseTypeDef
, p... |
de485800de2a76b158191e4ccfab73c8aecb5f42cd1cde006998cd93f951afaa | apache/couchdb-couch | couch_doc_json_tests.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/apache/couchdb-couch/21c8d37ac6ee1a7fed1de1f54f95a4d3cd9f5248/test/couch_doc_json_tests.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couch_doc_json_tests).
-include_lib("couch/include/couch_eunit.hrl").
-include_lib("couch/include/couch_db.hrl").
setup() ->
mock(couch_log),... |
5749ef764a48a227fade735ac15ce5f65603dc93a1aa8b6a37ae5936ffae72a0 | Bogdanp/racket-lz4 | xxhash32.rkt | #lang racket/base
(#%declare #:unsafe)
(require (for-syntax racket/base
racket/fixnum
racket/require-transform)
racket/contract
racket/match
racket/performance-hint
racket/require
racket/unsafe/ops
(filtered-in
(... | null | https://raw.githubusercontent.com/Bogdanp/racket-lz4/fc76297c1e18545257b641a649a961dab4fc1773/xxhash-lib/xxhash32.rkt | racket | help ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | #lang racket/base
(#%declare #:unsafe)
(require (for-syntax racket/base
racket/fixnum
racket/require-transform)
racket/contract
racket/match
racket/performance-hint
racket/require
racket/unsafe/ops
(filtered-in
(... |
7b55e93f9258437f5c596c956c74390283ac6af08586a52d0e73983aa80ebd68 | OCamlPro/freeton_wallet | commandNodeUpdate.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2021 OCamlPro SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/freeton_wallet/aec38be4d7adc6d93e706b8098b5880820d28863/src/freeton_wallet_lib/commandNodeUpdate.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2021 OCamlPro SAS
Public License version 2.1 , with the special exception on linking
open Ezcmd.V2
open EZCMD.TYPES
open Types
open EzFile . OP
let action ~image =
let config = Config.config () in
let node = Config.current_node config in
match ... |
60980c5d7b36715ca3fcdcdda616b255837320392e5cc43249b4459e42bdbf7b | karen/haskell-book | EitherT.hs | # LANGUAGE InstanceSigs #
newtype EitherT e m a =
EitherT { runEitherT :: m (Either e a) }
instance Functor m => Functor (EitherT e m) where
fmap f (EitherT mea) = EitherT $ (fmap . fmap) f mea
instance Applicative m => Applicative (EitherT e m) where
pure x = EitherT $ pure (Right x)
(<*>) :: Eithe... | null | https://raw.githubusercontent.com/karen/haskell-book/90bb80ec3203fde68fc7fda1662d9fc8b509d179/src/ch26/EitherT.hs | haskell | # LANGUAGE InstanceSigs #
newtype EitherT e m a =
EitherT { runEitherT :: m (Either e a) }
instance Functor m => Functor (EitherT e m) where
fmap f (EitherT mea) = EitherT $ (fmap . fmap) f mea
instance Applicative m => Applicative (EitherT e m) where
pure x = EitherT $ pure (Right x)
(<*>) :: Eithe... | |
2beaf20e4a347839c9073a405d24ed61fc6164eda1f256060c14259570976ab0 | Deducteam/Dedukti | z3arith.ml | module B = Kernel.Basic
module L = Common.Logic
module U = Common.Universes
module ZA = Z3.Arithmetic
module ZB = Z3.Boolean
module ZI = ZA.Integer
module Make (Spec : L.LRA_SPECIFICATION) = struct
type t = Z3.Expr.expr
type smt_model = Z3.Model.model
type ctx = Z3.context
let logic = `Lra
let mk_name : ... | null | https://raw.githubusercontent.com/Deducteam/Dedukti/7124a3edbaecf2d8a9046272cbc4d0d09cc3fad0/universo/solving/z3arith.ml | ocaml | module B = Kernel.Basic
module L = Common.Logic
module U = Common.Universes
module ZA = Z3.Arithmetic
module ZB = Z3.Boolean
module ZI = ZA.Integer
module Make (Spec : L.LRA_SPECIFICATION) = struct
type t = Z3.Expr.expr
type smt_model = Z3.Model.model
type ctx = Z3.context
let logic = `Lra
let mk_name : ... | |
042956fe0d79cf21e235168ccf7cf71f743712715c8886bb6493d3f6223ac912 | ghollisjr/cl-ana | package.lisp | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
;;;;
This file is part of cl - ana .
;;;;
;;;; cl-ana is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the Li... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/typespec/package.lisp | lisp |
cl-ana is free software: you can redistribute it and/or modify it
(at your option) any later version.
cl-ana is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License... | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
This file is part of cl - ana .
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
... |
3f9d7c4551836f266c12739a5fab08d9eb8a3b5e61d3418cea9a650114536b26 | jonase/reagent-tutorial | core.cljs | (ns reagent-tutorial.core
(:require [clojure.string :as string]
[reagent.core :as r]))
(enable-console-print!)
;; The "database" of your client side UI.
(def app-state
(r/atom
{:contacts
[{:first "Ben" :last "Bitdiddle" :email ""}
{:first "Alyssa" :middle-initial "P" :last "Hacker" :email ... | null | https://raw.githubusercontent.com/jonase/reagent-tutorial/24a3720feac9cb08da10792a163ecce7703ae6b9/src-cljs/reagent_tutorial/core.cljs | clojure | The "database" of your client side UI.
UI components
Render the root component | (ns reagent-tutorial.core
(:require [clojure.string :as string]
[reagent.core :as r]))
(enable-console-print!)
(def app-state
(r/atom
{:contacts
[{:first "Ben" :last "Bitdiddle" :email ""}
{:first "Alyssa" :middle-initial "P" :last "Hacker" :email ""}
{:first "Eva" :middle "Lu" :last ... |
2a4d7fbb39ef40aa3a697c2abb19872521ecc740bc9f297094439bf38c27ac4a | cornell-pl/forest | Students2.hs | # LANGUAGE TypeSynonymInstances , TemplateHaskell , QuasiQuotes , MultiParamTypeClasses , FlexibleInstances , DeriveDataTypeable , ScopedTypeVariables #
module Examples.Students2 where
import Language.Pads.Padsc hiding (take)
import Language.Forest.Forestc
import Language.Pads.GenPretty
import Language.Forest... | null | https://raw.githubusercontent.com/cornell-pl/forest/3772c1f44cdee0b705e927a14b54d84e60e224e6/src/Examples/Students2.hs | haskell | ?? [pads| type REd (r::String, d::String) = transform StringME r <=> Void using (const Void, const d) |]
, header :: Header
Auxiliary code
Collection of files containing all students in a particular major.
Collection of directories containing graduated students
; return (findFiles cs_md (\(r::FileI... | # LANGUAGE TypeSynonymInstances , TemplateHaskell , QuasiQuotes , MultiParamTypeClasses , FlexibleInstances , DeriveDataTypeable , ScopedTypeVariables #
module Examples.Students2 where
import Language.Pads.Padsc hiding (take)
import Language.Forest.Forestc
import Language.Pads.GenPretty
import Language.Forest... |
ae2bdc790e5208d5d3ff0edb4225e405b46da2ba3ccd8e3ef25eb0cb4ad7e5e3 | haskell/haskell-language-server | EmptyCaseParens.hs | test = True && case True of
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/EmptyCaseParens.hs | haskell | test = True && case True of
| |
2d6227e6fb9f716d89c7fe4f43cd4c77e357565348a808ca7b4ec83719f0f98b | Feldspar/raw-feldspar | Run.hs | | Monad for running Feldspar programs and C code back ends
module Feldspar.Run
( -- * Front end
module Feldspar
, module Feldspar.Run.Frontend
, module Feldspar.Run.Marshal
-- * Compilation options
, Selection, select, allExcept, selectBy
, CompilerOpts (..)
, ExternalCompilerOpts (..)
, Defaul... | null | https://raw.githubusercontent.com/Feldspar/raw-feldspar/d57ad4eae1624f9a2907d06e885a86a3f939072c/src/Feldspar/Run.hs | haskell | * Front end
* Compilation options
* Back ends | | Monad for running Feldspar programs and C code back ends
module Feldspar.Run
module Feldspar
, module Feldspar.Run.Frontend
, module Feldspar.Run.Marshal
, Selection, select, allExcept, selectBy
, CompilerOpts (..)
, ExternalCompilerOpts (..)
, Default (..)
, runIO
, compile'
, compile
, co... |
ce7b01da7cdaf559ba986875393f8da5e4aec05fadf064fa014ca56edf7a5537 | basho/yokozuna | yz_app.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2012 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may ob... | null | https://raw.githubusercontent.com/basho/yokozuna/e15fe64f9ef9318c0cc21754f3dfdd073d2dc77d/src/yz_app.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2012 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module... |
db057ff9f954193eb8348fc73262146ba4e42e78d404c279d4b39dae93a4642a | michiakig/LispInSmallPieces | chap2b.scm | $ I d : chap2b.scm , v 4.1 2006/11/09 18:55:33 queinnec Exp $
;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is part of the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
;;; Newest ve... | null | https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/src/chap2b.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is part of the files that accompany the book:
Newest version may be retrieved from:
Check the README file before using this file.
(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
Variants arount chapter 2 (u... | $ I d : chap2b.scm , v 4.1 2006/11/09 18:55:33 queinnec Exp $
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz
(define (f.evaluate e env fenv)
(if (atom? e)
(cond ((... |
66c9a1b5beb1343506200bf37bbf48a0c65a289d669da1a33e0db22b81577be5 | DSiSc/why3 | eliminate_symbol.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/transform/eliminate_symbol.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
open Term
open Decl
open Theory
let meta_elim_ls = register_meta "ls:eliminate" [MTlsymbol]
~desc:"Re... |
f750ce5a7a5ea9a1cbe47b84a3d5fbc7241a7a4d0773ec2d81435bf5a1f4278b | lexi-lambda/racket-macro-exercises | info.rkt | #lang info
(define collection 'multi)
(define deps
'())
(define build-deps
'("at-exp-lib"
"base"
"racket-doc"
["scribble-lib" #:version "1.16"]
"threading-doc"
"threading-lib"))
| null | https://raw.githubusercontent.com/lexi-lambda/racket-macro-exercises/ba4b45307bb6f5e5841a3fe892f3b8f1d8ec34a6/info.rkt | racket | #lang info
(define collection 'multi)
(define deps
'())
(define build-deps
'("at-exp-lib"
"base"
"racket-doc"
["scribble-lib" #:version "1.16"]
"threading-doc"
"threading-lib"))
| |
c846eaa7dd1334e40ac098a7ba0bd813a382eff75c9dcb7e49154a1d617ad067 | democracyworks/imbarcode | crc_test.cljc | (ns imbarcode.crc-test
(:require [imbarcode.crc :refer [IMb-fcs]]
[imbarcode.big-integer :as bi]
#?@(:clj [[clojure.test :refer [is deftest]]]
:cljs [[cljs.test :refer-macros [is deftest]]])))
(deftest IMb-fcs-test
(doseq [[data fcs] {(bi/from-string "00000000001122103B5C2004B1" 16) 0x051
... | null | https://raw.githubusercontent.com/democracyworks/imbarcode/8b4a821a42238c0bd62f5e19fbb51462741b4b9f/test/cljc/imbarcode/crc_test.cljc | clojure | (ns imbarcode.crc-test
(:require [imbarcode.crc :refer [IMb-fcs]]
[imbarcode.big-integer :as bi]
#?@(:clj [[clojure.test :refer [is deftest]]]
:cljs [[cljs.test :refer-macros [is deftest]]])))
(deftest IMb-fcs-test
(doseq [[data fcs] {(bi/from-string "00000000001122103B5C2004B1" 16) 0x051
... | |
5c0e6b31b4a02b775402cafed598b3bdc1d47656c0c42cb5d79d4cd163c2e037 | DianaPajon/tiger | TigerCanon.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
module TigerCanon
( linearize -- | Stm -> [Stm]
, basicBlocks -- | [Stm] -> ([[Stm]] , Label)
, traceSchedule -- | ( [[Stm]] , Label) -> [Stm]
, Trackable
, enterBlock'
, getBlock
, doExp
... | null | https://raw.githubusercontent.com/DianaPajon/tiger/30d360f02f5fc57883f988a1cbb581208ecd2744/src/TigerCanon.hs | haskell | # LANGUAGE TypeFamilies #
# LANGUAGE TypeSynonymInstances #
| Stm -> [Stm]
| [Stm] -> ([[Stm]] , Label)
| ( [[Stm]] , Label) -> [Stm] | # LANGUAGE FlexibleInstances #
module TigerCanon
, Trackable
, enterBlock'
, getBlock
, doExp
, doStm
, reorderExp
, reorderStm
, reorder
, fixBinops
)
where
import TigerTemp
import TigerTree
import TigerSymbol
import TigerUnique
import Contr... |
411744875804f47560d507605be4392e2d3e991886006af50c42d50b3ba0802f | Eventuria/demonstration-gsd | WriteModel.hs | # LANGUAGE InstanceSigs , TypeApplications #
module Eventuria.GSD.Write.Model.WriteModel.PropertyTesting.WriteModel where
import Test.QuickCheck
import Test.QuickCheck.Instances.Text ()
import Test.QuickCheck.Instances.Time ()
import Test.QuickCheck.Instances.UUID ()
import Generic.Random
import Eventuria.GSD.Write.... | null | https://raw.githubusercontent.com/Eventuria/demonstration-gsd/5c7692b310086bc172d3fd4e1eaf09ae51ea468f/test/Eventuria/GSD/Write/Model/WriteModel/PropertyTesting/WriteModel.hs | haskell | # LANGUAGE InstanceSigs , TypeApplications #
module Eventuria.GSD.Write.Model.WriteModel.PropertyTesting.WriteModel where
import Test.QuickCheck
import Test.QuickCheck.Instances.Text ()
import Test.QuickCheck.Instances.Time ()
import Test.QuickCheck.Instances.UUID ()
import Generic.Random
import Eventuria.GSD.Write.... | |
8abb67beefbcc114a39b0f5d692865fd87a87437f006cf4a2fb47100e1d658fa | input-output-hk/project-icarus-importer | Methods.hs | -- | Wallet endpoints implementation
module Pos.Wallet.Web.Methods
( module Pos.Wallet.Web.Methods.Backup
, module Pos.Wallet.Web.Methods.History
, module Pos.Wallet.Web.Methods.Info
, module Pos.Wallet.Web.Methods.Logic
, module Pos.Wallet.Web.Methods.Misc
, module Pos.Wallet... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet/src/Pos/Wallet/Web/Methods.hs | haskell | | Wallet endpoints implementation |
module Pos.Wallet.Web.Methods
( module Pos.Wallet.Web.Methods.Backup
, module Pos.Wallet.Web.Methods.History
, module Pos.Wallet.Web.Methods.Info
, module Pos.Wallet.Web.Methods.Logic
, module Pos.Wallet.Web.Methods.Misc
, module Pos.Wallet.Web.Methods.Payment
, module ... |
94dfd84837c802e4e7041b8e899548748274ea15d302b71f71e270a1d077cd7e | equill/restagraph | schema-db.lisp | Copyright 2021 - 2022 < >
;
Licensed under the GNU General Public License
- for details , see LICENSE.txt in the top - level directory
;;;; Schema-related functions, specific to storing the schema in the database.
(in-package #:restagraph)
(declaim (optimize (compilation-speed 0)
(... | null | https://raw.githubusercontent.com/equill/restagraph/9038d0a4065b87fa147553f22e50a009ab7fc0c1/src/schema-db.lisp | lisp |
Schema-related functions, specific to storing the schema in the database.
Install a schema version in the database
Do we have that version in the database?
It's there. Is it already the current version?
Yes, it is. Do nothing.
Not the current version, but valid. Update it
FIXME: wrap this in an explicit transac... | Copyright 2021 - 2022 < >
Licensed under the GNU General Public License
- for details , see LICENSE.txt in the top - level directory
(in-package #:restagraph)
(declaim (optimize (compilation-speed 0)
(speed 2)
(safety 3)
(debug 3)))
(defun c... |
950cbf19cdd10221c8abfc14240de30d3239fa68780699961914961eb54d278b | hsyl20/haskus-system | Netlink.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DataKinds #
| Netlink generic interface
module Haskus.System.Linux.Internals.Netlink
( NetlinkType (..)
, NetlinkSocket (..)
, NetlinkMessageHeader (..)
, NetlinkCommonFlag (..)
, NetlinkCommonFlags
, NetlinkGetFlag (..)
, Net... | null | https://raw.githubusercontent.com/hsyl20/haskus-system/2f389c6ecae5b0180b464ddef51e36f6e567d690/haskus-system/src/lib/Haskus/System/Linux/Internals/Netlink.hs | haskell | # LANGUAGE DeriveAnyClass #
=============================================================
From linux/include/uapi/linux/netlink.h
=============================================================
^ Routing/device hook
^ Reserved for user mode socket protocols
^ socket monitoring
^ netfilter/iptables ULOG
^ SELin... | # LANGUAGE DeriveGeneric #
# LANGUAGE DataKinds #
| Netlink generic interface
module Haskus.System.Linux.Internals.Netlink
( NetlinkType (..)
, NetlinkSocket (..)
, NetlinkMessageHeader (..)
, NetlinkCommonFlag (..)
, NetlinkCommonFlags
, NetlinkGetFlag (..)
, NetlinkGetFlags
, NetlinkNewFlag... |
2c66cf8f957db93709073d61b3aadcf7a360c9b17f790cd98b03d025811a5c81 | finnishtransportagency/harja | pdf.clj | (ns harja.palvelin.palvelut.kulut.pdf
(:require [harja.tyokalut.xsl-fo :as xsl-fo]
[harja.pvm :as pvm]))
(def ^:private border "solid 0.1mm black")
(def ^:private borders {:border-bottom border
:border-top border
:border-left border
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/89f1193c4b5455d123d0b837f37c181d2cee26ee/src/clj/harja/palvelin/palvelut/kulut/pdf.clj | clojure | (ns harja.palvelin.palvelut.kulut.pdf
(:require [harja.tyokalut.xsl-fo :as xsl-fo]
[harja.pvm :as pvm]))
(def ^:private border "solid 0.1mm black")
(def ^:private borders {:border-bottom border
:border-top border
:border-left border
... | |
0e45954570cdbf7939875c7bd5e0e038bcba74057af27b3b38b7627db1dfa862 | haskell-opengl/GLUT | PointP.hs |
( adapted from pointp.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program demonstrates point parameters and their effect on point
primit... | null | https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/examples/RedBook4/PointP.hs | haskell | CFloat has no Random instance, so we go via Float
We have to do this *after* createWindow, otherwise we have no OpenGL
compile time, we do a runtime check for the needed extension. |
( adapted from pointp.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program demonstrates point parameters and their effect on point
primit... |
45037d86aa00fc55051a8aeaa1b4ebc133b81a56692dec73a63b7b046223394f | GNOME/gimp-tiny-fu | basic1-logo.scm | ; DROP-SHADOW-LOGO
; draw the specified text over a background with a drop shadow
(define (apply-basic1-logo-effect img
logo-layer
bg-color
text-color)
(let* (
(width (car (gimp-drawable-width logo-layer))... | null | https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/basic1-logo.scm | scheme | DROP-SHADOW-LOGO
draw the specified text over a background with a drop shadow |
(define (apply-basic1-logo-effect img
logo-layer
bg-color
text-color)
(let* (
(width (car (gimp-drawable-width logo-layer)))
(height (car (gimp-drawable-height logo-layer)))
(bg-layer (car (g... |
f0756db2464eb3674750385ab582a8a00a89545dd9ad74df58c9777089b0ff90 | roburio/webauthn | webauthn.mli | * WebAuthn - authenticating users to services using public key cryptography
WebAuthn is a web standard published by the Its goal is to
standardize an interfacefor authenticating users to web - based
applications and services using public key cryptography . Modern web
browsers support WebAuthn ... | null | https://raw.githubusercontent.com/roburio/webauthn/00c1b4cf93a3cd0b0e85e6ae5dc6e052a1112342/src/webauthn.mli | ocaml | * [create origin] is a webauthn state, or an error if the origin does not
meet the specification (schema must be https, the host must be a valid
hostname. An optional port is supported: :4444
* [rpid t] is the relying party ID. Specifically, it is the effective domain
of the origin. Using registrable domai... | * WebAuthn - authenticating users to services using public key cryptography
WebAuthn is a web standard published by the Its goal is to
standardize an interfacefor authenticating users to web - based
applications and services using public key cryptography . Modern web
browsers support WebAuthn ... |
896a1ec03368a9526e9358ec35ab54be398a55f1ae7f000ad161665e1622fd78 | AndrasKovacs/ELTE-func-lang | Gy02_post.hs | # options_ghc -Wincomplete - patterns #
module Gy02 where
import Prelude hiding (Maybe(..), Either(..), Functor(..))
import Data.List.NonEmpty (NonEmpty)
-- data Either a b = Left a | Right b
f10 :: (a -> c, b -> c) -> Either a b -> c
f10 ( f , ) ( Left a ) = f a
f10 ( f , ) ( Right b ) = g b
--f10 (f, g) = either... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/93d35e7070bce72a3be55dd2f0d7ecb9bf1b8c84/2022-23-1/gyak3/Gy02_post.hs | haskell | data Either a b = Left a | Right b
f10 (f, g) = either f g
listák
------------------------------------------------------------------------------
applyMany [] x = []
applyMany (f:fs) x = f x : applyMany fs x
type NonEmptyList a = (a, [a])
(x:xs)
- Írj egy "toList :: NonEmptyList a -> [a]" függv... | # options_ghc -Wincomplete - patterns #
module Gy02 where
import Prelude hiding (Maybe(..), Either(..), Functor(..))
import Data.List.NonEmpty (NonEmpty)
f10 :: (a -> c, b -> c) -> Either a b -> c
f10 ( f , ) ( Left a ) = f a
f10 ( f , ) ( Right b ) = g b
f10 (f, g) = \e -> case e of
(Left a) -> f a
(Right b)... |
1721d135492db0b92ff14aa29fb5cc259aa6fe188f818d3ad7771cd8199fafa6 | ghc/nofib | Dom.hs | # LANGUAGE RankNTypes , BangPatterns , FlexibleContexts , Strict #
|
Module : Data . Graph . : ( c ) 2009
License : BSD3
The Lengauer - Tarjan graph dominators algorithm .
\[1\ ] Lengauer , Tarjan ,
/A Fast Algorithm for Finding Dominators in a Flowgraph/ , 1979 .... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/spectral/dom-lt/Dom.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
| /Dominators/.
Complexity as for @idom@
| /Post-dominators/.
Complexity as for @idom@.
| /Dominator tree/.
Complexity as for @idom@.
| /Post-dominator tree/.
C... | # LANGUAGE RankNTypes , BangPatterns , FlexibleContexts , Strict #
|
Module : Data . Graph . : ( c ) 2009
License : BSD3
The Lengauer - Tarjan graph dominators algorithm .
\[1\ ] Lengauer , Tarjan ,
/A Fast Algorithm for Finding Dominators in a Flowgraph/ , 1979 .... |
4886ae433e85464a7c457b10405da775b745aa7bfccfe234251ebe152d73c9fd | ghcjs/ghcjs-dom | FileError.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.FileError
(pattern NOT_FOUND_ERR, pattern SECURITY_ERR, pattern ABORT_ERR,
patt... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/FileError.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.FileError
(pattern NOT_FOUND_ERR, pattern SECURITY_ERR, pattern ABORT_ERR,
pattern NOT_READABLE_ERR, pattern ENCODING_ERR,
pattern NO_MODIFICATION_ALLOWED_ERR, pattern IN... |
4c527ff0ff1d30d7f6b31b7b83ef0d866b3a8871c65e8b7fd984edf0f64b8dbe | ocaml/oasis | OASISGraph.ml | (******************************************************************************)
OASIS : architecture for building OCaml libraries and applications
(* *)
Copyright ( C ) 2011 - 2016 ,
Copyrig... | null | https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/src/oasis/OASISGraph.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | OASIS : architecture for building OCaml libraries and applications
Copyright ( C ) 2011 - 2016 ,
Copyright ( C ) 2008 - 2011 , OCamlCore SARL
the Free Software Foundation ; either version 2.1 of the License , or ( at
You s... |
c62f932f633b9b853ababa8037976bafb82592f03287bd3b462d1e66f7e96b6c | helium/router | router_ct_utils.erl | -module(router_ct_utils).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("blockchain/include/blockchain_vars.hrl").
-include("console_test.hrl").
-include("router_ct_macros.hrl").
-export([
init_per_testcase/3,
end_per_testcase/2
]).
configures one router... | null | https://raw.githubusercontent.com/helium/router/04811018b5ac2f027ecbcd2594afa60141d1d610/test/router_ct_utils.erl | erlang | Router configuration
NOTE: elli must be running before router nodes start
Get router config results
Gather router nodes
check that the config loaded correctly on each router
connect nodes
make sure routers are also talking to the miners
accumulate the pubkey_bins of each miner
add both miners and router to cov... | -module(router_ct_utils).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("blockchain/include/blockchain_vars.hrl").
-include("console_test.hrl").
-include("router_ct_macros.hrl").
-export([
init_per_testcase/3,
end_per_testcase/2
]).
configures one router... |
726b2d6f56aa61006298dc77e452b1e8a48713a67f93b1baf8b99841b457c035 | kostmo/circleci-failure-tracker | DebugUtils.hs | {-# LANGUAGE OverloadedStrings #-}
module DebugUtils where
import Control.Monad (when)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Formatting
import Formatting.Clock
import System.Clock
import qualified Constants
debugList :: [String] -> IO ()
d... | null | https://raw.githubusercontent.com/kostmo/circleci-failure-tracker/393d10a72080bd527fdb159da6ebfea23fcd52d1/app/fetcher/src/DebugUtils.hs | haskell | # LANGUAGE OverloadedStrings #
| Wrap an 'IO' computation so that it prints out the execution time.
Borrowed from the "timeit" package here:
-1.0.0.0/docs/System-TimeIt.html
See rationale for adapting this function here:
-duration-in-haskell/#accurate-measuring
The timeit package does not consider wall clock t... |
module DebugUtils where
import Control.Monad (when)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Formatting
import Formatting.Clock
import System.Clock
import qualified Constants
debugList :: [String] -> IO ()
debugList = debugStr . unwords
deb... |
528f45bf9aa58a5ee09584e2d8c25aebe5afed0c0f52caeda8ec7852ae773755 | nominolo/scion | Compiler.hs | module Scion.Types.Compiler where
import Control.Applicative
import Data.Binary
import Data.Binary.Get()
import Data.String ( IsString(fromString) )
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
newtype Extension = Ext { extensionName :: T.Text }
de... | null | https://raw.githubusercontent.com/nominolo/scion/99b4589175665687181a932cd836850205625f71/src/Scion/Types/Compiler.hs | haskell | module Scion.Types.Compiler where
import Control.Applicative
import Data.Binary
import Data.Binary.Get()
import Data.String ( IsString(fromString) )
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
newtype Extension = Ext { extensionName :: T.Text }
de... | |
ca2742d1d617bf6f0df6795d53eee0bda5c18db0403901214fd4a5f7bfb458c0 | dharmatech/psilab | urman-tutorial-stroke.sps |
(import (rnrs)
(ypsilon cairo)
(psilab cairo with-cairo))
(let ((surface (cairo_image_surface_create CAIRO_FORMAT_ARGB32 120 120)))
(let ((cr (cairo_create surface)))
(with-cairo cr
(scale 120 120)
(set_line_width 0.1)
(set_source_rgb 0 0 0)
(rectangle 0.25 0.... | null | https://raw.githubusercontent.com/dharmatech/psilab/16b60e4ae63e3405d74117a50cd9ea313c179b33/cairo/examples/urman-tutorial-stroke.sps | scheme |
(import (rnrs)
(ypsilon cairo)
(psilab cairo with-cairo))
(let ((surface (cairo_image_surface_create CAIRO_FORMAT_ARGB32 120 120)))
(let ((cr (cairo_create surface)))
(with-cairo cr
(scale 120 120)
(set_line_width 0.1)
(set_source_rgb 0 0 0)
(rectangle 0.25 0.... | |
6c8c9be6c8dbd4061cc74691fcf2122d0a4d10b551dbe5599af89f61c86eec50 | input-output-hk/plutus-apps | State.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE MonoLocalBinds #-}
module Control.Monad.Freer.Extras.State (
use
, assign
, modifying ) where
import Control.Lens (ASetter, Getting, over, set, view)
import Control.Monad.Freer (Eff, Member)
import Control.Monad.Freer.State (State, get, gets, put)
use :: Mem... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/d637b1916522e4ec20b719487a8a2e066937aceb/freer-extras/src/Control/Monad/Freer/Extras/State.hs | haskell | # LANGUAGE MonoLocalBinds # | # LANGUAGE FlexibleContexts #
module Control.Monad.Freer.Extras.State (
use
, assign
, modifying ) where
import Control.Lens (ASetter, Getting, over, set, view)
import Control.Monad.Freer (Eff, Member)
import Control.Monad.Freer.State (State, get, gets, put)
use :: Member (State s) effs => Getting a s ... |
9d8ac2dc859523f586ec93df5d24e73c9a68e83a80c66190cb92e35f98d5b717 | rudymatela/extrapolate | overflow-main.hs | -- main for paperExample1
instance SubTypes I
instance SubTypes T
main :: IO ()
main = do
smartCheck scStdArgs{format = PrintString} prop
| null | https://raw.githubusercontent.com/rudymatela/extrapolate/0b3ca28eed0d04358b2fb033664476f8b29821a6/bench/smartcheck/overflow-main.hs | haskell | main for paperExample1 |
instance SubTypes I
instance SubTypes T
main :: IO ()
main = do
smartCheck scStdArgs{format = PrintString} prop
|
133788e3df1b9fc24a3567b92c54095c7e6b89a76ab28a9036e19798e2d5b563 | Clozure/ccl-tests | string.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Sep 30 19:16:59 2002
;;;; Contains: Tests for string related functions and classes
(in-package :cl-test)
(deftest string.1
(subtypep* 'string 'array)
t t)
(deftest string.2
(subtypep* 'string 'vector)
t t)
(deftest string.3
(subtypep* 'string 'sequ... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/string.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for string related functions and classes
Nothing in the spec says that STRING returns a fresh string. Table-driven implementation is allowed.
Error tests | Author :
Created : Mon Sep 30 19:16:59 2002
(in-package :cl-test)
(deftest string.1
(subtypep* 'string 'array)
t t)
(deftest string.2
(subtypep* 'string 'vector)
t t)
(deftest string.3
(subtypep* 'string 'sequence)
t t)
(deftest string.4
(let ((s (string #\a)))
(values (notnot (stringp... |
e629f3ab8e302afdc2c8eb60f10efe80766bd15a8bddd136e9d3a8da1037cd1a | practicalli/clojure-through-code | xx-fibonachi.clj | ;; Fibonachi series
simple description : the next number is the sum of the previous two , starting with 1 and 2
;;;;; Some references
;; -in-clojure/
;; could define a data structure, large enough for any series length you want
(def fibonachi-data #{1 2 3 5 8 13 21 34 55 89 144 223})
;; The evaluation of the set ... | null | https://raw.githubusercontent.com/practicalli/clojure-through-code/82834cdab6b5315aea630386c851200f98d5e48f/src/clojure_through_code/xx-fibonachi.clj | clojure | Fibonachi series
Some references
-in-clojure/
could define a data structure, large enough for any series length you want
The evaluation of the set is not ordered, so use a function to create a sorted output
We can sort in accending < order, or decending > order
We can of course also create an ordered set to star... | simple description : the next number is the sum of the previous two , starting with 1 and 2
(def fibonachi-data #{1 2 3 5 8 13 21 34 55 89 144 223})
(sorted-set-by > 1 2 3 5 8 13 21 34 55 89 144 223)
(def fibonachi-data (sorted-set 1 2 3 5 8 13 21 34 55 89 144 223))
fibonachi-data
Clojure is very good at ge... |
3bdb7ed57e44b5ea1852a52aaeada9f8a296b392f783aa4a32a7efa7d56ec273 | fp-works/2019-winter-Haskell-school | Checks.hs | module Checks (checks) where
import Exercise1
import Exercise2
import Exercise3
import Exercise4
import Data.Numbers.Primes
import Test.QuickCheck
exercise1Fun1 :: [Integer] -> Bool
exercise1Fun1 xs = fun1Original xs == fun1 xs
generatePositives :: Gen In... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week4/weining/test/Checks.hs | haskell | module Checks (checks) where
import Exercise1
import Exercise2
import Exercise3
import Exercise4
import Data.Numbers.Primes
import Test.QuickCheck
exercise1Fun1 :: [Integer] -> Bool
exercise1Fun1 xs = fun1Original xs == fun1 xs
generatePositives :: Gen In... | |
8b09917f4b65976bf41f3d9e1ddea3f3c03fa9fb78430ba6d635c93fb7a6f864 | jacquev6/General | IntRange.ml | open Int.O
open Bool.O
open Functions.Function1.O
type full = {
min: int;
max: int;
step: int;
}
type t =
| Empty
| Ascending of full
| Descending of full
let empty = Empty
let make ?(start=0) ?(step=1) stop =
We normalize everything here , so that to_list is simpler , and Equate . Poly is appropriate... | null | https://raw.githubusercontent.com/jacquev6/General/5237123668e939c0cb83aa3e1c4756473336bc7e/src/Foundations/IntRange.ml | ocaml | open Int.O
open Bool.O
open Functions.Function1.O
type full = {
min: int;
max: int;
step: int;
}
type t =
| Empty
| Ascending of full
| Descending of full
let empty = Empty
let make ?(start=0) ?(step=1) stop =
We normalize everything here , so that to_list is simpler , and Equate . Poly is appropriate... | |
f3c450897675c5499e880e50bc3657efc058fbfa83c0d273aa1954e6a8c698e7 | BetterThanTomorrow/joyride | zippers.cljs | (ns zippers
(:require [clojure.zip :as zip]))
;; example from: #example-5ceef576e4b0ca44402ef735
(defn zip-walk [f z]
(if (zip/end? z)
(zip/root z)
(recur f (zip/next (f z)))))
(comment
(->> [1 2 [3 4]]
zip/vector-zip
(zip-walk
(fn [loc]
(if (zip/branch? loc)
... | null | https://raw.githubusercontent.com/BetterThanTomorrow/joyride/94b1064f6ee7dd34fa55e9c40b5a2f34178d67ef/examples/.joyride/scripts/zippers.cljs | clojure | example from: #example-5ceef576e4b0ca44402ef735 | (ns zippers
(:require [clojure.zip :as zip]))
(defn zip-walk [f z]
(if (zip/end? z)
(zip/root z)
(recur f (zip/next (f z)))))
(comment
(->> [1 2 [3 4]]
zip/vector-zip
(zip-walk
(fn [loc]
(if (zip/branch? loc)
loc
= > [ 2 4 [ 6 8 ] ]
) |
e0b7d3764768f61c3ac4458e84d4ec52693b754bc9736eecac36bb9bc086f919 | datacraft-dsc/starfish-clj | test_remote.clj | (ns starfish.test-remote
(:require [clojure.test :refer :all]
[starfish.core :as sf :refer :all])
(:import (sg.dex.starfish.impl.remote RemoteAgent)))
(deftest remote-agent-test
(testing "Remote Instantiation with DID"
(let [d (random-did)
bad-ddo "{}"
ra (remote-agent d bad-d... | null | https://raw.githubusercontent.com/datacraft-dsc/starfish-clj/d199c0f7c96f5dd6941507556bc3070396eb3a04/src/test/clojure/starfish/test_remote.clj | clojure | (ns starfish.test-remote
(:require [clojure.test :refer :all]
[starfish.core :as sf :refer :all])
(:import (sg.dex.starfish.impl.remote RemoteAgent)))
(deftest remote-agent-test
(testing "Remote Instantiation with DID"
(let [d (random-did)
bad-ddo "{}"
ra (remote-agent d bad-d... | |
a9da58b4c16d0a82f768dc2f3430312f1e8e6ef3223016c24564640cb19fca57 | haskell-nix/hnix-store | Hash.hs | {-|
Description : Cryptographic hashing interface for hnix-store, on top
of the cryptohash family of libraries.
-}
# language AllowAmbiguousTypes #
# language TypeFamilies #
{-# language ScopedTypeVariables #-}
# language DataKinds #
# language ExistentialQuantification #
{-# language C... | null | https://raw.githubusercontent.com/haskell-nix/hnix-store/5e55781516178939bf9a86f943e120e6ad775b9d/hnix-store-core/src/System/Nix/Internal/Hash.hs | haskell | |
Description : Cryptographic hashing interface for hnix-store, on top
of the cryptohash family of libraries.
# language ScopedTypeVariables #
# language CPP # | # language AllowAmbiguousTypes #
# language TypeFamilies #
# language DataKinds #
# language ExistentialQuantification #
module System.Nix.Internal.Hash
( NamedAlgo(..)
, SomeNamedDigest(..)
, mkNamedDigest
, encodeDigestWith
, decodeDigestWith
, mkStorePathHash
)
where
import qualifi... |
b7e97bd2ef19d7f76db5129e89128be10551f9a2328cfc79d97edc7ee6e383ad | haskell/ghcide | FileStore.hs | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE CPP #
# LANGUAGE TypeFamilies #
module Development.IDE.Core.FileStore(
getFileContents,
getVirtualFile,
setFileModified,
setSomethingModified,
fileStoreRules,
modificationTime,
... | null | https://raw.githubusercontent.com/haskell/ghcide/3ef4ef99c4b9cde867d29180c32586947df64b9e/src/Development/IDE/Core/FileStore.hs | haskell | ^ get the contents of a virtual file
^ set a specific file to a value. If Nothing then we are ignoring these
signals anyway so can just say something was modified
Dir.getModificationTime is surprisingly slow since it performs
a ton of conversions. Since we do not actually care about
the format of the time, we c... | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE CPP #
# LANGUAGE TypeFamilies #
module Development.IDE.Core.FileStore(
getFileContents,
getVirtualFile,
setFileModified,
setSomethingModified,
fileStoreRules,
modificationTime,
... |
9dd4b33f6d3d5e9cd0b6b8f42300265ff1614ba9b7ea292de0950f45e7a8b98c | jonase/eastwood | validate_recur.clj | Copyright ( c ) , Rich Hickey & contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be b... | null | https://raw.githubusercontent.com/jonase/eastwood/caf87206706d51d59b04c5ad0c61ff7683d70cb1/copied-deps/eastwood/copieddeps/dep2/clojure/tools/analyzer/passes/jvm/validate_recur.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , Rich Hickey & contributors .
(ns eastwood.copieddeps.dep2.clojure.tools.analyzer.passes.jvm.validate-recur
(:require [eastwood.copieddeps.dep1.clojure.tools.analyzer.ast :refer [update-children]]
[eastwood.copieddeps.dep1.clojure.tools.analyzer.utils :refer [-source-info]]))
(def... |
17b2e7e87d54536174eb444290e43604de8736d0d09e074070b07be6fb5fa79c | REMath/mit_16.399 | lpretty_Print.mli | (* lpretty_Print.mli *)
open Linear_Syntax
val lpretty_print : lcom -> unit
| null | https://raw.githubusercontent.com/REMath/mit_16.399/3f395d6a9dfa1ed232d307c3c542df3dbd5b614a/project/Generic-FW-BW-REL-Abstract-Interpreter/lpretty_Print.mli | ocaml | lpretty_Print.mli | open Linear_Syntax
val lpretty_print : lcom -> unit
|
483511767115d2cefb0c48740498278388fa7e1082664283749fa40c52d03f42 | janestreet/ecaml | buffer.mli | (** Buffers are used to hold the contents of files that are being visited; there may also
be buffers that are not visiting files.
- [(Info-goto-node "(elisp)Buffers")] *)
open! Core
open! Import0
open! Ecaml_filename
open! Async_kernel
include Value.Subtype with type t = Buffer0.t
type buffer := t
include E... | null | https://raw.githubusercontent.com/janestreet/ecaml/25a5a2972b3a94f5529a46363b37670a6c1de195/src/buffer.mli | ocaml | * Buffers are used to hold the contents of files that are being visited; there may also
be buffers that are not visiting files.
- [(Info-goto-node "(elisp)Buffers")]
* Accessors
* - [(describe-function 'buffer-file-name)]
* - [(describe-function 'buffer-live-p) ]
* - [(describe-function 'buffer-name) ... |
open! Core
open! Import0
open! Ecaml_filename
open! Async_kernel
include Value.Subtype with type t = Buffer0.t
type buffer := t
include Equal.S with type t := t
module Compare_by_name : Comparable.S_plain with type t = t
val file_name : t -> string option
val is_live : t -> bool
val name : t -> string option
va... |
2c8cc79bf3dbad9aad0e2856f495af4370373e1b6c5f79bb2b80bd2c9b409175 | tip-org/tools | Pretty.hs | {-# LANGUAGE RecordWildCards, OverloadedStrings #-}
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
# LANGUAGE GeneralizedNewtypeDeriving #
module Tip.Pretty where
import Text.PrettyPrint
infixl 1 $\
-- | Typeclass for pretty things
class Pretty a where
pp :: a -> Doc
instance Pretty Doc where
pp = id
... | null | https://raw.githubusercontent.com/tip-org/tools/34350072587bd29157d18331eb895a1b2819555f/tip-lib/src/Tip/Pretty.hs | haskell | # LANGUAGE RecordWildCards, OverloadedStrings #
# LANGUAGE TypeSynonymInstances, FlexibleInstances #
| Typeclass for pretty things
| Pretty to string
| Print something pretty
| Typeclass for variables
| The string in a variable
| Variable to 'Doc'
| Infix 'hang'
| Conditional parentheses | # LANGUAGE GeneralizedNewtypeDeriving #
module Tip.Pretty where
import Text.PrettyPrint
infixl 1 $\
class Pretty a where
pp :: a -> Doc
instance Pretty Doc where
pp = id
ppRender :: Pretty a => a -> String
ppRender = render . pp
pprint :: Pretty a => a -> IO ()
pprint = putStrLn . ppRender
instance PrettyVar... |
8c7396e8b0ed71251ca2e05a5ce5954f3ea930db5013164edacc507c06643912 | Sintrastes/Montague | Dialog.hs |
module Montague.Experimental.Dialog where
import Montague.Experimental.Typed
-- An experimental module for creating chat/dialog systems.
| Takes a method of deriving the initial " world " from IO ,
-- together with a method for responding to user input, and
-- constructs a dialog system.
dialog :: IO w -> (Term (... | null | https://raw.githubusercontent.com/Sintrastes/Montague/9a2b92377cee761f7d2f93e0e7748165342fb901/src/Montague/Experimental/Dialog.hs | haskell | An experimental module for creating chat/dialog systems.
together with a method for responding to user input, and
constructs a dialog system.
Note: The simplest chat bot (assistant) would simply
take as fact anything that the user tells them.
For instance "My name is nate" would make the
bot store the fact na... |
module Montague.Experimental.Dialog where
import Montague.Experimental.Typed
| Takes a method of deriving the initial " world " from IO ,
dialog :: IO w -> (Term () -> w -> (String, w)) -> IO ()
dialog getWorld respond = undefined
" I am 28 years old " would store the fact age(user , years(28 ) ) .
|
2e7c6fc131d39aae9d47254ad5de36d14e0b3bb44152813c148a42c37c4a7478 | terezka/cherry-core | Dict.hs |
|
Module : Dict
Description : A dictionary mapping unique keys to values .
License : BSD 3
Maintainer :
Stability : experimental
Portability : POSIX
A dictionary mapping unique keys to values . The keys can be any comparable type . This includes ` Int ` , ` Float ` , ` Time ` , ` Char ... | null | https://raw.githubusercontent.com/terezka/cherry-core/d9bd446e226fc9b04783532969fa670211a150c6/src/Dict.hs | haskell | * Dictionaries
* Build
* Query
* Lists
* Transform
* Combine
DICTIONARIES
| Create an empty dictionary.
| Determine if a key is in a dictionary.
| Determine the number of key-value pairs in the dictionary.
| Determine if a dictionary is empty.
> isEmpty empty == True
| Insert a key-value pair into a dict... |
|
Module : Dict
Description : A dictionary mapping unique keys to values .
License : BSD 3
Maintainer :
Stability : experimental
Portability : POSIX
A dictionary mapping unique keys to values . The keys can be any comparable type . This includes ` Int ` , ` Float ` , ` Time ` , ` Char ... |
40e4281e4747424147964f1546e0aec8809d67db8a5a971b892ec7d9449f6fe4 | nuvla/api-server | credential_ssh_key_test.cljc | (ns sixsq.nuvla.server.resources.spec.credential-ssh-key-test
(:require
[clojure.test :refer [deftest]]
[sixsq.nuvla.server.resources.credential :as cred]
[sixsq.nuvla.server.resources.spec.credential-ssh-key :as ssh-key]
[sixsq.nuvla.server.resources.spec.spec-test-utils :as stu]))
(def valid-acl
... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/test/sixsq/nuvla/server/resources/spec/credential_ssh_key_test.cljc | clojure | there are no mandatory keywords | (ns sixsq.nuvla.server.resources.spec.credential-ssh-key-test
(:require
[clojure.test :refer [deftest]]
[sixsq.nuvla.server.resources.credential :as cred]
[sixsq.nuvla.server.resources.spec.credential-ssh-key :as ssh-key]
[sixsq.nuvla.server.resources.spec.spec-test-utils :as stu]))
(def valid-acl
... |
5f9836c470dd03f5fed51c3fe74c4919bf20b704389d7b74dd6b3fbcbe267218 | sogaiu/alc.x-as-tests | validate.clj | (ns alc.x-as-tests.impl.validate
(:require
[alc.x-as-tests.impl.ex :as ex]
[clj-kondo.core :as cc]
[clojure.string :as cs]))
(defn check-source
[src]
(let [results-map (with-in-str src
(cc/run! {:lint ["-"]}))
num-errs (get-in results-map [:summary :error])]
(when (< 0 ... | null | https://raw.githubusercontent.com/sogaiu/alc.x-as-tests/86cfc58393f4d81e1a74d58e85f89717afb3d9b0/src/alc/x_as_tests/impl/validate.clj | clojure | (ns alc.x-as-tests.impl.validate
(:require
[alc.x-as-tests.impl.ex :as ex]
[clj-kondo.core :as cc]
[clojure.string :as cs]))
(defn check-source
[src]
(let [results-map (with-in-str src
(cc/run! {:lint ["-"]}))
num-errs (get-in results-map [:summary :error])]
(when (< 0 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.