_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 |
|---|---|---|---|---|---|---|---|---|
2f60305f483e93e1af34a231626671d05ea84128242b179aba326a8820ec3a7c | jarohen/phoenix | plugin.clj | (ns phoenix.plugin
(:require [clojure.java.io :as io]))
(defn project-deps [{:keys [dependencies] :as project}]
(set (map first dependencies)))
(defn with-runtime-dep [project]
(cond-> project
(not (contains? (project-deps project) 'jarohen/phoenix.runtime))
(update-in [:dependencies] conj ['jarohen/pho... | null | https://raw.githubusercontent.com/jarohen/phoenix/f828bf144154f110f0a73f54645f5696e2c8bdab/plugin/src/phoenix/plugin.clj | clojure | (ns phoenix.plugin
(:require [clojure.java.io :as io]))
(defn project-deps [{:keys [dependencies] :as project}]
(set (map first dependencies)))
(defn with-runtime-dep [project]
(cond-> project
(not (contains? (project-deps project) 'jarohen/phoenix.runtime))
(update-in [:dependencies] conj ['jarohen/pho... | |
11a69722fe9f213ad559f11f908bf1b4ed1f27cd5d84526d434bed078c4c1925 | mbg/hoop | Spec.hs |
--------------------------------------------------------------------------------
import Test.Hspec
import Language.Hoop
import qualified Counter as C
import qualified Expr as E
import qualified Expr2 as E2
import qualified List as L
import qualified Stack as S
-------------------------------------------------------... | null | https://raw.githubusercontent.com/mbg/hoop/98a53bb1db66b06f9b5d3e5242eed336f908ad18/test/Spec.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------ |
import Test.Hspec
import Language.Hoop
import qualified Counter as C
import qualified Expr as E
import qualified Expr2 as E2
import qualified List as L
import qualified Stack as S
main :: IO ()
main = hspec $ do
describe "Counter" $ do
describe "Counter" $ do
it "c.!next is 0" $ result (C... |
c0098b229ccac3c1c1af6332a4986c2bc9d856083ebebb253bb24924f3cb5dc9 | pirapira/coq2rust | output.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/tools/coqdoc/output.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
s Low level output
s Coq keywords
... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Cdglobals
open Index
l... |
6737a66b50ed8502d48a3a9ee80f7c4ef6b5d2409cabe51534b9a1e7a2b62e76 | oshyshko/uio | xz.clj | (ns uio.codecs.xz
(:require [uio.impl :refer [ext->is->is ext->os->os]])
(:import (org.apache.commons.compress.compressors CompressorStreamFactory)))
(defmethod ext->is->is :xz [_] #(.createCompressorInputStream (CompressorStreamFactory.) CompressorStreamFactory/XZ %))
(defmethod ext->os->os :xz [_] #(.createComp... | null | https://raw.githubusercontent.com/oshyshko/uio/4e73ec5da0be1764e449ccc86e567ec701862332/src/uio/codecs/xz.clj | clojure | (ns uio.codecs.xz
(:require [uio.impl :refer [ext->is->is ext->os->os]])
(:import (org.apache.commons.compress.compressors CompressorStreamFactory)))
(defmethod ext->is->is :xz [_] #(.createCompressorInputStream (CompressorStreamFactory.) CompressorStreamFactory/XZ %))
(defmethod ext->os->os :xz [_] #(.createComp... | |
eaf6b58cf56f732c32d04e9e58a913d6a6b016749188fbf9a0f0f9e95a461ae6 | fyquah/hardcaml_zprize | stream.ml | open Base
open Hardcaml
open Stream_intf
open Signal
module type S = S
module Make (X : Config.S) = struct
open X
let tkeep_bits = data_bits / 8
let tstrb_bits = data_bits / 8
module Source = struct
type 'a t =
{ tvalid : 'a
; tdata : 'a [@bits data_bits]
; tkeep : 'a [@bits tkeep_bits... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/hardcaml_axi/src/stream.ml | ocaml | This is a port of the skid buffer as per
* -axis/blob/master/rtl/axis_register.v#L91
Combinational updates.
Do nothing
Do nothing | open Base
open Hardcaml
open Stream_intf
open Signal
module type S = S
module Make (X : Config.S) = struct
open X
let tkeep_bits = data_bits / 8
let tstrb_bits = data_bits / 8
module Source = struct
type 'a t =
{ tvalid : 'a
; tdata : 'a [@bits data_bits]
; tkeep : 'a [@bits tkeep_bits... |
e4197ac4e3353a167d44558432cc28e600ad4908c6b09687dad59f6d60524cae | aumouvantsillage/Virgule-CPU-Racket | virgule.rkt | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
#lang racket
(require
"signal.rkt"
"datapath-components.rkt")
(provide
virgule)
An implementation of a minimal RISC - V ( RV32I ) co... | null | https://raw.githubusercontent.com/aumouvantsillage/Virgule-CPU-Racket/3df9656c48f04fb9488952ededccee38d3c527c7/src/virgule.rkt | racket | The interface is inspired by the PicoRV32
The sequencer is a state machine.
Sequencer.
Instruction decoding:
decode, read registers, select ALU operands.
Instruction execution:
compute ALU and comparator results, compute branch address,
update program counter.
Memory access:
align data to/from memory, ... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
#lang racket
(require
"signal.rkt"
"datapath-components.rkt")
(provide
virgule)
An implementation of a minimal RISC - V ( RV32I ) co... |
3a26638e622a1e51d277045b952f61a09b21d105d23cffccc72504327da3b1ca | jvf/scalaris | lease_checker2.erl | 2012 - 2015 Zuse Institute Berlin ,
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
... | null | https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/src/cp/lease_checker2.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2012 - 2015 Zuse Institute Berlin ,
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(lease_checker2).
-author('').
-include("scalaris.hrl").
-include("record_helpers.hrl").
-record(leases_st... |
41640eff50b1b626064bacd66ba7e4e9fa5a3add4bd023e025d93dc70b79f760 | marick/fp-oo | higher-order-functions.clj | ` reversed - digits ` takes advantage of two new facts ( that are n't
;;; used in the rest of the book):
;;;
1 . Java interoperability allows you to call Java methods -- both
;;; instance methods and class methods. So you can call one of
Java 's Integer constructors like this :
;;;
user= > ( Integer... | null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/sources/higher-order-functions.clj | clojure | used in the rest of the book):
instance methods and class methods. So you can call one of
to them. The result isn't a string, though, but rather a
user=> (reverse "foo")
You can convert a character into a string with `str`:
"o"
original.
; This one is incorrect . | ` reversed - digits ` takes advantage of two new facts ( that are n't
1 . Java interoperability allows you to call Java methods -- both
Java 's Integer constructors like this :
user= > ( Integer . " 321 " )
321
2 . Strings are sequences , so you can apply sequence functions
sequence of J... |
eadf4b1cf780df8f80c5916f2ee930c85e6419dee0280b2f5db41ab152d7c277 | clj-kondo/clj-kondo | metadata.clj | (ns clj-kondo.impl.metadata
{:no-doc true}
(:require
[clj-kondo.impl.analyzer.common :as common]
[clj-kondo.impl.linters.keys :as key-linter]
[clj-kondo.impl.utils :as utils]))
(defn meta-node->map [ctx node]
(let [s (utils/sexpr node)]
(cond (keyword? s) {s true}
(map? s)
(do
... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/5db942f19916f98e8d21b4f787f37f3be0e0d45d/src/clj_kondo/impl/metadata.clj | clojure | use dorun to force analysis, we don't use the end result!
clj-kondo only sometimes sets these but later always checks them
Scratch | (ns clj-kondo.impl.metadata
{:no-doc true}
(:require
[clj-kondo.impl.analyzer.common :as common]
[clj-kondo.impl.linters.keys :as key-linter]
[clj-kondo.impl.utils :as utils]))
(defn meta-node->map [ctx node]
(let [s (utils/sexpr node)]
(cond (keyword? s) {s true}
(map? s)
(do
... |
7cd440a72b6df284dbbe0bd0dc62a771d2ea86a5e79989daf2349c4d98f05cd8 | alura-cursos/datomic-identidades-e-queries | model.clj | (ns ecommerce.model)
(defn uuid [] (java.util.UUID/randomUUID))
(defn novo-produto
; gerar ids dinamicamente
([nome slug preco]
(novo-produto (uuid) nome slug preco))
; usar ids que ja foram criados antes
([uuid nome slug preco]
{:produto/id uuid
:produto/nome nome
:produto/slug slug
:p... | null | https://raw.githubusercontent.com/alura-cursos/datomic-identidades-e-queries/2c14e40f02ae3ac2ebd39d2a1d07fbdc87526052/aula3.1/ecommerce/src/ecommerce/model.clj | clojure | gerar ids dinamicamente
usar ids que ja foram criados antes | (ns ecommerce.model)
(defn uuid [] (java.util.UUID/randomUUID))
(defn novo-produto
([nome slug preco]
(novo-produto (uuid) nome slug preco))
([uuid nome slug preco]
{:produto/id uuid
:produto/nome nome
:produto/slug slug
:produto/preco preco}))
(defn nova-categoria
([nome]
(nova-categ... |
1f03aeabaa1a4f9346758ae40f83cb815aa18a30ec08cbd0451ca2878ba5ea53 | clj-kafka/franzy | client_tests.clj | (ns franzy.clients.consumer.client-tests
(:require [midje.sweet :refer :all]
[franzy.clients.consumer.client :as cl]))
(facts "Clients should instantiate properly."
(fact "Invoking make-consumer with just a config map should not throw a ClassCastException when converting config map to Properties i... | null | https://raw.githubusercontent.com/clj-kafka/franzy/6c2e2e65ad137d2bcbc04ff6e671f97ea8c0e380/core/test/franzy/clients/consumer/client_tests.clj | clojure | (ns franzy.clients.consumer.client-tests
(:require [midje.sweet :refer :all]
[franzy.clients.consumer.client :as cl]))
(facts "Clients should instantiate properly."
(fact "Invoking make-consumer with just a config map should not throw a ClassCastException when converting config map to Properties i... | |
e4a3fb88b886db4f9f5e79c153f772566d633dd82d474969e7c9d94d20436bda | informatimago/lisp | wang-cl.lisp | (eval-when (:compile-toplevel :load-toplevel :execute)
(setf *readtable* (copy-readtable nil)))
(shadow '(trace untrace))
(defun trace (functions) (eval `(cl:trace ,@functions)))
(defun untrace (functions) (eval `(cl:untrace ,@functions)))
(defun define (definitions)
(dolist (def definitions)
(eval (if (a... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/small-cl-pgms/wang-cl.lisp | lisp | comment | (eval-when (:compile-toplevel :load-toplevel :execute)
(setf *readtable* (copy-readtable nil)))
(shadow '(trace untrace))
(defun trace (functions) (eval `(cl:trace ,@functions)))
(defun untrace (functions) (eval `(cl:untrace ,@functions)))
(defun define (definitions)
(dolist (def definitions)
(eval (if (a... |
0e6a131ce4daafbbd287ab40b6fb38020b6c752a2ebe76f428ba8c4dda490c5e | silkapp/generic-aeson | IsEnum.hs | {-# LANGUAGE
FlexibleContexts
, FlexibleInstances
, ScopedTypeVariables
, TypeOperators
#-}
| Test if a data type is an enumeration ( only zero - argument
constructors ) generically using " GHC.Generics " .
module Generics.Generic.IsEnum
( isEnum
, GIsEnum (..)
) where
import Data.Proxy
import G... | null | https://raw.githubusercontent.com/silkapp/generic-aeson/d461fffa6731391470ac344b6bdc5a8e88b436ca/src/Generics/Generic/IsEnum.hs | haskell | # LANGUAGE
FlexibleContexts
, FlexibleInstances
, ScopedTypeVariables
, TypeOperators
#
enumerations. You generally don't need to give any custom
instances. Just call 'isEnum'. | | Test if a data type is an enumeration ( only zero - argument
constructors ) generically using " GHC.Generics " .
module Generics.Generic.IsEnum
( isEnum
, GIsEnum (..)
) where
import Data.Proxy
import GHC.Generics
| Class for testing if the functors from " GHC.Generics " are
class GIsEnum f where
gIs... |
64e32688705da8d9d30a2b55034df97a051cc3c4914127d968862ddd6660cc12 | cxxxr/jsonrpc | utils.lisp | (in-package #:cl-user)
(defpackage #:jsonrpc/utils
(:use #:cl)
(:import-from #:usocket
#:socket-listen
#:socket-close
#:address-in-use-error)
(:import-from #:bordeaux-threads
#:make-lock
#:with-lock-held)
(:export #:random-port
... | null | https://raw.githubusercontent.com/cxxxr/jsonrpc/9f7708a9bc8d6f1a9e3a946188c4772adf752058/utils.lisp | lisp | (in-package #:cl-user)
(defpackage #:jsonrpc/utils
(:use #:cl)
(:import-from #:usocket
#:socket-listen
#:socket-close
#:address-in-use-error)
(:import-from #:bordeaux-threads
#:make-lock
#:with-lock-held)
(:export #:random-port
... | |
94fb171bcd0df179b123b5e572a21067964c4a8b666b644188617e75ca4c66b9 | dyzsr/ocaml-selectml | flambda_utils.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/middle_end/flambda/flambda_utils.ml | ocaml | ************************************************************************
OCaml
... | , OCamlPro
and ,
Copyright 2014 - -2016 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
[@@@ocaml.warning "+a-4-9-30-40-41-42-66"]
open! Int_replace_polymor... |
bd71493701a74000b3d735721ff35edbc12965f10108e890995ad08b470b7bb8 | rtoy/ansi-cl-tests | values.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Oct 19 08:18:50 2002
;;;; Contains: Tests of VALUES
(in-package :cl-test)
(deftest values.0
(values))
(deftest values.1
(values 1)
1)
(deftest values.2
(values 1 2)
1 2)
(deftest values.3
(values 1 2 3)
1 2 3)
(deftest values.4
(values 1 2 ... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/values.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of VALUES | Author :
Created : Sat Oct 19 08:18:50 2002
(in-package :cl-test)
(deftest values.0
(values))
(deftest values.1
(values 1)
1)
(deftest values.2
(values 1 2)
1 2)
(deftest values.3
(values 1 2 3)
1 2 3)
(deftest values.4
(values 1 2 3 4)
1 2 3 4)
(deftest values.10
(values 1 2 3 4 5... |
47f0f60c3930c43d0ef170b90db7fd51df6fb5a53a8603f5f44e10d51a343317 | casperschipper/ocaml-cisp | scheduler.ml | schedular allows to schedule parallel streams of any type .
The unit is a timedsection , which has a timedsection that defines its content and a starting sample .
Schedular 's schedule to an internal sample clock .
To play back any type , one has to define the properties ( monoid ):
- empty eve... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/src/scheduler/scheduler.ml | ocaml | section has a start point and a sequence of sounds
finite, has an end
this takes the heads of secs sums them, and updates the remaining part in the state
to deal with reset, if there is no future, then we reset the score | schedular allows to schedule parallel streams of any type .
The unit is a timedsection , which has a timedsection that defines its content and a starting sample .
Schedular 's schedule to an internal sample clock .
To play back any type , one has to define the properties ( monoid ):
- empty eve... |
41956a1b85a2e2e518a94ce8ed14a76905bff554f9b48f1af7a745b9a0677dcc | typelead/eta | tcfail131.hs | -- Error message in monomorphic case
module ShouldFail where
g :: Num b => b -> b
g x = f x x
| null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/fail/tcfail131.hs | haskell | Error message in monomorphic case |
module ShouldFail where
g :: Num b => b -> b
g x = f x x
|
f60459e2f734d7851654cc5c81d79b7397b85bac0532d90e568e0deab668b9ef | SjVer/Som-Lang | tast.ml | type tast = toplevel node list
and 'a node = 'a Parse.Ast.node
and 'a tnode =
{
span: Span.t;
item: 'a;
typ: Types.t;
}
= = = = = = = = = = = = = = = = = = = = = = Toplevel = = = = = = = = = = = = = = = = = = = = = =
and toplevel =
| TL_Declaration of string node * Types.t node
| TL_Value_Defi... | null | https://raw.githubusercontent.com/SjVer/Som-Lang/01b973a39769bba1e4ba71ebcb4e4a970328dfe3/somc/lib/typing/tast.ml | ocaml | ====================== Pattern =======================
===================== Expression ===================== | type tast = toplevel node list
and 'a node = 'a Parse.Ast.node
and 'a tnode =
{
span: Span.t;
item: 'a;
typ: Types.t;
}
= = = = = = = = = = = = = = = = = = = = = = Toplevel = = = = = = = = = = = = = = = = = = = = = =
and toplevel =
| TL_Declaration of string node * Types.t node
| TL_Value_Defi... |
fa1084a4233098161730cf0f998eda0f81878161a90ae5253f1eac23a51b4c0f | rowangithub/DOrder | oper.ml | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
(* ... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/external/ocamlgraph/src/oper.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2007
, and
modify it under the terms of the GNU Library General Public
License version 2 , with the special exception on linking
$ I d :... |
d789896f7ec838671c32a45b5c7d13f1190bee54e41d446d4805c1d32cf816ec | tommaisey/aeon | soft-clip.help.scm | ;; (soft-clip a)
;; Nonlinear distortion. Distortion with a perfectly linear region
from -0.5 to +0.5 .
(audition
(out 0 (mul (soft-clip (mul (f-sin-osc ar 500 0.0)
(x-line kr 0.1 10 10 do-nothing)))
0.25)))
| null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/unary-ops/soft-clip.help.scm | scheme | (soft-clip a)
Nonlinear distortion. Distortion with a perfectly linear region |
from -0.5 to +0.5 .
(audition
(out 0 (mul (soft-clip (mul (f-sin-osc ar 500 0.0)
(x-line kr 0.1 10 10 do-nothing)))
0.25)))
|
505125bfff8c517940de80c814d14c6f42f7917e7b7b8166dcab42ecfbacec08 | teamwalnut/graphql-ppx | traversal_utils.ml | open Graphql_ast
open Source_pos
type ctx = {
map_loc : source_position * source_position -> Result_structure.loc;
fragments : (string, Graphql_ast.fragment) Hashtbl.t;
schema : Schema.t;
errors : (Result_structure.loc * string) list ref;
warnings : (Result_structure.loc * string) list ref;
type_stack : Sc... | null | https://raw.githubusercontent.com/teamwalnut/graphql-ppx/8276452ebe8d89a748b6b267afc94161650ab620/src/graphql_compiler/traversal_utils.ml | ocaml | open Graphql_ast
open Source_pos
type ctx = {
map_loc : source_position * source_position -> Result_structure.loc;
fragments : (string, Graphql_ast.fragment) Hashtbl.t;
schema : Schema.t;
errors : (Result_structure.loc * string) list ref;
warnings : (Result_structure.loc * string) list ref;
type_stack : Sc... | |
25be54d4738440665dcbfb3eb19c1a8c4029110bc17d870cb3a9f24aca951b20 | RunOrg/RunOrg | events.ml | (* © 2014 RunOrg *)
open Std
include type module
[ `Created of <
id : GId.t ;
pid : PId.t option ;
label : String.Label.t option ;
audience : GroupAccess.Audience.t ;
>
| `Deleted of <
id : GId.t ;
pid : PId.t option ;
>
| `Added of <
pid : PId.... | null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/groupLib/events.ml | ocaml | © 2014 RunOrg |
open Std
include type module
[ `Created of <
id : GId.t ;
pid : PId.t option ;
label : String.Label.t option ;
audience : GroupAccess.Audience.t ;
>
| `Deleted of <
id : GId.t ;
pid : PId.t option ;
>
| `Added of <
pid : PId.t option ;
people :... |
8a1c1fc727e8006183dd2989208657c03eaa009d51fda03033119de957e7d806 | aharisu/Gauche-CV | seq.scm |
;;
;;test section for <cv-seq>
(test-section "cv.core#<cv-seq>")
(define storage (make-cv-mem-storage))
(define seq (make-cv-seq storage))
(cv-seq-push seq 1)
(cv-seq-push seq 2)
(cv-seq-push seq 3)
(test* "(cv-seq-pop seq)" 3
(cv-seq-pop seq))
(test* "(cv-seq-pop seq)" 2
(cv-seq-pop seq))
(test* "(cv-seq-pop se... | null | https://raw.githubusercontent.com/aharisu/Gauche-CV/5e4c51501431c72270765121ea4d92693f11d60b/src/test/seq.scm | scheme |
test section for <cv-seq> |
(test-section "cv.core#<cv-seq>")
(define storage (make-cv-mem-storage))
(define seq (make-cv-seq storage))
(cv-seq-push seq 1)
(cv-seq-push seq 2)
(cv-seq-push seq 3)
(test* "(cv-seq-pop seq)" 3
(cv-seq-pop seq))
(test* "(cv-seq-pop seq)" 2
(cv-seq-pop seq))
(test* "(cv-seq-pop seq)" 1
(cv-seq-pop seq))
(cv-s... |
4016fdd4374ad7476781aca9e6679154a52adbec372e8069e1857459958d9464 | manuel-serrano/hop | hintnum.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / js2scheme / hintnum.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/6510926d28b54ee4e3f72950838a1bb3724eca39/js2scheme/hintnum.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* hint typing of numerical values. */
* -----------------------... | * serrano / prgm / project / hop / hop / js2scheme / hintnum.scm * /
* Author : * /
* Creation : Tue May 1 16:06:44 2018 * /
* Last change : Sun Nov 21 10:02:50 2021 ( serrano ) * /
* Cop... |
2f224e23892f7f18c6239227a43ad76589f64b3e4b22e6f74e96c21a76b965c1 | google/ormolu | separation-1b-out.hs | decompressingPipe
:: (PrimMonad m, MonadThrow m, MonadResource m)
=> CompressionMethod
-> ConduitT ByteString ByteString m ()
decompressingPipe Store = C.awaitForever C.yield
decompressingPipe Deflate = Z.decompress $ Z.WindowBits (-15)
#ifdef ENABLE_BZIP2
decompressingPipe BZip2 = BZ.bunzip2
#else
decompressi... | null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/other/cpp/separation-1b-out.hs | haskell | decompressingPipe
:: (PrimMonad m, MonadThrow m, MonadResource m)
=> CompressionMethod
-> ConduitT ByteString ByteString m ()
decompressingPipe Store = C.awaitForever C.yield
decompressingPipe Deflate = Z.decompress $ Z.WindowBits (-15)
#ifdef ENABLE_BZIP2
decompressingPipe BZip2 = BZ.bunzip2
#else
decompressi... | |
b4c426eb8e4086357e974d3ecdfea0eec9f4219047a159662efb2a5686d49204 | pyrmont/pondent | posting.cljs | (ns pondent.specs.posting
(:require [clojure.spec.alpha :as s]))
(def filename-regex #"[^/]")
(def url-regex #"https?://[\w.-]+[\w./%#?&=-]+")
(s/def ::content string?)
(s/def ::date #(instance? goog.date.DateTime %))
(s/def ::filename (s/and string? #(re-matches filename-regex %)))
(s/def ::path string?)
(s/def ... | null | https://raw.githubusercontent.com/pyrmont/pondent/446adb8aaa62916b20fa34fb0cf5c419bb06f07c/test/pondent/specs/posting.cljs | clojure | (ns pondent.specs.posting
(:require [clojure.spec.alpha :as s]))
(def filename-regex #"[^/]")
(def url-regex #"https?://[\w.-]+[\w./%#?&=-]+")
(s/def ::content string?)
(s/def ::date #(instance? goog.date.DateTime %))
(s/def ::filename (s/and string? #(re-matches filename-regex %)))
(s/def ::path string?)
(s/def ... | |
e2524391ab0cf033eeae098bbdb26fd25c9fe517596d5609f9e1b13ab8921209 | her01n/guile-web-driver | key.scm | (define-module (web driver key))
(use-modules
(ice-9 match)
(srfi srfi-1))
(define-public (key->unicode-char code)
(if (equal? 1 (string-length code))
code
(first
(find
(match-lambda ((char key-code) (string-ci=? key-code code)))
char-key-codes))))
; Mappings between si... | null | https://raw.githubusercontent.com/her01n/guile-web-driver/792995f001b13b6f0fb3301cb8c05eb825833328/web/driver/key.scm | scheme | Mappings between single unicode character and keyevent codes
Copy Pasted from the specification page
ttps/
normalized key value table
Shifted character table | (define-module (web driver key))
(use-modules
(ice-9 match)
(srfi srfi-1))
(define-public (key->unicode-char code)
(if (equal? 1 (string-length code))
code
(first
(find
(match-lambda ((char key-code) (string-ci=? key-code code)))
char-key-codes))))
(define char-key-cod... |
25855e10ecb514b6f13b57e7b13d89aaf2116eeabe4d3eefc584255d02e16e49 | wies/grasshopper | logger.ml | -*- Mode : ; indent - tabs - mode : nil -*-
(******************************************************************************)
Copyright ( c ) 2009 , Metaweb Technologies , Inc.
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted ... | null | https://raw.githubusercontent.com/wies/grasshopper/108473b0a678f0d93fffec6da2ad6bcdce5bddb9/src/util/logger.ml | ocaml | ****************************************************************************
****************************************************************************
* log utilities
****************************************************************************
* log modules
*********************************************************... | -*- Mode : ; indent - tabs - mode : nil -*-
Copyright ( c ) 2009 , Metaweb Technologies , Inc.
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions
* are met :
* * Redistributions... |
eeb7d942d846509cf4e9e28eaf8825bfdfa96de397c492e126ce1e071c2ec371 | diku-dk/futhark | SOAC.hs | # LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
-- | Definition of /Second-Order Array Combinators/ (SOACs), which are
-- the main form of parallelism in the early stages of the compiler.
module Futhark.IR.SOACS.SOAC
( SOAC (..),
ScremaForm (..),
HistOp (..),
Scan (..),
scanResults,
s... | null | https://raw.githubusercontent.com/diku-dk/futhark/174e8d862def6f52d5c9a36fa3aa6e746049776e/src/Futhark/IR/SOACS/SOAC.hs | haskell | | Definition of /Second-Order Array Combinators/ (SOACs), which are
the main form of parallelism in the early stages of the compiler.
* Utility
* Generic traversal
Scatter maps values from a set of input arrays to indices and values of a
set of output arrays. It is able to write multiple values to multiple
outp... | # LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Futhark.IR.SOACS.SOAC
( SOAC (..),
ScremaForm (..),
HistOp (..),
Scan (..),
scanResults,
singleScan,
Reduce (..),
redResults,
singleReduce,
scremaType,
soacType,
typeCheckSOAC,
mkIdentityLambda,
is... |
f044e230897776a33079e68dc6ab9c23c343b790bf4815e76fe5755472a64689 | ghc/ghc | T22510.hs | # LANGUAGE MagicHash , UnboxedTuples , UnboxedSums , ScopedTypeVariables , TypeApplications , AllowAmbiguousTypes #
module Main where
import Type.Reflection
import Data.Proxy
import GHC.Types
import GHC.Prim
moduleOf :: forall a . Typeable a => String
moduleOf = case someTypeRep (Proxy @a) of
SomeTypeRe... | null | https://raw.githubusercontent.com/ghc/ghc/aacf616df0b4059e6b177ecb64624ae6fb1d1c87/testsuite/tests/typecheck/should_run/T22510.hs | haskell | This is from GHC.Tuple
These are in GHC.Prim
putStrLn $ moduleOf @(# () | () #)
| # LANGUAGE MagicHash , UnboxedTuples , UnboxedSums , ScopedTypeVariables , TypeApplications , AllowAmbiguousTypes #
module Main where
import Type.Reflection
import Data.Proxy
import GHC.Types
import GHC.Prim
moduleOf :: forall a . Typeable a => String
moduleOf = case someTypeRep (Proxy @a) of
SomeTypeRe... |
483095668ab86b14b92a96a0a1f52a87cb165a67da3812aa39bbaa01fdff4ae9 | OCamlPro/liquidity | liquidOCamlPrinter.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/liquidity/ocaml/liquidOCamlPrinter.ml | ocaml | ************************************************************************
OCaml
Fabrice L... | , OCamlPro
, University of Pennsylvania
Copyright 2007 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module Parser = LiquidOCamlParser
Original C... |
81abd68b915fb4c1a07a7a81c460ee68180b950bb91867c053e292f35f843f12 | FlowForwarding/LINC-Switch | linc_us4_oe_packet_tests.erl | %%------------------------------------------------------------------------------
Copyright 2012 FlowForwarding.org
%%
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/FlowForwarding/LINC-Switch/9c28e7c8677c03440a62023292dd700fef0c3420/apps/linc_us4_oe/test/linc_us4_oe_packet_tests.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, eithe... | Copyright 2012 FlowForwarding.org
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Erlang Solutions Ltd. < >
2012 FlowForwarding.org
-module(linc_us4_oe_packet_tests).
-import(linc_us4_oe_test_utils, [mock/1,... |
7ffc7f7bf2b21b4241085d5ffd2a403170554c9b7adc07aca2d51234a3cdb2dd | forked-from-1kasper/anders | repl.ml | open Prettyprinter
open Module
open Error
open Decl
open Radio
let help =
"Available commands:
<statement> infer type and normalize statement
:q quit
:r restart
:h display this message
Information about command line options can be found at ‘anders help’."
let banner =
... | null | https://raw.githubusercontent.com/forked-from-1kasper/anders/233098bf3ecf2f4900d44216af534044c4c8544e/src/frontend/repl.ml | ocaml | open Prettyprinter
open Module
open Error
open Decl
open Radio
let help =
"Available commands:
<statement> infer type and normalize statement
:q quit
:r restart
:h display this message
Information about command line options can be found at ‘anders help’."
let banner =
... | |
ef9bcd016f97621e3306b28fe108e95fbdbf468b2c89a35165d629c7530698f1 | nixeagle/cl-irc | parse-message.lisp | $ Id$
;;;; $Source$
;;;; See the LICENSE file for licensing information.
(in-package :irc)
(defun find-reply-name (reply-number &key (reply-names *reply-names*))
"Numeric replies in the IRC RFCs have more meaningful names. Given
a numeric reply (`reply-number') this function will either return the
symbol repres... | null | https://raw.githubusercontent.com/nixeagle/cl-irc/efaea15f2962107ea9b1a2fad5cd9db492b4247b/tags/mode_tracking/parse-message.lisp | lisp | $Source$
See the LICENSE file for licensing information.
(irc-error-reply-p command)
Disable for now, as it prevents adding hooks for some useful
error types | $ Id$
(in-package :irc)
(defun find-reply-name (reply-number &key (reply-names *reply-names*))
"Numeric replies in the IRC RFCs have more meaningful names. Given
a numeric reply (`reply-number') this function will either return the
symbol representing the reply or raise a continuable error
(`no-such-reply') whi... |
d2949aceb24bab8a17b94463a5defba89a7f0d61e620435b77e34a1da3c9ab59 | ghc/testsuite | tcfail201.hs | {-# LANGUAGE RankNTypes #-}
-- Claus reported by email that
GHCi , version 6.9.20080217 loops on this program
-- -ghc/2008-June/043173.html
-- So I'm adding it to the test suite so that we'll see it if it happens again
module Foo where
data HsDoc id
= DocEmpty
| DocParagraph (HsDoc id)
gfoldl' :: (forall a ... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail201.hs | haskell | # LANGUAGE RankNTypes #
Claus reported by email that
-ghc/2008-June/043173.html
So I'm adding it to the test suite so that we'll see it if it happens again |
GHCi , version 6.9.20080217 loops on this program
module Foo where
data HsDoc id
= DocEmpty
| DocParagraph (HsDoc id)
gfoldl' :: (forall a b . c (a -> b) -> a -> c b) -> (forall g . g -> c g) -> a -> c a
gfoldl' k z hsDoc = case hsDoc of
DocEmpty -> z DocEmpty
(DocParagraph hsDoc) ... |
1715f7174ac1cbbecf0ff72d5e9a2f5620376bb687028ad5c1157716499e78a4 | input-output-hk/cardano-wallet-legacy | Buildable.hs | -- | Utilities for dealing with 'Buildable'
module Util.Buildable (
ShowThroughBuild(..)
) where
import Formatting (bprint, sformat)
import qualified Formatting as F
import Formatting.Buildable (Buildable (..))
import Prelude (Show (..))
import Test.QuickCheck (Arbitrary (... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/test/unit/Util/Buildable.hs | haskell | | Utilities for dealing with 'Buildable' | module Util.Buildable (
ShowThroughBuild(..)
) where
import Formatting (bprint, sformat)
import qualified Formatting as F
import Formatting.Buildable (Buildable (..))
import Prelude (Show (..))
import Test.QuickCheck (Arbitrary (..))
import Universum
newtype Sho... |
6b6d356b3e9447581f7c82e850e65f33297715d39dca0e87d07d855fc4c75b85 | nuprl/gradual-typing-performance | scheme-tests.rkt | #lang scheme/base
(require test-engine/scheme-tests
"type-env-ext.rkt")
(provide (all-from-out test-engine/scheme-tests))
| null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/typed/test-engine/scheme-tests.rkt | racket | #lang scheme/base
(require test-engine/scheme-tests
"type-env-ext.rkt")
(provide (all-from-out test-engine/scheme-tests))
| |
103580e3771ce70018a4b47f20cb46547728762dc653f32968b9dc0e32056dc9 | jordwalke/rehp | deadcode.mli | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/compiler/lib/deadcode.mli | ocaml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | |
3af15e41873efe93a114464af4804c82e089061df8bd77d94a60c116acc1fa84 | melange-re/melange | functor_ffi.ml |
module Make ( S : sig type elt end ) = struct
open S
type 'a t
external unsafe_get : elt t -> int -> elt = "" [@@bs.get_index]
external get : elt t -> int -> elt Js.undefined = "" [@@bs.get_index]
let opt_get f i =
Js.Undefined.toOption @@ get f i
end
module Int_arr = Make ( stru... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/functor_ffi.ml | ocaml |
module Make ( S : sig type elt end ) = struct
open S
type 'a t
external unsafe_get : elt t -> int -> elt = "" [@@bs.get_index]
external get : elt t -> int -> elt Js.undefined = "" [@@bs.get_index]
let opt_get f i =
Js.Undefined.toOption @@ get f i
end
module Int_arr = Make ( stru... | |
821bcb95854abed31ad7238bbdc45ba884b2fe2d0ad0d847be6569144fb3d806 | techascent/tech.ml.dataset | format_sequence.clj | (ns ^:no-doc tech.v3.dataset.format-sequence
"This code provided initial by genmeblog after careful consideration
of R print code"
(:import [java.text DecimalFormat]))
CN - I removed cl - format as a required dependency so that graal native executables would
;;both compile faster and be much smaller.
(set! *w... | null | https://raw.githubusercontent.com/techascent/tech.ml.dataset/69b3035169453a23df70a19492fec47a2b1ddced/src/tech/v3/dataset/format_sequence.clj | clojure | both compile faster and be much smaller.
maximum double power for precise calculations
powers for scientific notation
digits on the left side of dot
normal number
scientific number (using table to shift values)
very big or very small case
desired precision on the right side
size of the exponent
switch to scien... | (ns ^:no-doc tech.v3.dataset.format-sequence
"This code provided initial by genmeblog after careful consideration
of R print code"
(:import [java.text DecimalFormat]))
CN - I removed cl - format as a required dependency so that graal native executables would
(set! *warn-on-reflection* true)
(set! *unchecked-m... |
076b9171edae44f0ce1d9082790f58ff11f09c49e6b2d49cc647357ff2b3c24f | metabase/metabase | logger_test.clj | (ns metabase.logger-test
(:require
[clojure.string :as str]
[clojure.test :refer :all]
#_{:clj-kondo/ignore [:discouraged-namespace]}
[clojure.tools.logging :as log]
[clojure.tools.logging.impl :as log.impl]
[metabase.logger :as mb.logger]
[metabase.test :as mt])
(:import
(org.apache.logging... | null | https://raw.githubusercontent.com/metabase/metabase/dad3d414e5bec482c15d826dcc97772412c98652/test/metabase/logger_test.clj | clojure | (ns metabase.logger-test
(:require
[clojure.string :as str]
[clojure.test :refer :all]
#_{:clj-kondo/ignore [:discouraged-namespace]}
[clojure.tools.logging :as log]
[clojure.tools.logging.impl :as log.impl]
[metabase.logger :as mb.logger]
[metabase.test :as mt])
(:import
(org.apache.logging... | |
3edc66ed16a00f863dcabb4b579ef29b1910518bd7781f77dcdbba4da27f7488 | haskellari/lukko | Lukko.hs | {-# LANGUAGE CPP #-}
# LANGUAGE Trustworthy #
-- | Open 'Handle' based locking
module Lukko (
FileLockingNotSupported(..),
Impl.fileLockingSupported,
Impl.FileLockingSupported,
FileLockingMethod (..),
Impl.fileLockingMethod,
LockMode(..),
-- * File descriptors
FD,
fdOpen,
... | null | https://raw.githubusercontent.com/haskellari/lukko/623a257210637b01e928090dccee88410d0b8e90/src/Lukko.hs | haskell | # LANGUAGE CPP #
| Open 'Handle' based locking
* File descriptors
* Handles
-----------------------------------------------------------------------------
Handles
-----------------------------------------------------------------------------
| If a 'Handle' references a file descriptor, attempt to lock conte... | # LANGUAGE Trustworthy #
module Lukko (
FileLockingNotSupported(..),
Impl.fileLockingSupported,
Impl.FileLockingSupported,
FileLockingMethod (..),
Impl.fileLockingMethod,
LockMode(..),
FD,
fdOpen,
fdClose,
fdLock,
fdTryLock,
fdUnlock,
handleToFd,
hLock,
hTryLo... |
ea83910910411698116c5c8f4d51373de34bb5bfb761f18fe88a3677e8fc64e5 | Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator | OperationGetOperationDescriptionSpec.hs | # LANGUAGE DuplicateRecordFields #
{-# LANGUAGE OverloadedStrings #-}
module OpenAPI.Generate.OperationGetOperationDescriptionSpec where
import qualified Data.Map as Map
import OpenAPI.Generate.Internal.Operation
import OpenAPI.Generate.Types as OAT
import Test.Hspec
spec :: Spec
spec =
let emptyResponseObject =
... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator/d9cc91717b773882be65ec290c020dd0adb7cc3b/openapi3-code-generator/test/OpenAPI/Generate/OperationGetOperationDescriptionSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DuplicateRecordFields #
module OpenAPI.Generate.OperationGetOperationDescriptionSpec where
import qualified Data.Map as Map
import OpenAPI.Generate.Internal.Operation
import OpenAPI.Generate.Types as OAT
import Test.Hspec
spec :: Spec
spec =
let emptyResponseObject =
OAT.ResponsesObject
... |
eb28d99cc162e5cec0fd803fe9a69b002e8f054ea858d8d842b8c2033ae07652 | steffan-westcott/clj-otel | logging.clj | (ns steffan-westcott.clj-otel.exporter.logging
"Exporters that log telemetry data using `java.util.logging`. Intended for
debugging only."
(:import (io.opentelemetry.exporter.logging LoggingMetricExporter LoggingSpanExporter)
(io.opentelemetry.sdk.metrics.data AggregationTemporality)))
(defn span-expo... | null | https://raw.githubusercontent.com/steffan-westcott/clj-otel/92975012560fb999fc46e73ec0d84e5b82fdeaab/clj-otel-exporter-logging/src/steffan_westcott/clj_otel/exporter/logging.clj | clojure | (ns steffan-westcott.clj-otel.exporter.logging
"Exporters that log telemetry data using `java.util.logging`. Intended for
debugging only."
(:import (io.opentelemetry.exporter.logging LoggingMetricExporter LoggingSpanExporter)
(io.opentelemetry.sdk.metrics.data AggregationTemporality)))
(defn span-expo... | |
43cf85b878e8e3ed3acf25b7143d0272c718ce23565d6c27f6853d43ae70e2f3 | oakmac/snowflake-css | util.cljs | (ns com.oakmac.snowflake.client.util)
;;------------------------------------------------------------------------------
;; Logging
;;------------------------------------------------------------------------------
(defn js-log
"Logs a JavaScript thing."
[js-thing]
(js/console.log js-thing))
(defn log
"Logs a C... | null | https://raw.githubusercontent.com/oakmac/snowflake-css/e6e19c6a9e4686e0abccdf3bd0d1b1866eb6ee5a/00-old/src-cljs/client/com/oakmac/snowflake/client/util.cljs | clojure | ------------------------------------------------------------------------------
Logging
------------------------------------------------------------------------------
------------------------------------------------------------------------------
--------------------------------------------------------------------------... | (ns com.oakmac.snowflake.client.util)
(defn js-log
"Logs a JavaScript thing."
[js-thing]
(js/console.log js-thing))
(defn log
"Logs a Clojure thing."
[clj-thing]
(js-log (pr-str clj-thing)))
DOM
(defn by-id [id]
(.getElementById js/document id))
|
9af12ed134ab5e6cc3d63aa2b534482301ed97f222f8ab301823d181cab621c5 | acl2/acl2 | slice@useless-runes.lsp | (+-OF---AND-0)
(SLICE-OF-0
(100 3 (:REWRITE BVCHOP-IDENTITY))
(98 5 (:REWRITE UNSIGNED-BYTE-P-OF-0-ARG2))
(67 9 (:DEFINITION NATP))
(42 4 (:REWRITE NATP-OF-+-WHEN-NATP-AND-NATP))
(28 2 (:REWRITE LOGTAIL-BECOMES-0))
(20 5 (:REWRITE <-OF-+-COMBINE-CONSTANTS-2))
(17 17 (:REWRITE BOUND-WHEN-USB))
(12 2 (:REWRITE LO... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/bv/.sys/slice%40useless-runes.lsp | lisp | (+-OF---AND-0)
(SLICE-OF-0
(100 3 (:REWRITE BVCHOP-IDENTITY))
(98 5 (:REWRITE UNSIGNED-BYTE-P-OF-0-ARG2))
(67 9 (:DEFINITION NATP))
(42 4 (:REWRITE NATP-OF-+-WHEN-NATP-AND-NATP))
(28 2 (:REWRITE LOGTAIL-BECOMES-0))
(20 5 (:REWRITE <-OF-+-COMBINE-CONSTANTS-2))
(17 17 (:REWRITE BOUND-WHEN-USB))
(12 2 (:REWRITE LO... | |
b1e5fd42f0dd144af7c89fa3f3ae4ea34e985f07d918fcc7b625ebf4000e183e | hjcapple/reading-sicp | eceval-compiler-example.scm | #lang sicp
P425 - [ 5.5.7 编译代码与求值器的互连 ]
(#%require "ch5-eceval-compiler.scm")
(compile-and-go
'(begin
(define (factorial n)
(if (= n 1)
1
(* (factorial (- n 1)) n)))
(factorial 5)
))
| null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_5/eceval-compiler-example.scm | scheme | #lang sicp
P425 - [ 5.5.7 编译代码与求值器的互连 ]
(#%require "ch5-eceval-compiler.scm")
(compile-and-go
'(begin
(define (factorial n)
(if (= n 1)
1
(* (factorial (- n 1)) n)))
(factorial 5)
))
| |
2b2c3ca2220e0e4774c08e16be011790b53a9de3b9e04c4d8009fd748c481a54 | ivanjovanovic/sicp | e-5.13.scm | Exercise 5.13 . Modify the simulator so that it uses the controller
; sequence to determine what registers the machine has rather than
; requiring a list of registers as an argument to make-machine. Instead
; of pre-allocating the registers in make-machine, you can allocate them
one at a time when they are first ... | null | https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/5.2/e-5.13.scm | scheme | sequence to determine what registers the machine has rather than
requiring a list of registers as an argument to make-machine. Instead
of pre-allocating the registers in make-machine, you can allocate them
instructions.
------------------------------------------------------------
This is not so difficult task.
... | Exercise 5.13 . Modify the simulator so that it uses the controller
one at a time when they are first seen during assembly of the
First hint is to update get - register - content and set - register - content
|
d6eaf944556aff68169c915e97b103ab36f4d9b860fe3aa82dd1a9c4d9ca5183 | emmabastas/elm-embed | Expression.hs | # OPTIONS_GHC -Wall -fno - warn - unused - do - bind #
{-# LANGUAGE OverloadedStrings #-}
module Parse.Expression
( expression
)
where
import qualified Data.Name as Name
import qualified AST.Source as Src
import qualified Parse.Keyword as Keyword
import qualified Parse.Number as Number
import qualified Parse.P... | null | https://raw.githubusercontent.com/emmabastas/elm-embed/c2c4f9dcc5c4f47480f728247ff7b4d0700d7476/compiler/src/Parse/Expression.hs | haskell | # LANGUAGE OverloadedStrings #
TERMS
.
.
LISTS
[
]
,
]
(
)
)
)
,
)
{
}
|
=
,
}
=
EXPRESSIONS
argument
operator
negative terms
term
final term
done
-
IF EXPRESSION
\
->
CASE EXPRESSIONS
->
LET EXPRESSION
LET DEFINITIONS
DEFINITION
:
=
DESTRUCTURE
= | # OPTIONS_GHC -Wall -fno - warn - unused - do - bind #
module Parse.Expression
( expression
)
where
import qualified Data.Name as Name
import qualified AST.Source as Src
import qualified Parse.Keyword as Keyword
import qualified Parse.Number as Number
import qualified Parse.Pattern as Pattern
import qualified ... |
ae180d7932d345c2e97e407ea8cce9ee9c5886eb9fa0f8cec852b062ca95f96b | vikram/lisplibraries | test.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : TBNL ; Base : 10 -*-
$ Header : /usr / local / cvsrep / tbnl / test / test.lisp , v 1.35 2006/09/04 22:54:36 edi Exp $
Copyright ( c ) 2004 - 2006 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; mod... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/tbnl-0.11.4/test/test.lisp | lisp | Syntax : COMMON - LISP ; Package : TBNL ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the foll... | $ Header : /usr / local / cvsrep / tbnl / test / test.lisp , v 1.35 2006/09/04 22:54:36 edi Exp $
Copyright ( c ) 2004 - 2006 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
To test T... |
7be215a53d078660e7342d4e6c6b192fa55eab7e160c015860a00adc11ae9609 | GaloisInc/semmc | Eval.hs | -- | Evaluators for location functions in formula definitions (e.g., memri_reg)
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module SemMC.Architecture.ARM.Eval
( ... | null | https://raw.githubusercontent.com/GaloisInc/semmc/4dc4439720b3b0de8812a68f8156dc89da76da57/semmc-arm/src/SemMC/Architecture/ARM/Eval.hs | haskell | | Evaluators for location functions in formula definitions (e.g., memri_reg)
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
----------------------------------------------------------------------
Int16
fromIntegral . W.unW .
----------------------------------------------------------------------
| Extract the register v... |
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module SemMC.Architecture.ARM.Eval
( interpIsR15
, interpAm2offsetimmImmExtractor
, interpAm2offsetimmAddExtractor
, interpBlxTarget_S
, interpBlxTarget... |
d638a9e2d9705807a6f0297467dad37144cb4ad55bc8646b574fba52423b8a6d | racket/redex | stlc-sub-3.rkt | #lang racket/base
(require redex/benchmark
"util.rkt"
redex/reduction-semantics)
(provide (all-defined-out))
(define the-error "swaps function and argument position in application")
(define-rewrite bug3
((subst M x M_x) (subst N x M_x))
==>
((subst N x M_x) (subst M x M_x))
#:context (defi... | null | https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-benchmark/redex/benchmark/models/stlc-subst/stlc-sub-3.rkt | racket | #lang racket/base
(require redex/benchmark
"util.rkt"
redex/reduction-semantics)
(provide (all-defined-out))
(define the-error "swaps function and argument position in application")
(define-rewrite bug3
((subst M x M_x) (subst N x M_x))
==>
((subst N x M_x) (subst M x M_x))
#:context (defi... | |
8bef4dccdb9ac759b7cc166ed8319ce482f203a21eeb26c421740a72b162233b | Eduap-com/WordMat | ar.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/src/ar.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
Check the dim... |
(in-package :maxima)
(macsyma-module ar)
(declare-top (special evarrp munbound flounbound fixunbound $use_fast_arrays))
(defstruct (mgenarray (:conc-name mgenarray-))
aref
aset
type
null
generator
content)
(defun marray-type (x)
(cond ((arrayp x) 'array)
((hash-table-p x) 'hash-table)
... |
d4e0f651b0c8f0b4472a4d844afeb207495c0d23a23524155eccf7ea80b844ac | PeterDWhite/Osker | BraidUtilities.hs | Copyright ( C ) , 2001 , 2002 , 2003
module BraidUtilities
Braid of threads
, B.ProgramType (..) -- Thread lifted, unlifted, or wait?
, OC.ThreadId -- Abstract type of thread identifiers
Creates MVar that is written when thread dies
Like myForkIO , but waits on oneshot first
, ForkInfo (... | null | https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Braid/BraidUtilities.hs | haskell | Thread lifted, unlifted, or wait?
Abstract type of thread identifiers
Information generated about a thread
Haskell imports
Utility imports
Created by the resumption fork
Input channel for the thread
Can wait on this until thread is done
Forked process waits on this to start
it dies. This permits the creator t... | Copyright ( C ) , 2001 , 2002 , 2003
module BraidUtilities
Braid of threads
Creates MVar that is written when thread dies
Like myForkIO , but waits on oneshot first
An MVar to be written only once
Create a new one shot
Shoot the one shot
Shoot a bunch of one shots
) where
import Monad
Braid im... |
17850e9fdeb78e2046a98716c30aa7221d38ca7282add3fe8007fb17348e448b | inclojure-org/intermediate-clojure-workshop | users.clj | (ns workshop-app.handlers.users
(:require [workshop-app.db.in-mem :as wadim]
[cheshire.core :as json]))
(defn get-handler
[{:keys [params] :as request}]
(def r* request)
(let [{:keys [name surname]} params]
(if (and name surname)
{:status 200
:body (str "Hello, "
... | null | https://raw.githubusercontent.com/inclojure-org/intermediate-clojure-workshop/3338a476aa815a587fa9e0b8b3804aa43492d15e/save-points/4/src/workshop_app/handlers/users.clj | clojure | (ns workshop-app.handlers.users
(:require [workshop-app.db.in-mem :as wadim]
[cheshire.core :as json]))
(defn get-handler
[{:keys [params] :as request}]
(def r* request)
(let [{:keys [name surname]} params]
(if (and name surname)
{:status 200
:body (str "Hello, "
... | |
824fb2cf9e619acd4fa302476d29295fa8085542c3e9110402b4c8d2fb62920b | facebook/duckling | Tests.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.
module Duckling.Numeral.BN.Tests
( tests
) where
import Data.String
import Prelude
import Test.Tasty
impo... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/tests/Duckling/Numeral/BN/Tests.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. | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Numeral.BN.Tests
( tests
) where
import Data.String
import Prelude
import Test.Tasty
import Duckling.Dimensions.Types
import Duckling.Numeral.BN.Corpus
import Duckling.Testing.Asserts
tests :: TestTree
tests = testGroup "BN Tests"
[ makeCorpusTe... |
37703de4d70f5cb790d98303b4c8b53426f1722cb43c06429733ad84722b8c67 | flussonic/sqlapi | sqlapi.erl | -module(sqlapi).
-include("../include/sqlapi.hrl").
-include("myproto.hrl").
-export([start_server/1, stop_server/1, existing_port/1, load_config/1]).
-export([password_hash/2, execute/3, terminate/2]).
-export([create_temporary_table/2, drop_temporary_table/1]).
-export([notify/2]).
-export([apply_sql_filter/2... | null | https://raw.githubusercontent.com/flussonic/sqlapi/a8f51e3cb5827366a6224585ee52024720b9c3ef/src/sqlapi.erl | erlang | filter, aggregate, order and limit rows after select query
null last mysql default
limit/offset rows, convert to maps
% %
check \_, \%, \\
| P], [$%| V]) -> like0(P, V);
| _], _) -> false;
'_': skip symbol
'%': skip symbols, check further pattern
| []], _) -> true;
| P], V) ->
| P], tl(V)); % keep pattern an... | -module(sqlapi).
-include("../include/sqlapi.hrl").
-include("myproto.hrl").
-export([start_server/1, stop_server/1, existing_port/1, load_config/1]).
-export([password_hash/2, execute/3, terminate/2]).
-export([create_temporary_table/2, drop_temporary_table/1]).
-export([notify/2]).
-export([apply_sql_filter/2... |
a8056ff7b7ad0c0c6aa9ec797032cbdf00f8285d087f7e8921b1aa756a1b6862 | TrustInSoft/tis-kernel | logic_preprocess.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_internals/parsing/logic_preprocess.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
5c407ede1ddf4dbabcd8ce5147913ee6859d2e2a4d4de8096c2a9f76c2381fb7 | justinethier/cyclone | convert-doc-index.scm | ;;;; Cyclone Scheme
;;;;
;;;;
Copyright ( c ) 2014 - 2016 ,
;;;; All rights reserved.
;;;;
;;;; A simple program to format links for the API index page.
;;;;
(import
(scheme base)
(scheme write)
(scheme cyclone util))
;; TODO: move this somewhere useful
(define (index-of lst x)
(define (find lst idx)
... | null | https://raw.githubusercontent.com/justinethier/cyclone/cf66cf1057fcd687cc42d4d7dcaeeef00cba089b/scripts/convert-doc-index.scm | scheme | Cyclone Scheme
All rights reserved.
A simple program to format links for the API index page.
TODO: move this somewhere useful
goal is:
[`load`](api/scheme/load.md#load)
(define line "docs/api/scheme/base.md:- [`denominator`](#denominator)")
(define line "docs/api/scheme/process-context.md:- [`get-environment... | Copyright ( c ) 2014 - 2016 ,
(import
(scheme base)
(scheme write)
(scheme cyclone util))
(define (index-of lst x)
(define (find lst idx)
(cond
((null? lst) #f)
((eq? (car lst) x) idx)
(else (find (cdr lst) (+ idx 1)))))
(find lst 0))
(define (convert-line line)
(let* ((lis (string... |
ed479a803b0b77eb98d9504d190d82b3f043c01dd6a5b025c338c2424a9c3c90 | rroohhh/guix_packages | caps2esc.scm | (define-module (vup caps2esc)
#:use-module (gnu)
#:use-module (gnu services shepherd)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages xorg)
#:use-module (gnu packages linux)
#:use-module (guix packages)
#:use-module (guix licenses)
#:use-module (guix git-download)
#:use-module (guix ... | null | https://raw.githubusercontent.com/rroohhh/guix_packages/117480ede867def846fa3120766864ed634e9321/vup/caps2esc.scm | scheme | The upstream makefile does not include an install phase. | (define-module (vup caps2esc)
#:use-module (gnu)
#:use-module (gnu services shepherd)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages xorg)
#:use-module (gnu packages linux)
#:use-module (guix packages)
#:use-module (guix licenses)
#:use-module (guix git-download)
#:use-module (guix ... |
8a03883f37c31046cf9672a5da093762160bc792134741d1e0fef25f8b42c901 | Gbury/dolmen | base.mli |
* { 2 Builtin functions manipulations }
val noop : _ -> _ -> [> `Not_found ]
* Noop builtins function .
val merge :
('a -> 'b -> ([> `Not_found ] as 'c)) list ->
'a -> 'b -> 'c
(** A convenient function for merging a list of
builtin parser functions into a single builtin function. *)
* { 2 Smtlib Indexed i ... | null | https://raw.githubusercontent.com/Gbury/dolmen/21bfd8d221b39dfd72a7938a09a6b2ae85b3c391/src/typecheck/base.mli | ocaml | * A convenient function for merging a list of
builtin parser functions into a single builtin function.
* The type of indexed family of operators.
* [parse_id basename indexes f ~err ~k] uses the function [f] to
get an expected arity for the indexed identifier, and then tries
and parse the index list accor... |
* { 2 Builtin functions manipulations }
val noop : _ -> _ -> [> `Not_found ]
* Noop builtins function .
val merge :
('a -> 'b -> ([> `Not_found ] as 'c)) list ->
'a -> 'b -> 'c
* { 2 Smtlib Indexed i d helpers }
type 'ret indexed = [
| `Not_indexed
| `Unary of (string -> 'ret)
| `Binary of (string -> str... |
2924b1383992b6b7a3e0f2fce1d7cf34a5cd390aacbb4523df3dc64a47d5cdb5 | ocaml-multicore/tezos | delegate_services.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/delegate_services.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2020 Metastate AG < >
Copyright ( c ) 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit perso... |
df53744b6242c3e90dab3b56daca95eeab975cc8f7d09bcf42325ffa3e6a8ac4 | ocsigen/ocsimore | ocsimore_pam.ml | Ocsimore
* Copyright ( C ) 2008
* Laboratoire PPS - Université Paris Diderot - CNRS
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
... | null | https://raw.githubusercontent.com/ocsigen/ocsimore/8eeaf043ed6f1f167a96cbdc5f72a5225d9516d5/src/user/pam/ocsimore_pam.ml | ocaml | Lwt_mutex.lock mutex >>= fun () ->
Lwt.finalize
(fun () ->
Lwt_preemptive.detach
(fun () ->
)
()
)
(fun () -> Lwt_mutex.unlock mutex; Lwt.return ())
| Ocsimore
* Copyright ( C ) 2008
* Laboratoire PPS - Université Paris Diderot - CNRS
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
... |
ebe88185df5583395c461b1064997ba4385521e8815f357720a8e732f5f92e5b | ocharles/opaleye-tf | BaseTypes.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstan... | null | https://raw.githubusercontent.com/ocharles/opaleye-tf/b4b27f51e6f6137e5eb037b3bf36e00091cd1b8a/src/Opaleye/TF/BaseTypes.hs | haskell | | The universe of base types known about by PostgreSQL.
^ @bigserial@
^ @bit [ (n) ]@
^ @bit varying [ (n) ]@
^ @boolean@
^ @box@
^ @bytea@
^ @character [ (n) ]@
^ @character varying (n)@ (unbound @character varying@ is 'PGText')
^ @cidr@
^ @circle@
^ @inet@
^ @integer@
^ @interval@. There is no ability t... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstan... |
07225abbdde5efdab7f5f01795159d990b54ada8e08933fc15374a2288d92a96 | vikram/lisplibraries | url.lisp |
(in-package :weblocks-test)
;;; Test url-presentation render-view-field-value
(deftest-html url-presentation-1
(render-view-field-value "www.hello.com"
(make-instance 'url-presentation)
(make-instance 'data-view-field
:slot-name 'foo)
(make-instance 'data-view)
nil *joe*)
... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/test/views/types/presentations/url.lisp | lisp | Test url-presentation render-view-field-value |
(in-package :weblocks-test)
(deftest-html url-presentation-1
(render-view-field-value "www.hello.com"
(make-instance 'url-presentation)
(make-instance 'data-view-field
:slot-name 'foo)
(make-instance 'data-view)
nil *joe*)
(:a :href "www.hello.com" :onclick "stopPropagat... |
7431d437265c72a7154c88684a6e964a30b26df9a8a1a264561cce9d9c452da8 | anwarmamat/cmsc330spring19-public | lexer.mli | open SmallCTypes
open TokenTypes
val tokenize : string -> token list
| null | https://raw.githubusercontent.com/anwarmamat/cmsc330spring19-public/98af1e8efc3d8756972731eaca19e55fe8febb69/project5/src/lexer.mli | ocaml | open SmallCTypes
open TokenTypes
val tokenize : string -> token list
| |
f710ff254d8e9a67724db475b1a40b4e242bd267af821c886b81ec097000f4e7 | ndmitchell/uniplate | SYB.hs | |
SYB compatibility layer . This module serves as a drop - in
replacement in some situations for some of the SYB operations .
Users should also import " Data . Generics . Uniplate . Data " .
SYB is described in the paper : \"Scrap your boilerplate : a practical design
pattern for generic ... | null | https://raw.githubusercontent.com/ndmitchell/uniplate/7d3039606d7a083f6d77f9f960c919668788de91/Data/Generics/SYB.hs | haskell | | @gmapT == 'descend'@
| Use 'children' and 'foldl'
| Use 'children' and 'foldr'
| Use 'children'
| Use 'children' and '!!'
| @gmapM == 'descendM'@
| @mkM == id@
| @everywhereM == 'transformBiM'@
| Only for use with 'everything'
| Use 'universe' or 'universeBi', perhaps followed by a fold.
Not an exact eq... | |
SYB compatibility layer . This module serves as a drop - in
replacement in some situations for some of the SYB operations .
Users should also import " Data . Generics . Uniplate . Data " .
SYB is described in the paper : \"Scrap your boilerplate : a practical design
pattern for generic ... |
034a5077dd1331d4eb47d2672be26c9185c291d2c2bbb8f83315479a68c03f0a | msakai/data-interval | Base.hs | # OPTIONS_GHC -Wall #
# LANGUAGE CPP , LambdaCase , ScopedTypeVariables , TypeFamilies , DeriveDataTypeable , MultiWayIf ,
# LANGUAGE Trustworthy #
#if __GLASGOW_HASKELL__ >= 708
# LANGUAGE RoleAnnotations #
#endif
-----------------------------------------------------------------------------
-- |
Module : D... | null | https://raw.githubusercontent.com/msakai/data-interval/8c7596ff71fd2055b006c3bbf8c6765b00ebeabe/src/Data/IntervalMap/Base.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : provisional
Interval datatype and interval arithmetic.
---------------------------------------------------------------------------
* Operators
* Query
* Construction
** Inser... | # OPTIONS_GHC -Wall #
# LANGUAGE CPP , LambdaCase , ScopedTypeVariables , TypeFamilies , DeriveDataTypeable , MultiWayIf ,
# LANGUAGE Trustworthy #
#if __GLASGOW_HASKELL__ >= 708
# LANGUAGE RoleAnnotations #
#endif
Module : Data . . Base
Copyright : ( c ) 2016
Portability : non - portable ( CP... |
074c0bb0c7f772355c46021cae28cf207ba83d131599e2c0b8ea19ce8068a9c4 | GNOME/gimp-tiny-fu | difference-clouds.scm | ; Plugin for the GNU Image Manipulation Program
Copyright ( C ) 2006
;
; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or
; (at your option) any later vers... | null | https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/difference-clouds.scm | scheme | Plugin for the GNU Image Manipulation Program
This program is free software: you can redistribute it and/or modify
either version 3 of the License , or
(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 ... | Copyright ( C ) 2006
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(define (script-fu-difference-clouds image
drawable)
(let* ((draw-offset-x (car (gimp-drawable-offsets drawable)))
... |
f5179ef2fdd59141f7c90b5fa32b62e89fcb6f7f2606288ef798def03c982a8f | raghavkarol/edt | edt_app.erl | %%
Copyright 2020 .
%%
-module(edt_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
Cmd = os:cmd("ps " ++ os:getpid()),
Profile = edt:rebar3_profile(),
case edt_lib:parse_rebar3_profile(Cmd) of
Profile ->
ok;
Other ->
... | null | https://raw.githubusercontent.com/raghavkarol/edt/619bb788767dbb0d8e144e1c58af9e6e4925460c/src/edt_app.erl | erlang | Copyright 2020 .
-module(edt_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
Cmd = os:cmd("ps " ++ os:getpid()),
Profile = edt:rebar3_profile(),
case edt_lib:parse_rebar3_profile(Cmd) of
Profile ->
ok;
Other ->
case a... | |
65cd0c2db2cd3f091543a653dc915ad98a7ad25d400a9c80ab2020efc7837550 | monadfix/ormolu-live | TcEvidence.hs | ( c ) The University of Glasgow 2006
# LANGUAGE CPP , DeriveDataTypeable #
module TcEvidence (
HsWrapper
HsWrapper(..),
(<.>), mkWpTyApps, mkWpEvApps, mkWpEvVarApps, mkWpTyLams,
mkWpLams, mkWpLet, mkWpCastN, mkWpCastR, collectHsWrapBinders,
mkWpFun, idHsWrapper, isIdHsWrapper, isErasableHsWrapper,
pprH... | null | https://raw.githubusercontent.com/monadfix/ormolu-live/d8ae72ef168b98a8d179d642f70352c88b3ac226/ghc-lib-parser-8.10.1.20200412/compiler/typecheck/TcEvidence.hs | haskell | Evidence bindings
TcCoercion
a phantom coercion
| This version does a slow check, calculating the related types and seeing
if they are equal.
Note that the input coercion should always be nominal.
The identity coercion
wrap2 :: act_res <= exp_res
This isn't the same as for mkFunCo, but it has... | ( c ) The University of Glasgow 2006
# LANGUAGE CPP , DeriveDataTypeable #
module TcEvidence (
HsWrapper
HsWrapper(..),
(<.>), mkWpTyApps, mkWpEvApps, mkWpEvVarApps, mkWpTyLams,
mkWpLams, mkWpLet, mkWpCastN, mkWpCastR, collectHsWrapBinders,
mkWpFun, idHsWrapper, isIdHsWrapper, isErasableHsWrapper,
pprH... |
5d5892e179ecf280f170d4085f232cf6e7b3cf58a2144f20d7d4075b009d4e55 | rubenbarroso/EOPL | 5-4-2.scm | This is 5-4-2.scm : flat fields
(let ((time-stamp "Time-stamp: <2000-12-13 16:22:39 wand>"))
(eopl:printf "5-4-2.scm - flat fields ~a~%"
(substring time-stamp 13 29)))
;;;;;;;;;;;;;;;; classes ;;;;;;;;;;;;;;;;
;;; classes are represented by their class-decls.
(define class? class-decl?) ; not us... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/interps/5-4-2.scm | scheme | classes ;;;;;;;;;;;;;;;;
classes are represented by their class-decls.
not used
objects ;;;;;;;;;;;;;;;;
an object is now just a single part, with a vector representing the
managed storage for the all the fields.
methods ;;;;;;;;;;;;;;;;
\new2
^;;;;;;;;;;;;;;; method environments ;;;;;;;;;;;;;;;;
^;;;;;;;;;;;;;... | This is 5-4-2.scm : flat fields
(let ((time-stamp "Time-stamp: <2000-12-13 16:22:39 wand>"))
(eopl:printf "5-4-2.scm - flat fields ~a~%"
(substring time-stamp 13 29)))
(define-datatype object object?
(an-object
(class-name symbol?)
(fields vector?)))
(define new-object
... |
8e7c9ccf37207169db32713cd56f22aaa5fc8d211d19833ba338b0927528f0d9 | rescript-lang/rescript-compiler | lam_compat.mli | Copyright ( C ) 2018 - Hongbo Zhang , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) an... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/e60482c6f6a69994907b9bd56e58ce87052e3659/jscomp/core/lam_compat.mli | ocaml | Copyright ( C ) 2018 - Hongbo Zhang , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) an... | |
31901c7f44bbc809af52541193e18ba5410c6caf23150f104b006aa45df361f6 | gregcman/sucle | sucle.lisp | (in-package :sucle)
;;;;************************************************************************;;;;
;;;;<BOXES?>
(defun create-aabb (&optional (maxx 1.0) (maxy maxx) (maxz maxx)
(minx (- maxx)) (miny (- maxy)) (minz (- maxz)))
(floatf maxx maxy maxz minx miny minz)
(aabbcc:make-aabb
:minx minx
:maxx... | null | https://raw.githubusercontent.com/gregcman/sucle/258be4ac4daaceea06a55f893227584d3772bb47/src/sucle/sucle.lisp | lisp | ************************************************************************;;;;
<BOXES?>
Why? because when there is an inexact number, like 0.3, there are bits at the end which
get chopped off or something, thus leading to strange clipping.
This effectively reduces the precision, giving leeway for math operations.
My pred... | (in-package :sucle)
(defun create-aabb (&optional (maxx 1.0) (maxy maxx) (maxz maxx)
(minx (- maxx)) (miny (- maxy)) (minz (- maxz)))
(floatf maxx maxy maxz minx miny minz)
(aabbcc:make-aabb
:minx minx
:maxx maxx
:miny miny
:maxy maxy
:minz minz
:maxz maxz))
(defparameter *block-aabb*
1x... |
07c9e86ce7d37bfead5c254899cec3b375ee5a7b6843413d299f4c9eb9951e8f | conscell/hugs-android | BSD.hs | module BSD
# DEPRECATED " This module has moved to Network . BSD " #
(module Network.BSD) where
import Network.BSD
| null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/oldlib/BSD.hs | haskell | module BSD
# DEPRECATED " This module has moved to Network . BSD " #
(module Network.BSD) where
import Network.BSD
| |
a13cbd246d1446f9dae3d4c0c84a15b28b3d48fc8516e9af4701e14fd3fd11c2 | serperu/secer | etorrent_dht_net.erl | -module(etorrent_dht_net).
-include("types.hrl").
-export([prova/1]).
% -ifdef(TEST).
% -include_lib("eqc/include/eqc.hrl").
-include_lib("eunit/include/eunit.hrl").
% -endif.
-ifdef(EQC).
-export([prop_query_inv/0, prop_inv_compact/0]).
-endif.
-behaviour(gen_server).
-import(etorrent_bcoding, [get_value/2, get_va... | null | https://raw.githubusercontent.com/serperu/secer/ffe2f9602356c34c9465c44534c82cc758b809b5/examples/etorrent/etorrent_dht_net.erl | erlang | -ifdef(TEST).
-include_lib("eqc/include/eqc.hrl").
-endif.
Implementation notes
RPC calls to remote nodes in the DHT are exposed to
clients using the gen_server call mechanism. In order
to make this work the client reference passed to the
handle_call/3 callback is stored in the server state.
... | -module(etorrent_dht_net).
-include("types.hrl").
-export([prova/1]).
-include_lib("eunit/include/eunit.hrl").
-ifdef(EQC).
-export([prop_query_inv/0, prop_inv_compact/0]).
-endif.
-behaviour(gen_server).
-import(etorrent_bcoding, [get_value/2, get_value/3]).
-import(etorrent_dht, [distance/2, closest_to/3]).
... |
c634eb18917ee5bd8d582fae39cdd88dfde31c2576c44cf0ac674ccfb414a419 | maximedenes/native-coq | type_errors.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/kernel/type_errors.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Type errors.
Fixpoints
CoFixpoi... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Term
open Sig... |
92972128040a1dfe5300fcebf9480eccce4834f1902eef46f8e1add5125ce7a2 | kazu-yamamoto/http3 | Client.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
| A client library for HTTP/0.9 .
module Network.HQ.Client (
-- * Runner
run
-- * Runner arguments
, H3.ClientConfig(..)
, H3.Config(..)
, H3.allocSimpleConfig
, H3.freeSimpleConfig
, H3.Scheme
, H3.Authority
-- * HQ client
, H2... | null | https://raw.githubusercontent.com/kazu-yamamoto/http3/5bbd91bd9fe02920d1d9099a686183fc10e731c0/Network/HQ/Client.hs | haskell | # LANGUAGE OverloadedStrings #
* Runner
* Runner arguments
* HQ client
* Request
* Creating request
* Response
** Accessing response
| Running an HQ client. | # LANGUAGE RecordWildCards #
| A client library for HTTP/0.9 .
module Network.HQ.Client (
run
, H3.ClientConfig(..)
, H3.Config(..)
, H3.allocSimpleConfig
, H3.freeSimpleConfig
, H3.Scheme
, H3.Authority
, H2.Client
, Request
, H2.requestNoBody
, Response
, H2.getResponseBodyChunk
) wher... |
8405f8395f91d313d85879118d1f8517e7ad1922a618a9f963c7dc5e6aa8bbc0 | nklein/grid-generators | cuboid.lisp |
(in-package :grid-iterate)
(iterate:defmacro-driver (iterate:FOR var ON-GRID-TO to
&optional FROM from-var BY by-var)
(alexandria:with-gensyms (generator new got)
(let ((kwd (if iterate:generate
'iterate:generate
'iterate:for)))
`(progn
... | null | https://raw.githubusercontent.com/nklein/grid-generators/5f7b790c339123f84710d907ddafdb52c160d44e/src/iterate/cuboid.lisp | lisp |
(in-package :grid-iterate)
(iterate:defmacro-driver (iterate:FOR var ON-GRID-TO to
&optional FROM from-var BY by-var)
(alexandria:with-gensyms (generator new got)
(let ((kwd (if iterate:generate
'iterate:generate
'iterate:for)))
`(progn
... | |
d20743d98a2fb391c8d0b330ffa12b72ca1c11cbb2dc455ddaa69202f2a15fe4 | CmdrDats/igoki | project.clj | (defproject igoki "0.8.0"
:description "Igoki, physical Go board/OGS interface"
:url ""
:license
{:name "Eclipse Public License"
:url "-v10.html"}
:dependencies
[[org.clojure/clojure "1.10.3"]
#_[com.google.guava/guava "20.0"]
[clj-http "3.12.3"]
[seesaw "1.5.0"]
[org.openpnp/opencv "4.5.1-2... | null | https://raw.githubusercontent.com/CmdrDats/igoki/4512602512d77ee8c334eb55351a587a19454b96/project.clj | clojure | (defproject igoki "0.8.0"
:description "Igoki, physical Go board/OGS interface"
:url ""
:license
{:name "Eclipse Public License"
:url "-v10.html"}
:dependencies
[[org.clojure/clojure "1.10.3"]
#_[com.google.guava/guava "20.0"]
[clj-http "3.12.3"]
[seesaw "1.5.0"]
[org.openpnp/opencv "4.5.1-2... | |
26b1391537ad1df3c02ec27d124b66620a813339e6dd290d2f30f85a2bf950c6 | hsyl20/haskus-system | Operand.hs | # LANGUAGE LambdaCase #
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE BinaryLiterals #
# LANGUAGE TypeApplications #
# LANGUAGE StandaloneDeriving #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
-- | Operand
module Haskus.Arch.X86_64.ISA.Operand
( OperandFam(..)
, OperandFamT
, ... | null | https://raw.githubusercontent.com/hsyl20/haskus-system/2f389c6ecae5b0180b464ddef51e36f6e567d690/haskus-system/src/lib/Haskus/Arch/X86_64/ISA/Operand.hs | haskell | # LANGUAGE DeriveAnyClass #
| Operand
-----------------------------------------------------------------
-----------------------------------------------------------------
Note [Operand size]
~~~~~~~~~~~~~~~~~~~
Default operand size(s)
-----------------------
for each segment)
-----------
In protected mode a... | # LANGUAGE LambdaCase #
# LANGUAGE DataKinds #
# LANGUAGE BinaryLiterals #
# LANGUAGE TypeApplications #
# LANGUAGE StandaloneDeriving #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
module Haskus.Arch.X86_64.ISA.Operand
( OperandFam(..)
, OperandFamT
, OperandFamP
, OperandStorage(..)
, Oper... |
7a6b262cd5cf40b1931e4c89f91400d73e609c703d30e6849a703b1bba77b729 | janestreet/learn-ocaml-workshop | board.ml | open Base
type t =
{ board : Filled_square.t option array array
; height : int
; width : int
}
let create ~height ~width =
{ board = Array.make_matrix ~dimx:width ~dimy:height None; height; width }
;;
let get t { Point.col; row } = t.board.(col).(row)
let set t { Point.col; row } value = t.board.(col).(row... | null | https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/solutions/lumines/board.ml | ocaml | TODO: remove any squares marked as [Swept] from the board. Gravity should
be applied appropriately. This is the function that is called by the
[Sweeper.t] to clear squares from the board.
At the end of this function, we should call
[mark_squares_that_are_sweepable] so that we ensure that we leave... | open Base
type t =
{ board : Filled_square.t option array array
; height : int
; width : int
}
let create ~height ~width =
{ board = Array.make_matrix ~dimx:width ~dimy:height None; height; width }
;;
let get t { Point.col; row } = t.board.(col).(row)
let set t { Point.col; row } value = t.board.(col).(row... |
4aa2db72bb8410f9d4ded23573109e86013c4d00180edd1174d7af6e856beb56 | clojure-lsp/clojure-lsp | handlers_test.clj | (ns clojure-lsp.handlers-test
(:require
[clojure-lsp.handlers :as handlers]
[clojure-lsp.kondo :as lsp.kondo]
[clojure-lsp.test-helper :as h]
[clojure.core.async :as async]
[clojure.test :refer [deftest is testing]]))
(h/reset-components-before-test)
(deftest initialize
(testing "detects URI format... | null | https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/374928dbcdd138c68943a835aaf639a8c1ef2002/lib/test/clojure_lsp/handlers_test.clj | clojure | defmulti
defmethod | (ns clojure-lsp.handlers-test
(:require
[clojure-lsp.handlers :as handlers]
[clojure-lsp.kondo :as lsp.kondo]
[clojure-lsp.test-helper :as h]
[clojure.core.async :as async]
[clojure.test :refer [deftest is testing]]))
(h/reset-components-before-test)
(deftest initialize
(testing "detects URI format... |
65ebafb605f720f3dcf3af49ec4d1fb7819626f1002e5f9628353bb56dc9b883 | reifyhealth/specmonstah | queries.cljs | (ns specmonstah-demo.examples.queries
(:require [shadow.resource :as rc]))
(def queries
[{:name "specify usernames"
:description "Specmonstah generates a lot of data for you, but you have the power to customize any of it."
:query {:user [[:custom-user-1 {:spec-gen {:user-name "Captain Crunch"}... | null | https://raw.githubusercontent.com/reifyhealth/specmonstah/afe38e7a39149836c31719f7e36a7504c14dbb80/demo/src/specmonstah_demo/examples/queries.cljs | clojure | (ns specmonstah-demo.examples.queries
(:require [shadow.resource :as rc]))
(def queries
[{:name "specify usernames"
:description "Specmonstah generates a lot of data for you, but you have the power to customize any of it."
:query {:user [[:custom-user-1 {:spec-gen {:user-name "Captain Crunch"}... | |
5e81b380c9bfeec3d49503cfe453e347e1136a3854d8452de5cf116a987fa2dd | xavierleroy/camlidl | lexpr.ml | (***********************************************************************)
(* *)
(* CamlIDL *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/xavierleroy/camlidl/b192760875fe6e97b13004bd289720618e12ee22/compiler/lexpr.ml | ocaml | *********************************************************************
CamlIDL
... | , projet Cristal , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
$ I d : lexpr.ml , v 1.11 2002 - 01 - 16 16:15:32 xleroy Exp $
open Printf
open Idltypes
open Utils
type c... |
22f8991c5e074ccd7af9907c51f23cccc421d75b42c6483a5974f2828cb6d522 | nmeum/edward | buffer.scm | (import (edward buffer))
(define (test-buffer name expected proc)
(test name
expected
(let ((b (make-buffer)))
(proc b)
(buffer->list b))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(test-group "append"
(test-buffer "append start"
... | null | https://raw.githubusercontent.com/nmeum/edward/035166ba90055c93b24efe0d4535636a6169250c/tests/buffer.scm | scheme |
undo append
undo undo
undo replace
undo undo | (import (edward buffer))
(define (test-buffer name expected proc)
(test name
expected
(let ((b (make-buffer)))
(proc b)
(buffer->list b))))
(test-group "append"
(test-buffer "append start"
'("foo" "bar")
(lambda (b)
(buffer-append... |
1b44e1e3188430aa179226ffcbbffef47b6eb0cd53963fca5fd18dd1845b14fd | ocaml-multicore/ocaml-tsan | odoc_class.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/ocamldoc/odoc_class.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module Name = Odoc_name
type class_element =
Class_attribute of Odoc_value.t_attribute
| Class_metho... |
7644e5af374ade6f79e1492b5448c5aa4784e12f408a2350e0647a038f6de6c8 | samcoy3/advent-of-code-template | Day22.hs | module Days.Day22 (runDay) where
{- ORMOLU_DISABLE -}
import Data.List
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Maybe
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Vector (Vector)
import qualified Data.Vector as Vec
import qualified Util.Util as U
import qu... | null | https://raw.githubusercontent.com/samcoy3/advent-of-code-template/ddc27cfd7ca36d6ebf0df2a2297347d02ee0f1a6/src/Days/Day22.hs | haskell | ORMOLU_DISABLE
---------- PARSER ------------
-------- TYPES ------------
---------- PART A ------------
---------- PART B ------------ | module Days.Day22 (runDay) where
import Data.List
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Maybe
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Vector (Vector)
import qualified Data.Vector as Vec
import qualified Util.Util as U
import qualified Program.RunDa... |
6897571fc48e523b09e08511dd9001173e4ecee21b351156cc0b86864b892125 | soarlab/FPTaylor | example.ml | open Interval;;
let _ =
let a = {low=3.0;high=3.0} in
let b = 1. /.$ a in
printf_I "%f" a;
print_newline();
printf_I "%f" b;
print_newline ();
Printf.printf "%e\n" (b.high -. b.low);;
| null | https://raw.githubusercontent.com/soarlab/FPTaylor/efbbc83970fe3c9f4cb33fafbbe1050dd18749cd/INTERVAL/EXAMPLES/example.ml | ocaml | open Interval;;
let _ =
let a = {low=3.0;high=3.0} in
let b = 1. /.$ a in
printf_I "%f" a;
print_newline();
printf_I "%f" b;
print_newline ();
Printf.printf "%e\n" (b.high -. b.low);;
| |
f174acaabdb9734f1b016bb65817ae6e42733b3017960d2e072233387cfe917e | diku-dk/futhark | Interval.hs | {-# LANGUAGE OverloadedStrings #-}
module Futhark.IR.Mem.Interval
( Interval (..),
distributeOffset,
expandOffset,
intervalOverlap,
selfOverlap,
primBool,
intervalPairs,
justLeafExp,
)
where
import Data.Function (on)
import Data.List (maximumBy, minimumBy, (\\))
import Futhark.Analysis... | null | https://raw.githubusercontent.com/diku-dk/futhark/5b24fb6f8c227f8d9264982ec39a58fb16e07757/src/Futhark/IR/Mem/Interval.hs | haskell | # LANGUAGE OverloadedStrings #
Find gnb
g(nb-b)
gnb - gnb + gb = gnb - g(nb-b)
gnb = g(nb-b) + gnb - gnb + gb
| Returns true if the intervals are self-overlapping, meaning that for a
given dimension d, the stride of d is larger than the aggregate spans of the
lower dimensions.
TODO: Do we need to do something c... |
module Futhark.IR.Mem.Interval
( Interval (..),
distributeOffset,
expandOffset,
intervalOverlap,
selfOverlap,
primBool,
intervalPairs,
justLeafExp,
)
where
import Data.Function (on)
import Data.List (maximumBy, minimumBy, (\\))
import Futhark.Analysis.AlgSimplify qualified as AlgSimpli... |
147e15b494e25b22c7f688e874cb1e4e9efb37924d277f276c273b86610003c1 | bitemyapp/bloodhound | BHRequest.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
-- |
-- Module : Database.Bloodhound.Client
Copyright : ( C ) 2014 , 2018
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
-- Stability : provisional
Portabilit... | null | https://raw.githubusercontent.com/bitemyapp/bloodhound/76a8c39860a6c1bbb8b86a19ef7b59a90d79798d/src/Database/Bloodhound/Internal/Client/BHRequest.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Database.Bloodhound.Client
License : BSD-style (see the file LICENSE)
Stability : provisional
* Request
* Response
* Response interpretation
* Response handling
* Common results
| 'Endpoint' represents an url before being built
| Create an 'Endpoint' from a list of ... | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
Copyright : ( C ) 2014 , 2018
Maintainer : < >
Portability : GHC
Client side abstractions to interact with Elasticsearch servers .
module Database.Bloodhound.Internal.Client.BHRequest
BHRequest (..),
... |
37c778a40f8d06e3b570e62c178419f94513a2b99d7ff5247fb5824d9ccebf76 | AbstractMachinesLab/caramel | btype.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
and ,... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/upstream/ocaml_403/typing/btype.ml | ocaml | ************************************************************************
OCaml
... | and , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Asttypes
open Types
module TypeSet = Set.Make(TypeOps)
module TypeMap = Map.Make (TypeOps)
module Typ... |
a7d574a363c9e64ffb15b0e709c1330d49b650f8f305a68baf6ecc4309f62937 | goblint/analyzer | lockDomain.ml | module Addr = ValueDomain.Addr
module Offs = ValueDomain.Offs
module Equ = MusteqDomain.Equ
module Exp = CilType.Exp
module IdxDom = ValueDomain.IndexDomain
open GoblintCil
module Mutexes = SetDomain.ToppedSet (Addr) (struct let topname = "All mutexes" end) (* TODO HoareDomain? *)
module Simple = Lattice.Reverse (Mut... | null | https://raw.githubusercontent.com/goblint/analyzer/fe66b8feba5dc31b4eb612dce1d707b9ef04e6bc/src/cdomains/lockDomain.ml | ocaml | TODO HoareDomain?
true means exclusive lock and false represents reader lock
TODO: Removing based on must-equality sets is not sound! | module Addr = ValueDomain.Addr
module Offs = ValueDomain.Offs
module Equ = MusteqDomain.Equ
module Exp = CilType.Exp
module IdxDom = ValueDomain.IndexDomain
open GoblintCil
module Simple = Lattice.Reverse (Mutexes)
module Priorities = IntDomain.Lifted
module Glob =
struct
module Var = Basetype.Variables
module V... |
31df99892aff9083f62c5db9c04e412b744eabd5a272a72806c1b733a5553fb9 | input-output-hk/cardano-wallet | HasDelegation.hs | # LANGUAGE FlexibleInstances #
-- |
Copyright : © 2018 - 2020 IOHK
-- License: Apache-2.0
--
-- Type class that discriminates whether an
-- address state supports delegation.
module Cardano.Wallet.Address.HasDelegation
( HasDelegation (..)
) where
import Prelude
import Cardano.Wallet.Primitive.AddressDeriv... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/999e7e15c9cf04133b6ae8593e1dcaca1d1c31d2/lib/wallet/src/Cardano/Wallet/Address/HasDelegation.hs | haskell | |
License: Apache-2.0
Type class that discriminates whether an
address state supports delegation.
| Discriminate whether an address state supports delegation. | # LANGUAGE FlexibleInstances #
Copyright : © 2018 - 2020 IOHK
module Cardano.Wallet.Address.HasDelegation
( HasDelegation (..)
) where
import Prelude
import Cardano.Wallet.Primitive.AddressDerivation.Icarus
( IcarusKey )
import Cardano.Wallet.Primitive.AddressDerivation.SharedKey
( SharedKey )
impo... |
53dd72b4d8a1de06103b128c3911398af5ea172d277be3aabe951dd8b7039be5 | morphismtech/squeal | Example.hs | # LANGUAGE
DataKinds
, DeriveGeneric
, FlexibleContexts
, OverloadedLabels
, OverloadedStrings
, OverloadedLists
, TypeApplications
, TypeOperators
#
DataKinds
, DeriveGeneric
, FlexibleContexts
, OverloadedLabels
, OverloadedStrings
, OverloadedLists
, TypeApplicatio... | null | https://raw.githubusercontent.com/morphismtech/squeal/bc555d5126b95948d9bc42a604099d37b99f19e2/squeal-postgresql/exe/Example.hs | haskell | # LANGUAGE
DataKinds
, DeriveGeneric
, FlexibleContexts
, OverloadedLabels
, OverloadedStrings
, OverloadedLists
, TypeApplications
, TypeOperators
#
DataKinds
, DeriveGeneric
, FlexibleContexts
, OverloadedLabels
, OverloadedStrings
, OverloadedLists
, TypeApplicatio... | |
2325396818e3c57242ab4f530f1491df74859f6a9dcacf27d8472a0adf50f33d | ocaml-sf/learn-ocaml-corpus | template.ml | (* TO DO: Define [weight] and [height]. *)
(* TO DO: Define [naive_trees_of_weight]. *)
(* TO DO: Define [trees_of_weights]. *)
The function call [ fix ff ] creates and returns a new memoizing function [ f ]
of type [ a - > b ] . Its argument [ ff ] is itself a function , whose type is
[ ( a - > b ) - > ... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/counting_trees/template.ml | ocaml | TO DO: Define [weight] and [height].
TO DO: Define [naive_trees_of_weight].
TO DO: Define [trees_of_weights].
It is now up to you to implement [fix], based on the following skeleton.
TO DO: complete this code.
TO DO: Define [sigma].
TO DO: Define [trees_of_weight].
TO DO: Define [trees_of_weight_0_19].
... |
The function call [ fix ff ] creates and returns a new memoizing function [ f ]
of type [ a - > b ] . Its argument [ ff ] is itself a function , whose type is
[ ( a - > b ) - > ( a - > b ) ] , and which expects to receive [ f ] as an argument .
of type [a -> b]. Its argument [ff] is itself a function,... |
87db3de9af4ef4469c76a6e835253335838abbf85b0d836e9ef8e0aba01dcdb3 | sile/ppg | ppg.erl | Copyright ( c ) 2016 , < >
%%
This software is released under the MIT License .
%% See the LICENSE file in the project root for full license information.
%%
@doc Plumtree based Process Group
-module(ppg).
%%-------------------------------------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/sile/ppg/2bf2a6ddb0b21f4661eeb22b04cf5e1ad44f7af9/src/ppg.erl | erlang |
See the LICENSE file in the project root for full license information.
----------------------------------------------------------------------------------------------------------------------
Exported API
-----------------------------------------------------------------------------------------------------------------... | Copyright ( c ) 2016 , < >
This software is released under the MIT License .
@doc Plumtree based Process Group
-module(ppg).
-export([default_join_options/0]).
-export([create/1]).
-export([delete/1]).
-export([which_groups/0]).
-export([get_members/1]).
-export([get_local_members/1]).
-export([get_closest_m... |
64fdb606f000f34623f13a02a5d220cefd46c6cd861fa30fea6da7c909edd118 | Incanus3/ExiL | misc.lisp | (in-package :exil-utils)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; TREES
(defun tree-find-all-if (pred tree)
(if (listp tree)
(mapcan (lambda (subtree)
(tree-find-all-if pred subtree)) tree)
(when (funcall pred tree) (list tree))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/Incanus3/ExiL/de0f7c37538cecb7032cc1f2aa070524b0bc048d/src/utils/misc.lisp | lisp |
TREES
SETS
PRINTING OUTPUT | (in-package :exil-utils)
(defun tree-find-all-if (pred tree)
(if (listp tree)
(mapcan (lambda (subtree)
(tree-find-all-if pred subtree)) tree)
(when (funcall pred tree) (list tree))))
(defun set-equal-p (set1 set2 &key (test #'eql))
(null (set-exclusive-or set1 set2 :test test)))
(defun fresh-for... |
6a1038a1cf9948390b08d7f31a745d9ccfc67ed7bc1544e24762a4924a715725 | dsabanin/clj-pid | core.clj | (ns clj-pid.test.core
(:use [clj-pid.core])
(:use [clojure.test]))
(deftest replace-me ;; FIXME: write
(is false "No tests have been written."))
| null | https://raw.githubusercontent.com/dsabanin/clj-pid/5ce865b97aee94ebff3170f19e3cd2a4394a4e28/test/clj_pid/test/core.clj | clojure | FIXME: write | (ns clj-pid.test.core
(:use [clj-pid.core])
(:use [clojure.test]))
(is false "No tests have been written."))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.