_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 |
|---|---|---|---|---|---|---|---|---|
a3c2bc6a3125599fb40b911ee614f7e3f50d8312630b3438b23c96f1e4a0887f | tstenhaug/trivial-irc | replies.lisp | Copyright ( c ) 2008 - 2017 < > .
;; See the LICENSE file for licensing information.
(in-package #:trivial-irc)
(defparameter *reply-number->reply-name*
(let ((hash-table (make-hash-table)))
(mapcar #'(lambda (reply)
(destructuring-bind (reply-number reply-name) reply
(setf (gethash reply-number hash... | null | https://raw.githubusercontent.com/tstenhaug/trivial-irc/7cb6e99e68c5391a31c693fcc65144d74ed4063a/replies.lisp | lisp | See the LICENSE file for licensing information.
this list borrowed from cl-irc
Seen in dancer ircd source
Seen in dancer ircd source
Seen in dancer ircd source
Seen in dancer ircd source
Seen in dancer ircd source
Seen in dancer ircd source
Seen in dancer ircd source
Seen in dancer ircd source
Seen in dancer... | Copyright ( c ) 2008 - 2017 < > .
(in-package #:trivial-irc)
(defparameter *reply-number->reply-name*
(let ((hash-table (make-hash-table)))
(mapcar #'(lambda (reply)
(destructuring-bind (reply-number reply-name) reply
(setf (gethash reply-number hash-table) reply-name)))
'((1 :rpl_welcome)
... |
7fd058a671a7aca4d5a23415e5a4359b7073b571f90e777b9ec438a092dfe6e4 | jackfirth/rebellion | guard.rkt | #lang racket/base
(provide guard-present)
(require (for-syntax racket/base
racket/syntax)
racket/block
rebellion/base/option
rebellion/private/guarded-block
syntax/parse/define)
(module+ test
(require (submod "..")
rackunit))
;@------------------... | null | https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/base/option/private/guard.rkt | racket | @----------------------------------------------------------------------------------------------------
This is used to give the generated identifiers readable names, and to make it clear which
option identifiers are associated with which present value identifiers. We could just use an
identifier like "tmp" for all of... | #lang racket/base
(provide guard-present)
(require (for-syntax racket/base
racket/syntax)
racket/block
rebellion/base/option
rebellion/private/guarded-block
syntax/parse/define)
(module+ test
(require (submod "..")
rackunit))
(begin-for-syntax
... |
51de890fe50b07355e5d87b8f00a4c04646686732754a7c6aa2c1829a666a97e | input-output-hk/hydra | TxIn.hs | module Hydra.Cardano.Api.TxIn where
import Hydra.Cardano.Api.Prelude
import qualified Cardano.Ledger.Alonzo.TxInfo as Ledger
import qualified Cardano.Ledger.TxIn as Ledger
import qualified Data.Set as Set
import qualified Plutus.V2.Ledger.Api as Plutus
-- * Extras
| Create a ' TxIn ' ( a.k.a UTXO ) from a transac... | null | https://raw.githubusercontent.com/input-output-hk/hydra/5d4369eef06688b9110ceafef912d50de2da52ae/hydra-cardano-api/src/Hydra/Cardano/Api/TxIn.hs | haskell | * Extras
| Access inputs of a transaction, as an ordered list.
| Access inputs of a transaction, as an ordered set.
* Type Conversions | module Hydra.Cardano.Api.TxIn where
import Hydra.Cardano.Api.Prelude
import qualified Cardano.Ledger.Alonzo.TxInfo as Ledger
import qualified Cardano.Ledger.TxIn as Ledger
import qualified Data.Set as Set
import qualified Plutus.V2.Ledger.Api as Plutus
| Create a ' TxIn ' ( a.k.a UTXO ) from a transaction and out... |
92bee97a8529e4bfd142e2028ff88e64d9ecacf60a153e9a5f6503470e087be9 | njordhov/droidbox | pallet.clj | ;;; Pallet project configuration file
(require
'[droidbox.groups.droidbox :refer [droidbox]])
(defproject droidbox
:provider {:jclouds
{:node-spec
{:image {:os-family :ubuntu :os-version-matches "12.04"
:os-64-bit true}}}}
:groups [droidbox])
| null | https://raw.githubusercontent.com/njordhov/droidbox/1fd77998a38fb6e4063bd2f1429f2af7666f44cb/pallet.clj | clojure | Pallet project configuration file |
(require
'[droidbox.groups.droidbox :refer [droidbox]])
(defproject droidbox
:provider {:jclouds
{:node-spec
{:image {:os-family :ubuntu :os-version-matches "12.04"
:os-64-bit true}}}}
:groups [droidbox])
|
efcb7f53b9b71bc44406dc0092b8a453074e59d20b9708078d4c18138bb0c2cc | OCamlPro/operf-micro | main.ml |
This benchmark test the capacity of the compiler to inline Array.fold_left
and promote reference assignment to local mutable variables , or continuarion
variables .
This is not possible yet as of 4.03
This benchmark test the capacity of the compiler to inline Array.fold_left
and promote reference... | null | https://raw.githubusercontent.com/OCamlPro/operf-micro/d5d2bf2068204b889321b0c5a7bc0d079c0fca80/share/operf-micro/benchmarks/kahan_sum/main.ml | ocaml |
This benchmark test the capacity of the compiler to inline Array.fold_left
and promote reference assignment to local mutable variables , or continuarion
variables .
This is not possible yet as of 4.03
This benchmark test the capacity of the compiler to inline Array.fold_left
and promote reference... | |
09fa5d9e4553b555bdba9b8e843a847890e1a63a5ae51d17e66ee87d326c713f | footprintanalytics/footprint-web | fingerprint.clj | (ns metabase.sync.analyze.fingerprint
"Analysis sub-step that takes a sample of values for a Field and saving a non-identifying fingerprint
used for classification. This fingerprint is saved as a column on the Field it belongs to."
(:require [clojure.set :as set]
[clojure.tools.logging :as log]
... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/sync/analyze/fingerprint.clj | clojure | All Fields who get new fingerprints should get marked as having the latest fingerprint version, but we'll
clear their values for `last_analyzed`. This way we know these fields haven't "completed" analysis for the
latest fingerprints.
+---------------------------------------------------------------------------------... | (ns metabase.sync.analyze.fingerprint
"Analysis sub-step that takes a sample of values for a Field and saving a non-identifying fingerprint
used for classification. This fingerprint is saved as a column on the Field it belongs to."
(:require [clojure.set :as set]
[clojure.tools.logging :as log]
... |
082aff250f974c80f6c3d01d85ff5fab275918e5f5ffd24cf44a306fe1bfaa7b | shriram/smol | semantics.rkt | #lang racket
(require [for-syntax syntax/parse])
(require smol/hof/semantics)
(provide [except-out [all-from-out smol/hof/semantics]
;defvar
;deffun
lambda λ
letrec
let
let*
... | null | https://raw.githubusercontent.com/shriram/smol/fff99a69d07459bffd6b124ac8f400d4d36408de/dyn-scope-is-bad/semantics.rkt | racket | defvar
deffun | #lang racket
(require [for-syntax syntax/parse])
(require smol/hof/semantics)
(provide [except-out [all-from-out smol/hof/semantics]
lambda λ
letrec
let
let*
set!
#%top
#... |
fb6cb07193f6be439e6bca8852bd899d9aa27d0541c1eb89a739275ac820607e | zcaudate/hara | ansi_test.clj | (ns hara.string.base.ansi-test
(:use hara.test)
(:require [hara.string.base.ansi :refer :all]))
^{:refer hara.string.base.ansi/encode-raw :added "3.0"}
(fact "encodes the raw ansi modifier codes to string"
(encode-raw [30 20])
=> "[30;20m")
^{:refer hara.string.base.ansi/encode :added "3.0"}
(fact "encodes ... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/string/base/ansi_test.clj | clojure | Text:
[blue cyan green grey magenta red white yellow]
Background:
[on-blue on-cyan on-green on-grey
on-magenta on-red on-white on-yellow]
Attributes:
[blink bold concealed dark reverse-color underline] | (ns hara.string.base.ansi-test
(:use hara.test)
(:require [hara.string.base.ansi :refer :all]))
^{:refer hara.string.base.ansi/encode-raw :added "3.0"}
(fact "encodes the raw ansi modifier codes to string"
(encode-raw [30 20])
=> "[30;20m")
^{:refer hara.string.base.ansi/encode :added "3.0"}
(fact "encodes ... |
cb34e481d13533e95b8b699455bbb5efec237f058e9d4a562f6ac5760b33529f | simingwang/emqx-plugin-kafkav5 | application.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2021 . 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 applic... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/kernel-8.3/src/application.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 l... | Copyright Ericsson AB 1996 - 2021 . 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(application).
-export([ensure_all_started/1, ensure_all_started/2, start/1, start/2,
start_boot/1, start_b... |
62b0034cd1b443501390aba1eae19751417afbd130b3f8a273b5c965ad0f77b4 | ninjudd/jiraph | masai_common.clj | (ns flatland.jiraph.layer.masai-common
(:use [flatland.useful.utils :only [or-max]]
[flatland.useful.state :only [put!]])
(:require [flatland.masai.db :as db]
[flatland.retro.core :as retro])
(:import [java.io ByteArrayInputStream ByteArrayOutputStream
DataOutputStream DataInputStr... | null | https://raw.githubusercontent.com/ninjudd/jiraph/e2897cf4770ead40e574261cd294d2c6701703e8/src/flatland/jiraph/layer/masai_common.clj | clojure | (ns flatland.jiraph.layer.masai-common
(:use [flatland.useful.utils :only [or-max]]
[flatland.useful.state :only [put!]])
(:require [flatland.masai.db :as db]
[flatland.retro.core :as retro])
(:import [java.io ByteArrayInputStream ByteArrayOutputStream
DataOutputStream DataInputStr... | |
ef17a93c2d927d3444ede55dac27355f2fd74b98cdafc4bf780fb26784e36730 | dimitri/pginstall | frontend.lisp | ;;;
;;; The repository server is also offering a web frontend to manage the
;;; information found in the database, read logs, etc.
;;;
;;;
(in-package #:pginstall.server)
(defvar *dashboard-menu* '(("/" . "Build Queue")
("/extension" . "Extensions")
("/an... | null | https://raw.githubusercontent.com/dimitri/pginstall/66e4274fc544c48be03c719f8d3f03955649a994/src/server/frontend.lisp | lisp |
The repository server is also offering a web frontend to manage the
information found in the database, read logs, etc.
Tools to render specific set of pages
all the entries in the menu only work properly with a database
connection (that has been setup), so refrain from displaying them
when the basic setup ha... |
(in-package #:pginstall.server)
(defvar *dashboard-menu* '(("/" . "Build Queue")
("/extension" . "Extensions")
("/animal" . "Animals")
("/build" . "Builds")
("/archive" . "Archives"))
"An al... |
2d5b3b7fec1d52a33842212e1133de20bc89fde32dd1f9e5a8c40e9399fac8e4 | nibbula/yew | stty.lisp | ;;;
;;; stty.lisp - Terminal driver manipulator.
;;;
(defpackage :stty
(:documentation "Terminal driver modes manipulator.")
(:use :cl :dlib :opsys #+unix :os-unix :cffi :dlib-misc
:char-util :completion)
(:shadow #:sane)
(:export
#:describe-tty
#:set-tty
#:!stty
))
(in-package :stty)
(declaim #.... | null | https://raw.githubusercontent.com/nibbula/yew/a62473dae637fb33a92aa75f260bf77b34cdbcfd/los/stty.lisp | lisp |
stty.lisp - Terminal driver manipulator.
close the terminal
free C memory
these slot names are stupid as fuck
set modes
unset modes
set chars
actually do it now holmes
Close the terminal
free shabby old C memory
:until (endp ss) |
(defpackage :stty
(:documentation "Terminal driver modes manipulator.")
(:use :cl :dlib :opsys #+unix :os-unix :cffi :dlib-misc
:char-util :completion)
(:shadow #:sane)
(:export
#:describe-tty
#:set-tty
#:!stty
))
(in-package :stty)
(declaim #.`(optimize ,.(getf los-config::*config* :optimization... |
a182ee9c3a1037f3bc78d0228ceb5bd5f14af9d527d6f9a0f9f71e730dbac3dc | ekmett/lens | Lens.hs | {-# LANGUAGE Rank2Types #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.HashSet.Lens
Copyright : ( C ) 2012 - 16
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
-- Stability : provisional
-- Portability : portable
--... | null | https://raw.githubusercontent.com/ekmett/lens/010a11872b562bfa8495dce723b45e92f0fd86bf/src/Data/HashSet/Lens.hs | haskell | # LANGUAGE Rank2Types #
---------------------------------------------------------------------------
|
Module : Data.HashSet.Lens
License : BSD-style (see the file LICENSE)
Stability : provisional
Portability : portable
--------------------------------------------------------------------------
$set... | Copyright : ( C ) 2012 - 16
Maintainer : < >
module Data.HashSet.Lens
( setmapped
, setOf
, hashMap
) where
import Control.Lens.Getter (Getting, views)
import Control.Lens.Iso (iso)
import Control.Lens.Setter (setting)
import Control.Lens.Type
import qualified Data.HashSet as HashSet
import D... |
c3f2d55d2b653fbb4849de3018c90ddc5fc9babffb06018e74f6d8b330e278cd | hyperfiddle/electric | txn.clj | (ns hyperfiddle.txn
(:require [contrib.datomic-contrib-2020 :as dx]
[clojure.set :as set]
[hyperfiddle.api :as hf]
[hyperfiddle.rcf :refer [tests]]))
; Not sure if CLJ only
; we need to resovle queries to fix some edge cases
; but if state is in localstorage, maybe the logic is on... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/src/hyperfiddle/txn.clj | clojure | Not sure if CLJ only
we need to resovle queries to fix some edge cases
but if state is in localstorage, maybe the logic is on the client?
staging area always immediately updates the database, so if immediately transmitted,
then state likely should be on the backend - all tabs can now share it -
but we do not have... | (ns hyperfiddle.txn
(:require [contrib.datomic-contrib-2020 :as dx]
[clojure.set :as set]
[hyperfiddle.api :as hf]
[hyperfiddle.rcf :refer [tests]]))
(defn val->identifier [e]
(cond (string? e) {:tempid e}
(number? e) {:db/id e}
(keyword? e) {:db/ident e}
... |
c6ae0e7e08f235c20b402d1c27a12220463f024c059139816f80851e4a0213fb | c4-project/c4f | summary.ml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fuzz_run/src/summary.ml | ocaml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | |
18a0e18b38a729cd873f4369e340c65f1055e65e618f56e126c96954a398b5af | gedge-platform/gedge-platform | eetcd_watch.erl | -module(eetcd_watch).
-include("eetcd.hrl").
-export_type([watch_conn/0]).
-type watch_conn() :: #{http2_pid => pid(),
monitor_ref => reference(),
stream_ref => reference(),
unprocessed => binary(),
Revision is the revision of the KV when the watchResponse is created . For a normal response , the revision should be ... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/eetcd/src/eetcd_watch.erl | erlang | API
@doc init watch request
user-provided ID is available, an ID will automatically be assigned.
@doc Get the previous key-value pair before the event happens.
@doc WithFragment to receive raw watch response with fragmentation.
Fragmentation is disabled by default. If fragmentation is enabled,
etcd watch server wi... | -module(eetcd_watch).
-include("eetcd.hrl").
-export_type([watch_conn/0]).
-type watch_conn() :: #{http2_pid => pid(),
monitor_ref => reference(),
stream_ref => reference(),
unprocessed => binary(),
Revision is the revision of the KV when the watchResponse is created . For a normal response , the revision should be ... |
a75faa0a49ad24f372a90174820cda527bfe26905f6029d7baa5052cb4636bd4 | esl/MongooseIM | mongoose_graphql_account_admin_query.erl | -module(mongoose_graphql_account_admin_query).
-behaviour(mongoose_graphql).
-export([execute/4]).
-ignore_xref([execute/4]).
-include("../mongoose_graphql_types.hrl").
-import(mongoose_graphql_helper, [format_result/2, make_error/3]).
execute(_Ctx, _Obj, <<"listUsers">>, Args) ->
list_users(Args);
execute(_Ct... | null | https://raw.githubusercontent.com/esl/MongooseIM/6cbbb406c7a0ef8c6f59f0c30578e456a457b4a1/src/graphql/admin/mongoose_graphql_account_admin_query.erl | erlang | -module(mongoose_graphql_account_admin_query).
-behaviour(mongoose_graphql).
-export([execute/4]).
-ignore_xref([execute/4]).
-include("../mongoose_graphql_types.hrl").
-import(mongoose_graphql_helper, [format_result/2, make_error/3]).
execute(_Ctx, _Obj, <<"listUsers">>, Args) ->
list_users(Args);
execute(_Ct... | |
36f73fe883edcecdc0be2e517e5e1aed8ece157794d6056d44f2998adeddfe59 | clash-lang/clash-compiler | BlockRam.hs | # LANGUAGE NoImplicitPrelude #
module Clash.Tests.BlockRam (tests) where
import qualified Data.List as List
import Test.Tasty
import Test.Tasty.HUnit
import qualified Clash.Explicit.Prelude as E
import Clash.Explicit.BlockRam (blockRam#)
import Clash.Prelude
readRam
:: (HiddenClockResetEnable dom)
=> Signal dom... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/ac97f0d044ba44cc783f9fddfc656b8b511886b6/clash-prelude/tests/Clash/Tests/BlockRam.hs | haskell | attempt to access an out of bounds address when using readRam.
Undefined enable:
The written-to address should read 'undefined', but other addresses
should still have their data. | # LANGUAGE NoImplicitPrelude #
module Clash.Tests.BlockRam (tests) where
import qualified Data.List as List
import Test.Tasty
import Test.Tasty.HUnit
import qualified Clash.Explicit.Prelude as E
import Clash.Explicit.BlockRam (blockRam#)
import Clash.Prelude
readRam
:: (HiddenClockResetEnable dom)
=> Signal dom... |
0fd4d17d29c1425ff461d4711cca5ea9d568cdb2b430ce2b3700ce385ae525b2 | Vagabond/diemap | diemap_session.erl |
-module(diemap_session).
-behaviour(gen_server).
gen_server exports$
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
%% other exports
-export([start_link/3, start/3]).
-define(UNAUTH, 0).
-define(AUTH, 1).
-define(SELECTED, 2).
-record(state,
{
socket :: inet:socket(... | null | https://raw.githubusercontent.com/Vagabond/diemap/1cf070cafa0594259b9ed3ef1758f3af398d7151/src/diemap_session.erl | erlang | other exports
[<<>>, <<"*">>] ->
[<<>>, <<"*">>] ->
io:format("fetch ~p ~p~n", [Sequence, Spec]),
io:format("Fetch results ~p~n", [list_to_binary(FetchResults)]),
io:format("fetch ~p ~p~n", [Sequence, Spec]),
io:format("fetch ~p ~p~n", [Sequence, Spec]),
io:format("Fetch results ~p~n", [list_to_binary(FetchResults)]),... |
-module(diemap_session).
-behaviour(gen_server).
gen_server exports$
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-export([start_link/3, start/3]).
-define(UNAUTH, 0).
-define(AUTH, 1).
-define(SELECTED, 2).
-record(state,
{
socket :: inet:socket(),
transport ::... |
87db03d0343c534b4b604ee200ffd72544d8a5a3c240ebc9e3ebec69b027bf23 | cnuernber/dtype-next | lein_codox.clj | (ns tech.v3.libs.lein-codox
(:require [codox.main :as codox]
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.pprint :as pprint]
[clojure.tools.logging :as log]))
(defn find-vals
[proj-file key-seq]
(let [pvec (vec proj-file)
key-set (set key-seq)
... | null | https://raw.githubusercontent.com/cnuernber/dtype-next/4e43212942aafa0145640cf6b655bb83855f567d/src/tech/v3/libs/lein_codox.clj | clojure | (ns tech.v3.libs.lein-codox
(:require [codox.main :as codox]
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.pprint :as pprint]
[clojure.tools.logging :as log]))
(defn find-vals
[proj-file key-seq]
(let [pvec (vec proj-file)
key-set (set key-seq)
... | |
60a7c2d760984cc47a474b6f19317be18a5041025c0994c69d8e2dc98fdf74aa | cpeikert/Lol | CTBenches.hs | |
Module : Crypto . Lol . Benchmarks . CTBenches
Description : Benchmarks for the CPP Tensor .
Copyright : ( c ) , 2011 - 2017
, 2011 - 2017
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Benchmarks for the CPP Tensor , without harn... | null | https://raw.githubusercontent.com/cpeikert/Lol/4416ac4f03b0bff08cb1115c72a45eed1fa48ec3/lol/Crypto/Lol/Benchmarks/CTBenches.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators # | |
Module : Crypto . Lol . Benchmarks . CTBenches
Description : Benchmarks for the CPP Tensor .
Copyright : ( c ) , 2011 - 2017
, 2011 - 2017
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Benchmarks for the CPP Tensor , without harn... |
041701eadac57a6b7cee5d2eb59bad813eba6043f76ef97611cd1c4a5c3647cb | orchid-hybrid/microKanren-sagittarius | unification-trie.scm | (define (walk u s)
;; Walking a variable or term in a substitution will
;; give either the value it points to, or a fresh variable
;;
;; it is sort of like `weak-head normal form`
(if (var? u)
(let-values (((v? v) (trie-lookup s (var->int u))))
(if v?
(walk v s)
u))
u))
(define (walk* ... | null | https://raw.githubusercontent.com/orchid-hybrid/microKanren-sagittarius/9e740bbf94ed2930f88bbcf32636d3480934cfbb/miruKanren/unification-trie.scm | scheme | Walking a variable or term in a substitution will
give either the value it points to, or a fresh variable
it is sort of like `weak-head normal form`
walk* recursively walks a term to put it into a
normalized/completely evaluated form
Performing occurs check of a variable in a term
given a substitution.
This le... | (define (walk u s)
(if (var? u)
(let-values (((v? v) (trie-lookup s (var->int u))))
(if v?
(walk v s)
u))
u))
(define (walk* v s)
UNCHANGED
(let ((v (walk v s)))
(cond
((var? v) v)
((pair? v) (cons (walk* (car v) s)
(walk* (cdr v) s)))
(else v))))
... |
0abe1c55eb3c1843855338d9377353f53cdfd7ed64a3e523ea3291ca7ae8e9ab | hyperfiddle/electric | incremental.cljc | (ns hyperfiddle.incremental
#?(:cljs (:require-macros [minitest :refer [tests]]))
(:require
[missionary.core :refer [latest relieve watch ap ?!]]
#?(:clj [minitest :refer [tests]])))
; monad instance for Incremental values
(defn pureI [a] (watch (atom a)))
(defn fmapI [f & >as] (apply latest f >as))
(defn ... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2021/hfql/incremental.cljc | clojure | monad instance for Incremental values
extend-seqI :: I Seq a -> I Seq I a -- reactive list with reactive elements
allocate inputs and introduce layer
(tests
needs vectors
(let [paths (scan incr? tree)
>as (sequenceI (map #(get-in tree %) paths))]
(fmapI (fn [as]
(reduce (fn [acc [path a]]... | (ns hyperfiddle.incremental
#?(:cljs (:require-macros [minitest :refer [tests]]))
(:require
[missionary.core :refer [latest relieve watch ap ?!]]
#?(:clj [minitest :refer [tests]])))
(defn pureI [a] (watch (atom a)))
(defn fmapI [f & >as] (apply latest f >as))
(defn bindI [>a f] (relieve {} (ap (?! (f (?! ... |
78d8cd61cdb22af329b05064b21167d8a3ed1db5075441b9cc393fb7fb753f27 | music-suite/music-score | Score.hs |
module Music.Score (
module Music.Score.Part,
module Music.Score.Pitch,
module Music.Score.Dynamics,
module Music.Score.Articulation,
module Music.Score.Slide,
module Music.Score.Tremolo,
module Music.Score.Text,
module Music.Score.Harmonics,
modu... | null | https://raw.githubusercontent.com/music-suite/music-score/aa7182d8ded25c03a56b83941fc625123a7931f8/src/Music/Score.hs | haskell | to,
inside, parts, reversed,
rewrite, simple, transform,
(<.>), (<|), (|>))
import Music.Score.Export.Lilypond |
module Music.Score (
module Music.Score.Part,
module Music.Score.Pitch,
module Music.Score.Dynamics,
module Music.Score.Articulation,
module Music.Score.Slide,
module Music.Score.Tremolo,
module Music.Score.Text,
module Music.Score.Harmonics,
modu... |
41c3e0e9d050f2eada849a01b52219302c47c95cc89fee3d3ef326a92ed6e070 | opennars/Narjure | key_path.clj | (ns nal.deriver.key-path
(:require
[clojure.core.memoize :refer [lru]]))
(defn path
"Generates premises \"path\" by replacing terms with :any"
[statement]
(if (coll? statement)
(let [[fst & tail] statement]
(conj (map path tail) fst))
:any))
(defn path-with-max-level
([statement] (path-wit... | null | https://raw.githubusercontent.com/opennars/Narjure/cd5a72e6777fc47271d721fef8362aa2dad664ca/src/nal/deriver/key_path.clj | clojure | (all-paths 'Y '(==> (seq-conj X A1 A2 A3) B)) | (ns nal.deriver.key-path
(:require
[clojure.core.memoize :refer [lru]]))
(defn path
"Generates premises \"path\" by replacing terms with :any"
[statement]
(if (coll? statement)
(let [[fst & tail] statement]
(conj (map path tail) fst))
:any))
(defn path-with-max-level
([statement] (path-wit... |
f7eccfcf482d113fe32e949e918016485266110cbd7c7aa0db3c8425edc5f0b7 | acl2/acl2 | pointers.lisp | C Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "ACL2")
... | null | https://raw.githubusercontent.com/acl2/acl2/1e94e0bfb92e8caa9e90d9d5fe6afbed655bf8db/books/kestrel/c/atc/tests/pointers.lisp | lisp |
Some examples to test code generation for integers manipulated by pointer.
| C Library
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "ACL2")
(include-book "kestrel/c/atc/atc" :dir :system :ttags ((:quicklisp) (:quicklisp.osicat... |
af3c3025be63e21a84c5880af3b215dc313fefca1633723a89485ed0ca7c9b30 | aeternity/aestratum_client | aestratum_client_generator_worker.erl | -module(aestratum_client_generator_worker).
-behaviour(gen_server).
%% API.
-export([start_link/1,
stop/1,
generate/4,
status/1
]).
-export([pid/1,
job_id/1,
block_hash/1,
block_version/1,
target/1,
extra_nonce/1,
miner_nonce/1
... | null | https://raw.githubusercontent.com/aeternity/aestratum_client/e5e3c61ce36465e1149c1f0fdb893ffedb9f1e1e/src/aestratum_client_generator_worker.erl | erlang | API.
gen_server.
Internal exports.
API.
gen_server callbacks. | -module(aestratum_client_generator_worker).
-behaviour(gen_server).
-export([start_link/1,
stop/1,
generate/4,
status/1
]).
-export([pid/1,
job_id/1,
block_hash/1,
block_version/1,
target/1,
extra_nonce/1,
miner_nonce/1
... |
c21f53db430b24bac815f86e7cf1c59de680d3f18634b7be537ab6bc0551a508 | lread/sci-test | test.clj | ;; copied from babashka.impl.clojure.test
Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in a... | null | https://raw.githubusercontent.com/lread/sci-test/34d9a1156fb68bdc0a726b24c8e210c36c1fe9f9/src/sci_test/impl/clojure/test.clj | clojure | copied from babashka.impl.clojure.test
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 ... |
Copyright ( c ) . All rights reserved .
test.clj : test framework for Clojure
by
March 28 , 2009
Thanks to , , and for
(ns
^{:author "Stuart Sierra, with contributions and suggestions by
Chas Emerick, Allen Rohner, and Stuart Halloway",
:doc "A unit testing framework.
ASSERTIO... |
d5f14b9c6a8a6e21fbb213ee1a0791ab445fc2d876652e7e6a28dec263132015 | input-output-hk/plutus | Entity.hs | -- editorconfig-checker-disable-file
| Generators of various PLC things : ' Builtin 's , ' IterApp 's , ' Term 's , etc .
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE Ran... | null | https://raw.githubusercontent.com/input-output-hk/plutus/78402fb44148ce97a0a30efe406ba431fc49006c/plutus-core/testlib/PlutusCore/Generators/Hedgehog/Entity.hs | haskell | editorconfig-checker-disable-file
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
| Generators of built-ins supplied to computations that run in the 'PlcGenT' monad.
^ Generates a PLC 'Term' and the corresponding
| The type used in generators defined in this module.
It's parameterized by a 'B... | | Generators of various PLC things : ' Builtin 's , ' IterApp 's , ' Term 's , etc .
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TupleSections #
# LANGUAGE TypeAp... |
87b80569dc218ded9ea39fd3c9e4b7300a42cad717c8af2ad24db65e572fc30f | tjknoth/resyn | Types.hs | # LANGUAGE TemplateHaskell , DeriveFunctor #
-- | Different types used to interface between the different solvers
module Synquid.Solver.Types where
import Synquid.Logic
import Synquid.Pretty
import Data.Set (Set)
import Data.Map (Map)
import qualified Z3.Monad as Z3
import Control.Lens
data ResourceSolver = SYGUS |... | null | https://raw.githubusercontent.com/tjknoth/resyn/54ff304c635f26b4b498b82be267923a65e0662d/src/Synquid/Solver/Types.hs | haskell | | Different types used to interface between the different solvers
Resource Constraint body AST
Atom: product of coefficient and variable
Sum of atoms
Don't need to substitute in constructors (can't contain nameless reps)
Types for solving resource formulas
![FmlLC]
All unknowns are instantiated
Coefficient va... | # LANGUAGE TemplateHaskell , DeriveFunctor #
module Synquid.Solver.Types where
import Synquid.Logic
import Synquid.Pretty
import Data.Set (Set)
import Data.Map (Map)
import qualified Z3.Monad as Z3
import Control.Lens
data ResourceSolver = SYGUS | CEGIS | Incremental
deriving (Show)
data LinearExp a =
derivi... |
5ed550eb237a8f3843609c5f807ac6f521a7b464e96eb1853350c797f0d99040 | symbiont-io/detsys-testkit | Fault.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
module Scheduler.Fault where
import qualified Data.Aeson as Aeson
import Data.List (foldl')
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Maybe (fromMaybe)
import qualifie... | null | https://raw.githubusercontent.com/symbiont-io/detsys-testkit/54ac69babc84d92d3ad21b14cbba00f3d82efbee/src/runtime-prototype/src/Scheduler/Fault.hs | haskell | ----------------------------------------------------------------------
`rvRange` is how often it should be true, and `rvPoint` is some deteriminstic randomness
?
----------------------------------------------------------------------
??
Dropped
maybe we should keep the reason why it is dropped for tracing?
maybe u... | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
module Scheduler.Fault where
import qualified Data.Aeson as Aeson
import Data.List (foldl')
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Maybe (fromMaybe)
import qualifie... |
db4542ce75fb0acc2ea6384c837b41be4b9664ad7be4f7c3361328aabc49b6b0 | ragkousism/Guix-on-Hurd | man.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2014 , 2015 < >
Copyright © 2014 >
Copyright © 2015 , 2016 < >
Copyright © 2015 < >
Copyright © 2015 , 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify i... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/man.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2014 , 2015 < >
Copyright © 2014 >
Copyright © 2015 , 2016 < >
Copyright © 2015 < >
Copyright © 2015 , 2016 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If no... |
4890d57ed50e4550a191bbc69479bce8429b1240ea7f0270efda26ea7ec9ab66 | realworldocaml/book | versions.ml | (**************************************************************************)
(* *)
(* OCaml Migrate Parsetree *)
(* *)
... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppxlib/ast/versions.ml | ocaml | ************************************************************************
OCaml Migrate Parsetree
... |
, Jane Street Europe
Copyright 2017 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type _ witnesses = ..
type _ migration = ..
... |
47865754fa4755cb414f98f941cd1d5ff207a38c71d3694fa0e8814c9ed90a93 | richcarl/edoc | edoc_wiki.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 w... | null | https://raw.githubusercontent.com/richcarl/edoc/1d816832ea6d4a8666c059aa9b84298a26a3265a/src/edoc_wiki.erl | erlang | =====================================================================
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.... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may
distributed under the License is distributed on an " AS IS " BASIS ,
General Public License ( the " LGPL " ) as published by the Free Software
Foundation ; either version 2.1 , or ( at your option ) any later version .
either the Ap... |
e6aae3ca18eafb1354067bffe5766662f877cc005d1e9d7be906606f1e160731 | xh4/web-toolkit | packages.lisp | (in-package #:common-lisp-user)
(defpackage #:trivial-backtrace
(:use #:common-lisp)
(:export #:print-backtrace
#:print-backtrace-to-stream
#:print-condition
#:*date-time-format*
#:backtrace-string
#:map-backtrace))
| null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/trivial-backtrace-20190710-git/dev/packages.lisp | lisp | (in-package #:common-lisp-user)
(defpackage #:trivial-backtrace
(:use #:common-lisp)
(:export #:print-backtrace
#:print-backtrace-to-stream
#:print-condition
#:*date-time-format*
#:backtrace-string
#:map-backtrace))
| |
8d0bb0fe8fbffc161bca1f70ad575ba493c9e42938f55efd83d6790a01aae616 | purerl/purerl | Synonyms.hs | {-# LANGUAGE GADTs #-}
-- |
-- Functions for replacing fully applied type synonyms
--
module Language.PureScript.Erl.Synonyms
( SynonymMap
, KindMap
, replaceRecordRowTypeSynonymsM
, replaceAllTypeSynonyms'
) where
import Prelude.Compat
import Control.Monad.Error.Class (MonadError(..))
... | null | https://raw.githubusercontent.com/purerl/purerl/8ec9f1228c41ded287192ab98ca32517f63d00b4/src/Language/PureScript/Erl/Synonyms.hs | haskell | # LANGUAGE GADTs #
|
Functions for replacing fully applied type synonyms
| Type synonym information (arguments with kinds, aliased type), indexed by name |
module Language.PureScript.Erl.Synonyms
( SynonymMap
, KindMap
, replaceRecordRowTypeSynonymsM
, replaceAllTypeSynonyms'
) where
import Prelude.Compat
import Control.Monad.Error.Class (MonadError(..))
import Data.Maybe (fromMaybe)
import qualified Data.Map as M
import ... |
f9732f273ae1c3b17298631518f677186101c7eef6eb79c183c7727481e50e25 | cojna/iota | Sparse.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
module Data.Graph.Sparse where
import Control.Monad.Primitive
import Control.Monad.ST
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Unboxed.Mutable as UM
--
import Data.Buffer
type Vertex = Int
type Edge = (Vertex, Vertex)
type EdgeWi... | null | https://raw.githubusercontent.com/cojna/iota/52feb135dd09262c69801fbcb0749e9bd296790e/src/Data/Graph/Sparse.hs | haskell | # LANGUAGE RankNTypes #
# INLINE iadj # | # LANGUAGE RecordWildCards #
module Data.Graph.Sparse where
import Control.Monad.Primitive
import Control.Monad.ST
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Unboxed.Mutable as UM
import Data.Buffer
type Vertex = Int
type Edge = (Vertex, Vertex)
type EdgeWith w = (Vertex, Vertex, w)
type... |
b54f7237fbb58df9bde58bb146e37012b6021e3f731b692e373316169e02b644 | exercism/haskell | ValentinesDay.hs | module ValentinesDay where
Define the function and required algebraic data types ( ADT ) below .
data Approval = ImplementApproval
data Cuisine = ImplementCuisine
data Genre = ImplementGenre
data Activity = ImplementActivity
rateActivity :: Activity -> Approval
rateActivity activity = error "Implement rateActiv... | null | https://raw.githubusercontent.com/exercism/haskell/7e549492f4f46653072a79a5b8e0d01e55a7a063/exercises/concept/valentines-day/src/ValentinesDay.hs | haskell | module ValentinesDay where
Define the function and required algebraic data types ( ADT ) below .
data Approval = ImplementApproval
data Cuisine = ImplementCuisine
data Genre = ImplementGenre
data Activity = ImplementActivity
rateActivity :: Activity -> Approval
rateActivity activity = error "Implement rateActiv... | |
609e1f4b46680ad8c0b85e961a75f68fa68bdb3691e3fdbc56a4357eb9aae32a | samrushing/irken-compiler | t_lex.scm | (include "lib/core.scm")
(include "lib/pair.scm")
(include "lib/string.scm")
(include "lib/frb.scm")
(include "lib/symbol.scm")
(include "lib/io.scm")
(datatype token
;; <kind> <value>
(:t symbol string)
)
(define eof-token (token:t 'eof "eof"))
defines the < step > function ( DFA ) from the lexer generato... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_lex.scm | scheme | <kind> <value>
producer gives us characters
consumer takes tokens
we've entered a new final state
we've left a final state - longest match - emit token
accumulate this character | (include "lib/core.scm")
(include "lib/pair.scm")
(include "lib/string.scm")
(include "lib/frb.scm")
(include "lib/symbol.scm")
(include "lib/io.scm")
(datatype token
(:t symbol string)
)
(define eof-token (token:t 'eof "eof"))
defines the < step > function ( DFA ) from the lexer generator
(include "parse/lex... |
6606013338d4bb7e9d877fd6592b5139285e4d4fb966ba9aeea2239748b8741d | BradWBeer/clinch | tutorial02.lisp | (ql:quickload :clinch)
;; The projection matrix.
(defparameter *projection* nil)
;; The triangle entity which connects the shader, vertexes and projection matrix.
(defparameter *triangle* nil)
The shader program . A gpu side program which writes to the screen .
(defparameter *shader-program* nil)
(defun make-sh... | null | https://raw.githubusercontent.com/BradWBeer/clinch/421de1e4844a5142e37cb06805bc2d9d13ba048f/examples/Tutorial02/tutorial02.lisp | lisp | The projection matrix.
The triangle entity which connects the shader, vertexes and projection matrix.
Create a window-resized event handler
Run this once before the next on-idle call.
Set the window's clear color. I like blue.
Enable a few opengl features.
Set the blending mode.
Make the shader program.... | (ql:quickload :clinch)
(defparameter *projection* nil)
(defparameter *triangle* nil)
The shader program . A gpu side program which writes to the screen .
(defparameter *shader-program* nil)
(defun make-shader-program ()
A normal shader program is made of two shaders , a vertex shader and a fragment shader .
... |
514aa83b4d12ac466575f1ec6e48798612cb0aba230c22d01471e0174035ba26 | susanemcg/pandoc-tufteLaTeX2GitBook | Builder.hs | # LANGUAGE TypeSynonymInstances , FlexibleInstances , MultiParamTypeClasses ,
DeriveDataTypeable , , CPP , StandaloneDeriving ,
DeriveGeneric , DeriveTraversable #
DeriveDataTypeable, GeneralizedNewtypeDeriving, CPP, StandaloneDeriving,
DeriveGeneric, DeriveTraversable #-}
Copyright ( C ) 2010 - ... | null | https://raw.githubusercontent.com/susanemcg/pandoc-tufteLaTeX2GitBook/00c34b4299dd89c4e339e1cde006061918b559ab/pandoc-types-1.12.4/Text/Pandoc/Builder.hs | haskell | | Converts a JSON document into ' Blocks ' .
| Converts a JSON document into 'Blocks'.
* Document builders
* Inline list builders
* Block list builders
| An infix synonym for 'mappend'.
# INLINE (<>) #
Document builders
Inline list builders
| Inline code with attributes.
| Plain inline code.
| Inline math
... | # LANGUAGE TypeSynonymInstances , FlexibleInstances , MultiParamTypeClasses ,
DeriveDataTypeable , , CPP , StandaloneDeriving ,
DeriveGeneric , DeriveTraversable #
DeriveDataTypeable, GeneralizedNewtypeDeriving, CPP, StandaloneDeriving,
DeriveGeneric, DeriveTraversable #-}
Copyright ( C ) 2010 - ... |
3c24852b8229292ef19c855b426c20dd70c6cd6d801f2f4da80b65a62619e82f | bennn/dissertation | untyped.rkt | #lang racket/base
(provide assert index?)
(require (only-in racket/unsafe/ops unsafe-fx>=))
(define (index? x) (and (fixnum? x) (unsafe-fx>= x 0) (fixnum? (* x 4))))
(define (assert v p)
(unless (p v) (error 'assert))
v)
| null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/suffixtree/base/untyped.rkt | racket | #lang racket/base
(provide assert index?)
(require (only-in racket/unsafe/ops unsafe-fx>=))
(define (index? x) (and (fixnum? x) (unsafe-fx>= x 0) (fixnum? (* x 4))))
(define (assert v p)
(unless (p v) (error 'assert))
v)
| |
e89e7e72d4f3957230557504e391e54b563fa2bc5a32dcdfe0c210f014cd385e | silviucpp/epqueue | epqueue.erl | -module(epqueue).
-export([
new/0,
new/1,
size/1,
insert/3,
remove/2,
pop/1,
peek/1
]).
-type error() :: badarg | {error, binary()}.
-type queue_option() :: {global_lock, boolean()}.
-type priority() :: non_neg_integer().
-type data() :: any().
-type queue_ref() :: reference().
-type data_... | null | https://raw.githubusercontent.com/silviucpp/epqueue/66467aa31bf8c1f2126628929a7fecb962011e94/src/epqueue.erl | erlang | -module(epqueue).
-export([
new/0,
new/1,
size/1,
insert/3,
remove/2,
pop/1,
peek/1
]).
-type error() :: badarg | {error, binary()}.
-type queue_option() :: {global_lock, boolean()}.
-type priority() :: non_neg_integer().
-type data() :: any().
-type queue_ref() :: reference().
-type data_... | |
d09f618598048a68f82540b9fc8ac810725ca19b3d39963c9e5185e50d6f2334 | plewto/Cadejo | random_program.clj | (println "--> cobalt random-program")
(ns cadejo.instruments.cobalt.randprog.random-program
(:require [cadejo.util.col :as col])
(:require [cadejo.util.math :as math])
(:require [cadejo.instruments.cobalt.program :as prog])
(:require [cadejo.instruments.cobalt.randprog.config :as config])
(:require [cadejo... | null | https://raw.githubusercontent.com/plewto/Cadejo/2a98610ce1f5fe01dce5f28d986a38c86677fd67/src/cadejo/instruments/cobalt/randprog/random_program.clj | clojure | (println "--> cobalt random-program")
(ns cadejo.instruments.cobalt.randprog.random-program
(:require [cadejo.util.col :as col])
(:require [cadejo.util.math :as math])
(:require [cadejo.instruments.cobalt.program :as prog])
(:require [cadejo.instruments.cobalt.randprog.config :as config])
(:require [cadejo... | |
fb6748bd71ce98544b5f7e4c556783c717eb1a8a10996fa4b6e7e339140a2cdc | open-company/open-company-auth | slack_router.clj | (ns oc.auth.async.slack-router
"
Consume slack messages from SQS. This SQS queue is subscribed to the Slack
message SNS topic.
"
(:require [clojure.core.async :as async :refer (<!! >!!)]
[cheshire.core :as json]
[oc.lib.sqs :as sqs-lib]
[oc.auth.lib.sqs :as sqs]
... | null | https://raw.githubusercontent.com/open-company/open-company-auth/79275bd3b877e70048a80960d7fa2d14be0abfe9/src/oc/auth/async/slack_router.clj | clojure | ----- core.async -----
buffered channel
Simply remove slack as medium where it's being used
For each user of the team
else if he's part of multiple teams
If message is for a token revoked of a bot (we ignore revoke for users atm)
If the bot id is the same of our bot:
Remove the slack org from the team
a messag... | (ns oc.auth.async.slack-router
"
Consume slack messages from SQS. This SQS queue is subscribed to the Slack
message SNS topic.
"
(:require [clojure.core.async :as async :refer (<!! >!!)]
[cheshire.core :as json]
[oc.lib.sqs :as sqs-lib]
[oc.auth.lib.sqs :as sqs]
... |
4799b9e0b6713564af709ebd54caf07bb7e1b26d73d10081e7bf08a728cd2ebb | haskell-gi/haskell-gi | Config.hs | -- | Configuration for the code generator.
module Data.GI.CodeGen.Config
( Config(..)
) where
import Data.Text (Text)
import Data.GI.CodeGen.Overrides (Overrides)
data Config = Config {
| GIR name of the module being generated ( Gtk , GObject , ... ) .
modName :: Text,
-- | Version of the... | null | https://raw.githubusercontent.com/haskell-gi/haskell-gi/bff8f3b92bf2594ea3d6745c346a8de594fc3709/lib/Data/GI/CodeGen/Config.hs | haskell | | Configuration for the code generator.
| Version of the GIR API for the package being generated
("3.0", "2.0", ...).
| Version of the haskell package ("3.0.35", "2.0.21", ...).
| Whether to print extra info.
| List of loaded overrides for the code generator. | module Data.GI.CodeGen.Config
( Config(..)
) where
import Data.Text (Text)
import Data.GI.CodeGen.Overrides (Overrides)
data Config = Config {
| GIR name of the module being generated ( Gtk , GObject , ... ) .
modName :: Text,
modVersion :: Text,
| Haskell package being generated ( ... |
72e3f9e8c2566f94471be31b157ffbcfde82434c25ed354cafa9d4e1f691a5dd | klakplok/goji | PPrintOCaml.ml | (**************************************************************************)
(* *)
(* PPrint *)
(* *)
, INRIA... | null | https://raw.githubusercontent.com/klakplok/goji/78da18fafdd32910fc85f334210c9cd3aae2f974/pprint-20130324/src/PPrintOCaml.ml | ocaml | ************************************************************************
PPrint
... | , INRIA Paris - Rocquencourt
, IT University of Copenhagen
Copyright 2007 - 2013 INRIA . All rights reserved . This file is
distributed under the terms of the CeCILL - C license , as described
open Printf
open PPrintEngine
open PPrintCo... |
ff03f7c46e8f076c36d4727c1221be353c9970e37a0518f33d359a2d94794a6c | bpiel/guildsman | session.clj | (ns com.billpiel.guildsman.session
(:require [com.billpiel.guildsman.common :as com]
[com.billpiel.guildsman.graph :as gr]
[com.billpiel.guildsman.op-node :as op-node]
[com.billpiel.guildsman.macros :as mcro]
[com.billpiel.guildsman.util :as util]
[com.billp... | null | https://raw.githubusercontent.com/bpiel/guildsman/59c9a7459de19525cfc54112f02127e0777a00ce/src/clj/com/billpiel/guildsman/session.clj | clojure | ops
map op/output => tensor
outputs or operations
inputTensorHandles
inputOpHandles
inputOpIndices
outputOpHandles
outputOpIndices
targetOpHandles | (ns com.billpiel.guildsman.session
(:require [com.billpiel.guildsman.common :as com]
[com.billpiel.guildsman.graph :as gr]
[com.billpiel.guildsman.op-node :as op-node]
[com.billpiel.guildsman.macros :as mcro]
[com.billpiel.guildsman.util :as util]
[com.billp... |
9f18fa555bd510d90c334ec306dad70f74fe9349358733cbcb3706096aa75d18 | berke/aurochs | pack.mli | (* Pack *)
type packer = Bytes.sink;;
val write_byte : packer -> int -> unit
val write_int64 : packer -> int64 -> unit
val write_uint64 : packer -> int64 -> unit
val write_string : packer -> string -> unit
val write_int : packer -> int -> unit
val write_uint : packer -> int -> unit
val test : string -> unit
| null | https://raw.githubusercontent.com/berke/aurochs/637bdc0d4682772837f9e44112212e7f20ab96ff/pack/pack.mli | ocaml | Pack |
type packer = Bytes.sink;;
val write_byte : packer -> int -> unit
val write_int64 : packer -> int64 -> unit
val write_uint64 : packer -> int64 -> unit
val write_string : packer -> string -> unit
val write_int : packer -> int -> unit
val write_uint : packer -> int -> unit
val test : string -> unit
|
16ccb7921726103bdeabf2c6712031e59ab202416d2161f6c8b8c22bc4ce7622 | processone/ejabberd-contrib | mod_statsdx.erl | %%%----------------------------------------------------------------------
%%% File : mod_statsdx.erl
Author : < >
%%% Purpose : Calculates and gathers statistics actively
%%% Created :
I d : $ I d : mod_statsdx.erl 1118 2011 - 07 - 11 17:16:30Z badlop $
%%%----------------------------------------------... | null | https://raw.githubusercontent.com/processone/ejabberd-contrib/e76b0877d6281e9e23984bd5e946bf43091875b8/mod_statsdx/src/mod_statsdx.erl | erlang | ----------------------------------------------------------------------
File : mod_statsdx.erl
Purpose : Calculates and gathers statistics actively
Created :
----------------------------------------------------------------------
Definitions
Commands
Hooks
user_logout_sm/3,
==================================
Mo... | Author : < >
I d : $ I d : mod_statsdx.erl 1118 2011 - 07 - 11 17:16:30Z badlop $
-module(mod_statsdx).
-author('').
-behaviour(gen_mod).
-export([start/2, stop/1, depends/2, mod_opt_type/1, mod_options/1, mod_doc/0, mod_status/0]).
-export([loop/1, get_statistic/2,
pre_uninstall/0,
received_respo... |
22d98c21cae6c3cfbb97ba87ea3c1b12cf9db332ffc0240e1b328749270f96e5 | schemedoc/surveys | os.scm | ((fork
(features
thunk
thread-safe)
(implementation
chicken
process-fork
(thunk))
(implementation
gambit
sys-fork
()))
(spawn
(features
fork
double-fork
setsid
exec
wait
path-search
arg-shell
arg-list
arg-syms
arg-nums
arg-zero
arg-w32-quote
env... | null | https://raw.githubusercontent.com/schemedoc/surveys/fd811013ccfd5f814443cbf8c05a16ac735ca1b8/os.scm | scheme | ((fork
(features
thunk
thread-safe)
(implementation
chicken
process-fork
(thunk))
(implementation
gambit
sys-fork
()))
(spawn
(features
fork
double-fork
setsid
exec
wait
path-search
arg-shell
arg-list
arg-syms
arg-nums
arg-zero
arg-w32-quote
env... | |
ba9764bc8d3e0bb760a678216a6435e7626c854d3efcb670dbbd8e6b603e268a | babashka/sci | io_test.cljc | (ns sci.io-test
(:require
[clojure.edn :as edn]
[clojure.string :as str]
[clojure.test :as test :refer [deftest is]]
[sci.core :as sci]
[sci.test-utils :as tu]))
(defn eval*
([form] (eval* nil form))
([binding form]
(tu/eval* form {:bindings {'*in* binding}})))
(deftest with-sci-out-str-test
... | null | https://raw.githubusercontent.com/babashka/sci/a91f90eefc2466ed21a3bf4322d13a10de7f231d/test/sci/io_test.cljc | clojure | (ns sci.io-test
(:require
[clojure.edn :as edn]
[clojure.string :as str]
[clojure.test :as test :refer [deftest is]]
[sci.core :as sci]
[sci.test-utils :as tu]))
(defn eval*
([form] (eval* nil form))
([binding form]
(tu/eval* form {:bindings {'*in* binding}})))
(deftest with-sci-out-str-test
... | |
5df340cdfd4d7ef4255a2d741fa77558af0597d1f1ee183cd7157953e8c9a5f7 | input-output-hk/cardano-base | Failure.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Test.Cardano.Binary.Failure
(tests)
where
import qualified Codec.CBOR.Read as CR
import Data.List.NonEmpty (NonEmpty)
import Data.Set (Set)
import GHC.Stack (HasCallStack, withFrozenCallStack)
import Nume... | null | https://raw.githubusercontent.com/input-output-hk/cardano-base/7e64caa79e0f751f1333ccbce4a64cb48752ae69/cardano-binary/test/Test/Cardano/Binary/Failure.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
--------------------------------------------------------------------
----------------------- Generators -----------------------------
NonEmpty Bool
--------------------------------------------------------------------
----------------------- Properties... | # LANGUAGE TemplateHaskell #
module Test.Cardano.Binary.Failure
(tests)
where
import qualified Codec.CBOR.Read as CR
import Data.List.NonEmpty (NonEmpty)
import Data.Set (Set)
import GHC.Stack (HasCallStack, withFrozenCallStack)
import Numeric.Natural (Natural)
import Cardano.Binary hiding (Range)
import He... |
b7fd4b159fddf56cf4604540e8e3d112925cdcb52f1a4669d06b051628305086 | pva701/Haskell-Practices | Task2.hs | import Data.Map (Map)
import qualified Data.Map as M
import Control.Monad.Except (ExceptT (..), throwError, runExceptT)
import Control.Monad.Reader (ReaderT (..), local, ask)
import Control.Monad.State (State, runState, get, modify)
type Var = String
data Template =
Assign Var Expr
| With Var Expr Template
| ... | null | https://raw.githubusercontent.com/pva701/Haskell-Practices/71b9241cf92c757fa793fd0c0c053af77e68205d/lecture7-practice/src/Task2.hs | haskell | import Data.Map (Map)
import qualified Data.Map as M
import Control.Monad.Except (ExceptT (..), throwError, runExceptT)
import Control.Monad.Reader (ReaderT (..), local, ask)
import Control.Monad.State (State, runState, get, modify)
type Var = String
data Template =
Assign Var Expr
| With Var Expr Template
| ... | |
5721263ebf0f4691ab5ad74a663afa40ed71b64a0239749b0e95b6a6c9500ff0 | homegrownlabs/sim-template | repl.clj | (ns {{namespace}}.repl
"REPL-driven example of creating and running a sim."
(:require [datomic.api :as d]
[{{namespace}}.db :as db]
[{{namespace}}.model :refer [create-model!]]
[{{namespace}}.test :refer [create-test!]]
[{{namespace}}.sim :refer [run-sim!] :as sim]
... | null | https://raw.githubusercontent.com/homegrownlabs/sim-template/2ddba7c1a3c2a17aff1e1ed30bada941bcb938a3/src/leiningen/new/sim_test/src/repl.clj | clojure | 0. Create and bootstrap a database (happens once)
=> nil
behavioral model.
=> {:db/id 123456789}
create different configurations of tests to run. For example, we may test
with few acquirers/users/time to get a quick feel, or many to stress the
system.
=> {...<sim context map>...} | (ns {{namespace}}.repl
"REPL-driven example of creating and running a sim."
(:require [datomic.api :as d]
[{{namespace}}.db :as db]
[{{namespace}}.model :refer [create-model!]]
[{{namespace}}.test :refer [create-test!]]
[{{namespace}}.sim :refer [run-sim!] :as sim]
... |
8d68ecb0834aff879f0b2571e8da986c5311919b4139dfe02b0c6d933b19a1e4 | kitnil/dotfiles | node.scm | '(("groups" .
#((("rules"
.
#((("labels" ("severity" . "warning"))
("for" . "1h")
("expr"
.
"(
node_filesystem_avail_bytes{job=\"node\",fstype!=\"\"} / node_filesystem_size_bytes{job=\"node\",fstype!=\"\"} * 100 < 40
and
predict_linear(node_filesystem_avail... | null | https://raw.githubusercontent.com/kitnil/dotfiles/6bda5afefbec10cf433ccee92f29656f8fd7a1d2/dotfiles/guixsd/node.scm | scheme | '(("groups" .
#((("rules"
.
#((("labels" ("severity" . "warning"))
("for" . "1h")
("expr"
.
"(
node_filesystem_avail_bytes{job=\"node\",fstype!=\"\"} / node_filesystem_size_bytes{job=\"node\",fstype!=\"\"} * 100 < 40
and
predict_linear(node_filesystem_avail... | |
be44c006bf33273cdc13cee27fc15a6d479cb86fec34a2109e3d3700796fdfa9 | klutometis/clrs | 12.2-3.scm | (require-extension syntax-case check)
(require '../12.1/section)
(require '../12.2/section)
(import section-12.1)
(import section-12.2)
(check (bt-node-datum (bt-successor figure-12.2/root)) => 17)
(check (bt-node-datum (bt-successor figure-12.2/13)) => 15)
(check (bt-node-datum (bt-predecessor figure-12.2/root)) => 13... | null | https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/12.2/12.2-3.scm | scheme | (require-extension syntax-case check)
(require '../12.1/section)
(require '../12.2/section)
(import section-12.1)
(import section-12.2)
(check (bt-node-datum (bt-successor figure-12.2/root)) => 17)
(check (bt-node-datum (bt-successor figure-12.2/13)) => 15)
(check (bt-node-datum (bt-predecessor figure-12.2/root)) => 13... | |
7e4e89eb644a8d1fb0e69d34277596f0afd8614d49c1552f136ba7a62ce795de | otto-de/tesla-microservice | sanitize_test.clj | (ns de.otto.tesla.util.sanitize-test
(:require [clojure.test :refer :all]
[de.otto.tesla.util.sanitize :as san]))
(deftest ^:unit should-sanitize-passwords
(is (= (san/hide-passwds {:somerandomstuff "not-so-secret"
:somerandomstuff-passwd-somerandomstu... | null | https://raw.githubusercontent.com/otto-de/tesla-microservice/eb2190dacc1634f625ed216186cad00fc9853868/test/de/otto/tesla/util/sanitize_test.clj | clojure | (ns de.otto.tesla.util.sanitize-test
(:require [clojure.test :refer :all]
[de.otto.tesla.util.sanitize :as san]))
(deftest ^:unit should-sanitize-passwords
(is (= (san/hide-passwds {:somerandomstuff "not-so-secret"
:somerandomstuff-passwd-somerandomstu... | |
13bc629bdd36b71d204baa0167775fcca818ea95bee0691e7b416459804ac667 | andreas/ocaml-graphql-server | graphql_async.ml | module Schema =
Graphql_schema.Make
(struct
include Async_kernel.Deferred
let bind x f = bind x ~f
module Stream = struct
type 'a t = 'a Async_kernel.Pipe.Reader.t
let map t f =
Async_kernel.Pipe.map' t ~f:(fun q ->
Async_kernel.Deferred.Queue.map q ~f)... | null | https://raw.githubusercontent.com/andreas/ocaml-graphql-server/d615cbb164d4ddfdc2efeb246a198dfe114adf24/graphql-async/src/graphql_async.ml | ocaml | module Schema =
Graphql_schema.Make
(struct
include Async_kernel.Deferred
let bind x f = bind x ~f
module Stream = struct
type 'a t = 'a Async_kernel.Pipe.Reader.t
let map t f =
Async_kernel.Pipe.map' t ~f:(fun q ->
Async_kernel.Deferred.Queue.map q ~f)... | |
f9b4be865221a56c67d7b847708d6c420566ae072a678d87556d90c6c9645328 | timaschew/Artificial-Neural-Network-with-Haskell | TopologyParser.hs | module TopologyParser where
import Neuron
import Data.Char
import Data.List
import Random
input : whole file input str , which describes the netzwork . xor sample : " 4b\nb3\n1\n "
-- randNums: a list of random Double values, the list size is equal to the total needed neuron weights of the network.
-- returns the g... | null | https://raw.githubusercontent.com/timaschew/Artificial-Neural-Network-with-Haskell/13586dbd61eeff0146abdb186f0b256b0656afb7/src/TopologyParser.hs | haskell | randNums: a list of random Double values, the list size is equal to the total needed neuron weights of the network.
returns the generated Network
calc the number of inputs of the previous layer. input layer has 0 inputs, output layer does not care
fill input layer with empty lists, because input neurons dont have w... | module TopologyParser where
import Neuron
import Data.Char
import Data.List
import Random
input : whole file input str , which describes the netzwork . xor sample : " 4b\nb3\n1\n "
getTopology :: String -> [Double] -> Network
getTopology input randNums = result where
tupleList = parseTopology (lines input)
prev... |
997ac7ea845dece92dc4fa1b119d4e0936b4c03feb9c0a00cfd729cbcb35d4f3 | eugeneia/athens | relaxed.lisp | ;;;; relaxed.lisp
;;;;
;;;; This file is part of the cl-sanitize library, released under Lisp-LGPL.
;;;; See file COPYING for details.
;;;;
Author : < >
(in-package #:sanitize)
(define-sanitize-mode +relaxed+
:elements ("a" "abbr" "b" "bdo" "blockquote" "br" "caption" "cite" "code" "col"
"col... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/cl-sanitize-20130720-git/src/modes/relaxed.lisp | lisp | relaxed.lisp
This file is part of the cl-sanitize library, released under Lisp-LGPL.
See file COPYING for details.
| Author : < >
(in-package #:sanitize)
(define-sanitize-mode +relaxed+
:elements ("a" "abbr" "b" "bdo" "blockquote" "br" "caption" "cite" "code" "col"
"colgroup" "dd" "del" "dfn" "dl" "dt" "em" "figcaption" "figure" "h1" "h2"
"h3" "h4" "h5" "h6" "hgroup" "i" "img" "ins" "kbd" "li... |
5abe6bbeedd50e26eb8af0b7defdac443b25b5e259bcdfab2664d4ec28c7162b | backtracking/ocamlgraph | test_31.ml |
Issue # 31
This would fail in the current state of OCamlGraph ,
as map_vertex requires a supplied function that is injective .
This would fail in the current state of OCamlGraph,
as map_vertex requires a supplied function that is injective.
*)
module String = struct include String let hash = Has... | null | https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/tests/test_31.ml | ocaml | Make a persistent graph where:
A -> B
B -> C
C -> B |
Issue # 31
This would fail in the current state of OCamlGraph ,
as map_vertex requires a supplied function that is injective .
This would fail in the current state of OCamlGraph,
as map_vertex requires a supplied function that is injective.
*)
module String = struct include String let hash = Has... |
b9a7b940796253ca1af8044642bb42acfb7ff6dc662c6b56a8f25d9731514111 | omariosouto/learnin-public-clojure | core_test.clj | (ns github-profile-display-cli.core-test
(:require [clojure.test :refer :all]
[github-profile-display-cli.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/omariosouto/learnin-public-clojure/2553142fca5386986285f3e21031d5a7e6ab4a9e/projects/github-profile-display-cli/test/github_profile_display_cli/core_test.clj | clojure | (ns github-profile-display-cli.core-test
(:require [clojure.test :refer :all]
[github-profile-display-cli.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
eb3417d19c365d0ed9bd4711328627ef468f88695445e79809db28e8a7f50174 | unisonweb/unison | Globbing.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ViewPatterns #
-- | Provides Globbing for selecting types, terms and namespaces using wildcards.
module Unison.CommandLine.Globbing
( expandGlobs,
containsGlob,
TargetType (..),
)
where
import Control.Lens as Lens hiding (noneOf)
im... | null | https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/unison-cli/src/Unison/CommandLine/Globbing.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| Provides Globbing for selecting types, terms and namespaces using wildcards.
| Possible targets which a glob may select.
| Glob paths are always relative to some branch.
| Represents a name segment containing a glob pattern
e.g. start?end -> GlobArg "start... | # LANGUAGE ViewPatterns #
module Unison.CommandLine.Globbing
( expandGlobs,
containsGlob,
TargetType (..),
)
where
import Control.Lens as Lens hiding (noneOf)
import qualified Data.Either as Either
import qualified Data.Set as Set
import qualified Data.Text as Text
import Unison.Codebase.Branch (Branch0)
... |
f978e0381ca35b08ca4b4fff81ebf25f3d67f7967529faa4ee862e95c54cb226 | iu-parfunc/verified-instances | Internal.hs | # LANGUAGE CPP #
|
Module : Generics . Deriving . Newtypeless . TH.Internal
Copyright : ( c ) 2008 - -2009 Universiteit Utrecht
License : BSD3
Maintainer :
Stability : experimental
Portability : non - portable
Template Haskell - related utilities .
Module : Gen... | null | https://raw.githubusercontent.com/iu-parfunc/verified-instances/cebfdf1e3357a693360be74c90211be18ce3c045/generic-proofs/generic-deriving-newtypeless/src/Generics/Deriving/Newtypeless/TH/Internal.hs | haskell | 2009 Universiteit Utrecht
-----------------------------------------------------------------------------
Expanding type synonyms
-----------------------------------------------------------------------------
There are no kind synonyms to deal with
There are no kind variables!
------------------------------------------... | # LANGUAGE CPP #
|
Module : Generics . Deriving . Newtypeless . TH.Internal
Copyright : ( c ) 2008 - -2009 Universiteit Utrecht
License : BSD3
Maintainer :
Stability : experimental
Portability : non - portable
Template Haskell - related utilities .
Module : Gen... |
48c626bcac4a6b45d6dee483248889d402a43333dfee56b9f4db4ce6d0386fe2 | unison-code/unison | DG.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Dependency Graph .
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
Dependency Graph.
-}
Main authors :
< >
This fi... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Graphs/DG.hs | haskell | TODO: boundary edges are just a type of "readWrite" edges,
that would also possibly make the extended edges
unnecessary
| Note (for potential optimization): cg is a tree
| Whether i precede j in dg | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Dependency Graph .
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
Dependency Graph.
-}
Main authors :
< >
This fi... |
7af2f8914a0c18f523fe6f98bd87a1eacc1703b17984fdb57bb368b690c88a4e | SjVer/Som-Lang | on_init.ml | open Lsp.Types
let init_info =
let t = `Bool true in
let capabilities =
ServerCapabilities.create
(* ~completionProvider:(
CompletionOptions.create
~triggerCharacters:["."]
()
) *)
~hoverProvider:t
(* ~declarationProvider:t *)
(* ~definitionProvider:... | null | https://raw.githubusercontent.com/SjVer/Som-Lang/03f36099faa6a5c4fdf4a694e9b7d79d075118d7/tools/language-server/lib/on_init.ml | ocaml | ~completionProvider:(
CompletionOptions.create
~triggerCharacters:["."]
()
)
~declarationProvider:t
~definitionProvider:t
~typeDefinitionProvider:t
~codeLensProvider: | open Lsp.Types
let init_info =
let t = `Bool true in
let capabilities =
ServerCapabilities.create
~hoverProvider:t
~semanticTokensProvider:(`SemanticTokensOptions
(SemanticTokensOptions.create
~legend:Semantics.legend
~range:false
~full:t
()))
... |
44dc155606d51bb3d0761c51d4a01a93704a25f8fbeee268d1e803dc055ec527 | mattmundell/nightshade | input.lisp | ;;; The code that handles input to the editor.
(in-package "EDI")
(export '(get-key-event unget-key-event clear-editor-input listen-editor-input
*last-key-event-typed* *key-event-history* *editor-input*
*real-editor-input* input-waiting last-key-event-cursorpos))
;;;
INPUT - WAITING is exported solely as a ha... | null | https://raw.githubusercontent.com/mattmundell/nightshade/68e960eff95e007462f2613beabc6cac11e0dfa1/src/ed/input.lisp | lisp | The code that handles input to the editor.
mechanism.
routines for method dispatching:
GET-KEY-EVENT
UNGET-KEY-EVENT
LISTEN-EDITOR-INPUT
CLEAR-EDITOR-INPUT
FIX where should this go?
editor-input structure.
A function that returns the next key-event in the queue.
A function that puts a key-event... |
(in-package "EDI")
(export '(get-key-event unget-key-event clear-editor-input listen-editor-input
*last-key-event-typed* *key-event-history* *editor-input*
*real-editor-input* input-waiting last-key-event-cursorpos))
INPUT - WAITING is exported solely as a hack for the definition
#[ Keyboard Input
Keyboard... |
0c24bf5a4eca2d31bc008c7070367dd7b1ba434f14c2434829361e47122c8204 | glotcode/glot-www | Snippets.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
module Handler.Api.Snippets where
import Import
import qualified Data.Aeson as Aeson
import qualified GHC.Generics as GHC
import qualified Handler.Snippets as SnippetsHandler
import qualified Handler.Snippet as SnippetHandler
import qualified Handler.UserS... | null | https://raw.githubusercontent.com/glotcode/glot-www/cef0d7d00c0b0501fa2fdc407a26d13b19b84bd9/Handler/Api/Snippets.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
module Handler.Api.Snippets where
import Import
import qualified Data.Aeson as Aeson
import qualified GHC.Generics as GHC
import qualified Handler.Snippets as SnippetsHandler
import qualified Handler.Snippet as SnippetHandler
import qualified Handler.UserS... | |
c65fc088ac1e2b788e01981efb9e2746b320d419caec05cdbd37f681f343395a | unbalancedparentheses/radioelm | uc_root_handler.erl | -module(uc_root_handler).
-include_lib("mixer/include/mixer.hrl").
-mixin([
{uc_default,
[
init/3,
rest_init/2,
content_types_accepted/2,
content_types_provided/2,
resource_exists/2
]}
]).
-export(
[
allowed_methods/2,
handle_g... | null | https://raw.githubusercontent.com/unbalancedparentheses/radioelm/649ecff452bc3ddc8c316e7e5abf6e7523dc566e/api/src/uc_root_handler.erl | erlang | cowboy
internal | -module(uc_root_handler).
-include_lib("mixer/include/mixer.hrl").
-mixin([
{uc_default,
[
init/3,
rest_init/2,
content_types_accepted/2,
content_types_provided/2,
resource_exists/2
]}
]).
-export(
[
allowed_methods/2,
handle_g... |
cfec6b53993a2ee795a10c3305108b3da15bc1b0d7d077658a797631c5e26cde | AlexKnauth/reprovide-lang | reprovide.rkt | #lang racket/base
(provide reprovide)
(require syntax/parse/define
(for-syntax racket/base
racket/require-transform))
(begin-for-syntax
(define-syntax-class reprov-spec
[pattern require-spec:expr
#:with [[local-id phase] ...]
(let-values ([[imports import-sources] (exp... | null | https://raw.githubusercontent.com/AlexKnauth/reprovide-lang/8c3c912d200eec45d22fc267d151fb1939471b49/reprovide-lang-lib/reprovide/reprovide.rkt | racket | #lang racket/base
(provide reprovide)
(require syntax/parse/define
(for-syntax racket/base
racket/require-transform))
(begin-for-syntax
(define-syntax-class reprov-spec
[pattern require-spec:expr
#:with [[local-id phase] ...]
(let-values ([[imports import-sources] (exp... | |
004d3e72e4de07b0e9f3df4f47b499be99d19744edef63a59ad3218b430a59f4 | ostera/serde.ml | map_access.ml | open Intf
type ('value, 'error) t = ('value, 'error) map_access = {
next_key :
'key.
deser_key:(unit -> ('key, 'error Error.de_error) result) ->
('key option, 'error Error.de_error) result;
next_value :
'field.
deser_value:(unit -> ('field, 'error Error.de_error) result) ->
('field option, ... | null | https://raw.githubusercontent.com/ostera/serde.ml/1b0d46a361f2a152eb52eeeec10db8458129793c/serde/de/map_access.ml | ocaml | open Intf
type ('value, 'error) t = ('value, 'error) map_access = {
next_key :
'key.
deser_key:(unit -> ('key, 'error Error.de_error) result) ->
('key option, 'error Error.de_error) result;
next_value :
'field.
deser_value:(unit -> ('field, 'error Error.de_error) result) ->
('field option, ... | |
8b45f3f16c150fcf85e6a2043b3c31cf6361a627479a0701927895a13338b9a0 | crisptrutski/matchbox | common_test.cljc | (ns matchbox.common-test
#?(:cljs
(:require-macros
[cljs.test :refer [deftest is testing]]
[cljs.core.async.macros :refer [go]]))
(:require
#?(:cljs [cljs.test]
:clj [clojure.test :refer [deftest is testing]])
[matchbox.core :as m]
[matchbox.async :as ma]
... | null | https://raw.githubusercontent.com/crisptrutski/matchbox/5bb9ba96f5df01bce302a8232f6cddd9d64a1d71/test/matchbox/common_test.cljc | clojure | create read-only fixtures statically | (ns matchbox.common-test
#?(:cljs
(:require-macros
[cljs.test :refer [deftest is testing]]
[cljs.core.async.macros :refer [go]]))
(:require
#?(:cljs [cljs.test]
:clj [clojure.test :refer [deftest is testing]])
[matchbox.core :as m]
[matchbox.async :as ma]
... |
c4f4e918aea8dcb8f93b62e5ebcc34c366133b18a1f7e94c2b404b787e8225e2 | bittide/bittide-hardware | Extra.hs | SPDX - FileCopyrightText : 2022 Google LLC
--
SPDX - License - Identifier : Apache-2.0
module Language.Haskell.TH.Extra where
import Prelude
import Data.List (intercalate)
import Data.List.Split (splitOn)
import qualified Language.Haskell.TH as TH
import qualified Language.Haskell.TH.Syntax as TH
$ setup
>... | null | https://raw.githubusercontent.com/bittide/bittide-hardware/b44dac8ee0fb14b0c6a94fcbe830fdd8d140bec4/bittide-instances/src/Language/Haskell/TH/Extra.hs | haskell |
| Split a package name into the package name, package version, and package
hash. For example:
("assoc","1.0.2","aba0a117dd6de51d6a539")
("base-orphans","0.8.7","2e63b02a231c60dc1867d037a0c")
If a package name does not conform to $name-$version-$hash, this function will
error.
| Split globally bound reference... | SPDX - FileCopyrightText : 2022 Google LLC
SPDX - License - Identifier : Apache-2.0
module Language.Haskell.TH.Extra where
import Prelude
import Data.List (intercalate)
import Data.List.Split (splitOn)
import qualified Language.Haskell.TH as TH
import qualified Language.Haskell.TH.Syntax as TH
$ setup
> > ... |
66f3bbe2acd48f2e24737fc4430c14b31d829f1c88cb5e5b680dcbf8790f30e1 | ryukinix/lisp-inference | build.lisp | (load "fix-quicklisp")
(ql:quickload :prove)
(ql:quickload :lisp-inference)
(in-package :lisp-inference)
(sb-ext:save-lisp-and-die "lisp-inference"
:toplevel #'main
:executable t
:compression 9)
| null | https://raw.githubusercontent.com/ryukinix/lisp-inference/b109dc0006985ee0d62589ca4b22b12540b911dc/build.lisp | lisp | (load "fix-quicklisp")
(ql:quickload :prove)
(ql:quickload :lisp-inference)
(in-package :lisp-inference)
(sb-ext:save-lisp-and-die "lisp-inference"
:toplevel #'main
:executable t
:compression 9)
| |
ebbe4e1f3511f2060b14efe4bdd2d880d5d40aaa53fbc0b88d316d23f2e15b13 | input-output-hk/marlowe-cardano | Semantics.hs | -----------------------------------------------------------------------------
--
-- Module : $Headers
License : Apache 2.0
--
-- Stability : Experimental
Portability : Portable
--
| = : financial contracts domain specific language for blockchain
--
Here we present a reference implementation... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/16a56284a9d53c71d4673abdb70fb5d97f1bbd69/marlowe/src/Language/Marlowe/Core/V1/Semantics.hs | haskell | ---------------------------------------------------------------------------
Module : $Headers
Stability : Experimental
on Cardano.
== Semantics
where remaining contract and its state is passed through /Datum/,
and actions (i.e. /Choices/) are passed as
/Redeemer Script/
-------------... | License : Apache 2.0
Portability : Portable
| = : financial contracts domain specific language for blockchain
Here we present a reference implementation of , domain - specific language targeted at
the execution of financial contracts in the style of et al
This is the implementation of s... |
a872e4b6c67ae5561ab1d7867a0259d933549e6ed6e597232e445e9c5b316aad | CloudI/CloudI | proper_erlang_abstract_code.erl | This file is part of PropEr .
%%%
%%% PropEr 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 License , or
%%% (at your option) any later version.
%%%
%%% PropEr is distributed in the... | null | https://raw.githubusercontent.com/CloudI/CloudI/c47b4f94525dfaf7c33328c2e50f8611c11a9565/src/external/proper/src/proper_erlang_abstract_code.erl | erlang |
PropEr is free software: you can redistribute it and/or modify
(at your option) any later version.
PropEr 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 for ... | This file is part of PropEr .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
Alternatively , you may use this file under the terms of the Apache
distrib... |
cd94ef57bc318335a073aef368550d55807164ea3a3a78237388da5d4b6275dc | ucsd-progsys/dsolve | oo.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet Cri... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/stdlib/oo.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : , v 1.27 2004/05/26 11:10:52 ga... |
532966bd916ce38c8b86351bfbfbbbe532a6e73a25fb5b606330b0012abdd3aa | ucsd-progsys/nate | codegen.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/asmcomp/codegen.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : codegen.ml , v 1.7 2000/04/21... |
0b3d90eeefd393d54de05c9b9adc05806c0502f3797117e37bd8607778ebcb60 | azimut/shiny | lv2.lisp | (in-package #:shiny)
(dsp! swipe-dsp-up ((plugin (or null vug-foreign:plugin-instance))
(port-index fixnum)
dur
(max single-float)
(min single-float))
(:defaults NIL 45 1 1 0)
(with-samples ((e (envelope
(make-enve... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/lib/lv2.lisp | lisp | --------------------------------------------------
--------------------------------------------------
Change the port value in rt-thread. | (in-package #:shiny)
(dsp! swipe-dsp-up ((plugin (or null vug-foreign:plugin-instance))
(port-index fixnum)
dur
(max single-float)
(min single-float))
(:defaults NIL 45 1 1 0)
(with-samples ((e (envelope
(make-enve... |
e5affa858240ecb81f9a19f1c75b4dbadd3a6df41241fb758cacf4862e7dfcbd | clojure-garden/clojure-garden | slack_message.clj | (ns platform.slack.sql.slack-message
(:require
[honey.sql.helpers :as helpers]
[platform.storage.jdbc-wrappers :as jw])
(:import
(com.zaxxer.hikari
HikariDataSource)
(java.util
UUID)))
(defn insert-message!
[^HikariDataSource db {:as _message :keys [content timestamp sender_id stream... | null | https://raw.githubusercontent.com/clojure-garden/clojure-garden/c6929c58c5d0fcc26b9ce0d7ba469269b4fda7b0/modules/backend/src/platform/slack/sql/slack_message.clj | clojure | (ns platform.slack.sql.slack-message
(:require
[honey.sql.helpers :as helpers]
[platform.storage.jdbc-wrappers :as jw])
(:import
(com.zaxxer.hikari
HikariDataSource)
(java.util
UUID)))
(defn insert-message!
[^HikariDataSource db {:as _message :keys [content timestamp sender_id stream... | |
92b780ee3a1a44c392e8bd1968d45fd54b8314a8bd1ab36745c08dd8a650dacd | basho/riak_core | riak_core_eventhandler_guard.erl | %% -------------------------------------------------------------------
%%
%% riak_core_eventhandler_guard: Guard process for persistent event handlers.
%%
Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "Lic... | null | https://raw.githubusercontent.com/basho/riak_core/762ec81ae9af9a278e853f1feca418b9dcf748a3/src/riak_core_eventhandler_guard.erl | erlang | -------------------------------------------------------------------
riak_core_eventhandler_guard: Guard process for persistent event handlers.
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 expres... | Copyright ( c ) 2007 - 2011 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
-... |
52bb35ed58334526ee88aff489cca66f5e6f4b400f53eeeadf9f372c2a446fc8 | huangz1990/SICP-answers | 10-ackermann.scm | 10-ackermann.scm
(define (A x y)
(cond ((= y 0)
0)
((= x 0)
(* 2 y))
((= y 1)
2)
(else
(A (- x 1)
(A x (- y 1))))))
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/10-ackermann.scm | scheme | 10-ackermann.scm
(define (A x y)
(cond ((= y 0)
0)
((= x 0)
(* 2 y))
((= y 1)
2)
(else
(A (- x 1)
(A x (- y 1))))))
| |
4cfb609154ecdebedb04dbbf21bb28608aedbd8ffdf5cbade8e9cded1c16a773 | auser/alice | eunit_examples.erl | %% -------------------------------------------------------------------
%% File: test.erl
%%
$ I d : eunit_examples.erl 273 2008 - 11 - 06 09:17:08Z rcarlsson $
%%
@author < >
2005
@private
-module(eunit_examples).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
succeed() ->
ok.
fai... | null | https://raw.githubusercontent.com/auser/alice/e0f867071ede99f451d09053608bd6719c72d1c9/test/include/eunit/examples/eunit_examples.erl | erlang | -------------------------------------------------------------------
File: test.erl
should be accepted, but will not produce any visible result
setup/foreach usage examples | $ I d : eunit_examples.erl 273 2008 - 11 - 06 09:17:08Z rcarlsson $
@author < >
2005
@private
-module(eunit_examples).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
succeed() ->
ok.
fail() ->
throw(failed).
succeeding_test() ->
succeed().
failing_test() ->
fail().
... |
31741fd9efe575dc3a0466072150d4bb313e6d827abe33ae01e84a21021cc01a | savonet/ocaml-mm | mm_oss.ml |
* Copyright 2011 The Savonet Team
*
* This file is part of ocaml - mm .
*
* 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 2 of the License , or
* ( at your ... | null | https://raw.githubusercontent.com/savonet/ocaml-mm/59278f78a2987c6debbbd5ca58467fb654f3deed/external/mm_oss.ml | ocaml | TODO: other formats than 16 bits? |
* Copyright 2011 The Savonet Team
*
* This file is part of ocaml - mm .
*
* 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 2 of the License , or
* ( at your ... |
8ca72b311a579d8887c7d8db1a27e11aba334fa63182fd5909bde9f10dd57afb | cfelde/ebbs-social-frontend | handler.clj | (ns ebbs-social-frontend.server.handler
(:require [compojure.core :refer :all]
[compojure.route :as route]
[ring.middleware.reload :refer [wrap-reload]]
[ring.middleware.defaults :refer [wrap-defaults site-defaults]]
[ring.middleware.content-type :refer [wrap-content-ty... | null | https://raw.githubusercontent.com/cfelde/ebbs-social-frontend/ad47de958f3e60bbafe0867f3e192981d3acf3d6/src/ebbs_social_frontend/server/handler.clj | clojure | (GET "/eth/address" [] (posts-file))
(GET "/new-post@address" [] (posts-file))
(GET "/post/123@address" [] (posts-file))
(GET "/edit-post/123@address" [] (posts-file))
(GET "/reply-to-post/123@address" [] (posts-file))
(GET "/posts/user-address@address" [] (posts-file))
(GET "/replies/user-address@address" [] (posts-fi... | (ns ebbs-social-frontend.server.handler
(:require [compojure.core :refer :all]
[compojure.route :as route]
[ring.middleware.reload :refer [wrap-reload]]
[ring.middleware.defaults :refer [wrap-defaults site-defaults]]
[ring.middleware.content-type :refer [wrap-content-ty... |
0a07eaa7478b37d23e9feb6eaafa9f269e55ab6e2bec3193397ddee089bef53d | composewell/streamly | StreamD.hs | -- |
Module : Streamly . Benchmark . Data . Stream . StreamD
Copyright : ( c ) 2018 Composewell Technologies
--
-- License : BSD3
-- Maintainer :
# LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# OPTIONS_GHC -Wno - orphans #
#ifdef __HADDOC... | null | https://raw.githubusercontent.com/composewell/streamly/dff87c7e2ef5ec91783369cf618bf8f67b9817b5/benchmark/Streamly/Benchmark/Data/Stream/StreamD.hs | haskell | |
License : BSD3
Maintainer :
# OPTIONS_GHC -fplugin Test.Inspection.Plugin #
We try to keep the total number of iterations same irrespective of nesting
of the loops so that the overhead is easy to compare.
double nested loop
triple nested loop
triple nested loop
-----------------------------------------... | Module : Streamly . Benchmark . Data . Stream . StreamD
Copyright : ( c ) 2018 Composewell Technologies
# LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# OPTIONS_GHC -Wno - orphans #
#ifdef __HADDOCK_VERSION__
#undef INSPECTION
#endif
#ifdef INS... |
f1ae7c5906bf9d05452cd8682057b9bcb47c227f7329a69f4b7939185df424dd | seckcoder/course-compiler | s1_27.rkt | (eq? #t 42)
| null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/s1_27.rkt | racket | (eq? #t 42)
| |
3295c986321dd39be9618da4ac9ddf4043442a93c6241d51f1c207c7077b1bb5 | haslab/HAAP | Play.hs | module Play where
import Text.XML.Light
import Haskassonne
import Next (pontua)
import Data.Maybe (fromJust, isNothing, isJust)
import System.Environment
import System.Exit
import Control.Monad (when)
import Data.List (sortBy, (\\), nubBy)
import Data.Ord (comparing)
greedyBot :: Element -> IO Element
greedyBot board... | null | https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/examples/xterm/Play.hs | haskell | | Play aleatório
| Play com estratégia aleatória
putStrLn $ show board
putStrLn $ show xml | module Play where
import Text.XML.Light
import Haskassonne
import Next (pontua)
import Data.Maybe (fromJust, isNothing, isJust)
import System.Environment
import System.Exit
import Control.Monad (when)
import Data.List (sortBy, (\\), nubBy)
import Data.Ord (comparing)
greedyBot :: Element -> IO Element
greedyBot board... |
4175c9c2940fac80ab481c11a23f1219893cfac17fb7820368b3a08ec215f18f | yav/hobbit | Names.hs | -- | This module is used by the module system to manipulate names.
module ModSys.Names
(Name(..), QName, ModName
, getQualifier, getQualified
, mkUnqual, mkQual
) where
import AST.Type
getQualifier (Q (Qual q _)) = Just q
getQualifier _ = Nothing
getQualified (Q (Qual _ n)) = n
getQualified (... | null | https://raw.githubusercontent.com/yav/hobbit/31414ba1188f4b39620c2553b45b9e4d4aa40169/src/ModSys/Names.hs | haskell | | This module is used by the module system to manipulate names. | module ModSys.Names
(Name(..), QName, ModName
, getQualifier, getQualified
, mkUnqual, mkQual
) where
import AST.Type
getQualifier (Q (Qual q _)) = Just q
getQualifier _ = Nothing
getQualified (Q (Qual _ n)) = n
getQualified (Q n) = n
mkUnqual x = Q x
mkQual q x = Q (Qual q x)
|
c5491d83da06dd8dd0f060ef8cc8828399d21e74935612f644fb1229c441de08 | RedPRL/redtt | IAbs.mli | open RedBasis.Bwd
type 'a abs
type atom = Name.t
val pp : 'a Pp.t0 -> 'a abs Pp.t0
module type S =
sig
type el
include Sort.S with type 'a m = 'a with type t = el abs
val unsafe_map : (el -> el) -> t -> t
val bind : atom bwd -> el -> t
val unleash : t -> atom bwd * el
val unsafe_unleash : t -> atom b... | null | https://raw.githubusercontent.com/RedPRL/redtt/50689559ff970e33013b8cf8a3bbc8be18ec4e09/src/core/IAbs.mli | ocaml | open RedBasis.Bwd
type 'a abs
type atom = Name.t
val pp : 'a Pp.t0 -> 'a abs Pp.t0
module type S =
sig
type el
include Sort.S with type 'a m = 'a with type t = el abs
val unsafe_map : (el -> el) -> t -> t
val bind : atom bwd -> el -> t
val unleash : t -> atom bwd * el
val unsafe_unleash : t -> atom b... | |
c93bbf24de0c7feaecb1814f2dd8e807e5525b2e19fc6ecd79a71c855df61e96 | GaloisInc/heapster-saw | IRTTranslation.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeOperators #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
# LANGUAGE RecordWildCards #
# LANGUAGE Templa... | null | https://raw.githubusercontent.com/GaloisInc/heapster-saw/fd571cdcdb0658d2d6bca386606438b5c3180b97/src/Verifier/SAW/Heapster/IRTTranslation.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings #
# LANGUAGE DeriveTraversable #
* Useful functions
| "Complete" an 'OpenTerm' to a closed 'TypedTerm' or 'fail' on
type-checking error
| Build an element of type ListSort from a list of types
| Get the result of applying 'exprCtxToTerms' to t... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TypeOperators #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE Pat... |
a67a33e359e7215c1e0998a02806fa73eefae13ba49bcbfcca5f194e5e467e80 | openmusic-project/openmusic | fluid-midi-player.lisp | ;;; ===========================================================================
FluidSynth Player class for OM .
;;;
;;; 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... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/2d3c937a08756c2ce1632d490debc1db69892dfc/OPENMUSIC/code/projects/midi/players/fluid-midi-player.lisp | lisp | ===========================================================================
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
either version 2.1 of the License , or
(at your option) any later version.
This program... | FluidSynth Player class for OM .
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
Author :
(in-package :om)
(defmethod player-name ((player (eql ... |
ee1e5794c628b098634c19e47341b8faaabd88f7cfa3fff074434012e06c5b51 | laurencer/confluence-sync | TestSuite.hs | --
-- HTTP client for use with io-streams
--
Copyright © 2012 - 2014 Operational Dynamics Consulting , Pty Ltd
--
-- The code in this file, and the program it is a part of, is made
-- available to you by its authors as open source software: you can
redistribute it and/or modify it under a BSD licence .
--
# LANGUA... | null | https://raw.githubusercontent.com/laurencer/confluence-sync/442fdbc84fe07471f323af80d2d4580026f8d9e8/vendor/http-streams/tests/TestSuite.hs | haskell |
HTTP client for use with io-streams
The code in this file, and the program it is a part of, is made
available to you by its authors as open source software: you can
# LANGUAGE OverloadedStrings #
# OPTIONS -fno-warn-unused-imports #
Otherwise redundent imports, but useful for testing in GHCi.
what we're act... | Copyright © 2012 - 2014 Operational Dynamics Consulting , Pty Ltd
redistribute it and/or modify it under a BSD licence .
# LANGUAGE DeriveGeneric #
module TestSuite where
import Blaze.ByteString.Builder (Builder)
import qualified Blaze.ByteString.Builder as Builder (fromByteString,
... |
6b630f4e2ce13e13d6b9fc9c31755647a8857169cfbc0ce6fe547500479fef65 | brownplt/LambdaS5 | ljs_pretty_value.mli |
val string_of_obj : Ljs_values.objectv -> Ljs_values.store -> string
val string_of_value : Ljs_values.value -> Ljs_values.store -> string
val string_of_env : Ljs_values.env -> string
val print_values : Ljs_values.store -> unit
val print_objects : Ljs_values.store -> unit
| null | https://raw.githubusercontent.com/brownplt/LambdaS5/f0bf5c7baf1daa4ead4e398ba7d430bedb7de9cf/src/ljs/ljs_pretty_value.mli | ocaml |
val string_of_obj : Ljs_values.objectv -> Ljs_values.store -> string
val string_of_value : Ljs_values.value -> Ljs_values.store -> string
val string_of_env : Ljs_values.env -> string
val print_values : Ljs_values.store -> unit
val print_objects : Ljs_values.store -> unit
| |
dfd400526cc23feb820e2f302abd1675874d577a6d679f10cb237b140ac1c033 | TorXakis/TorXakis | Purpose.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
{-# LANGUAGE OverloadedStrings #-}
modu... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/core/src/Purpose.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------------------- --
Test Primitives for a Test Purpose, built on Behave
----------------------------------------------------------------------------------------- --
export
:: String -> IOC.IOC BTree.Menu
:: I... |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
module Purpose
: : TxsDDefs . Acti... |
dceb29458ea77948d9cfb3772500220e5f285c8e64322a4828414d9d40fae245 | initc3/SaUCy | Value.hs | -- {-# OPTIONS_GHC -Wall #-}
--------------------------------------------------------------------------------
-- |
-- Module : Language.ILC.Value
Copyright : ( C ) 2018
-- License : BSD-style (see LICENSE)
Maintainer : ( )
-- Stability : experimental
--
Defines ILC values .
--
--------... | null | https://raw.githubusercontent.com/initc3/SaUCy/199154c1f488af4561e4bf1f7f5f3ef8876dfa6b/src/Language/ILC/Value.hs | haskell | {-# OPTIONS_GHC -Wall #-}
------------------------------------------------------------------------------
|
Module : Language.ILC.Value
License : BSD-style (see LICENSE)
Stability : experimental
------------------------------------------------------------------------------
^ Integer value
^ Boolea... | Copyright : ( C ) 2018
Maintainer : ( )
Defines ILC values .
module Language.ILC.Value (
Value(..)
, TermEnv
, emptyTmEnv
, extendTmEnv
, mergeTmEnv
) where
import Control.Concurrent
import qualified Data.Map.Strict as Map
import Text.PrettyPrint.ANSI.Leijen
import Language.ILC.Pret... |
002aded1061f00f6bfbc4bf796115737557d4be88d5f1ef1c361e31350262552 | deadeyejoe/fabrikk | referencing.cljc | (ns joe.tutorial.alpha.referencing
(:require [fabrikk.alpha.core :as fab]))
(defn admin-email []
(str "admin-" (rand-int 10000) "@example.com"))
(def user
(fab/->factory
{:id ::user
:template {:id (fab/sequence)
:name "John Smith"
:email ""
:role "user"
... | null | https://raw.githubusercontent.com/deadeyejoe/fabrikk/c731cd435baaf241450a9b280286b894c8cee81c/development/src/joe/tutorial/alpha/referencing.cljc | clojure | :title "This one weird trick",
:content "Some content goes here...."}
:id #uuid "67a43dea-f992-47f7-a78a-761a29de9f1c",
:title "This one weird trick",
:content "Some content goes here...."}
:id #uuid "83ee842e-ee37-4dd1-b385-6aba8f7a6c0f",
:title "This one weird trick",
:conte... | (ns joe.tutorial.alpha.referencing
(:require [fabrikk.alpha.core :as fab]))
(defn admin-email []
(str "admin-" (rand-int 10000) "@example.com"))
(def user
(fab/->factory
{:id ::user
:template {:id (fab/sequence)
:name "John Smith"
:email ""
:role "user"
... |
328f8df3ae18638fcd53f3e9b242c102669d1f327d75d19b3ddbecfba0b4ac16 | johnlawrenceaspden/hobby-code | philosophers.clj | ;;the philosopher's dining table
(def n 5)
(def chopsticks (map atom (map (fn[_] "down") (range n))))
(defstruct philosopher :status :left-stick :right-stick :has-left-stick :has-right-stick)
(defn make-philosopher [n]
(struct-map philosopher
:status "hungry"
:left-stick n
:right-stick (mod (+ n 1) ... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/philosophers.clj | clojure | the philosopher's dining table |
(def n 5)
(def chopsticks (map atom (map (fn[_] "down") (range n))))
(defstruct philosopher :status :left-stick :right-stick :has-left-stick :has-right-stick)
(defn make-philosopher [n]
(struct-map philosopher
:status "hungry"
:left-stick n
:right-stick (mod (+ n 1) 5)
:has-left-stick false
... |
8777513d39624805db6d68dcb1289c0f52f0caaf0477f7eef139dfb51496bf98 | geophf/1HaskellADay | Exercise.hs | module Y2018.M07.D30.Exercise where
import Data.Set (Set)
We have two databases
pilot, entities, exDir :: FilePath
exDir = "Y2018/M07/D30/"
pilot = "pilot_db.csv"
entities = "entities_db.csv"
We want to merge those databases into one SUPER - database
-- Read in the tables from each database (mind the header in... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M07/D30/Exercise.hs | haskell | Read in the tables from each database (mind the header information) and do
a set difference. What are the names of the tables that both databases share?
How many tables are common between both databases? | module Y2018.M07.D30.Exercise where
import Data.Set (Set)
We have two databases
pilot, entities, exDir :: FilePath
exDir = "Y2018/M07/D30/"
pilot = "pilot_db.csv"
entities = "entities_db.csv"
We want to merge those databases into one SUPER - database
type Table = String
type Database = Set Table
readDatabase... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.