_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 |
|---|---|---|---|---|---|---|---|---|
a24c2e36c8016fbb71c048bf51cb47380cbd3bd4e780b370af7ecb866828b2aa | tommaisey/aeon | buf-delay-l.help.scm | ;; See buf-delay-c
| null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/delays/buf-delay-l.help.scm | scheme | See buf-delay-c | |
b5e60317f17164b29c15b10337ef740c8d153765698a55221e7c0b6a85f4c369 | kerneis/cpc | dataflow.ml |
module IH = Inthash
module E = Errormsg
open Cil
open Pretty
(** A framework for data flow analysis for CIL code. Before using
this framework, you must initialize the Control-flow Graph for your
program, e.g using {!Cfg.computeFileCFG} *)
type 't action =
Default (** The default action *)
| Done of... | null | https://raw.githubusercontent.com/kerneis/cpc/0ca695d25e58dadbd92639162338a06a517875d9/src/ext/dataflow.ml | ocaml | * A framework for data flow analysis for CIL code. Before using
this framework, you must initialize the Control-flow Graph for your
program, e.g using {!Cfg.computeFileCFG}
* The default action
* Do not do the default action. Use this result
* The default action, followed by the given
... |
module IH = Inthash
module E = Errormsg
open Cil
open Pretty
type 't action =
type 't stmtaction =
* Visit the instructions and successors of this statement
as usual , but use the specified state instead of the
one that was passed to doStmt
as usual, but ... |
4720b4a299412ff18954aa5d541999b561128302b78a34db82ddf9dfa9848350 | marigold-dev/deku | source.mli | type pos = { file : string; line : int; column : int }
type region = { left : pos; right : pos }
type 'a phrase = { at : region; it : 'a }
val no_pos : pos
val no_region : region
val string_of_pos : pos -> string
val string_of_region : region -> string
val ( @@ ) : 'a -> region -> 'a phrase
val at : region -> 'a -> 'a... | null | https://raw.githubusercontent.com/marigold-dev/deku/a26f31e0560ad12fd86cf7fa4667bb147247c7ef/deku-c/interpreter/util/source.mli | ocaml | type pos = { file : string; line : int; column : int }
type region = { left : pos; right : pos }
type 'a phrase = { at : region; it : 'a }
val no_pos : pos
val no_region : region
val string_of_pos : pos -> string
val string_of_region : region -> string
val ( @@ ) : 'a -> region -> 'a phrase
val at : region -> 'a -> 'a... | |
85191e0ff5c036fc5dd4f39af4505cdeb4fef8e442600c7d160bd2ed8fa965c6 | basho/riak_search | riak_search_op_utils.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
%%
%% -------------------------------------------------------------------
-module(riak_search_op_utils).
-export([
iterator_tree/3,
gather_iterator_results/... | null | https://raw.githubusercontent.com/basho/riak_search/79c034350f37706a1db42ffca8f6449d4cce99e1/src/riak_search_op_utils.erl | erlang | -------------------------------------------------------------------
-------------------------------------------------------------------
expose as a single topmost iterator. All of the iterators return
results in sorted order, so a SelectFun is used to maintain the
sorted order as well as filter out any results ... | Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
-module(riak_search_op_utils).
-export([
iterator_tree/3,
gather_iterator_results/3,
gather_stream_results/4
]).
-include("riak_search.hrl").
-define(STREAM_TIMEOUT, 15000).
Given a long list of iterators ( which are zero ... |
2926d91beef3a302d30e90745232c8ff761e6edc9d0df11b2f353d3878b344a1 | helium/blockchain-core | blockchain_txn_reward_v1.erl | %%%-------------------------------------------------------------------
%% @doc
%% == Blockchain Transaction reward ==
%%%-------------------------------------------------------------------
-module(blockchain_txn_reward_v1).
-behavior(blockchain_json).
-include("blockchain_json.hrl").
-include("blockchain_utils.hrl").... | null | https://raw.githubusercontent.com/helium/blockchain-core/b2d1c7a5830b8afcfe9adbb46024bd53b05e900c/src/transactions/v1/blockchain_txn_reward_v1.erl | erlang | -------------------------------------------------------------------
@doc
== Blockchain Transaction reward ==
-------------------------------------------------------------------
--------------------------------------------------------------------
@doc
@end
------------------------------------------------------------... | -module(blockchain_txn_reward_v1).
-behavior(blockchain_json).
-include("blockchain_json.hrl").
-include("blockchain_utils.hrl").
-include_lib("helium_proto/include/blockchain_txn_rewards_v1_pb.hrl").
-export([
new/4,
hash/1,
account/1,
gateway/1,
amount/1,
type/1,
is_valid/1,
print/1... |
ac8fc932cf6931c2e9b82a4a2145f001df8d1f96a5fcf695d67ae793dedb5dd6 | takikawa/racket-ppa | check-class-unit.rkt | #lang racket/unit
;; This module provides a unit for type-checking classes
(require "../utils/utils.rkt"
racket/dict
racket/format
racket/list
racket/match
racket/set
syntax/parse
syntax/stx
"signatures.rkt"
"../private/parse-type.rkt"
... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt | racket | This module provides a unit for type-checking classes
A super-init-stxs is a
interp. Represents the by-position and by-name initialization
arguments respectively provided by the class
time debugging
Syntax classes for use in functions below
This is similar to `type-declaration` from "internal-forms.rkt"... | #lang racket/unit
(require "../utils/utils.rkt"
racket/dict
racket/format
racket/list
racket/match
racket/set
syntax/parse
syntax/stx
"signatures.rkt"
"../private/parse-type.rkt"
"../private/syntax-properties.rkt"
"../p... |
b40f0f1fe9df4c73b4a2ff94195ad74dc034be3cf77821ceeb69f00084bb0e0f | sveri/closp | user_service.clj | (ns {{namespace}}.service.user-service)
(defn get-loggedin-email-address [req]
(get-in req [:session :user :email]))
| null | https://raw.githubusercontent.com/sveri/closp/8bd82134f57b2b32e26ee091bb74a6f0eb2ddcdb/resources/clj/new/closp/src/clj/service/user_service.clj | clojure | (ns {{namespace}}.service.user-service)
(defn get-loggedin-email-address [req]
(get-in req [:session :user :email]))
| |
5076e9c201df1c0c34e85b14316cff0a9226a9d58f56f160f6faff199d26ffbe | ds-wizard/engine-backend | EditCommentSpec.hs | module Wizard.Specs.Websocket.Questionnaire.Detail.EditCommentSpec where
import Data.Aeson
import Network.WebSockets
import Test.Hspec hiding (shouldBe)
import Test.Hspec.Expectations.Pretty
import Shared.Database.DAO.Package.PackageDAO
import Shared.Database.Migration.Development.Package.Data.Packages
import Wizard.... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/test/Wizard/Specs/Websocket/Questionnaire/Detail/EditCommentSpec.hs | haskell | ----------------------------------------------------
----------------------------------------------------
----------------------------------------------------
GIVEN: Prepare database
AND: Connect to websocket
WHEN:
THEN:
AND: Close sockets
----------------------------------------------------
-----------------... | module Wizard.Specs.Websocket.Questionnaire.Detail.EditCommentSpec where
import Data.Aeson
import Network.WebSockets
import Test.Hspec hiding (shouldBe)
import Test.Hspec.Expectations.Pretty
import Shared.Database.DAO.Package.PackageDAO
import Shared.Database.Migration.Development.Package.Data.Packages
import Wizard.... |
ddd96053856849783c40a1828e682b186fc92e829a43d28376a54d7cd5287610 | mark-watson/loving-common-lisp | text-node.lisp | (in-package :lw-grapher)
;; A text node class for use with simple Grapher and info panel Grapher
(defclass text-node (capi:pinboard-object)
((text :initarg :text :reader text-node-text)
(full-text :initarg :full-text :reader text-node-full-text)
(string-x-offset :accessor text-node-string-x-offset)
(string... | null | https://raw.githubusercontent.com/mark-watson/loving-common-lisp/32f6abf3d2e500baeffd15c085a502b03399a074/src/lw-grapher/text-node.lisp | lisp | A text node class for use with simple Grapher and info panel Grapher | (in-package :lw-grapher)
(defclass text-node (capi:pinboard-object)
((text :initarg :text :reader text-node-text)
(full-text :initarg :full-text :reader text-node-full-text)
(string-x-offset :accessor text-node-string-x-offset)
(string-y-offset :accessor text-node-string-y-offset)))
code derived from ... |
219498e17e977d99a46082034760c4e6467e84672020b22dc6e974235d91f1ef | aeternity/aeternity | aec_accounts_trees_tests.erl | -module(aec_accounts_trees_tests).
-include_lib("eunit/include/eunit.hrl").
smoke_test() ->
T0 = aec_accounts_trees:empty(),
{error, empty} = aec_accounts_trees:root_hash(T0),
A1 = aec_accounts:new(<<"_______________k1_______________">>, 10),
T1 = aec_accounts_trees:enter(A1, T0),
?assertEqual({v... | null | https://raw.githubusercontent.com/aeternity/aeternity/59e05a04ea9be29a65f8a2f65f36a9f2f984e1a4/apps/aecore/test/aec_accounts_trees_tests.erl | erlang | Assert root hash summarizes content.
not present in empty tree
adding more tokens increments locked coins' amount
adding more tokens increments locked coins' amount even more
channels' rely on accounts with a dict backend being reproducible with
only the latest state | -module(aec_accounts_trees_tests).
-include_lib("eunit/include/eunit.hrl").
smoke_test() ->
T0 = aec_accounts_trees:empty(),
{error, empty} = aec_accounts_trees:root_hash(T0),
A1 = aec_accounts:new(<<"_______________k1_______________">>, 10),
T1 = aec_accounts_trees:enter(A1, T0),
?assertEqual({v... |
873c9e16646f0e8f416b54f8ae61dee8bd653b580d03ee2938f2965c51cd287f | fccm/glMLite | enums-gen.ml | { { { COPYING * (
This file belongs to glMLite , an OCaml binding to the OpenGL API .
Copyright ( C ) 2006 - 2008
Permission is hereby granted , free of charge , to any person obtaining a
copy of this software and associated documentation files ( the " Software " ) ,
to deal in the Software... | null | https://raw.githubusercontent.com/fccm/glMLite/c52cd806909581e49d9b660195576c8a932f6d33/SRC/enums-gen.ml | ocaml |
#directory "+xml-light/"
#load "xml-light.cma"
#load "str.cma"
{{{ gl-version
}}}
{{{ load xml file
}}}
{{{ print
}}}
{{{ get gl_type
}}}
{{{ select the output
}}}
vim: sw=2 sts=2 ts=2 et fdm=marker
| { { { COPYING * (
This file belongs to glMLite , an OCaml binding to the OpenGL API .
Copyright ( C ) 2006 - 2008
Permission is hereby granted , free of charge , to any person obtaining a
copy of this software and associated documentation files ( the " Software " ) ,
to deal in the Software... |
939fef7591c82768b5b943ac41c093656b90212b74abb8ca13672e0451a0a3a1 | ygrek/mldonkey | commonSearch.mli | val search_num : int ref
val searches_by_num : (int, CommonTypes.search) Hashtbl.t
val new_search :
CommonTypes.ui_user ->
CommonTypes.query GuiTypes.search_request -> CommonTypes.search
val search_find : int -> CommonTypes.search
val search_add_result_in :
CommonTypes.search -> CommonTypes.result -> unit
val sea... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/daemon/common/commonSearch.mli | ocaml | val search_num : int ref
val searches_by_num : (int, CommonTypes.search) Hashtbl.t
val new_search :
CommonTypes.ui_user ->
CommonTypes.query GuiTypes.search_request -> CommonTypes.search
val search_find : int -> CommonTypes.search
val search_add_result_in :
CommonTypes.search -> CommonTypes.result -> unit
val sea... | |
005fe551177891ab6b78c44b951bae790a326750a175f13cc5ce67c34a11a4ca | ragkousism/Guix-on-Hurd | gcc.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 , 2015 , 2016 , 2017 < >
Copyright © 2014 , 2015 < >
Copyright © 2014 , 2015 , 2016 < >
Copyright © 2015 < >
Copyright © 2015 , 2016 < >
Copyright © 2016 Lama < >
;;;
;;; This file is part of GNU Guix.... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/gcc.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 , 2014 , 2015 , 2016 , 2017 < >
Copyright © 2014 , 2015 < >
Copyright © 2014 , 2015 , 2016 < >
Copyright © 2015 < >
Copyright © 2015 , 2016 < >
Copyright © 2016 Lama < >
under the terms of the GNU General Public License as published by
You should have receive... |
f879681a98495fc961ac2ca65b87a1208272b949351288e1b4aad2aac11267d1 | janestreet/merlin-jst | module_type.mli | module type T = sig type a end
module T : sig type b end
include T
include module type of T
| null | https://raw.githubusercontent.com/janestreet/merlin-jst/0152b4e8ef1b7cd0ddee2873aa1860a971585391/tests/test-dirs/type-enclosing/mod-type.t/module_type.mli | ocaml | module type T = sig type a end
module T : sig type b end
include T
include module type of T
| |
07e4aa33817d1c5a0f610e282cc092fe7747f35f1319a00315a56ec1cf70c764 | Kappa-Dev/KappaTools | menu_editor_file.mli | (******************************************************************************)
(* _ __ * The Kappa Language *)
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
(* | ' / ********************************************************************... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/gui/menu_editor_file.mli | ocaml | ****************************************************************************
_ __ * The Kappa Language
| ' / ********************************************************************
| . \ * This file is distributed under the terms of the
|_|\_\ * GN... | | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
val content : [> `Button | `Div | `Ul | `A of [> `PCDATA | `Span ]] Tyxml_js.Html5.elt list
val onload : unit -> unit
|
6fdf51d3510c730f0bc5dd14e0a1257a7bf53c460fb6021301ad918ea82637c3 | igorhvr/bedlam | test-irregex-utf8.scm | #!/usr/local/bin/csi -script
(cond-expand
(chicken-5 (import test))
(else (use test extras utils)))
(load "irregex.scm")
(test-begin)
(test-assert (irregex-search "(?u:<..>)" "<漢字>"))
(test-assert (irregex-search "(?u:<.*>)" "<漢字>"))
(test-assert (irregex-search "(?u:<.+>)" "<漢字>"))
(test-assert (not (irregex-se... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/irregex/irregex-0.9.8/test-irregex-utf8.scm | scheme | #!/usr/local/bin/csi -script
(cond-expand
(chicken-5 (import test))
(else (use test extras utils)))
(load "irregex.scm")
(test-begin)
(test-assert (irregex-search "(?u:<..>)" "<漢字>"))
(test-assert (irregex-search "(?u:<.*>)" "<漢字>"))
(test-assert (irregex-search "(?u:<.+>)" "<漢字>"))
(test-assert (not (irregex-se... | |
97bd2a27a6d3a8162c1326d5663b51d62215eb80b2127a4965e0acac53cfcfc0 | rootmos/silly-church | repl.scm | (load "silly-church.scm")
(repl)
| null | https://raw.githubusercontent.com/rootmos/silly-church/1e50886a0f9a239f3f31679759165c389e2c3f5e/repl.scm | scheme | (load "silly-church.scm")
(repl)
| |
cce0988c6a5b596d2f11731f25055111e8ce15c771caa59996fa0311256b0b6c | haskell/haskell-language-server | Main.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
module Main
( main
) where
import qualified Ide.Plugin.CabalFmt as CabalFmt
import System.Directory (findExecutable)
import System.FilePath
import Test.Hls
data CabalFmtFound = Found | NotFound
isTestIsolated :: B... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/aeb57a8eb56964c8666d7cd05b6ba46d531de7c7/plugins/hls-cabal-fmt-plugin/test/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE CPP #
module Main
( main
) where
import qualified Ide.Plugin.CabalFmt as CabalFmt
import System.Directory (findExecutable)
import System.FilePath
import Test.Hls
data CabalFmtFound = Found | NotFound
isTestIsolated :: Bool
#if isolateTests
isTestIsolated... |
d18bc7487557d373740319f30878b0ebefab9f5d51e95994c784552c1a79d600 | viesti/clj-lttb | core.cljc | (ns lttb.core)
(defn downsample [threshold data]
(let [data-length (count data)]
(if (or (zero? threshold) (zero? data-length))
data
;; Bucket size. Leave room for start and end data points
(let [every (if (= 2 threshold)
2
(/ (- data-length 2)
... | null | https://raw.githubusercontent.com/viesti/clj-lttb/8ae80e8d215dae3a94df3da25e2007aa636d897e/src/lttb/core.cljc | clojure | Bucket size. Leave room for start and end data points
Calculate point average for next bucket (containing c)
Get the range for this bucket
Pick this point from the bucket
This a is the next a (chosen b)
Always add last | (ns lttb.core)
(defn downsample [threshold data]
(let [data-length (count data)]
(if (or (zero? threshold) (zero? data-length))
data
(let [every (if (= 2 threshold)
2
(/ (- data-length 2)
(- threshold 2)))]
(loop [sampled (transie... |
eae466cedec5afb17c77a565fdc80dafe3148298cd191108afabf80da42722e5 | racket/redex | stlc.rkt | #lang racket
(require redex)
(provide λ λv red typeof)
(define-language λ
(e (e e)
x
(λ (x τ) e)
(if0 e e e)
(+ e e)
number)
(τ (τ -> τ) num)
(x variable-not-otherwise-mentioned))
(define-extended-language λv λ
(v (λ (x τ) e) number)
(E hole
(v E) (E e)
(if0 E e e)
(+... | null | https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-examples/redex/examples/stlc.rkt | racket | the last cases cover all other expressions
remove this #; to run an example
remove this #; to generate a random well-typed term
| #lang racket
(require redex)
(provide λ λv red typeof)
(define-language λ
(e (e e)
x
(λ (x τ) e)
(if0 e e e)
(+ e e)
number)
(τ (τ -> τ) num)
(x variable-not-otherwise-mentioned))
(define-extended-language λv λ
(v (λ (x τ) e) number)
(E hole
(v E) (E e)
(if0 E e e)
(+... |
396dc262984600c020f79fe8c05018d454733020e7ef53081406ff1b81c8ec79 | hbr/albatross | list.ml | include Stdlib.List
include Module_types
type 'a t = 'a list
let return (a:'a): 'a t = [a]
let rec (>>=) (l:'a t) (f:'a -> 'b t): 'b t =
match l with
| [] ->
[]
| hd :: tl ->
f hd @ (tl >>= f)
let (>=>) (f:'a -> 'b t) (g:'b -> 'c t) (a:'a): 'c t =
f a >>= g
let (<*>) (flst: ('a -> 'b) t) (lst:'a... | null | https://raw.githubusercontent.com/hbr/albatross/8f28ef97951f92f30dc69cf94c0bbe20d64fba21/ocaml/fmlib/basic/list.ml | ocaml | Illegal call!
Illegal call!
No rows is not allowed.
Unit Tests | include Stdlib.List
include Module_types
type 'a t = 'a list
let return (a:'a): 'a t = [a]
let rec (>>=) (l:'a t) (f:'a -> 'b t): 'b t =
match l with
| [] ->
[]
| hd :: tl ->
f hd @ (tl >>= f)
let (>=>) (f:'a -> 'b t) (g:'b -> 'c t) (a:'a): 'c t =
f a >>= g
let (<*>) (flst: ('a -> 'b) t) (lst:'a... |
4d13d4c53c9840ee03c1a557d437f1616514bf00b2939a8f4fda4c076d22b0c1 | vedang/clj_fdb | subspace_test.clj | (ns me.vedang.clj-fdb.subspace.subspace-test
(:require [byte-streams :as bs]
[clojure.test :refer [deftest is]]
[me.vedang.clj-fdb.core :as fc]
[me.vedang.clj-fdb.FDB :as cfdb]
[me.vedang.clj-fdb.internal.util :as u]
[me.vedang.clj-fdb.subspace.subspace :as ... | null | https://raw.githubusercontent.com/vedang/clj_fdb/58aae585273f291a1dbd69d5a2a355f177e20b61/test/me/vedang/clj_fdb/subspace/subspace_test.clj | clojure | (ns me.vedang.clj-fdb.subspace.subspace-test
(:require [byte-streams :as bs]
[clojure.test :refer [deftest is]]
[me.vedang.clj-fdb.core :as fc]
[me.vedang.clj-fdb.FDB :as cfdb]
[me.vedang.clj-fdb.internal.util :as u]
[me.vedang.clj-fdb.subspace.subspace :as ... | |
32f5a4666c559c09cdd3519b1a261943c46073c005db33d1a5adf90f4aa9bb21 | dkochmanski/charming-clim | drawing.lisp |
(in-package #:clim-user)
(defun draw-grid (sheet &optional (xstep 1) (ystep 1))
(let ((ink +gray+))
(loop for coord from 0 to 40 by xstep
do (draw-line* sheet coord 0 coord 40 :ink ink))
(loop for coord from 0 to 40 by ystep
do (draw-line* sheet 0 coord 40 coord :ink ink))))
(defun draw-coord... | null | https://raw.githubusercontent.com/dkochmanski/charming-clim/931da8f7f888499d880ae22187ce1779d13dc11c/doc/drawing.lisp | lisp | orientation
units
:8000/clim-spec/12-4.html
we must know screen size!
we must know screen size!
gross hack to show "device-native" coordinates |
(in-package #:clim-user)
(defun draw-grid (sheet &optional (xstep 1) (ystep 1))
(let ((ink +gray+))
(loop for coord from 0 to 40 by xstep
do (draw-line* sheet coord 0 coord 40 :ink ink))
(loop for coord from 0 to 40 by ystep
do (draw-line* sheet 0 coord 40 coord :ink ink))))
(defun draw-coord... |
291077cd2c9fe6da5f2d2a95fe8e483c105f48a69ed02e5fbdcbea8f1d801464 | austral/austral | AbstractionPass.mli |
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions .
See LICENSE file for details .
SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception
Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions.
See LICENSE file for details.
SPDX... | null | https://raw.githubusercontent.com/austral/austral/69b6f7de36cc9576483acd1ac4a31bf52074dbd1/lib/AbstractionPass.mli | ocaml |
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions .
See LICENSE file for details .
SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception
Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions.
See LICENSE file for details.
SPDX... | |
1b382dad1b6b8068c7de2c2f8851190e704ba8abc87baef55d052b4bb453a8a1 | racket/typed-racket | method-default.rkt | #lang typed/racket/shallow
;; Test immediate and expression defaults
;; for optional & keyword arguments
(let ()
;; optional, value
(: c1% (Class (f (->* [Integer] [Integer] Integer))))
(define c1%
(class object%
(super-new)
(define/public (f x [y 0]) (+ 4 4))))
(send (new c1%) f 0))
(let (... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/method-default.rkt | racket | Test immediate and expression defaults
for optional & keyword arguments
optional, value
optional, expression
optional, field
keyword, value
keyword, expression
keyword, field | #lang typed/racket/shallow
(let ()
(: c1% (Class (f (->* [Integer] [Integer] Integer))))
(define c1%
(class object%
(super-new)
(define/public (f x [y 0]) (+ 4 4))))
(send (new c1%) f 0))
(let ()
(: c1% (Class (f (->* [Integer] [Integer] Integer))))
(define c1%
(class object%
(su... |
b35923796e3df29f235277e42195ee5f163cff3a7220c34416123497701e67af | tzemanovic/haskell-yesod-realworld-example-app | Model.hs | {-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildC... | null | https://raw.githubusercontent.com/tzemanovic/haskell-yesod-realworld-example-app/d9f5191a909fa3c0087c5f28fcaae7ad1eca8b9a/app/src/Model.hs | haskell | # LANGUAGE EmptyDataDecls #
# LANGUAGE GADTs #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
You can define all of your database entities in the entities file.
You can find more information on persistent and how... | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
module Model where
import ClassyPrelude.Yesod
import Data.Aeson (Value (S... |
22b9988e63ec6ba62985f001fd609b71c5a97b11ce0f5e265001c95d8d0bab5c | hatashiro/monkey-hs | Types.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeOperators #
module Evaluator.Types where
import Protolude
import Evaluator.BuiltIns (builtIns)
import Evaluator.Object
import Parser.AST (Ident)
import Control.Monad.Trans.Class (MonadTrans(..))
newtype EvalError = EvalError Text
deriving (Show, ... | null | https://raw.githubusercontent.com/hatashiro/monkey-hs/0ea5e3cf7596d64366a3d68b5616de9748a4824c/lib/Evaluator/Types.hs | haskell | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeOperators #
module Evaluator.Types where
import Protolude
import Evaluator.BuiltIns (builtIns)
import Evaluator.Object
import Parser.AST (Ident)
import Control.Monad.Trans.Class (MonadTrans(..))
newtype EvalError = EvalError Text
deriving (Show, ... | |
d8963e728df3b3d7475ae0d8a4cf9c46ced55187b6ce411821d9f3e27b04b7c8 | snowleopard/hadrian | Hsc2Hs.hs | module Settings.Builders.Hsc2Hs (hsc2hsBuilderArgs) where
import Hadrian.Haskell.Cabal.Type
import Builder
import Packages
import Settings.Builders.Common
hsc2hsBuilderArgs :: Args
hsc2hsBuilderArgs = builder Hsc2Hs ? do
stage <- getStage
ccPath <- getBuilderPath $ Cc CompileC stage
gmpDir <- getSett... | null | https://raw.githubusercontent.com/snowleopard/hadrian/b9a3f9521b315942e1dabb006688ee7c9902f5fe/src/Settings/Builders/Hsc2Hs.hs | haskell | we might be able to leave out cppOpts, to be investigated. | module Settings.Builders.Hsc2Hs (hsc2hsBuilderArgs) where
import Hadrian.Haskell.Cabal.Type
import Builder
import Packages
import Settings.Builders.Common
hsc2hsBuilderArgs :: Args
hsc2hsBuilderArgs = builder Hsc2Hs ? do
stage <- getStage
ccPath <- getBuilderPath $ Cc CompileC stage
gmpDir <- getSett... |
77f2bb6ae62171f57e0bbe50516232336348906c79fe529ad43856fec47c9b2a | mirage/lwt-dllist | test_lwt_dllist.ml | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
open Test
let filled_sequence () =
let s = Lwt_dllist.create () in
let _ = Lwt_dllist.add_r 1 s in
let _ = Lwt_dllist.add_r 2 s in
let _ = Lwt_dllist.add_r 3 s in
let _ = Lwt... | null | https://raw.githubusercontent.com/mirage/lwt-dllist/9405bc1f1479ac94322a536e95bc64b03559996e/test/test_lwt_dllist.ml | ocaml | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
open Test
let filled_sequence () =
let s = Lwt_dllist.create () in
let _ = Lwt_dllist.add_r 1 s in
let _ = Lwt_dllist.add_r 2 s in
let _ = Lwt_dllist.add_r 3 s in
let _ = Lwt... | |
51ffd7f55abebeeeed39083a5b71aa279d83b250c782a1cb497c8ef5863ee257 | clash-lang/clash-compiler | ClockGen.hs | |
Copyright : ( C ) 2017 - 2018 , Google Inc
2019 , Myrtle Software
2022 , QBayLogic B.V.
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
PLL and other clock - related components for Intel ( Altera ) FPGAs
A PLL generates... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/9417cb618257266471cda191893593a739b888c8/clash-prelude/src/Clash/Intel/ClockGen.hs | haskell | with settings to provide a stable 'Clock' from a single free-running input
Only works when configured with:
* a reset input port
* a locked output port
connected to reset circuitry to keep the circuit in reset while the clock is
still stabilizing.
See also the [ALTPLL (Phase-Locked Loop) IP Core User Guide](... | |
Copyright : ( C ) 2017 - 2018 , Google Inc
2019 , Myrtle Software
2022 , QBayLogic B.V.
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
PLL and other clock - related components for Intel ( Altera ) FPGAs
A PLL generates... |
5f8fd8697a3dfabc2708184a694a56716511172dbb2a4a7f13dc5722bfcda38a | ufasoft/lisp | places.lisp | CLISP - PLACES.LSP
CLISP - specific : string - concat , % rplaca , % rplacd , store , setelt , ...
(in-package "SYSTEM")
;;;----------------------------------------------------------------------------
;;; Functions to define and deal with places
;;;-----------------------------------------------------------------... | null | https://raw.githubusercontent.com/ufasoft/lisp/bd5213fbd5e162ca7e8a4a9b5aeb6252f38a30fc/clisp/places.lisp | lisp | ----------------------------------------------------------------------------
Functions to define and deal with places
----------------------------------------------------------------------------
Return a symbol for SYSTEM::SETF-FUNCTION
the returned symbol will be interned iff the argument is.
----------------------... | CLISP - PLACES.LSP
CLISP - specific : string - concat , % rplaca , % rplacd , store , setelt , ...
(in-package "SYSTEM")
(defun setf-symbol (symbol)
(let* ((pack (symbol-package symbol))
(name (string-concat "(SETF " (if pack (package-name pack) "#") ":"
(symbol-name symbo... |
6981ef29e424ea3de2e982c7c3a5cc183d4504d609c81127ceb266b6b4d16d1f | Frama-C/Frama-C-snapshot | dyncall.ml | (**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/dyncall.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Software
Foundation ,... |
527d5cbb1b8f06c43c2d483935242a7aff9b71f406c0d7d872269c4557fb151d | OCamlPro/drom | config.ml | (**************************************************************************)
(* *)
Copyright 2020 OCamlPro & Origin Labs
(* *)
(* All rights ... | null | https://raw.githubusercontent.com/OCamlPro/drom/dbbb5f9225df65c589e6f307ac28be4c408b9cae/src/drom_lib/config.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2020 OCamlPro & Origin Labs
GNU Lesser General Public License version 2.1 , with the special
open Ez_file.V1
open Types
open EzFile.OP
let config_of_toml filename =
Printf.eprintf " Loading config from % s\n% ! " filename ;
match EzToml.from_file filename wi... |
d6f0169ec6a41aeb389d3d1b5975ee2b6e93ef8373df5d4690eed253d87dcc95 | pol-is/polisMath | logger.clj | Copyright ( C ) 2012 - present , The Authors . This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . This program is distributed in the hope that it will be useful , but WITHOUT A... | null | https://raw.githubusercontent.com/pol-is/polisMath/dfe233e8c9207c2ce11e1379286ad0cf0f732067/src/polismath/components/logger.clj | clojure | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU Affero General Public License for more details . You should have received a copy of the GNU Affero General Public License along with this program . If not , see < / > .
XXX Hmmm.. this doesn't seem to be working... |
(ns polismath.components.logger
(:require [com.stuartsierra.component :as component]
[taoensso.timbre :as log]
[taoensso.timbre.appenders.core :as appenders]))
(defrecord Logger [config]
component/Lifecycle
(start [component]
(log/info ">> Starting config component")
(log/merge-... |
aa48e2c620ad0a5d4d1d3bd3651954415e5032719a49abb71fb924e957ee8c17 | bbusching/libgit2 | revwalk.rkt | #lang racket
(require ffi/unsafe
"define.rkt"
"types.rkt"
"utils.rkt")
(provide (all-defined-out))
; Types
(define _git_sort_t
(_bitmask '(GIT_SORT_NONE = 0
GIT_SORT_TOPOLOGICAL = 1
GIT_SORT_TIME = 2
GIT_SORT_REVERSE = 4)))
(define _git_revwalk... | null | https://raw.githubusercontent.com/bbusching/libgit2/6d6a007543900eb7a6fbbeba55850288665bdde5/libgit2/include/revwalk.rkt | racket | Types
Functions | #lang racket
(require ffi/unsafe
"define.rkt"
"types.rkt"
"utils.rkt")
(provide (all-defined-out))
(define _git_sort_t
(_bitmask '(GIT_SORT_NONE = 0
GIT_SORT_TOPOLOGICAL = 1
GIT_SORT_TIME = 2
GIT_SORT_REVERSE = 4)))
(define _git_revwalk_hide_cb... |
e7f7f99071a82d021a9d470fbd17cc45bb550f661497177b0c8598676e35887f | gergoerdi/tandoori | bool.hs | -- data Bool = True | False
-- ifthenelse :: Bool -> a -> a -> a
ifthenelse True x y = x
ifthenelse False x y = y
| null | https://raw.githubusercontent.com/gergoerdi/tandoori/515142ce76b96efa75d7044c9077d85394585556/input/bool.hs | haskell | data Bool = True | False
ifthenelse :: Bool -> a -> a -> a |
ifthenelse True x y = x
ifthenelse False x y = y
|
64aad54a907420c88d49144468e1d781dd7b8a4042b6127c9911633c9fa5410a | grisp/rebar3_grisp | rebar3_grisp_version.erl | -module(rebar3_grisp_version).
% Callbacks
-export([init/1]).
-export([do/1]).
-export([format_error/1]).
-import(rebar3_grisp_util, [
console/1,
console/2
]).
%--- Callbacks -----------------------------------------------------------------
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
init(State) -... | null | https://raw.githubusercontent.com/grisp/rebar3_grisp/b166498e3d31f534b6f740bf4151d86aba8b7166/src/rebar3_grisp_version.erl | erlang | Callbacks
--- Callbacks -----------------------------------------------------------------
--- Internal ------------------------------------------------------------------ | -module(rebar3_grisp_version).
-export([init/1]).
-export([do/1]).
-export([format_error/1]).
-import(rebar3_grisp_util, [
console/1,
console/2
]).
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
init(State) ->
Provider = providers:create([
{namespace, grisp},
{name, version},
... |
c6b5f29f45973aa80ad1f02bcd18d7805e334ef187abe759d175482910d1be82 | rems-project/cerberus | cerb_runtime.ml | * Discover the path to the Cerberus runtime .
(** If it is set, [specified_runtime] has highest priority, and it can thus be
used to override the "detected" runtime path from the CLI for example. *)
let specified_runtime : string option ref = ref None
* [ find_build_runtime ( ) ] attempts to locate the build - ti... | null | https://raw.githubusercontent.com/rems-project/cerberus/124c93f10cb4c235f6396adec82ebf9563daeb7e/util/cerb_runtime.ml | ocaml | * If it is set, [specified_runtime] has highest priority, and it can thus be
used to override the "detected" runtime path from the CLI for example.
* [detect_runtime ()] locates the cerberus runtime. Note that if opam is not
properly initialized then the function may raise [Failure].
Then check the CERB_RUNT... | * Discover the path to the Cerberus runtime .
let specified_runtime : string option ref = ref None
* [ find_build_runtime ( ) ] attempts to locate the build - time Cerberus runtime
( inside the Dune [ _ build ] directory ) using the PATH . Exception [ Not_found ]
is raised in case of failure .
(inside... |
cda0d95c507bd0bf0cb0c49b27df725d12869cda0244623d8d21b2e63323dbbf | yuriy-chumak/ol | process-context.scm | (define-library (scheme process-context)
;; An interface to the system environment, command
;; line, and process exit status is available in the (scheme
;; process-context) library.
(export
command-line
exit
emergency-exit
get-environment-variable
get-environment-variables
set-en... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/e4cdab9f15eaf00f7d5e3cf553b36571584d3d10/libraries/scheme/process-context.scm | scheme | An interface to the system environment, command
line, and process exit status is available in the (scheme
process-context) library. | (define-library (scheme process-context)
(export
command-line
exit
emergency-exit
get-environment-variable
get-environment-variables
set-environment-variable
unset-environment-variable)
(import
(scheme core)
(otus async)
(owl string))
(begin
... |
fc7abe5b980bc6fe2bbb3478068c2753189f81a3dc789f9bd6999155fb123a9b | puppetlabs/ring-middleware | common.clj | (ns puppetlabs.ring-middleware.common
(:require [clojure.tools.logging :as log]
[clojure.string :refer [join split replace-first]]
[puppetlabs.http.client.sync :refer [request]]
[puppetlabs.i18n.core :as i18n :refer [trs]])
(:import (java.net URI)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/puppetlabs/ring-middleware/a09e0fe0e62f31ce49c807b831adf7153cdc37ac/src/puppetlabs/ring_middleware/common.clj | clojure |
Private utility functions
Remove :decompress-body from the options map, as if this is
ever set to true, the response returned to the client making the
proxy request will be truncated | (ns puppetlabs.ring-middleware.common
(:require [clojure.tools.logging :as log]
[clojure.string :refer [join split replace-first]]
[puppetlabs.http.client.sync :refer [request]]
[puppetlabs.i18n.core :as i18n :refer [trs]])
(:import (java.net URI)))
(defn prepare-cookies
"Rem... |
7723ac705bd0e052ac1763354253bc6c2cbcfef14d62f27865282c9ae20c4182 | 6502/JSLisp | crayons.lisp | (import * from gui)
(import * from layout)
(defun crayons ()
(let** ((w (window 0 0 0.75 0.75 title: "Crayons"))
(area (add-widget w (create-element "div")))
(canvas (append-child area (set-style (create-element "canvas")
position "absolute"
... | null | https://raw.githubusercontent.com/6502/JSLisp/9a4aa1a9116f0cfc598ec9f3f30b59d99810a728/examples/crayons.lisp | lisp | (import * from gui)
(import * from layout)
(defun crayons ()
(let** ((w (window 0 0 0.75 0.75 title: "Crayons"))
(area (add-widget w (create-element "div")))
(canvas (append-child area (set-style (create-element "canvas")
position "absolute"
... | |
3003877e0433c1a5049ae8208b3fd44f8706400ab097a30d571414782ba25ba2 | ilevd/hicosql | parser.clj | (ns hicosql.parser
(:require [instaparse.core :as insta]))
(def function-parser
(insta/parser
"
main = name w? <'('> w? params w? <')'> w?
params = name (w? <','> w? name)*
<name> = #\"[a-zA-Z0-9_-]+\"
<w> = <#'\\s+'>
"))
(defn parse-function-def [s]
(let [data (function-parser s)]
... | null | https://raw.githubusercontent.com/ilevd/hicosql/0393ce9ccd3b77f6b96376545ab1db4d66c2acd5/src/hicosql/parser.clj | clojure | (ns hicosql.parser
(:require [instaparse.core :as insta]))
(def function-parser
(insta/parser
"
main = name w? <'('> w? params w? <')'> w?
params = name (w? <','> w? name)*
<name> = #\"[a-zA-Z0-9_-]+\"
<w> = <#'\\s+'>
"))
(defn parse-function-def [s]
(let [data (function-parser s)]
... | |
46ea12459fa0837d4738576995a7754aaafd2a3109cc8d2bd2c6480af7272c88 | mryndzionek/composable-sdr | SoapySDR.hs | # OPTIONS_GHC -Wno - missing - signatures #
module Main where
import qualified Data.Map as M
import Data.Maybe (mapMaybe)
import Data.Semigroup ((<>))
import Control.Category (Category (..), id)
import Control.Exception (fromException, try)
impor... | null | https://raw.githubusercontent.com/mryndzionek/composable-sdr/b0d492a4ae00096809531e8df7b443e4edf99acc/apps/SoapySDR.hs | haskell | # OPTIONS_GHC -Wno - missing - signatures #
module Main where
import qualified Data.Map as M
import Data.Maybe (mapMaybe)
import Data.Semigroup ((<>))
import Control.Category (Category (..), id)
import Control.Exception (fromException, try)
impor... | |
70c6e6b163703a66c6c597ac954112c0e1a32d97748528d4644a052b2ebc3588 | erlang/otp | observer.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2011 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/observer/src/observer.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2011 - 2023 . 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(observer).
-export([start/0, start/1, start_and_wait/0, start_and_wait/1, stop/0]).
start() ->
observ... |
8552ac9868ac95b8ea6f085d806eb86f58e47331195ce82bb0f159c19673c03b | lread/test-doc-blocks | doc_parse_test.clj | (ns lread.test-doc-blocks.impl.doc-parse-test
(:require [babashka.fs :as fs]
[clojure.string :as string]
[clojure.test :refer [deftest testing is]]
[lread.test-doc-blocks.impl.doc-parse :as sut])
(:import [java.io File]))
;; TODO: Spot checks for now until/if I tangle apart pars... | null | https://raw.githubusercontent.com/lread/test-doc-blocks/8b40a1713ccb951f982b0aed46f7aef96efc79e5/test/lread/test_doc_blocks/impl/doc_parse_test.clj | clojure | TODO: Spot checks for now until/if I tangle apart parsing from evaluation | (ns lread.test-doc-blocks.impl.doc-parse-test
(:require [babashka.fs :as fs]
[clojure.string :as string]
[clojure.test :refer [deftest testing is]]
[lread.test-doc-blocks.impl.doc-parse :as sut])
(:import [java.io File]))
(defn temp-file [prefix ext lines]
(let [f (File/creat... |
d462473d863c4d53629860bb7aeaaa31b5567b09bc68685327c2841368ebe57b | jamesmacaulay/zelkova | signal_test.cljc | (ns jamesmacaulay.zelkova.signal-test
#?(:cljs (:require [jamesmacaulay.async-tools.core :as tools]
[jamesmacaulay.zelkova.signal :as z]
[jamesmacaulay.zelkova.impl.signal :as impl]
[cljs.core.async :as async :refer [chan to-chan <! >!]]
... | null | https://raw.githubusercontent.com/jamesmacaulay/zelkova/a8e00dc51b48c5b429fe2e2fb4aa2d557571829c/test/jamesmacaulay/zelkova/signal_test.cljc | clojure | (ns jamesmacaulay.zelkova.signal-test
#?(:cljs (:require [jamesmacaulay.async-tools.core :as tools]
[jamesmacaulay.zelkova.signal :as z]
[jamesmacaulay.zelkova.impl.signal :as impl]
[cljs.core.async :as async :refer [chan to-chan <! >!]]
... | |
a8624b9d21264240b1b3492d9b807dd80792bd663341897f35e2182a8a154d3d | elnewfie/lslforge | Evaluation.hs | module Language.Lsl.Internal.Evaluation(
ScriptInfo(..),
EvalResult(..),
Event(..)) where
import Data.Map(Map)
import Language.Lsl.Internal.Key(LSLKey(..))
import Language.Lsl.Internal.Type(LSLValue)
import Language.Lsl.Internal.Util(LSLInteger)
import Language.Lsl.Internal.Breakpoint(Breakpoint)
type Scr... | null | https://raw.githubusercontent.com/elnewfie/lslforge/27eb84231c53fffba6bdb0db67bde81c1c12dbb9/lslforge/haskell/src/Language/Lsl/Internal/Evaluation.hs | haskell | ( object i d , prim index , script name , prim key ) | module Language.Lsl.Internal.Evaluation(
ScriptInfo(..),
EvalResult(..),
Event(..)) where
import Data.Map(Map)
import Language.Lsl.Internal.Key(LSLKey(..))
import Language.Lsl.Internal.Type(LSLValue)
import Language.Lsl.Internal.Util(LSLInteger)
import Language.Lsl.Internal.Breakpoint(Breakpoint)
data Scr... |
686f3705a01f8cd6077e7760a15d1f8c36781554a67c360b7f73a6cb558c88bd | runtimeverification/haskell-backend | Bool.hs | |
Copyright : ( c ) Runtime Verification , 2018 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2018-2021
License : BSD-3-Clause
-}
module Kore.Builtin.Bool (
sort,
assertSort,
verifiers,
builtinFunctions,
asInternal,
asPattern,
extractBoolDomainVa... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/283674984e2845ca5bf4877f36302a3c981e7bb4/kore/src/Kore/Builtin/Bool.hs | haskell | * Keys
| Verify that hooked symbol declarations are well-formed.
See also: 'Builtin.verifySymbol'
| Verify that domain value patterns are well-formed.
| get the value from a (possibly encoded) domain value
| error message Context
| Parse an integer string literal.
| @builtinFunctions@ are builtin functions o... | |
Copyright : ( c ) Runtime Verification , 2018 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2018-2021
License : BSD-3-Clause
-}
module Kore.Builtin.Bool (
sort,
assertSort,
verifiers,
builtinFunctions,
asInternal,
asPattern,
extractBoolDomainVa... |
9fdd57650a9c110d5c8c5ddf56e0996e9a15319476e40994eccfa292d5b138aa | dboris/ocaml-cocoa | nswindow.ml | open Objc
open Foundation
module StyleMask = struct
let t = uint
let borderless = UInt.zero
let titled = UInt.(shift_left one 0)
let closable = UInt.(shift_left one 1)
let miniaturizable = UInt.(shift_left one 2)
let resizable = UInt.(shift_left one 3)
let texturedBackground = UInt.(shift_l... | null | https://raw.githubusercontent.com/dboris/ocaml-cocoa/2c2831b0436c807f9cca287cef4f7caf5fb2ea49/src/nswindow.ml | ocaml | open Objc
open Foundation
module StyleMask = struct
let t = uint
let borderless = UInt.zero
let titled = UInt.(shift_left one 0)
let closable = UInt.(shift_left one 1)
let miniaturizable = UInt.(shift_left one 2)
let resizable = UInt.(shift_left one 3)
let texturedBackground = UInt.(shift_l... | |
7bc59698ae41fbd2219a13d47f5b4006405653076b1f69459e635ac7a629a7b3 | zadean/xqerl | prod_DecimalFormatDecl_SUITE.erl | -module('prod_DecimalFormatDecl_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['decimal-format-01'/1]).
-export(['decimal-format-02'/1]).
-export(['dec... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/prod/prod_DecimalFormatDecl_SUITE.erl | erlang | \" decimal-separator=\".\";\n" | -module('prod_DecimalFormatDecl_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['decimal-format-01'/1]).
-export(['decimal-format-02'/1]).
-export(['dec... |
54eb3ea32cb8a75641b2eb0805ad19ea6f7ea504225de283613d7778c4e2009e | cljfx/cljfx | event_handler.clj | (ns cljfx.event-handler
"Part of a public API"
(:import [clojure.lang Agent]))
(defn make-deref-co-effect [*ref]
#(deref *ref))
(defn wrap-co-effects [f co-effect-id->producer]
(fn [event]
(f (reduce (fn [acc [k v]]
(assoc acc k (v)))
event
co-effect-id->prod... | null | https://raw.githubusercontent.com/cljfx/cljfx/ec3c34e619b2408026b9f2e2ff8665bebf70bf56/src/cljfx/event_handler.clj | clojure | (ns cljfx.event-handler
"Part of a public API"
(:import [clojure.lang Agent]))
(defn make-deref-co-effect [*ref]
#(deref *ref))
(defn wrap-co-effects [f co-effect-id->producer]
(fn [event]
(f (reduce (fn [acc [k v]]
(assoc acc k (v)))
event
co-effect-id->prod... | |
94d302bd1fc18007dba7dfe303f541692697ca8e3dcf379688d2a8e3c18aa00a | tweag/ormolu | proc-applications-out.hs | {-# LANGUAGE Arrows #-}
foo x = proc a -> a -< x
foolr x = proc a -> x >- a
bar f x =
proc
( y,
z,
w
)
->
f -- The value
-<
( x, -- Foo
w, -- Bar
)
baz x = proc a -> a -<< x
bazlr x = proc a -> x >>- a
| null | https://raw.githubusercontent.com/tweag/ormolu/f1d701f9113286eccbbaad44333f88bfb793b9af/data/examples/declaration/value/function/arrow/proc-applications-out.hs | haskell | # LANGUAGE Arrows #
The value
Foo
Bar |
foo x = proc a -> a -< x
foolr x = proc a -> x >- a
bar f x =
proc
( y,
z,
w
)
->
-<
)
baz x = proc a -> a -<< x
bazlr x = proc a -> x >>- a
|
a33d9c17c7755dfbc31bf1597f31b80ba4f64670be3e21e1f55b20d1fe78d5f3 | inaka/shotgun | shotgun_test_utils.erl | -module(shotgun_test_utils).
-type config() :: [{atom(), term()}].
-export_type([config/0]).
-export([all/1]).
-export([ auto_send/1
, wait_receive/2
]).
-spec all(atom()) -> [atom()].
all(Module) ->
ExcludedFuns = [module_info, init_per_suite, end_per_suite],
[F || {F, 1} <- Module:module_info(... | null | https://raw.githubusercontent.com/inaka/shotgun/2fa6c86e7cc7c0d437c624aa72956a8f6e82f360/test/shotgun_test_utils.erl | erlang | -module(shotgun_test_utils).
-type config() :: [{atom(), term()}].
-export_type([config/0]).
-export([all/1]).
-export([ auto_send/1
, wait_receive/2
]).
-spec all(atom()) -> [atom()].
all(Module) ->
ExcludedFuns = [module_info, init_per_suite, end_per_suite],
[F || {F, 1} <- Module:module_info(... | |
d46c0c5487454672665148a049caef7bfc5d7065e15bceb1bc312320b5516f07 | nedap/formatting-stack | no_extra_blank_lines.clj | (ns formatting-stack.formatters.no-extra-blank-lines
"Ensures that no three consecutive newlines happen in a given file.
That can happen naturally, or because of other formatters' intricacies."
(:require
[clojure.spec.alpha :as spec]
[clojure.string :as string]
[formatting-stack.protocols.formatter :as ... | null | https://raw.githubusercontent.com/nedap/formatting-stack/c43e74d5409e9338f208457bb8928ce437381a3f/src/formatting_stack/formatters/no_extra_blank_lines.clj | clojure | group consecutive warnings | (ns formatting-stack.formatters.no-extra-blank-lines
"Ensures that no three consecutive newlines happen in a given file.
That can happen naturally, or because of other formatters' intricacies."
(:require
[clojure.spec.alpha :as spec]
[clojure.string :as string]
[formatting-stack.protocols.formatter :as ... |
f8822f959372c5a0942d1a3c7646de8e7160381a1c6b4fef5df906bacb108e55 | B-Lang-org/bsc | Yices.hs | {-# LANGUAGE ForeignFunctionInterface #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE CPP #
module Yices (
-- * Types
Expr,
Type,
Context,
Status(..),
Model,
-- * Version numbers
version,
buildArch, buildMode, buildDate,
--... | null | https://raw.githubusercontent.com/B-Lang-org/bsc/bd141b505394edc5a4bdd3db442a9b0a8c101f0f/src/vendor/yices/v2.6/HaskellIfc/Yices.hs | haskell | # LANGUAGE ForeignFunctionInterface #
# LANGUAGE TypeSynonymInstances #
* Types
* Version numbers
Check that version is not a stub
* Global initialization and cleanup
* Error reporting
...
* Type constructors
* Term constructors
** Logical operators
* Arithmetic term constructors
* Bit vector term co... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE CPP #
module Yices (
Expr,
Type,
Context,
Status(..),
Model,
version,
buildArch, buildMode, buildDate,
checkVersion,
yicesInit , yicesExit , yicesReset ,
mkBoolType,
mkBitVectorType,
mkIntType,
mkTrue, mkFalse,
... |
9e6dffd4304c1f264b436600207513d6a0dc4f3f07b8b23b2903b72fb59247e1 | cxphoe/SICP-solutions | 3.79.rkt | (define (solve-2nd f y0 dy0 dt)
(define y (integral (delay dy) y0 dt))
(define dy (integral (delay ddy) dy0 dt))
(define ddy (stream-map f (scale-stream dy (/ 1 dt)) y))
y) | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%203-Modeling%20with%20Mutable%20Data/5.Stream/3.79.rkt | racket | (define (solve-2nd f y0 dy0 dt)
(define y (integral (delay dy) y0 dt))
(define dy (integral (delay ddy) dy0 dt))
(define ddy (stream-map f (scale-stream dy (/ 1 dt)) y))
y) | |
4a86e4c324b9b055cbccfdf6704b4624c42e4eef683222987aea4f4ef65c1e96 | sol/hpack | Defaults.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE CPP #
# LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns #
# LANGUAGE LambdaCase #
module Hpack.Defaults (
ensure
, Defaults(..)
#ifdef TEST
, Result(..)
, ensureFile
#endif
) where
import Imports
import Network.HTTP.Client
import Network... | null | https://raw.githubusercontent.com/sol/hpack/be9b7fa56165b9fc8c8cc8804554ae39c0a67ef0/src/Hpack/Defaults.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE CPP #
# LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns #
# LANGUAGE LambdaCase #
module Hpack.Defaults (
ensure
, Defaults(..)
#ifdef TEST
, Result(..)
, ensureFile
#endif
) where
import Imports
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import qualified D... |
68d2f0eb67f54766a14ad3f44d0f5c6dd54132dbe517d5a0abe113a648fbc05d | nubank/workspaces | deps.cljs | {:npm-deps
{:react-grid-layout "^0.16.6"
:highlight.js "^9.12.0"}}
| null | https://raw.githubusercontent.com/nubank/workspaces/c93802388e1d6e1028dda6868d4fece8a2df8ea1/src/deps.cljs | clojure | {:npm-deps
{:react-grid-layout "^0.16.6"
:highlight.js "^9.12.0"}}
| |
f1253bd80d132b307ea057c0d9e01b12df5bce30618e2255b6feaa7ea984eef7 | jwiegley/notes | CheckT.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE GeneralizedNewtypeDeriving #
module CheckT where
import Control.Monad hiding (mapM)
import Control.Monad.Trans.Class
import Control.Monad.Trans.Reader
import Data.IORef
import Data.Traversable
import Prelude hiding (mapM)
newtype CheckT m a = CheckT { getCheckT :: Reader... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/misc/CheckT.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE GeneralizedNewtypeDeriving #
module CheckT where
import Control.Monad hiding (mapM)
import Control.Monad.Trans.Class
import Control.Monad.Trans.Reader
import Data.IORef
import Data.Traversable
import Prelude hiding (mapM)
newtype CheckT m a = CheckT { getCheckT :: ReaderT (m Bool) m (Maybe a) }
derivi... |
d7e2007e0232bf30a2db0813deeaf637bf86c9f5bbc392c768c81688ef484905 | jellelicht/guix | slim.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2014 < >
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Fre... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/slim.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 © 2013 < >
Copyright © 2014 < >
Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages slim)
#:use-module ((guix licen... |
bdcde4d9ed6a4353f106b5df00546e4bd544d81c95840d62a5ebc47e8e510c98 | NorfairKing/easyspec | TypeTranslation.hs | # LANGUAGE FlexibleContexts #
module EasySpec.Discover.TypeTranslation where
import Import hiding (tyConName)
import System.FilePath as FP
import Class
import GHC
import qualified Module
import qualified Name
import TyCoRep
import TyCon
import Type
import Var
import Language.Haskell.Exts.Syntax as H
import EasySp... | null | https://raw.githubusercontent.com/NorfairKing/easyspec/b038b45a375cc0bed2b00c255b508bc06419c986/easyspec/src/EasySpec/Discover/TypeTranslation.hs | haskell | This should not occur, but it's not enforced by the type system. | # LANGUAGE FlexibleContexts #
module EasySpec.Discover.TypeTranslation where
import Import hiding (tyConName)
import System.FilePath as FP
import Class
import GHC
import qualified Module
import qualified Name
import TyCoRep
import TyCon
import Type
import Var
import Language.Haskell.Exts.Syntax as H
import EasySp... |
8aaded7efad6fb427e8b0efdaddba6d1b7b1b28d4dd6de3282fe61c6b6102ac9 | facebook/duckling | Types.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE NamedFieldPuns #
# LANGUAGE DeriveGeneric #
# LANGUAGE NoRebindab... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/CreditCardNumber/Types.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
# LANGUAGE NamedFieldPuns #
# LANGUAGE DeriveGeneric #
# LANGUAGE NoRebindableSyntax #
# LANGUAGE TypeFamilies #
module Duckling.CreditCardNumber.Types where
import Control.DeepSeq
import Data.Aeson
import Data.Hashable
import Data.Text (Text)
import qualified Data... |
800a6d9582b3247629df9fb93e276ceab7b3be3b74f11d0e45eb5113c69de3ed | zellige/hs-geojson | CRSTests.hs | {-# LANGUAGE OverloadedStrings #-}
module Data.Geospatial.Internal.CRSTests where
import qualified Data.Aeson as A
import qualified Data.ByteString.Lazy.Char8 as BS
-- Local
import Data.Geospatial.Internal.CRS
import Fixture
import Test.Hspec
( Spec,
context,
describe,
it,
shouldBe,
)
import Test.... | null | https://raw.githubusercontent.com/zellige/hs-geojson/63d89670c5daaa7b5093c6d638e34846a44e0f12/test/Data/Geospatial/Internal/CRSTests.hs | haskell | # LANGUAGE OverloadedStrings #
Local
Tests
>>> (A.decode . BS.pack) testLinkCRSJSON == Just testLinkCRS
True
>>> (A.decode . BS.pack) testNamedCRSJSON == Just testNamedCRS
True
True
True
>>> (A.decode . A.encode) testLinkCRS == Just testLinkCRS
True
>>> (A.decode . A.encode) testNamedCRS == Just testNam... |
module Data.Geospatial.Internal.CRSTests where
import qualified Data.Aeson as A
import qualified Data.ByteString.Lazy.Char8 as BS
import Data.Geospatial.Internal.CRS
import Fixture
import Test.Hspec
( Spec,
context,
describe,
it,
shouldBe,
)
import Test.Tasty
import Test.Tasty.Hspec
( testSpec,
... |
a6fb0634adf61cdbe995b778a359a5e078b24bfb02e3ec1145d4c6be75f21557 | bnomis/om-next-datascript-localisation-demo | localised_string.cljs | (ns om-next-datascript-localisation-demo.components.locale.localised-string
(:require
[om.next :as om :refer-macros [defui]]
[sablono.core :as html :refer-macros [html]]
[om-next-datascript-localisation-demo.logging :refer-macros [log]]
[om-next-datascript-localisation-demo.utils.ident :refer [string-... | null | https://raw.githubusercontent.com/bnomis/om-next-datascript-localisation-demo/be9a77e0a040896533f79f86cdbd115c19ab3c9f/src/om_next_datascript_localisation_demo/components/locale/localised_string.cljs | clojure | (log "LocalisedString: render: props " props) | (ns om-next-datascript-localisation-demo.components.locale.localised-string
(:require
[om.next :as om :refer-macros [defui]]
[sablono.core :as html :refer-macros [html]]
[om-next-datascript-localisation-demo.logging :refer-macros [log]]
[om-next-datascript-localisation-demo.utils.ident :refer [string-... |
6d3cee872e81fa5cbfdb177ad4773382cba7234840ace2757f930fdd26897b4e | qkrgud55/ocamlmulti | std_exit.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/stdlib/std_exit.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : std_exit.ml 11156 2011 - 07 -... |
67b6e3ed763e0edab5caa5964684e5ffd779d8169c19e781481976cb9f2ad79e | duncanatt/detecter | cowboy_clear.erl | Copyright ( c ) 2016 - 2017 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/duncanatt/detecter/95b6a758ce6c60f3b7377c07607f24d126cbdacf/experiments/coordination_2022/src/cowboy/cowboy_clear.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2016 - 2017 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(cowboy_clear).
-behavior(ranch_protocol).
-i... |
068189c8f00ed6151999390e8530010fc420f4855d1b996e7d6d24bf6c6a5588 | inhabitedtype/ocaml-aws | createHostedZone.mli | open Types
type input = CreateHostedZoneRequest.t
type output = CreateHostedZoneResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/route53/lib/createHostedZone.mli | ocaml | open Types
type input = CreateHostedZoneRequest.t
type output = CreateHostedZoneResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
23d4256c8e91a9a3daa67e414aab02a5c9af32ac89e74abba46bb27291202d3d | discus-lang/ddc | Base.hs | {-# OPTIONS_HADDOCK hide #-}
Generic type expression representation .
module DDC.Source.Discus.Exp.Type.Base
( module DDC.Source.Discus.Exp.Bind
, module DDC.Data.Label
-- * Abstract Syntax
, GType (..)
, GTyCon (..)
, TyConPrim (..)
, Pri... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-source-discus/DDC/Source/Discus/Exp/Type/Base.hs | haskell | # OPTIONS_HADDOCK hide #
* Abstract Syntax
* Syntactic Sugar
-------------------------------------------------------------------------------------------------
| Generic type expression representation.
-------------------------------------------------
| An annotated type.
| Type constructor or literal.
| Type vari... |
Generic type expression representation .
module DDC.Source.Discus.Exp.Type.Base
( module DDC.Source.Discus.Exp.Bind
, module DDC.Data.Label
, GType (..)
, GTyCon (..)
, TyConPrim (..)
, PrimTyCon (..)
, TyConDiscus (..)
, patt... |
f0843df0ee1c560850c57cf2787b06abaf2a4586f074b625414b0bdcc4938524 | rtoy/cmucl | cp1256.lisp | ;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*-
;;;
;;; **********************************************************************
This code was written by and has been placed in the public
;;; domain.
;;;
(ext:file-comment "$Header: src/pcl/simple-streams/external-formats/cp1256.lisp $")
(in-package... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/pcl/simple-streams/external-formats/cp1256.lisp | lisp | -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*-
**********************************************************************
domain.
For undefined characters we use U+FFFE | This code was written by and has been placed in the public
(ext:file-comment "$Header: src/pcl/simple-streams/external-formats/cp1256.lisp $")
(in-package "STREAM")
(intl:textdomain "cmucl")
See
(defconstant +ms-cp1256+
(make-array 128
:element-type '(unsigned-byte 16)
:initial-c... |
92b3d5f3a9bf2e10c4044d420845e672b79aeb21a1d5db2336b629a20dfb1663 | ghc/nofib | Test.hs | module Test where
import LambdaLift
import Utilities
program =
(ELet True [("p", ELam ["a", "b"] (ELet False [("p", (EAp (EAp (EConst
(CFun "-")) (EAp (EAp (EConst (CFun "+")) (EVar "a")) (EVar "b")))
(EConst (CNum 20))))] (ELet False [("m", ELam ["p", "q"] (ELet False
[("g", (EAp (EAp (EConst (CFun "+"... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/lift/Test.hs | haskell | module Test where
import LambdaLift
import Utilities
program =
(ELet True [("p", ELam ["a", "b"] (ELet False [("p", (EAp (EAp (EConst
(CFun "-")) (EAp (EAp (EConst (CFun "+")) (EVar "a")) (EVar "b")))
(EConst (CNum 20))))] (ELet False [("m", ELam ["p", "q"] (ELet False
[("g", (EAp (EAp (EConst (CFun "+"... | |
85f6a055eb86b376edde0ee78e20b8d3ba98d69e5ce5cde78c680310d5c61cea | awalterschulze/the-little-typer-exercises | chapter8-3-plus-assoc.rkt | #lang pie
;; Define a function called plus-assoc that states and proves that
;; + is associative.
;; (claim plus-assoc
( Pi ( ( n Nat ) ( m ) ( k Nat ) )
( + k ( + n m ) ) ( + ( + k n ) m ) ) ) )
(claim + (-> Nat Nat Nat))
(define +
(lambda (a b)
(rec-Nat a
b
(lambda (_ b+a-1)
(... | null | https://raw.githubusercontent.com/awalterschulze/the-little-typer-exercises/91cad6c6d5c1733562aa952d8ca515addb2b301d/chapter8-3-plus-assoc.rkt | racket | Define a function called plus-assoc that states and proves that
+ is associative.
(claim plus-assoc
start actual exercise | #lang pie
( Pi ( ( n Nat ) ( m ) ( k Nat ) )
( + k ( + n m ) ) ( + ( + k n ) m ) ) ) )
(claim + (-> Nat Nat Nat))
(define +
(lambda (a b)
(rec-Nat a
b
(lambda (_ b+a-1)
(add1 b+a-1)))))
practice by first proving that n=0+n
(claim n=0+n
(Pi ((n Nat))
(= Nat n (+ 0 n))))... |
0a37f0088e69e4f18d322f829917d1d45bcf50dfdf010df575c49dc83b06a1d7 | upgradingdave/cljs | pass.cljc | (ns up.pass
(:require #?(:clj [clojure.spec :as s]
:cljs [cljs.spec :as s])
#?(:clj [clojure.spec.gen :as gen]
:cljs [cljs.spec.impl.gen :as gen])
[up.pass-cljs-macro :refer-macros [and']]))
(def char-lowers (into #{} (map char (range 97 122)))... | null | https://raw.githubusercontent.com/upgradingdave/cljs/1026b6db905214586fb7e04800df078da19b37cc/src/cljc/up/pass.cljc | clojure | This is a spec for password configs
TODO: min required must be less than total
min-length must be at least as big as sum of minimums of various
char classes
total max length of password must be bigger than min length
TODO: min required for any given class of chars must be less than the
number of valid character... | (ns up.pass
(:require #?(:clj [clojure.spec :as s]
:cljs [cljs.spec :as s])
#?(:clj [clojure.spec.gen :as gen]
:cljs [cljs.spec.impl.gen :as gen])
[up.pass-cljs-macro :refer-macros [and']]))
(def char-lowers (into #{} (map char (range 97 122)))... |
f0f6da64b3c3ec76eaa10f1270014476348057e29b8e86afa712a26bd9e25eea | tezos/tezos-mirror | wasm_encoding.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 TriliTech < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/652a2ac363a38cbbc94ac49050c4acdfbbea874a/src/lib_scoru_wasm/wasm_encoding.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 TriliTech < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER... |
ba652e5721013861482add7765f77521981c3c8ac9a2c7810f2f075f4631bfd3 | exoscale/ablauf | job.clj | (ns ablauf.job
"
An abstract program runtime for ASTs produced by `ablauf.job.ast`.
This exposes two functions for the outside world: `make`
and `restart`
You are expected to create a *program* to be ran with the functions
available in the `ablauf.job.ast` namespace. This program is then
initialized with... | null | https://raw.githubusercontent.com/exoscale/ablauf/c7496a46b364c4d311c785eb5dfba12b844958ca/src/ablauf/job.clj | clojure | (ns ablauf.job
"
An abstract program runtime for ASTs produced by `ablauf.job.ast`.
This exposes two functions for the outside world: `make`
and `restart`
You are expected to create a *program* to be ran with the functions
available in the `ablauf.job.ast` namespace. This program is then
initialized with... | |
09a4c6dff1e540c1cd3eadd57bdc6c7b517e4db55914f1abdf25344b40510ce6 | nominolo/lambdachine | CString.hs | # LANGUAGE NoImplicitPrelude , BangPatterns , MagicHash #
-----------------------------------------------------------------------------
-- |
-- Module : GHC.CString
Copyright : ( c ) The University of Glasgow 2011
License : see libraries / ghc - prim / LICENSE
--
-- Maintainer :
-- Stability ... | null | https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/libraries/ghc-prim/GHC/CString.hs | haskell | ---------------------------------------------------------------------------
|
Module : GHC.CString
Maintainer :
Stability : internal
Use GHC.Exts from the base package instead of importing this
module directly.
---------------------------------------------------------------------------
------------... | # LANGUAGE NoImplicitPrelude , BangPatterns , MagicHash #
Copyright : ( c ) The University of Glasgow 2011
License : see libraries / ghc - prim / LICENSE
Portability : non - portable ( GHC Extensions )
GHC C strings definitions ( previously in ) .
module GHC.CString (
unpackCString#, unp... |
fc7981b1558a9456646543a6df6d451c8805809756da820eeea1657a03f52147 | Bodigrim/arithmoi | DirichletCharactersTests.hs | -- |
Module : Math . . DirichletCharactersTests
Copyright : ( c ) 2018
License : MIT
Maintainer : < >
--
Tests for Math . . DirichletCharacters
--
{-# LANGUAGE GADTs #-}
{-# LANGUAGE Rank2Types #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatter... | null | https://raw.githubusercontent.com/Bodigrim/arithmoi/df789d23341247e9cdb4f690595ea99c89836d09/test-suite/Math/NumberTheory/DirichletCharactersTests.hs | haskell | |
# LANGUAGE GADTs #
# LANGUAGE Rank2Types #
| There should be totient(n) characters
| Test the orthogonality relations #Character_orthogonality
| Manually confirm isRealCharacter is correct (in both directions)
| Check real character evaluation matches normal evaluation
| Bulk evaluation agrees with pointwise ... | Module : Math . . DirichletCharactersTests
Copyright : ( c ) 2018
License : MIT
Maintainer : < >
Tests for Math . . DirichletCharacters
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
module Math.NumberTheory.DirichletCharactersTests where
... |
e0574add811ba8e2da58c6ac6f6f89a74f3dc612caeb7e7c6e6851496a68e480 | zoomhub/zoomhub | OpenSeadragonTileSource.hs | {-# LANGUAGE OverloadedStrings #-}
module ZoomHub.Web.Types.OpenSeadragonTileSource
( OpenSeadragonTileSource,
fromDeepZoomImage,
)
where
import Data.Aeson (ToJSON, object, toJSON, (.=))
import qualified Data.Text as T
import System.FilePath (dropExtension)
import ZoomHub.API.Types.DeepZoomImage
( DeepZoomI... | null | https://raw.githubusercontent.com/zoomhub/zoomhub/2414355f5b790120700a0eea0aba8780b49ff349/src/ZoomHub/Web/Types/OpenSeadragonTileSource.hs | haskell | # LANGUAGE OverloadedStrings #
JSON |
module ZoomHub.Web.Types.OpenSeadragonTileSource
( OpenSeadragonTileSource,
fromDeepZoomImage,
)
where
import Data.Aeson (ToJSON, object, toJSON, (.=))
import qualified Data.Text as T
import System.FilePath (dropExtension)
import ZoomHub.API.Types.DeepZoomImage
( DeepZoomImage,
dziHeight,
dziTileFor... |
6e902a5512a8c8ffc7d4ff6662642c2bfc632d1002715b3196dafe04da4d7ff9 | slepher/astranaut | astranaut_SUITE.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2018 ,
%%% @doc
%%%
%%% @end
Created : 8 Dec 2018 by < >
%%%-------------------------------------------------------------------
-module(astranaut_SUITE).
-compile(nowarn_export_all).
-compile(export_all).
-includ... | null | https://raw.githubusercontent.com/slepher/astranaut/55881ea2f86e550be962f581bb1da6a5db6dff6d/test/astranaut_SUITE.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
--------------------------------------------------------------------
Info = [tuple()]
@end
--------------------------------------------------------------------
---------... | @author < >
( C ) 2018 ,
Created : 8 Dec 2018 by < >
-module(astranaut_SUITE).
-compile(nowarn_export_all).
-compile(export_all).
-include("astranaut_struct_name.hrl").
-include_lib("syntax_tools/include/merl.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
... |
9fc39fa575d8f2dacccb2e4006992d97353c1bbd916e0b3ae243b3bae7837992 | input-output-hk/cardano-ledger | MapExtras.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
-- | Sometimes we need to write our own version of functions over `Map.Map` that
-- do not appear in the "containers" library. This module is for such functions.
--
-- For example:
--
1 . Version of ` Map.withoutKeys ` where both argumen... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/libs/cardano-data/src/Data/MapExtras.hs | haskell | # LANGUAGE BangPatterns #
| Sometimes we need to write our own version of functions over `Map.Map` that
do not appear in the "containers" library. This module is for such functions.
For example:
> ((dom stkcred) ◁ deleg) ▷ (dom stpool)) ==>
> intersectDomP (\ k v -> Map.member v stpool) stkcred deleg
We ... | # LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
1 . Version of ` Map.withoutKeys ` where both arguments are ` Map . Map `
2 . Comparing that two maps have exactly the same set of keys
3 . The intersection of two maps guarded by a predicate .
module Data.MapExtras (
StrictTriple (..),
extract,
noKeys,
k... |
b1b5663ce41cb56448561b18d402c3ade29f68b4b53cbd67b1c4bb27b5bcf76f | wdebeaum/DeepSemLex | unconventional.lisp | ;;;;
;;;; w::unconventional
;;;;
(define-words :pos W::adj
:words (
(w::unconventional
(senses
((lf-parent ont::atypical-val)
(TEMPL central-adj-templ)
(sem (f::gradability +) (f::intensity ont::med) (f::orientation F::neg))
(meta-data :origin cardiac :entry-date 20090129 :change-date 20090804 :wn ... | null | https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/unconventional.lisp | lisp |
w::unconventional
|
(define-words :pos W::adj
:words (
(w::unconventional
(senses
((lf-parent ont::atypical-val)
(TEMPL central-adj-templ)
(sem (f::gradability +) (f::intensity ont::med) (f::orientation F::neg))
(meta-data :origin cardiac :entry-date 20090129 :change-date 20090804 :wn ("strange%3:00:00") :comments nil... |
c76bc714c58fd0ecb066c4f8ffaae75c0acdfc29a9d51da9259c1c74e289cb33 | DestyNova/advent_of_code_2021 | Part2.hs | module Main where
import Text.Parsec
import Data.List (nub)
type Coord = (Int,Int)
type Grid = [[Char]]
main = do
txt <- readFile "input.txt"
let (Right area) = parse parser "" txt
print area
print $ uncurry solve area
solve :: Coord -> Coord -> Int
solve (x1,x2) (y1,y2) = length $ nub xSteps
where ySteps... | null | https://raw.githubusercontent.com/DestyNova/advent_of_code_2021/95c62ad0b37a7aea9d953815a5b45eed3a77546d/day17/Part2.hs | haskell | module Main where
import Text.Parsec
import Data.List (nub)
type Coord = (Int,Int)
type Grid = [[Char]]
main = do
txt <- readFile "input.txt"
let (Right area) = parse parser "" txt
print area
print $ uncurry solve area
solve :: Coord -> Coord -> Int
solve (x1,x2) (y1,y2) = length $ nub xSteps
where ySteps... | |
7fbdc21e104294d7561e47413582cd850b611713399fc150b8fdc7278f1d5966 | realworldocaml/mdx | prelude2.ml | #require "prelude-ml";;
| null | https://raw.githubusercontent.com/realworldocaml/mdx/38e1446b127f67bbdd4a64e0b08ac05b77511d5e/test/bin/mdx-dune-gen/misc/basic/prelude2.ml | ocaml | #require "prelude-ml";;
| |
32b538935fee0b022ff69ae177c640394875ce4fa5e9f638e789287a0428e268 | PagingMatt/osilo | test_src.ml | let cstruct = Alcotest.testable (Cstruct.hexdump_pp) (Cstruct.equal)
let host = "127.0.0.1"
let port = 6620
let peer = Peer.create host port
let host1 = "127.0.0.1"
let peer1 = Peer.create host1 port
let host2 = "localhost"
let peer2 = Peer.create host2 port
module Api_tests = struct
open Api
let pull_out_stri... | null | https://raw.githubusercontent.com/PagingMatt/osilo/3ef63a3c0970444c19bd5abf52ad9db154829904/tests/test_src.ml | ocaml | Caught in more detail in separate test | let cstruct = Alcotest.testable (Cstruct.hexdump_pp) (Cstruct.equal)
let host = "127.0.0.1"
let port = 6620
let peer = Peer.create host port
let host1 = "127.0.0.1"
let peer1 = Peer.create host1 port
let host2 = "localhost"
let peer2 = Peer.create host2 port
module Api_tests = struct
open Api
let pull_out_stri... |
dd6caa0388f6c5906e159bce875f1d987bf309bf682e80006881edb0e17147a8 | purebred-mua/purebred | Internal.hs | -- This file is part of purebred
Copyright ( C ) 2021
--
-- purebred is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) any later version.
--
-... | null | https://raw.githubusercontent.com/purebred-mua/purebred/8473998d796dea121ef879c7f7b119284e1511f1/src/Purebred/Plugin/Internal.hs | haskell | This file is part of purebred
purebred is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ... | Copyright ( C ) 2021
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU Affero General Public License
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE... |
3ff8cda02bf4ed6e5bf957e4c775a95faf341dc1f641c6d638947b03dc899e02 | kit-ty-kate/visitors | fold.ml | type person = {
firstname: string[@opaque];
surname: string[@opaque]
}
and crowd =
| Nobody
| Someone of person * crowd
[@@deriving visitors { variety = "fold" }]
let convert : crowd -> (string * string) list =
let v = object
inherit [_] fold
method build_person () f s = (f, s)
method build_N... | null | https://raw.githubusercontent.com/kit-ty-kate/visitors/fc53cc486178781e0b1e581eced98e07facb7d29/test/fold.ml | ocaml | type person = {
firstname: string[@opaque];
surname: string[@opaque]
}
and crowd =
| Nobody
| Someone of person * crowd
[@@deriving visitors { variety = "fold" }]
let convert : crowd -> (string * string) list =
let v = object
inherit [_] fold
method build_person () f s = (f, s)
method build_N... | |
39d90b727027a3ca8fe9a62e57b1ff7b05c302f08cfbe02eb83fbfa650f9d081 | VitoVan/calm | package.lisp | (defpackage :calm-utils
(:use :cl)
(:local-nicknames
(:c :cl-cairo2))
(:export
:calm-log
:play-wav
:halt-wav
:play-music
:halt-music
:audio-is-playing
:set-cursor))
(defpackage :calm
(:use :cl)
(:local-nicknames
(:c :cl-cairo2)
(:u :calm-utils))
(:export
:calm-init
:calm... | null | https://raw.githubusercontent.com/VitoVan/calm/06a07be1a3f80bf189de08d03e8d7d90d1acc321/src/package.lisp | lisp | (defpackage :calm-utils
(:use :cl)
(:local-nicknames
(:c :cl-cairo2))
(:export
:calm-log
:play-wav
:halt-wav
:play-music
:halt-music
:audio-is-playing
:set-cursor))
(defpackage :calm
(:use :cl)
(:local-nicknames
(:c :cl-cairo2)
(:u :calm-utils))
(:export
:calm-init
:calm... | |
61b708cb96439823631c4555b4b4c08f46ff7a2562a897751f3f9c81d9b6d32f | jimcrayne/jhc | TypeSynonym.hs | module Foo() where
-- check various type synonym expansions.
type XChar = Char
xc :: XChar
xc = 'x'
type Foo = Int
type Bar = Foo
type Bug x = Char
type App f x = f (Bug x)
type Fun = App Bug (Bug Char)
f :: Foo -> Int
f = id
( x : : ) = 4
y = (1 + 4 :: Bar) `div` 3
z = 'z' :: Fun
w = let f = 'z' :: App Bug Foo in... | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/TypeSynonym.hs | haskell | check various type synonym expansions. | module Foo() where
type XChar = Char
xc :: XChar
xc = 'x'
type Foo = Int
type Bar = Foo
type Bug x = Char
type App f x = f (Bug x)
type Fun = App Bug (Bug Char)
f :: Foo -> Int
f = id
( x : : ) = 4
y = (1 + 4 :: Bar) `div` 3
z = 'z' :: Fun
w = let f = 'z' :: App Bug Foo in 4
class Baz a where
g :: a -> Bar
i... |
253ff9e99405faada80ab1a58f521ef0be06a16c65702d59ea7ec07ea9b912f6 | returntocorp/semgrep | Unit_SPcre.ml | (*
Unit tests for SPcre
*)
let test_match_limit_ok () =
let rex = SPcre.regexp "(a+)+$" in
match SPcre.pmatch ~rex "aaaaaaaaaaaaaaaaa!" with
| Ok _ -> ()
| Error Pcre.MatchLimit ->
Alcotest.fail "should not have failed with error MatchLimit"
| Error _ -> Alcotest.fail "unexpected error"
let test_ma... | null | https://raw.githubusercontent.com/returntocorp/semgrep/e0d996ed1e4d76d0dafd34aec96bde3b718ac05e/libs/commons/tests/Unit_SPcre.ml | ocaml |
Unit tests for SPcre
This is a little dirty since we can't undo it. |
let test_match_limit_ok () =
let rex = SPcre.regexp "(a+)+$" in
match SPcre.pmatch ~rex "aaaaaaaaaaaaaaaaa!" with
| Ok _ -> ()
| Error Pcre.MatchLimit ->
Alcotest.fail "should not have failed with error MatchLimit"
| Error _ -> Alcotest.fail "unexpected error"
let test_match_limit_fail () =
let rex ... |
e278ce7d0a8009b06be67c14f16677958faed02ab1cfe192d8c4742d527f36b7 | ivankelly/gambit | base64.scm | ;==============================================================================
File : " base64.scm " , Time - stamp : < 2008 - 12 - 15 11:54:22 feeley >
Copyright ( c ) 2005 - 2008 by , All Rights Reserved .
;==============================================================================
(##namespace ("base64... | null | https://raw.githubusercontent.com/ivankelly/gambit/7377246988d0982ceeb10f4249e96badf3ff9a8f/examples/web-server/base64.scm | scheme | ==============================================================================
==============================================================================
==============================================================================
Representation of fifos.
To obtain an atomic update of the fifo, we must force a
... |
File : " base64.scm " , Time - stamp : < 2008 - 12 - 15 11:54:22 feeley >
Copyright ( c ) 2005 - 2008 by , All Rights Reserved .
(##namespace ("base64#"))
(##include "~~lib/gambit#.scm")
(##include "base64#.scm")
(declare
(standard-bindings)
(extended-bindings)
(block)
(not safe)
(fixnum)
)
(#... |
a39288f83e9a689884a89aaf21f41a93a002b61ae514496c51b995b6b09f0bef | astrada/ocaml-extjs | ext_chart_Tip.ml | class type t =
object('self)
inherit Ext_Base.t
end
class type configs =
object('self)
inherit Ext_Base.configs
end
class type events =
object
inherit Ext_Base.events
end
class type statics =
object
inherit Ext_Base.statics
end
let get_static () = Js.Unsafe.variable "Ext.chart.Tip"
... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_chart_Tip.ml | ocaml | class type t =
object('self)
inherit Ext_Base.t
end
class type configs =
object('self)
inherit Ext_Base.configs
end
class type events =
object
inherit Ext_Base.events
end
class type statics =
object
inherit Ext_Base.statics
end
let get_static () = Js.Unsafe.variable "Ext.chart.Tip"
... | |
58495afc2924fdf56dfbcafe43ba00ffb22bbdd196eb1fa81b80965fb9f459e1 | esl/MongooseIM | rdbms_SUITE.erl | %%==============================================================================
Copyright 2016 Erlang Solutions Ltd.
%%
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
%%
... | null | https://raw.githubusercontent.com/esl/MongooseIM/212126c18cda3c05af95fb845fc2d6925bac06bc/big_tests/tests/rdbms_SUITE.erl | erlang | ==============================================================================
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ex... | Copyright 2016 Erlang Solutions Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(rdbms_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("eunit/include/eunit.hrl").
-include("mam_helper.hrl").
... |
13ca91581dbe20ab6feae9a317c225944abc45b2936d3e0bd5e986af8d325e5d | lambdamikel/DLMAPS | cache-references10.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*-
(in-package :THEMATIC-SUBSTRATE)
;;;
FULL - ENUMERATOR ist nur ein anderes Wort fuer " COMPLETE VIEW WILL BE COMPUTED "
;;;
(defmethod full-enumerator-p :around ((query query))
(unless (in-dnf-p query)
(nrql-er... | null | https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/query/cache-references10.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*-
sonst werden nur J/N-Antworten generiert!
und die Cached-Bindings koennen nicht ohne
den AND-Kontext vollstaendig verwendet werden,
waere also ein incomplete view!
(not (valid-qbox-entry-p candidate))
Allgemeine Anme... |
(in-package :THEMATIC-SUBSTRATE)
FULL - ENUMERATOR ist nur ein anderes Wort fuer " COMPLETE VIEW WILL BE COMPUTED "
(defmethod full-enumerator-p :around ((query query))
(unless (in-dnf-p query)
(nrql-error "Query ~A is not in DNF!" query))
(and (not (existential-vois query))
(if (top-level-query... |
be3166f08a138834b16273689d221d9ccf1a30e7fb9ba0741b0f9360f30a3469 | jasongilman/crdt-edit | logoot.clj | (ns crdt-edit.logoot
"An implementation of the Logoot CRDT. See -ouvertes.fr/docs/00/34/59/11/PDF/main.pdf"
(:require [clojure.string :as str]))
(defprotocol ToLogootString
"Converts a logoot structure into a string for human readability of the logoot structure as shown
in the Logoot paper."
(to-logoot-strin... | null | https://raw.githubusercontent.com/jasongilman/crdt-edit/2b8126632bc7f204cb3979e9c51f7ab363704f29/src/crdt_edit/logoot.clj | clojure | Represents portion of a position. Contains a number and the site which created this identifier.
A symbol identifying the site
Represents a position in a logoot document.
A list of position identifiers
Represents a single character positioned withing a logoot document.
A single character with a position in the do... | (ns crdt-edit.logoot
"An implementation of the Logoot CRDT. See -ouvertes.fr/docs/00/34/59/11/PDF/main.pdf"
(:require [clojure.string :as str]))
(defprotocol ToLogootString
"Converts a logoot structure into a string for human readability of the logoot structure as shown
in the Logoot paper."
(to-logoot-strin... |
451065baa1d8c8457e4eb38a241e2dd9e792095bfb3240c426ac001a9d8f7439 | ninjudd/jiraph | cache_test.clj | (ns flatland.jiraph.cache-test
(:use clojure.test)
(:require [flatland.jiraph.cache :as cache]
[flatland.jiraph.layer.masai :as masai]
[flatland.jiraph.ruminate :as ruminate]
[flatland.jiraph.graph :as graph]))
(deftest caching
(let [uncached (ruminate/incoming (masai/make-tem... | null | https://raw.githubusercontent.com/ninjudd/jiraph/e2897cf4770ead40e574261cd294d2c6701703e8/test/flatland/jiraph/cache_test.clj | clojure | (ns flatland.jiraph.cache-test
(:use clojure.test)
(:require [flatland.jiraph.cache :as cache]
[flatland.jiraph.layer.masai :as masai]
[flatland.jiraph.ruminate :as ruminate]
[flatland.jiraph.graph :as graph]))
(deftest caching
(let [uncached (ruminate/incoming (masai/make-tem... | |
6c1565466c7bd6190db73b9c61d1923d38444c09cf880109a1493e3d6eea36f3 | picty/parsifal | asn1parse.ml | open Parsifal
open Asn1Engine
open Asn1PTypes
open Getopt
open PTypes
open Base64
let indent = ref false
let keep_going = ref false
let openssl_mode = ref false
type input_style = Hex | PEM | Raw
let input_style = ref PEM
let set_input_style v () = input_style := v
let base64_header = ref (AnyHeader)
let set_b64_hea... | null | https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/tools/asn1parse.ml | ocaml | TODO: Should some of this code be factored in asn1Engine?
TODO: Rethink the lwt flavour? | open Parsifal
open Asn1Engine
open Asn1PTypes
open Getopt
open PTypes
open Base64
let indent = ref false
let keep_going = ref false
let openssl_mode = ref false
type input_style = Hex | PEM | Raw
let input_style = ref PEM
let set_input_style v () = input_style := v
let base64_header = ref (AnyHeader)
let set_b64_hea... |
487a4788763079a50aa72235f4ed35913173e3ed1291c6a629ca3e1c7f12b266 | ktakashi/sagittarius-scheme | ecdsa_secp224r1_sha512_p1363_test.scm | (test-signature/testvector
"ecdsa_secp224r1_sha512_p1363_test"
:algorithm
"ECDSA"
:digest
"SHA-512"
:public-key
#vu8(48 78 48 16 6 7 42 134 72 206 61 2 1 6 5 43 129 4 0 33 3 58 0 4 234 218 147 190 16 178 68 158 30 139 181 131 5 213 32 8 1 60 87 16 124 26 32 163 23 166 203 167 236 166 114 52 12 3 209 210 2... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/8d3be98032133507b87d6c0466d60f982ebf9b15/ext/crypto/tests/testvectors/signature/ecdsa_secp224r1_sha512_p1363_test.scm | scheme | (test-signature/testvector
"ecdsa_secp224r1_sha512_p1363_test"
:algorithm
"ECDSA"
:digest
"SHA-512"
:public-key
#vu8(48 78 48 16 6 7 42 134 72 206 61 2 1 6 5 43 129 4 0 33 3 58 0 4 234 218 147 190 16 178 68 158 30 139 181 131 5 213 32 8 1 60 87 16 124 26 32 163 23 166 203 167 236 166 114 52 12 3 209 210 2... | |
a56e32378eaa57749aed8157bd21dc4e522b9a4f48165020f18f720b7e1a6642 | hexlet-basics/exercises-clojure | test.clj | (ns case-test
(:require [test-helper :refer [assert-solution]]
[index :refer [humanize-permission]]))
(assert-solution [["x"] ["r"] ["w"]] ["execute" "read" "write"] humanize-permission)
| null | https://raw.githubusercontent.com/hexlet-basics/exercises-clojure/ede14102d01f9ef736e0af811cd92f5b22a83bc2/modules/20-logic/35-case/test.clj | clojure | (ns case-test
(:require [test-helper :refer [assert-solution]]
[index :refer [humanize-permission]]))
(assert-solution [["x"] ["r"] ["w"]] ["execute" "read" "write"] humanize-permission)
| |
711c77049c58fd36e0561469c21dca0af1a698b4c1b5dc68a8e9054feb00def4 | mzp/coq-ruby | ppextend.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/interp/ppextend.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
s Pretty-print.
Dealing with p... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : ppextend.mli 6616... |
7d7c0c1078ffd5d647cf41ef0f04525b826b2bac138e46f854cbfb07046e5ecb | vyos/vyconf | session.ml | module CT = Config_tree
module RT = Reference_tree
module D = Directories
exception Session_error of string
type cfg_op =
| CfgSet of string list * string option * CT.value_behaviour
| CfgDelete of string list * string option
type world = {
running_config: CT.t;
reference_tree: RT.t;
vyconf_confi... | null | https://raw.githubusercontent.com/vyos/vyconf/dd9271b4304c6b1a5a2576821d1b2b8fd3aa6bf5/src/session.ml | ocaml | module CT = Config_tree
module RT = Reference_tree
module D = Directories
exception Session_error of string
type cfg_op =
| CfgSet of string list * string option * CT.value_behaviour
| CfgDelete of string list * string option
type world = {
running_config: CT.t;
reference_tree: RT.t;
vyconf_confi... | |
b4580aa76221e28f1b85dc1bb893249bea2df782d2b492fa7f525cf0488bb0bc | Apress/beg-haskell | CategoriesFnDeps.hs | # LANGUAGE MultiParamTypeClasses , FunctionalDependencies #
module Chapter13.CategoriesFnDeps where
data TimeMachine = TimeMachine { model :: String } deriving Show
data Book = Book { title :: String, author :: String, rating :: Integer } deriving Show
data Costume = Costume { place :: String, range :: (Integer, Inte... | null | https://raw.githubusercontent.com/Apress/beg-haskell/aaacbf047d553e6177c38807e662cc465409dffd/chapter13/src/Chapter13/CategoriesFnDeps.hs | haskell | ? ?
?? | # LANGUAGE MultiParamTypeClasses , FunctionalDependencies #
module Chapter13.CategoriesFnDeps where
data TimeMachine = TimeMachine { model :: String } deriving Show
data Book = Book { title :: String, author :: String, rating :: Integer } deriving Show
data Costume = Costume { place :: String, range :: (Integer, Inte... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.