_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 |
|---|---|---|---|---|---|---|---|---|
048bed3049e7a5f21ca726896d57f04ccc4f3a79d5eaf16e6a8a62a46f24f449 | arcfide/chez-srfi | rec.sps | #!r6rs
Copyright 2009 . My MIT - style license is in the file named
;; LICENSE from the original collection this file is distributed with.
(import (rnrs) (srfi :31 rec))
(display
((rec (F N)
(if (zero? N) 1
(* N (F (- N 1)))))
10))
(newline)
| null | https://raw.githubusercontent.com/arcfide/chez-srfi/96fb553b6ba0834747d5ccfc08c181aa8fd5f612/tests/rec.sps | scheme | LICENSE from the original collection this file is distributed with. | #!r6rs
Copyright 2009 . My MIT - style license is in the file named
(import (rnrs) (srfi :31 rec))
(display
((rec (F N)
(if (zero? N) 1
(* N (F (- N 1)))))
10))
(newline)
|
d2085f418f024e6f7ead2263805d1c960387d801a23615dd1096bbf73b3ace0e | softlab-ntua/bencherl | class_PerformanceTracker.erl | Copyright ( C ) 2008 - 2014 EDF R&D
This file is part of Sim - Diasca .
Sim - Diasca 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 ) a... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/sim-diasca/src/core/src/data-management/monitoring/performance/class_PerformanceTracker.erl | erlang | it under the terms of the GNU Lesser General Public License as
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
If not, see </>.
Its roles are to trace:
computing nodes)
Thus there will be one (basic) facility probe per node, showing th... | Copyright ( C ) 2008 - 2014 EDF R&D
This file is part of Sim - Diasca .
Sim - Diasca is free software : you can redistribute it and/or modify
published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) any later version .
Sim - Diasca is distributed in the hope tha... |
1020c82b1b89db21c523ada1f31772d258155cde409662e98c1cf4c1d8ed7c75 | donaldsonjw/bigloo | method.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Object / method.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Object/method.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The method management */
*===========================... | * serrano / prgm / project / bigloo / comptime / Object / method.scm * /
* Author : * /
* Creation : We d May 1 13:58:40 1996 * /
* Last change : We d Jan 29 09:49:22 2014 ( serrano ) * /
* C... |
6aec02ec4ac33d0cb5e329a30f1d95c400a8fc1aaf4df99fa36a46fde26ac555 | expipiplus1/vulkan | Haddock.hs | module Documentation.Haddock
( Haddock(..)
, DocumenteeLocation(..)
, documentationToHaddock
) where
import Data.Default
import Data.List as List
import qualified Data.Text.Extra as T
import Relude
import Text.Pandoc
import Do... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/generate-new/src/Documentation/Haddock.hs | haskell | ^ A URL for some HTML to point unresolved links to
^ Find which module a documentee lives in
^ The documentation to render
Remove idents from headers
Change definition lists to bullets
can do is link to the spec | module Documentation.Haddock
( Haddock(..)
, DocumenteeLocation(..)
, documentationToHaddock
) where
import Data.Default
import Data.List as List
import qualified Data.Text.Extra as T
import Relude
import Text.Pandoc
import Do... |
874681a6c2dd6a5fbe76ebf7ff5055087c0c77075753b690116ac9d107f09b61 | jacekschae/learn-pedestal-course-files | routes.clj | (ns cheffy.routes
(:require [io.pedestal.http.route :as route]
[cheffy.recipes :as recipes]))
(def routes
(route/expand-routes
#{["/recipes" :get recipes/list-recipes :route-name :list-recipes]
["/recipes" :post recipes/create-recipe :route-name :create-recipe]
["/recipes/:recipe-id" :... | null | https://raw.githubusercontent.com/jacekschae/learn-pedestal-course-files/0b3c87775a0a1e8924d11df65c4f78b658d10666/increments/28-delete-recipe/src/main/cheffy/routes.clj | clojure | (ns cheffy.routes
(:require [io.pedestal.http.route :as route]
[cheffy.recipes :as recipes]))
(def routes
(route/expand-routes
#{["/recipes" :get recipes/list-recipes :route-name :list-recipes]
["/recipes" :post recipes/create-recipe :route-name :create-recipe]
["/recipes/:recipe-id" :... | |
0e933bae3f8e0bc2295894434dd508db31ff5abfa9647e5d944390ec9e2d6f0f | viercc/coercible-subtypes | Sub.hs | # LANGUAGE GADTs #
# LANGUAGE PolyKinds #
# LANGUAGE QuantifiedConstraints #
{-# LANGUAGE RankNTypes #-}
| @'Sub ' a b@ witnesses a zero - cost conversion @a - > b@.
= = = Example
Think about the following code :
> -- | A pair @(x::a , y::a)@ , but guaranteed @x < = y... | null | https://raw.githubusercontent.com/viercc/coercible-subtypes/bce2228622d79a33b8c63ba8a63ed485c98c845a/src/Data/Type/Coercion/Sub.hs | haskell | # LANGUAGE RankNTypes #
| A pair @(x::a , y::a)@ , but guaranteed @x < = y@
| A pair @(x::a, y::a)@, but guaranteed @x <= y@
| Make a directed witness of @'coerce' :: a -> b@.
| Make a directed witness of @'coerce' :: a -> b@, from a 'Coercion' value.
| Type-safe cast
| All 'Coercion' can be seen as '... | # LANGUAGE GADTs #
# LANGUAGE PolyKinds #
# LANGUAGE QuantifiedConstraints #
| @'Sub ' a b@ witnesses a zero - cost conversion @a - > b@.
= = = Example
Think about the following code :
> newtype Range a = MkRange ( a , a )
>
> getRange : : Range a - > ( a , a )
> getRange ... |
4d076f562aca5d278b1fb3d00de77cfc86cec3c9a61d9cba7ce27a11fd965b51 | DimaSamoz/mezzo | Part2.hs | # LANGUAGE NoImplicitPrelude #
module Chopin.Part2 (part2) where
import Mezzo
part2Rh1 = ef maj3D qc :|: ef fourthD qc :|: (d' qn :-: (af en' :|: gf sn) :-: d qn) :|: d fourthD qc
part2Lh1 = c__ oct qc :|: c_ oct qc :|: b__ oct qc :|: bf__ oct qc
part2Rh2 = c fifthD qc :|: d maj3D qc {-:-: c qn -} :|: g_ maj' i2 ec... | null | https://raw.githubusercontent.com/DimaSamoz/mezzo/13365da8907a714e34540f7a1d99898b67816cc9/examples/src/Chopin/Part2.hs | haskell | :-: c qn | # LANGUAGE NoImplicitPrelude #
module Chopin.Part2 (part2) where
import Mezzo
part2Rh1 = ef maj3D qc :|: ef fourthD qc :|: (d' qn :-: (af en' :|: gf sn) :-: d qn) :|: d fourthD qc
part2Lh1 = c__ oct qc :|: c_ oct qc :|: b__ oct qc :|: bf__ oct qc
part2Lh2 = a__ oct qc :|: af__ oct qc :|: g__ oct qc :|: f__ oct qc
... |
f95440da107b2600b58cd1bd6197c0cfce9554bebcb05b5f3a9f5399f28dd3f1 | hyperfiddle/rcf | unify.cljc | ;; Adapted from `` which was not cljs
;; compatible out of the box.
(ns hyperfiddle.rcf.unify
(:require [clojure.walk :as walk]
[clojure.set :as set]))
(defn wildcard? [x] (= '_ x))
(defn &? [form] (and (seqable? form) (= '& (first form))))
(defn lvar? [x] (and (symbol? x) (= \? (first (name x)))))
(... | null | https://raw.githubusercontent.com/hyperfiddle/rcf/89ce7b01091a0b74036e5130b3e9202c27b61439/src/hyperfiddle/rcf/unify.cljc | clojure | Adapted from `` which was not cljs
compatible out of the box.
Javascript do not have chars. So iterating a string always produce more strings -> StackOverflow. |
(ns hyperfiddle.rcf.unify
(:require [clojure.walk :as walk]
[clojure.set :as set]))
(defn wildcard? [x] (= '_ x))
(defn &? [form] (and (seqable? form) (= '& (first form))))
(defn lvar? [x] (and (symbol? x) (= \? (first (name x)))))
(defn failed? [env] (contains? env ::fail))
(defn unify-in-env [x y ... |
dd8ff70ceead1d861f73a0ce3e999d1cca29bc5e3957aa3f87d2d82000d34229 | babashka/pod-registry | clj-kondo.clj | #!/usr/bin/env bb
(require '[babashka.pods :as pods])
(pods/load-pod 'clj-kondo/clj-kondo "2023.02.17")
(require '[pod.borkdude.clj-kondo :as clj-kondo])
(-> (clj-kondo/run! {:lint ["examples"]})
:summary)
| null | https://raw.githubusercontent.com/babashka/pod-registry/2f36023947432906b65da37158443c39ae2a2b20/examples/clj-kondo.clj | clojure | #!/usr/bin/env bb
(require '[babashka.pods :as pods])
(pods/load-pod 'clj-kondo/clj-kondo "2023.02.17")
(require '[pod.borkdude.clj-kondo :as clj-kondo])
(-> (clj-kondo/run! {:lint ["examples"]})
:summary)
| |
ea6fb63478172a1a461b7a7f1711bb1c0d1eb239d17df656d536eb790263ac70 | sysbio-bioinf/avatar | painting.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
Eclipse Public License 2.0 ( -v20.html )
; which can be found in the file LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of ... | null | https://raw.githubusercontent.com/sysbio-bioinf/avatar/cbf9968485f96fb61725aaa7381dba53624d6189/src/clojure/avatar/ui/plot/painting.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
group ce... | Copyright ( c ) . All rights reserved .
Eclipse Public License 2.0 ( -v20.html )
(ns avatar.ui.plot.painting
(:require [avatar.util :as u]
[clj-jfx.core :as jfx]
[avatar.ui.plot.structure :as struct]
[avatar.ui.plot.util :as pu]
[avatar.ui.plot.layout :as lo]
... |
313caf70020ae9d1a3af5a6a844791e42dd7628c17037230f475fcdf2216e165 | tiancaiamao/yasfs | scheme2c.scm | #lang racket
(require r5rs)
(define (c-repr exp)
(define symbol-map ;; map to create legal C names.
'((#\- . #\_) (#\/ . #\S) (#\? . #\P) (#\> . #\G) (#\< . #\L) (#\= . #\E)
(#\! . #\1) (#\+ . #\A) (#\* . #\C) (#\/ . #\D) (#\% . #\F)))
(define (symbol-fix str pos)
(if (= pos (string-length str)) '()
... | null | https://raw.githubusercontent.com/tiancaiamao/yasfs/c138b7bf9a16ee70b90e5d18bdd45c60cd8e2f44/scheme2c.scm | scheme | map to create legal C names.
generate locals, string constants and functions.
generalized string-append
(define env-global-runtime (make-vector 200 '()))
(vector-set! env-global-runtime index value)))
函数调用规则:由调用者准备好参数。由被调函数切换环境绑定。由调用者恢复环境
(define (compile-define-global name form env tail?)
(let ((locate (global... | #lang racket
(require r5rs)
(define (c-repr exp)
'((#\- . #\_) (#\/ . #\S) (#\? . #\P) (#\> . #\G) (#\< . #\L) (#\= . #\E)
(#\! . #\1) (#\+ . #\A) (#\* . #\C) (#\/ . #\D) (#\% . #\F)))
(define (symbol-fix str pos)
(if (= pos (string-length str)) '()
(let ((a (assoc (string-ref str pos) symbol-map)))
... |
95d8b2ed920a145ea6a3d939e3711bc8c05cb477e499c41b5e2a063a268a0679 | minoki/haskell-floating-point | HalfSpec.hs | # LANGUAGE CPP #
# LANGUAGE HexFloatLiterals #
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -Wno - orphans #
module HalfSpec where
import AugmentedArithSpec (augmentedAddition_viaRational,
augmentedMultiplication_viaRational)
import qualified AugmentedArithSpec
import qu... | null | https://raw.githubusercontent.com/minoki/haskell-floating-point/369d3b1acaa403da5ccd27531948f6951e8de51a/fp-ieee/test/HalfSpec.hs | haskell | orphan instances
TODO: avoid overflow
TODO: Add more | # LANGUAGE CPP #
# LANGUAGE HexFloatLiterals #
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -Wno - orphans #
module HalfSpec where
import AugmentedArithSpec (augmentedAddition_viaRational,
augmentedMultiplication_viaRational)
import qualified AugmentedArithSpec
import qu... |
077b789fa57c36d53d89c46b6488709f0e6cbd0b060e3580a969e155e587a5db | janestreet/ppx_typed_fields | variant_generator.mli | include Variant_kind_generator_intf.S
| null | https://raw.githubusercontent.com/janestreet/ppx_typed_fields/cf7511db2ccfdbbc0e43601e4d9a0c9d0a36c9e2/src/variant_generator.mli | ocaml | include Variant_kind_generator_intf.S
| |
1601ae29c94bf7b8d3245c0a1fec96d98f5c0c8e697ac159ab8e4233838ac17a | kindista/kindista | package.lisp | Copyright 2012 - 20 CommonGoods Network , Inc.
;;;
This file is part of Kindista .
;;;
Kindista is free software : you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
;;; (at your ... | null | https://raw.githubusercontent.com/kindista/kindista/ec8ea9bc829bfb376cf3890e80c7ee0af715c541/src/package.lisp | lisp |
(at your option) any later version.
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
License for more details.
| Copyright 2012 - 20 CommonGoods Network , Inc.
This file is part of Kindista .
Kindista is free software : you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
Kindista is distrib... |
64cc2fb60b3a4d51fbe990455e3fdcea8594683cd85d19a9ff5e315e0f7b6db1 | day8/re-com | selection_list.cljs | (ns re-com.selection-list
(:require-macros
[re-com.core :refer [handler-fn at reflect-current-component]]
[re-com.validate :refer [validate-args-macro]])
(:require
[re-com.config :refer [include-args-desc?]]
[re-com.debug :refer [->attr]]
[re-com.text :refer [label]]
... | null | https://raw.githubusercontent.com/day8/re-com/07451b1d19c59eb185548efe93e2d00b5d3eab89/src/re_com/selection_list.cljs | clojure | ----------------------------------------------------------------------------
TODO: margin-top required because currently checkbox & radio-button don't center label
TODO: Do we really need an anchor now that bootstrap styles not realy being used ?
handled by enclosing box
prevents on-change from firing if unselect is... | (ns re-com.selection-list
(:require-macros
[re-com.core :refer [handler-fn at reflect-current-component]]
[re-com.validate :refer [validate-args-macro]])
(:require
[re-com.config :refer [include-args-desc?]]
[re-com.debug :refer [->attr]]
[re-com.text :refer [label]]
... |
58d49332eab7f042ea63922bbce911e7130583a25d9340280a98240a0c60fd18 | ruanpienaar/goanna | goanna_sup.erl | -module(goanna_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-include_lib("goanna.hrl").
%% Helper macro for declaring children of supervisor
-define(CHILD(Id, Mod, Type, Args),
{Id, {Mod, start_link, Args}, permanent, 5000, Type, [Mod]}).
%% ========... | null | https://raw.githubusercontent.com/ruanpienaar/goanna/52d75566fd6f9760fbdebe53b2ca3c82fdb44e01/src/goanna_sup.erl | erlang | API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
===================================================================
Supervisor callback... | -module(goanna_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-include_lib("goanna.hrl").
-define(CHILD(Id, Mod, Type, Args),
{Id, {Mod, start_link, Args}, permanent, 5000, Type, [Mod]}).
-spec start_link() -> {ok,pid()}.
start_link() ->
supervisor:start_link({local, ?MODULE}, ... |
fef3222d73c782a813e685c8c0b17aaeca71d37b5090a3a9b37f728b677affcb | gvannest/piscine_OCaml | examples_of_file.ml | let print_example (example:(float array * string)) : unit =
print_string "([|" ;
let rec print_array (l:float list) = match l with
| h :: n :: t -> Printf.printf "%f; " h ; print_array (n :: t)
| h :: t -> Printf.printf "%f|]" h
| _ -> ()
in
print_array (Array.to_list (fst exampl... | null | https://raw.githubusercontent.com/gvannest/piscine_OCaml/2533c6152cfb46c637d48a6d0718f7c7262b3ba6/d05/ex07/examples_of_file.ml | ocaml | let print_example (example:(float array * string)) : unit =
print_string "([|" ;
let rec print_array (l:float list) = match l with
| h :: n :: t -> Printf.printf "%f; " h ; print_array (n :: t)
| h :: t -> Printf.printf "%f|]" h
| _ -> ()
in
print_array (Array.to_list (fst exampl... | |
a511fd0947192dca40afbc152f299892bc2101a069d34665ffc8a910efb35bef | seancribbs/eunit_formatters | eunit_progress_tests.erl | Copyright 2014
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed under the Lice... | null | https://raw.githubusercontent.com/seancribbs/eunit_formatters/473e0cd89bf5608e97886a3bdf9047a16edc88f0/test/eunit_progress_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, either express or implied.
See the License for the specific language governing permis... | Copyright 2014
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(eunit_progress_tests).
-include_lib("eunit/include/eunit.hrl").
basic_test() ->
{ok, Output, error} = capture_io:capture(fun () ->
Tests... |
88408e3de7e40bebfd6aacc2164dde485906cd4a5bedc380aae71f0edfc80434 | ocaml-sf/learn-ocaml-corpus | fair_bind_choose.ml | let return (x : 'a) : 'a m =
let compute s f = s x f in
{ compute }
let (>>=) (m1 : 'a m) (f2 : 'a -> 'b m) : 'b m =
let compute s f = m1.compute (fun x f' -> (f2 x).compute s f') f in
{ compute }
let fail : 'a m =
let compute s f = f() in
{ compute }
let choose (m1 : 'a m) (m2 : 'a m) : 'a m =
let com... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/nondet_monad_cont/wrong/fair_bind_choose.ml | ocaml | The functions [reflect] and [msplit] witness an isomorphism between the
type ['a m] and the type [unit -> ('a * 'a m) option].
wrong: use [choose] instead of [interleave] | let return (x : 'a) : 'a m =
let compute s f = s x f in
{ compute }
let (>>=) (m1 : 'a m) (f2 : 'a -> 'b m) : 'b m =
let compute s f = m1.compute (fun x f' -> (f2 x).compute s f') f in
{ compute }
let fail : 'a m =
let compute s f = f() in
{ compute }
let choose (m1 : 'a m) (m2 : 'a m) : 'a m =
let com... |
56c998e2cd33631f60d79fe8a5631dde7c1143d906f7fd46a1dbd1d1eb135d18 | haskell-foundation/foundation | Foreign.hs | -- |
-- Module : Foundation.Foreign
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
module Foundation.Foreign
( module Basement.FinalPtr
, V.foreignMem
, V.mutableForeignMem
, module Basement.Compat.C.Types
) where
import ... | null | https://raw.githubusercontent.com/haskell-foundation/foundation/58568e9f5368170d272000ecf16ef64fb91d0732/foundation/Foundation/Foreign.hs | haskell | |
Module : Foundation.Foreign
License : BSD-style
Stability : experimental
Portability : portable
| Maintainer : < >
module Foundation.Foreign
( module Basement.FinalPtr
, V.foreignMem
, V.mutableForeignMem
, module Basement.Compat.C.Types
) where
import Basement.FinalPtr
import qualified Basement.UArray as V
import qualified Basement.UArray.Mutable as V
import Basemen... |
c8e074ef97b03663b9665d7d78f686ae40417f5b9b97495acbebf79ab6e8a2df | camlp5/camlp5 | pcaml.mli | (* camlp5r *)
(* pcaml.mli,v *)
Copyright ( c ) INRIA 2007 - 2017
(* #load "pa_macro.cmo" *)
(** Language grammar, entries and printers.
Hold variables to be set by language syntax extensions. Some of them
are provided for quotations management. *)
val syntax_name : string ref;;
* { 6 Parsers }
type statu... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_src/main/pcaml.mli | ocaml | camlp5r
pcaml.mli,v
#load "pa_macro.cmo"
* Language grammar, entries and printers.
Hold variables to be set by language syntax extensions. Some of them
are provided for quotations management.
* Grammar variable of the OCaml language
* Some entries of the language, set by [pa_o.cmo] and [pa_r.cmo].
* The... | Copyright ( c ) INRIA 2007 - 2017
val syntax_name : string ref;;
* { 6 Parsers }
type status = Ploc.t option;;
val parse_interf :
(char Stream.t -> (MLast.sig_item * MLast.loc) list * status) ref;;
val parse_implem :
(char Stream.t -> (MLast.str_item * MLast.loc) list * status) ref;;
* Called when parsing a... |
e615abf1811a69666588510da731cfe92599da61fb47e404fda59ad8e0f47449 | noloop/cacau | no-spaghetti.lisp | (in-package #:noloop.cacau)
(defmacro defbefore-plan (name options &body body)
(cond-options options
`(common-create-before-all
,name
,(if async-p
`(lambda (,async-done) ,@body)
`(lambda () ,@body))
:async-p ,async-p
:timeout ,timeout)))
(defmacro defafter-plan (nam... | null | https://raw.githubusercontent.com/noloop/cacau/ba0fb36a284ded884f1dab0bd3f0f41ec14e3038/src/interfaces/no-spaghetti.lisp | lisp | (in-package #:noloop.cacau)
(defmacro defbefore-plan (name options &body body)
(cond-options options
`(common-create-before-all
,name
,(if async-p
`(lambda (,async-done) ,@body)
`(lambda () ,@body))
:async-p ,async-p
:timeout ,timeout)))
(defmacro defafter-plan (nam... | |
b479eff346a9a919b46998a83a171319ab7d018c000d3ddb8dd2c9dca6be710c | jesperes/aoc_erlang | aoc2015_day01.erl | -module(aoc2015_day01).
-include("aoc_puzzle.hrl").
-export([parse/1, solve/1, info/0]).
-behavior(aoc_puzzle).
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2015,
day = 1,
name = "Not Quite Lisp",
expected = {232, 17... | null | https://raw.githubusercontent.com/jesperes/aoc_erlang/ec0786088fb9ab886ee57e17ea0149ba3e91810a/src/2015/aoc2015_day01.erl | erlang | _* Emacs ====================================================================
Local Variables:
allout-layout: t
End: | -module(aoc2015_day01).
-include("aoc_puzzle.hrl").
-export([parse/1, solve/1, info/0]).
-behavior(aoc_puzzle).
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2015,
day = 1,
name = "Not Quite Lisp",
expected = {232, 17... |
ac366eb053361ff04c4dacb77548ec22618fae03292dd3bffd96ecfbe0d3cd60 | jackfirth/rebellion | scribble-cross-document-tech.rkt | #lang racket/base
(module doc racket/base
(require racket/contract/base)
(provide
(contract-out
Similar to @tech { .... } , but creates a link to a ` deftech ` in The Racket
;; Guide.
[tech/guide cross-document-tech-function/c]
Links to a ` deftech ` in The Racket Reference .
[tech/reference c... | null | https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/private/scribble-cross-document-tech.rkt | racket | Guide.
Links to a `deftech` in the `syntax/` libraries.
@---------------------------------------------------------------------------- | #lang racket/base
(module doc racket/base
(require racket/contract/base)
(provide
(contract-out
Similar to @tech { .... } , but creates a link to a ` deftech ` in The Racket
[tech/guide cross-document-tech-function/c]
Links to a ` deftech ` in The Racket Reference .
[tech/reference cross-document-... |
50c89aae7f57ee9c058b8bb016d275e15ecfb3aac2e76304fcb7a2336a8384d4 | telekons/one-more-re-nightmare | re-types.lisp | (in-package :one-more-re-nightmare)
(define-types
(literal set)
(empty-string)
(repeat r min max can-empty)
(tag-set substitutions)
(alpha expression history)
(grep vector prototype)
(either r s)
(both r s)
(invert r)
(join r s))
(define-rewrites (literal set)
:printer ((literal set)
... | null | https://raw.githubusercontent.com/telekons/one-more-re-nightmare/c27f2e96ece56dc5689db0d5d3909e6f8a3744ef/Code/DFA-construction/re-types.lisp | lisp | Preserve tags then
Try to expose more prefixes.
We can't call EITHER, since EITHER calls us, so we
handle simplifying out empty sets here.
Rotate so that a TAG-SET is always at the start.
Avoid A*A* | (in-package :one-more-re-nightmare)
(define-types
(literal set)
(empty-string)
(repeat r min max can-empty)
(tag-set substitutions)
(alpha expression history)
(grep vector prototype)
(either r s)
(both r s)
(invert r)
(join r s))
(define-rewrites (literal set)
:printer ((literal set)
... |
c95b65e6157b6c1b69381e940b6ad715fb8a5ae9b63d9d3a73765f894b00a4e1 | iu-parfunc/verified-instances | Unit.hs | {-@ LIQUID "--higherorder" @-}
{-@ LIQUID "--exactdc" @-}
{-@ LIQUID "--noadt" @-}
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeFamilies #-}
module GenericProofs.VerifiedOrd.Examples.Unit where
import Language.Haskell.Liquid.ProofCombinators
import GenericProofs.Iso
import GenericPr... | null | https://raw.githubusercontent.com/iu-parfunc/verified-instances/cebfdf1e3357a693360be74c90211be18ce3c045/generic-proofs/src/GenericProofs/VerifiedOrd/Examples/Unit.hs | haskell | @ LIQUID "--higherorder" @
@ LIQUID "--exactdc" @
@ LIQUID "--noadt" @
# LANGUAGE TypeFamilies #
@ axiomatize fromMyUnit @
@ axiomatize toMyUnit @
@ tofMyUnit :: a:MyUnit
-> { toMyUnit (fromMyUnit a) == a }
@
@ fotMyUnit :: a:RepMyUnit x
-> { fromMyUnit (toM... | # LANGUAGE TemplateHaskell #
module GenericProofs.VerifiedOrd.Examples.Unit where
import Language.Haskell.Liquid.ProofCombinators
import GenericProofs.Iso
import GenericProofs.TH
import GenericProofs.VerifiedOrd
import GenericProofs.VerifiedOrd.Generics
import Generics.Deriving.Newtypeless.Base.Internal
data MyUnit... |
05c4fd8079316748eb742ac13e59f332f495a172e22705b65d1af6bcba98b251 | incoherentsoftware/defect-process | Menu.hs | module Configs.All.Settings.Menu
( MenuConfig(..)
) where
import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON)
import GHC.Generics (Generic)
import Menu.SettingsMenu.ControlsTab.KeyButtons.JSON
import Menu.UnlocksMenu.JSON
import Util
import World.Audio.LayeredMusic.Types
import {-# SOURCE #-} ... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/8797aad1d93bff5aadd7226c39a48f45cf76746e/src/Configs/All/Settings/Menu.hs | haskell | # SOURCE #
# SOURCE #
# SOURCE #
# SOURCE # | module Configs.All.Settings.Menu
( MenuConfig(..)
) where
import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON)
import GHC.Generics (Generic)
import Menu.SettingsMenu.ControlsTab.KeyButtons.JSON
import Menu.UnlocksMenu.JSON
import Util
import World.Audio.LayeredMusic.Types
data MenuConfig = Men... |
b3e7fa2c7dc8f61afa927ee4e8def86591ef860c4d14e49d14c8cf3fe93fb748 | lambdacms/lambdacms | Home.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module LambdaCms.Core.Handler.Home
( getAdminHomeR
) where
import Data.Text (pack)
import LambdaCms.Core.Import
import qualified LambdaCms.Core.Message as Msg
import Yesod.Auth (requireAuthId)... | null | https://raw.githubusercontent.com/lambdacms/lambdacms/3b9cd54f8f168d6c984d29d944895d7d742e30b9/lambdacms-core/LambdaCms/Core/Handler/Home.hs | haskell | # LANGUAGE OverloadedStrings #
| The home of the admin section, displaying a dashboard like page.
The potential last item is used to determain if the "show more"
link should be shown. | # LANGUAGE TemplateHaskell #
module LambdaCms.Core.Handler.Home
( getAdminHomeR
) where
import Data.Text (pack)
import LambdaCms.Core.Import
import qualified LambdaCms.Core.Message as Msg
import Yesod.Auth (requireAuthId)
getAdminHomeR :: CoreHandler Html... |
136c9722a61ced0fc9b8c927c142f49cabecb9dd17da0eca6dc2d8a1e7726f9a | PaoloRibeca/KPop | Space.ml |
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 version .
This program is distributed in the hope tha... | null | https://raw.githubusercontent.com/PaoloRibeca/KPop/6eb846028355f11f6fca0b90431ef5ea09aabd0d/lib/Space.ml | ocaml | A number of distance functions.
They all have signature: float array -> float array -> float array -> float
Functions to deduce a metric from a vector
We hide the type to implement constraints
We hide the type to implement constraints
What happens when the vectors have incompatible lengths
Mutable
Retur... |
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 version .
This program is distributed in the hope tha... |
134246b03735b79e3dccbd196524f8531df519cdce128e3abff8abfc7f9b2b69 | bravit/hid-examples | Main.hs | import qualified Hedgehog.Gen as Gen
import Options.Applicative as Opt
import Control.Monad.Catch
import System.Exit
import GenIP
data Params = Params
Int
FilePath
mkParams :: Opt.Parser Params
mkParams = Params
<$> argument auto (metavar "SIZE" <> help "number of ranges"... | null | https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/ip/gen/Main.hs | haskell | import qualified Hedgehog.Gen as Gen
import Options.Applicative as Opt
import Control.Monad.Catch
import System.Exit
import GenIP
data Params = Params
Int
FilePath
mkParams :: Opt.Parser Params
mkParams = Params
<$> argument auto (metavar "SIZE" <> help "number of ranges"... | |
536c7608d6d5a2a43eddca228483b841fac13c23d104ca5e48c31e2468084670 | BillHallahan/G2 | NameSwitcher.hs | # LANGUAGE FlexibleContexts #
module G2.Postprocessing.NameSwitcher (switchNames) where
import G2.Language
switchNames :: Named m => Bindings -> m -> m
switchNames b e = renames (cleaned_names b) e
| null | https://raw.githubusercontent.com/BillHallahan/G2/dfd377793dcccdc7126a9f4a65b58249673e8a70/src/G2/Postprocessing/NameSwitcher.hs | haskell | # LANGUAGE FlexibleContexts #
module G2.Postprocessing.NameSwitcher (switchNames) where
import G2.Language
switchNames :: Named m => Bindings -> m -> m
switchNames b e = renames (cleaned_names b) e
| |
c8646e0c4c59cf83c0f8d3776f1fd905d047a5b6a8617434e1d2faf0bf37c6a3 | statusfailed/cartographer-string-diagrammatic-reasoning | Layer.hs | # LANGUAGE TupleSections #
module Data.Hypergraph.Layer where
import Data.Maybe (catMaybes)
import Control.Monad
import Data.Hypergraph.Type
import Data.Hypergraph.Traversal (bfs, bfsAcyclic)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
| Assign to each Hyperedge its distance from the left... | null | https://raw.githubusercontent.com/statusfailed/cartographer-string-diagrammatic-reasoning/7559db3f6de17dfa2dc13a6bf29f95c9cebcf7c4/cartographer/src/Data/Hypergraph/Layer.hs | haskell | # LANGUAGE TupleSections #
module Data.Hypergraph.Layer where
import Data.Maybe (catMaybes)
import Control.Monad
import Data.Hypergraph.Type
import Data.Hypergraph.Traversal (bfs, bfsAcyclic)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
| Assign to each Hyperedge its distance from the left... | |
42a01e20a12fcd9bea65572b9a0334aa72214d28885fd9676f06c699c63a4eae | Deewiant/glob | Instances.hs | File created : 2009 - 01 - 30 15:01:02
# LANGUAGE CPP #
module Tests.Instances (tests) where
Monoid is re - exported from Prelude as of 4.8.0.0
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid (mempty, mappend)
#endif
import Test.Framework
import Test.Framework.Providers.QuickCheck2
import Test.QuickCheck (Proper... | null | https://raw.githubusercontent.com/Deewiant/glob/08e138b4a0c1db090549d585f4ff457e230ced5e/tests/Tests/Instances.hs | haskell | The monoid laws: associativity...
... left identity ...
... and right identity.
strings they came from and compiling that
(notice: relies on the fact that our Arbitrary instance doesn't generate | File created : 2009 - 01 - 30 15:01:02
# LANGUAGE CPP #
module Tests.Instances (tests) where
Monoid is re - exported from Prelude as of 4.8.0.0
#if !MIN_VERSION_base(4,8,0)
import Data.Monoid (mempty, mappend)
#endif
import Test.Framework
import Test.Framework.Providers.QuickCheck2
import Test.QuickCheck (Proper... |
1f847dd6714a2c3edea307a2077fffa0099be5d41dfa75171cea51d15fc76ac8 | elaforge/karya | Process_test.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module LogView.Process_test where
import qualified Data.ByteString as ByteString
import qualified Data.ByteString.UTF8 as UTF8
import qualified Data.Map as Map
import qualified Util.Log ... | null | https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/LogView/Process_test.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
Key is deleted.
..aaaa
...bb | Copyright 2013
module LogView.Process_test where
import qualified Data.ByteString as ByteString
import qualified Data.ByteString.UTF8 as UTF8
import qualified Data.Map as Map
import qualified Util.Log as Log
import qualified LogView.Process as Process
import Util.Test
test_process_msg :: Test
test_pr... |
d703c6221383903368ef70ff70b4af7b1136cc1ade22b35001946d53bbc479da | ReactiveX/RxClojure | chunk_test.clj | (ns rx.lang.clojure.chunk-test
(:require [rx.lang.clojure.chunk :as rx-chunk]
[rx.lang.clojure.core :as rx]
[rx.lang.clojure.future :as rx-future]
[rx.lang.clojure.blocking :as rx-blocking]
[clojure.test :refer [deftest testing is]]))
(deftest test-chunk
(let [n ... | null | https://raw.githubusercontent.com/ReactiveX/RxClojure/8f8e454f447ae24549bcf5f001c9d2458af21cac/src/test/clojure/rx/lang/clojure/chunk_test.clj | clojure | (ns rx.lang.clojure.chunk-test
(:require [rx.lang.clojure.chunk :as rx-chunk]
[rx.lang.clojure.core :as rx]
[rx.lang.clojure.future :as rx-future]
[rx.lang.clojure.blocking :as rx-blocking]
[clojure.test :refer [deftest testing is]]))
(deftest test-chunk
(let [n ... | |
6a58f86cdc0de3c163dc0b7398fb35f2722d954a75fb30a349df02db4bb1ad4b | originrose/cortex | impl.clj | (ns cortex.nn.impl
"Implementation helpers to aid implementing neural network cortex protocols
or specific neural network layers"
(:require [cortex.nn.layers :as layers]
[clojure.core.matrix.macros :refer [c-for]]))
(defmacro convolution-outer-kernel
[conv-desc & body]
`(let [~'conv-desc ~conv-des... | null | https://raw.githubusercontent.com/originrose/cortex/94b1430538e6187f3dfd1697c36ff2c62b475901/src/cortex/nn/impl.clj | clojure | positive values for how far out we are into the padding
Negative values for how far before the 0 idx we are.
Width of the kernel excluding padding | (ns cortex.nn.impl
"Implementation helpers to aid implementing neural network cortex protocols
or specific neural network layers"
(:require [cortex.nn.layers :as layers]
[clojure.core.matrix.macros :refer [c-for]]))
(defmacro convolution-outer-kernel
[conv-desc & body]
`(let [~'conv-desc ~conv-des... |
c66d3a29d4ebda67e446b448e32efe2954801c068c388685d59d5233168528dd | donaldsonjw/bigloo | cfa.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Cfa / cfa.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Cfa/cfa.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The `control flow analysis': the walk down the ast */
*===========================... | * serrano / prgm / project / bigloo / comptime / Cfa / cfa.scm * /
* Author : * /
* Creation : Thu Feb 23 14:21:20 1995 * /
* Last change : Mon Nov 11 09:53:22 2013 ( serrano ) * /
* Copy... |
bb0f9b4dcf5fb75a44c637603e96552e7820bf1814df81b55fc36557982be16a | ghcjs/ghcjs-dom | RTCRtpReceiver.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.RTCRtpReceiver
(js_getParameters, getParameters, getParameters_, js_getTrack,
g... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/RTCRtpReceiver.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.RTCRtpReceiver
(js_getParameters, getParameters, getParameters_, js_getTrack,
getTrack, RTCRtpReceiver(..), gTypeRTCRtpReceiver)
where
import Prelude ((.), (==), (>>=), re... |
156db62e87e809f4fff95c23da21dea4ef903d240a42f8136e749d127e991387 | aphyr/gnuplot | core_test.clj | (ns gnuplot.core-test
(:require [clojure.test :refer :all]
[gnuplot.core :as g]
[clojure.pprint :refer [pprint]]))
(deftest simple-test
(g/raw-plot! [[:set :title "simple-test"]
[:plot (g/range 0 5)
(g/list ["-" :title "rising" :with :lines]
... | null | https://raw.githubusercontent.com/aphyr/gnuplot/a3d834f7b381ac37d3ef1c9b61bee41302ffa770/test/gnuplot/core_test.clj | clojure | (ns gnuplot.core-test
(:require [clojure.test :refer :all]
[gnuplot.core :as g]
[clojure.pprint :refer [pprint]]))
(deftest simple-test
(g/raw-plot! [[:set :title "simple-test"]
[:plot (g/range 0 5)
(g/list ["-" :title "rising" :with :lines]
... | |
9b83e58211be2f3d9a3be627835a50403efd07e2e94d6cb38c25292f8cfea255 | McCLIM/McCLIM | text-multiline-positioning.lisp | (in-package #:clim-demo)
(define-application-frame text-multiline-positioning ()
()
(:menu-bar nil)
(:pane :application :display-function #'display :scroll-bars nil))
(defun draw-lazy (pane align-x align-y)
(let* ((string* (format nil
"~A~%~A~%~A~%~A~%~%~s~%~A"
... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/7c890f1ac79f0c6f36866c47af89398e2f05b343/Examples/text-multiline-positioning.lisp | lisp | <intentionally empty>
XXX: surrounding-output-with-border makes transformed text drawing MANY
times slower when replaying. This may be indicator, that we redraw things
too much when we manipulate output records. Also for some reason border
is a little off despite text-bounding-rectangle* being correct (uncomment
... | (in-package #:clim-demo)
(define-application-frame text-multiline-positioning ()
()
(:menu-bar nil)
(:pane :application :display-function #'display :scroll-bars nil))
(defun draw-lazy (pane align-x align-y)
(let* ((string* (format nil
"~A~%~A~%~A~%~A~%~%~s~%~A"
... |
395c5d668ac83943328c3b31452f9afee923b39f13ad0f932c417e0505afbb93 | killme2008/erlwsh | erlwsh_app.erl | @author author < >
YYYY author .
%% @doc Callbacks for the erlwsh application.
-module(erlwsh_app).
-author('author <>').
-behaviour(application).
-export([start/2,stop/1]).
, _ ) - > ServerRet
%% @doc application start callback for erlwsh.
start(_Type, _StartArgs) ->
erlwsh_deps:ensure(),
erlws... | null | https://raw.githubusercontent.com/killme2008/erlwsh/ac1309d871e20666bc2d27c48af5f67e36203882/src/erlwsh_app.erl | erlang | @doc Callbacks for the erlwsh application.
@doc application start callback for erlwsh.
@doc application stop callback for erlwsh. | @author author < >
YYYY author .
-module(erlwsh_app).
-author('author <>').
-behaviour(application).
-export([start/2,stop/1]).
, _ ) - > ServerRet
start(_Type, _StartArgs) ->
erlwsh_deps:ensure(),
erlwsh_sup:start_link().
@spec stop(_State ) - > ServerRet
stop(_State) ->
ok.
|
8998a9c45961785f4e50284e49e8899be10c5c2992a65a68e031de294d71fc01 | ShamoX/admere | admereParameter.mli | (** This is a signature for the parameters of a parameter module for Admere *)
module type AdmereParameter =
sig
(** This is the minimum level of the grid *)
val minLevel : int
(** This is the maximum level of the grid *)
val maxLevel : int
(** This is the number of dimension for the grid *)
... | null | https://raw.githubusercontent.com/ShamoX/admere/9a6211b3def99a8344454f88b64cce4a52ca4256/src/admereParameter.mli | ocaml | * This is a signature for the parameters of a parameter module for Admere
* This is the minimum level of the grid
* This is the maximum level of the grid
* This is the number of dimension for the grid |
module type AdmereParameter =
sig
val minLevel : int
val maxLevel : int
val dim : int
end
|
60efa24c8d1479b1d8e07f3c31761571e8f728301143731754279165ce92c6ba | gedge-platform/gedge-platform | cow_http2_machine.erl | Copyright ( c ) 2018 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS A... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/cowlib/src/cow_http2_machine.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2018 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(cow_http2_machine).
-export([init/2]).
-export([ini... |
d50416451049f49cfbe1e4ccda776bd863d09ffc097c7e186b571494cf203da0 | thelema/ocaml-community | intext.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/testsuite/tests/lib-marshal/intext.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
let max_data_depth = 500000
type t = ... |
f0a28c629da4f3974fd034eb53f55dc0cddd1757ee7b3eb2011d9b7087b50f2e | huangz1990/real-world-haskell-cn | MVarExample.hs | file : ch24 / MVarExample.hs
import Control.Concurrent
communicate = do
m <- newEmptyMVar
forkIO $ do
v <- takeMVar m
putStrLn ("received " ++ show v)
putStrLn "sending"
putMVar m "wake up!" | null | https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch24/MVarExample.hs | haskell | file : ch24 / MVarExample.hs
import Control.Concurrent
communicate = do
m <- newEmptyMVar
forkIO $ do
v <- takeMVar m
putStrLn ("received " ++ show v)
putStrLn "sending"
putMVar m "wake up!" | |
44300e580288c193e71adce45a8e452e3deb3727d4838597635cc4384de4760b | Decentralized-Pictures/T4L3NT | test_interpretation.ml | * Testing
-------
Component : Protocol ( interpretation )
Dependencies : src / proto_alpha / lib_protocol / script_interpreter.ml
Invocation : dune exec src / proto_alpha / lib_protocol / test / main.exe -- test " ^interpretation$ "
Subject : Interpretation of scripts
-... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_012_Psithaca/lib_protocol/test/test_interpretation.ml | ocaml | * Runs a script with an ill-typed parameter and verifies that a
Bad_contract_parameter error is returned.
Run script with a parameter of wrong type
Set the gas counter to the maximum value
storage: (last input * total); param replaces the last input and
if some – gets added to the total. | * Testing
-------
Component : Protocol ( interpretation )
Dependencies : src / proto_alpha / lib_protocol / script_interpreter.ml
Invocation : dune exec src / proto_alpha / lib_protocol / test / main.exe -- test " ^interpretation$ "
Subject : Interpretation of scripts
-... |
fd24a8ef36ff8b96e81dd799c4c1425e5d1a4b7c89dcffb85a07c3009efd6088 | diku-dk/futhark | Simplify.hs | module Futhark.Pass.Simplify
( simplify,
simplifySOACS,
simplifySeq,
simplifyMC,
simplifyGPU,
simplifyGPUMem,
simplifySeqMem,
simplifyMCMem,
)
where
import Futhark.IR.GPU.Simplify qualified as GPU
import Futhark.IR.GPUMem qualified as GPUMem
import Futhark.IR.MC qualified as MC
import F... | null | https://raw.githubusercontent.com/diku-dk/futhark/98e4a75e4de7042afe030837084764bbf3c6c66e/src/Futhark/Pass/Simplify.hs | haskell | module Futhark.Pass.Simplify
( simplify,
simplifySOACS,
simplifySeq,
simplifyMC,
simplifyGPU,
simplifyGPUMem,
simplifySeqMem,
simplifyMCMem,
)
where
import Futhark.IR.GPU.Simplify qualified as GPU
import Futhark.IR.GPUMem qualified as GPUMem
import Futhark.IR.MC qualified as MC
import F... | |
463fcdf90a421f22eac7d071bd5fd344192c26c618f08eac6491238c3e50ae8e | AndrasKovacs/ELTE-func-lang | Lesson12.hs | {-# OPTIONS_GHC -Wincomplete-patterns #-}
# LANGUAGE InstanceSigs #
# LANGUAGE DeriveFunctor #
# LANGUAGE LambdaCase #
import Data.Maybe
import Data.Char
import Control.Applicative
import Control.Monad
import Debug.Trace
Parser
newtype Parser a = Parser {runParser :: String -> Maybe (a, String)}
deriving Functo... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/7240bceddea6e2c57c8575be64dad45fb800d85a/2020-21-2/gyak_2/Lesson12.hs | haskell | # OPTIONS_GHC -Wincomplete-patterns #
(State String + Maybe) monad
Nothing : parse error
Just (a, s) : successful parsing with result and remaining input
No input is consumed
Executing parsers sequentially
Basic parsers
Read a character if it satisfies a certain criteria
(And the input is not empty.)
R... | # LANGUAGE InstanceSigs #
# LANGUAGE DeriveFunctor #
# LANGUAGE LambdaCase #
import Data.Maybe
import Data.Char
import Control.Applicative
import Control.Monad
import Debug.Trace
Parser
newtype Parser a = Parser {runParser :: String -> Maybe (a, String)}
deriving Functor
evalParser :: Parser a -> String -> May... |
36f69096663c417317c8d66c359fa8299dbe7cd3129778d554f47b2a22456561 | yutopp/rill | reasons.ml |
* Copyright yutopp 2019 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2019 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )... | null | https://raw.githubusercontent.com/yutopp/rill/375b67c03ab2087d0a2a833bd9e80f3e51e2694f/rillc/lib/syntax/reasons.ml | ocaml |
* Copyright yutopp 2019 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2019 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )... | |
52cb89a2b0a7bcac82b9c00a3ca00259e2e149239bea78fe0c57d2143be636d8 | jdreaver/amy | TypeCheck.hs | {-# LANGUAGE OverloadedStrings #-}
module Amy.TypeCheck.TypeCheck
( inferModule
, inferBindingGroup
, inferExpr
, checkBinding
, checkExpr
) where
import Control.Monad (replicateM)
import Control.Monad.Except
import Data.Foldable (for_, traverse_, toList)
import Data.List (foldl')
import Data.List.NonEmpt... | null | https://raw.githubusercontent.com/jdreaver/amy/a0c73f6c02e7d923f1d85c0de89f78dc204dae2f/library/Amy/TypeCheck/TypeCheck.hs | haskell | # LANGUAGE OverloadedStrings #
Infer
Add data constructor types to scope
Infer type declaration kinds and add to scope
Add extern types to scope
Infer all bindings
| Compute binding groups and infer each group separately.
Add all binding types to contex Also record whether binding is typed or
untyped
we only... |
module Amy.TypeCheck.TypeCheck
( inferModule
, inferBindingGroup
, inferExpr
, checkBinding
, checkExpr
) where
import Control.Monad (replicateM)
import Control.Monad.Except
import Data.Foldable (for_, traverse_, toList)
import Data.List (foldl')
import Data.List.NonEmpty (NonEmpty(..))
import qualified D... |
97ea1baef0a7625f75f96b3b36b0c7a1615653c36a6dd55970fafdeb3ca3542f | libguestfs/virt-v2v | OVF.mli | virt - v2v
* Copyright ( C ) 2009 - 2020 Red Hat Inc.
*
* 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
* ( at your option ) any later ... | null | https://raw.githubusercontent.com/libguestfs/virt-v2v/cff4514927b3e12a30619377149789c5bd2daebb/input/OVF.mli | ocaml | * As above, but returns only the disks. | virt - v2v
* Copyright ( C ) 2009 - 2020 Red Hat Inc.
*
* 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
* ( at your option ) any later ... |
5dc4a70ed8c589fe33fb261e6481db85ee3193f7ef09797f77825d621cb950cb | timbertson/opam2nix | hex.ml |
* Copyright ( c ) 2015 < >
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWAR... | null | https://raw.githubusercontent.com/timbertson/opam2nix/6f2fbdf3730d49bf8fadc22374a2e270bee9400d/src/hex.ml | ocaml | Char.code '0'
Char.code 'A' + 10
Char.code 'a' + 10 |
* Copyright ( c ) 2015 < >
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWAR... |
16ae03910ab3061f68dcab9c09e2fdf0677a58401cb70361b6613884aef6d66a | xapi-project/xen-api | dm_api.mli |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/ebca6495a67319466ae7bdd5b7f5771465d3c552/ocaml/idl/dm_api.mli | ocaml | An abstract type representing an entire datamodel-style API
Extract a list of relations from an API
Extract a list of the objects from an API
* Find and return a field by name
* Find and return an object by name
* True if the named field exists
* Apply a predicate to every object, field and message, to generat... |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
f53fee42a5eb11a496f49099e59108a4aebe841c6be128ca517d54d5bd2e02a2 | comby-tools/comby | hunks.ml | open! Core_kernel
open! Import
type t = string Patience_diff.Hunk.t list [@@deriving sexp_of]
let iter' ~f_hunk_break ~f_line (hunks : t) =
List.iter hunks ~f:(fun hunk ->
f_hunk_break hunk;
List.iter hunk.ranges ~f:(function
| Same r -> Array.iter r ~f:(fun (_, next) -> f_line next)
| Prev r | ... | null | https://raw.githubusercontent.com/comby-tools/comby/fa71ea540855ba5bd48d948dd8c8ff034714348d/lib/app/vendored/patdiff/kernel/src/hunks.ml | ocaml | open! Core_kernel
open! Import
type t = string Patience_diff.Hunk.t list [@@deriving sexp_of]
let iter' ~f_hunk_break ~f_line (hunks : t) =
List.iter hunks ~f:(fun hunk ->
f_hunk_break hunk;
List.iter hunk.ranges ~f:(function
| Same r -> Array.iter r ~f:(fun (_, next) -> f_line next)
| Prev r | ... | |
a8b05093f5b7406d0c1b3b293f7bc237a3060231f10977a3016fcdfbbb52a7cb | krisajenkins/Cloud-Haskell-Game | EchoGame.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
module EchoGame
( initialModel
, update
, view
) where
import Control.Distributed.Process
import Data.Binary
import Data.Text (Text)
import GHC.Generics
import Network.GameEngine
------------------------------------------... | null | https://raw.githubusercontent.com/krisajenkins/Cloud-Haskell-Game/abb5d906f1adc35ea73e13470f9a141c8172bb39/server/src/EchoGame.hs | haskell | # LANGUAGE DeriveAnyClass #
----------------------------------------------------------
This Specific Game
---------------------------------------------------------- | # LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
module EchoGame
( initialModel
, update
, view
) where
import Control.Distributed.Process
import Data.Binary
import Data.Text (Text)
import GHC.Generics
import Network.GameEngine
data Model = Model
{ lastMsg :: Maybe (String, Text)
, msgCount :: Int... |
d64c7ad62f206f25bb17bdba42bc7040e56c463079bd6b0c9abfda818ff5c2bb | cfpb/qu | loader.clj | (ns qu.loader
"This namespace contains all our functions for loading data from
datasets into MongoDB. This includes parsing CSV files and
transforming the data within."
(:require [clj-time.core :refer [default-time-zone now]]
[clj-time.format :as time]
[clojure.core.reducers :as r]
... | null | https://raw.githubusercontent.com/cfpb/qu/f460d9ab2f05ac22f6d68a98a9641daf0f7c7ba4/src/qu/loader.clj | clojure | Needed to interact with joda-time.
Convert field names to compressed fields
deprecated
TODO show better error msg on failure to find dataset
false to skip deletion (default is false)." | (ns qu.loader
"This namespace contains all our functions for loading data from
datasets into MongoDB. This includes parsing CSV files and
transforming the data within."
(:require [clj-time.core :refer [default-time-zone now]]
[clj-time.format :as time]
[clojure.core.reducers :as r]
... |
f22a3a9ed10054ad2826358df913636c05aaa9d4a70acfa623791367d7367d62 | Mesabloo/nihil | Redefined.hs | module Nihil.TypeChecking.Errors.Redefined where
import Nihil.Utils.Source
import Text.PrettyPrint.ANSI.Leijen
import Prelude hiding ((<$>))
import Control.Arrow ((&&&))
{-| [Redefined function error]
Occurs when a function with the same name already exists in the scope.
For example:
> f = 0
> f = ... | null | https://raw.githubusercontent.com/Mesabloo/nihil/3821052ca5691a6492b23bd8a46bfe70567d374f/src/typechecker/Nihil/TypeChecking/Errors/Redefined.hs | haskell | | [Redefined function error]
Occurs when a function with the same name already exists in the scope.
For example:
> f = 0
> f = 1
@f@ already exists when the typechecking of @f = 1@ occurs, it therefore throws this error.
| [Redefined type error]
Occurs when a type with the same name is alr... | module Nihil.TypeChecking.Errors.Redefined where
import Nihil.Utils.Source
import Text.PrettyPrint.ANSI.Leijen
import Prelude hiding ((<$>))
import Control.Arrow ((&&&))
redefinedFunction :: Located String -> Doc
redefinedFunction name = nest 4 (text "- Redefined function" <$> description)
where description =
... |
3d520036faa1d4ed391f43daf107a72a1ea4762a3e03e4f6b06efbae686c48fe | portkey-cloud/edn-to-cfn | game_lift.clj | (ns portkey.cloudformation.game-lift
"AUTOGENERATED clojure.spec definitions"
(:require [clojure.spec.alpha]
[portkey.cloudformation]))
(do
(clojure.core/defmethod
portkey.cloudformation/resource-type-spec
:portkey.cloudformation.game-lift/alias
[___19567__auto__]
(clojure.spec.alpha/keys
:... | null | https://raw.githubusercontent.com/portkey-cloud/edn-to-cfn/7a3d247d35b7c4988c9b55634d03a008b87a2449/src/portkey/cloudformation/game_lift.clj | clojure | (ns portkey.cloudformation.game-lift
"AUTOGENERATED clojure.spec definitions"
(:require [clojure.spec.alpha]
[portkey.cloudformation]))
(do
(clojure.core/defmethod
portkey.cloudformation/resource-type-spec
:portkey.cloudformation.game-lift/alias
[___19567__auto__]
(clojure.spec.alpha/keys
:... | |
21d21c4b4e5ab9d6ec135af52782b8658f2f76fb53f4c84b8bf140ca3f0a5cdb | andrejbauer/clerical | clerical.ml | (** Clerial main program *)
(** The usage message. *)
let usage = "Usage: clerical [option] ... [file] ..."
(** A list of files to be loaded and run, together with information on whether they should
be loaded in interactive mode. *)
let files = ref []
(** Add a file to the list of files to be loaded, and record ... | null | https://raw.githubusercontent.com/andrejbauer/clerical/6916f1de50f812921fe187bdaec830e06f4dcde8/src/clerical.ml | ocaml | * Clerial main program
* The usage message.
* A list of files to be loaded and run, together with information on whether they should
be loaded in interactive mode.
* Add a file to the list of files to be loaded, and record whether it should
be processed in interactive mode.
* Command-line options
* Interac... |
let usage = "Usage: clerical [option] ... [file] ..."
let files = ref []
let add_file quiet filename = (files := (filename, quiet) :: !files)
let options = Arg.align [
("--columns",
Arg.Set_int Config.columns,
" Set the maximum number of columns of pretty printing");
("--wrapper",
Arg.Strin... |
7d1ccfd24cc84fdd49800bc555039339ba76d73a515febd0947c69034f77cea4 | Spivoxity/obc-3 | icode.ml |
* icode.ml
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006 - -2016 J. M. Spivey
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 .... | null | https://raw.githubusercontent.com/Spivoxity/obc-3/9e5094df8382ac5dd25ff08768277be6bd71a4ae/compiler/icode.ml | ocaml | Pointer is non-null
Procedure assigned is global
icode -- type of intermediate instructions
Push constant (value)
Push hex constant (value)
Typed constant
Push global addr (value)
Push address (offset)
Load
Store
Copy multiple values
Copy open array param
Duplicate n'th value on stack (n)
Pop... |
* icode.ml
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006 - -2016 J. M. Spivey
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 .... |
2c10f80864aed3979607e92839f9bbc6397f38eab1ab9fdb24af9980902a2c02 | ocamllabs/ocaml-modular-implicits | t253-offsetclosure2.ml | open Lib;;
let rec f _ = g
and g _ = 10
in
if f 3 4 <> 10 then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 BRANCH 18
11 OFFSETCLOSURE2
12 RETURN 1
14 CONSTINT 10
16 RETURN 1
18 CLOSUREREC 0 ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t253-offsetclosure2.ml | ocaml | open Lib;;
let rec f _ = g
and g _ = 10
in
if f 3 4 <> 10 then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 BRANCH 18
11 OFFSETCLOSURE2
12 RETURN 1
14 CONSTINT 10
16 RETURN 1
18 CLOSUREREC 0 ... | |
ba50f394e8f1c2dd6e26e1b58276cb68a5ce040d012433c90176cec1f4a8964a | sph-mn/sph-lib | tree.scm | Copyright ( C ) 2010 - 2020 sph < >
; 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 version.
; This program is distributed i... | null | https://raw.githubusercontent.com/sph-mn/sph-lib/c7daf74f42d6bd1304f49c2fef89dcd6dd94fdc9/modules/sph/tree.scm | scheme | This program is free software; you can redistribute it and/or modify it
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 of
MERCHANTABILITY or FITNESS FOR A PARTICULA... | Copyright ( C ) 2010 - 2020 sph < >
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-module (sph tree))
(export denoted-tree->prefix-tree denoted-tree->tree
denoted-tree->tree-inner denoted-tree-adjust-depth
denoted-t... |
25b5a34564c1965f72f8f6abe2751cc17334efe900dbc8c6b46ff33da2861a74 | evdubs/chart-simulator | bear-rally.rkt | #lang racket/base
(require racket/stream
racket/vector
"../structs.rkt"
"../technical-indicators.rkt")
(provide bear-rally-execution)
(struct bear-rally-in
(dohlc
sma-20
sma-20-slope
sma-50
sma-50-slope
satr-50
dc-20-high
dc-20-low)
#:transparent)
(define (bear-ra... | null | https://raw.githubusercontent.com/evdubs/chart-simulator/a615e2a5c05a73bd712fdf6d7070a83d354754a8/strategy/bear-rally.rkt | racket | timeframe entry stop target
position
history
market data inputs
satisfactory conditions no longer exist for entry
satisfactory conditions exist for entry and open price leads to execution
satisfactory conditions exist for entry and price range leads to execution
have position and open above stop
have position ... | #lang racket/base
(require racket/stream
racket/vector
"../structs.rkt"
"../technical-indicators.rkt")
(provide bear-rally-execution)
(struct bear-rally-in
(dohlc
sma-20
sma-20-slope
sma-50
sma-50-slope
satr-50
dc-20-high
dc-20-low)
#:transparent)
(define (bear-ra... |
5341769187993b9f2373fcf6dfcdbc7d6d7e96a340bda695ff70cec2cf6b1aaf | OCamlPro/freeton_wallet | commandMultisigCreate.mli | (**************************************************************************)
(* *)
Copyright ( c ) 2021 OCamlPro SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/freeton_wallet/b97877379e51d96cb3544141d386d502348cfca9/src/freeton_wallet_lib/commandMultisigCreate.mli | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2021 OCamlPro SAS
Public License version 2.1 , with the special exception on linking
open Types
val cmd : Ezcmd.V2.EZCMD.TYPES.sub
val create_multisig :
?client:Ton_sdk.TYPES.client -> ?custodians:string list ->
?not_owner:bool -> ?req:int -> ?wc:... |
3d9bf91ff933cc2e7a7a387bd490def9bcb84592f0f593dbb55ec1c269d2a71d | silky/quipper | Example1.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
import Quipper
example1 (q, a, b, c) = do
... | null | https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/tests/Example1.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
====================================================================== | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
import Quipper
example1 (q, a, b, c) = do
hadamard a
qnot_at c `controlled` [a, b]
hadamard q `controlled` [c]
qnot_at c `controlled` [a, b]
hadamard a
return (q, a, b, c)
main = print_simple Preview example1
|
7be5fa87d5cd917c7a61c471335ebfb19aab1a34feb9110a11760ffdfb7a7514 | racket/racket-lang-org | dirlist.rkt | #lang plt-web
;; This stub is to generate fancy directory listings with the Racket style
(require (only-in "../download/resources.rkt" download-site))
(define dirlist-site (site "stubs/dirlist"
#:url "-lang.org/"
#:always-abs-url? #t
#... | null | https://raw.githubusercontent.com/racket/racket-lang-org/88dada2ee769ada9afaf1e3ec1fb28b8ddf216db/stubs/dirlist.rkt | racket | This stub is to generate fancy directory listings with the Racket style | #lang plt-web
(require (only-in "../download/resources.rkt" download-site))
(define dirlist-site (site "stubs/dirlist"
#:url "-lang.org/"
#:always-abs-url? #t
#:share-from download-site))
(define header+footer
(lazy (regexp-split #r... |
7f5a28e84430c8ecec2e077708a1c728c82e743062935e160a1add101b410baa | mirage/irmin | layout.ml |
* Copyright ( c ) 2018 - 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | null | https://raw.githubusercontent.com/mirage/irmin/101dccffc33a72c97691dc2301ac6b844a7fbfea/src/irmin-pack/layout.ml | ocaml | * [is_number] is a less generic than [Stdlib.int_of_string_opt]. It matches
this equivalent regex: {v "([1-9][0-9]*|0)" v}. |
* Copyright ( c ) 2018 - 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... |
9d52275f2c31af9779ba511454484a828e1b2db32cd1af392a2d566a63c292b4 | np/hlatex | Unicode.hs | # LANGUAGE FlexibleInstances #
module Language.LaTeX.Unicode where
import Language.LaTeX.Types
import qualified Language.LaTeX.Builder as B
import qualified Language.LaTeX.Builder.Math as M
α = alpha )
β = beta )
χ = chi )
δ = delta )
Δ = _ Delta )
ε = epsilon )
-... | null | https://raw.githubusercontent.com/np/hlatex/4f2212c5db5e10dab7f6cbb9cf47a041b3320176/Language/LaTeX/Unicode.hs | haskell | = varepsilon )
= varphi )
= vartheta )
= upsilon )
= _ )
= varepsilon)
= varphi)
= vartheta)
= upsilon)
= _Xi)
varphi
vartheta
upsilon | # LANGUAGE FlexibleInstances #
module Language.LaTeX.Unicode where
import Language.LaTeX.Types
import qualified Language.LaTeX.Builder as B
import qualified Language.LaTeX.Builder.Math as M
α = alpha )
β = beta )
χ = chi )
δ = delta )
Δ = _ Delta )
ε = epsilon )
... |
572ecffa3c355162482e3e072ccc7ba3edef878529563482433a8daf5dc4c005 | LdBeth/star-lisp | arrays.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : ( * SIM - I COMMON - LISP - GLOBAL ) ; Base : 10 -*-
(in-package :*sim-i)
;;;> *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
;;;>
;;;> The Thinking Machines *Lisp Simulator is in the public domain.
;;;> You are free to ... | null | https://raw.githubusercontent.com/LdBeth/star-lisp/034fb97fe8780d6e9fbff7c1d8c4a6b8c331797b/source/arrays.lisp | lisp | Syntax : Common - lisp ; Package : ( * SIM - I COMMON - LISP - GLOBAL ) ; Base : 10 -*-
> *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
>
> The Thinking Machines *Lisp Simulator is in the public domain.
> You are free to do whatever you like with it, including but
> not limi... |
(in-package :*sim-i)
(defconstant *max-index-pvar-length* #.(1+ (truncate (log *array-total-size-limit 2))))
(defconstant *max-single-index-pvar-length* #.(1+ (truncate (log *array-dimension-limit 2))))
(defconstant *max-array-rank-pvar-length* #.(1+ (truncate (log *array-rank-limit 2))))
Put the names of the A... |
ff12cd54b9a68a4cf6920d122a796a3dd66805e0821ebab7f23e3208cfc1a8f5 | eproxus/unite | unite_compact.erl | @private
-module(unite_compact).
-behaviour(eunit_listener).
EUnit Callbacks
-export([start/0]).
-export([start/1]).
-export([init/1]).
-export([handle_begin/3]).
-export([handle_end/3]).
-export([handle_cancel/3]).
-export([terminate/2]).
-export([ioindent/2]).
Clear line : " \e[2 K "
-record(s, {
start... | null | https://raw.githubusercontent.com/eproxus/unite/b858c521096e62e23f4bf4969bbf03da9e7fc375/src/unite_compact.erl | erlang | --- Macros --------------------------------------------------------------------
--- EUnit Callbacks -----------------------------------------------------------
--- Internal Functions -------------------------------------------------------
Individual Test Case
Profiling
Summary
If the stack trace contained a call to... | @private
-module(unite_compact).
-behaviour(eunit_listener).
EUnit Callbacks
-export([start/0]).
-export([start/1]).
-export([init/1]).
-export([handle_begin/3]).
-export([handle_end/3]).
-export([handle_cancel/3]).
-export([terminate/2]).
-export([ioindent/2]).
Clear line : " \e[2 K "
-record(s, {
start... |
14c07badf1e144a950f2eac8069cfc8123073293140c4046117fb8acdb2b98f3 | Relph1119/sicp-solutions-manual | p2-2-segment-selector.scm | (define (start-segment seg)
(car seg))
(define (end-segment seg)
(cdr seg)) | null | https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/practices/ch02/p2-2-segment-selector.scm | scheme | (define (start-segment seg)
(car seg))
(define (end-segment seg)
(cdr seg)) | |
10f233733130ca1b02aef93e4c411fb8a94a1dcac9f01c09c6d9bdc018fda0d6 | gigamonkey/yamp | tex.lisp | ;;
Copyright ( c ) 2005 , 2017 , Gigamonkeys Consulting All rights reserved .
;;
(in-package :com.gigamonkeys.yamp)
(defvar *tex-preamble* nil)
(defvar *tex-postamble* nil)
Render Markup data into TeX
(defun generate-tex (file)
(with-output-to-file (out (ensure-directories-exist (tex-filename file)))
(whe... | null | https://raw.githubusercontent.com/gigamonkey/yamp/dcf1b811e22709682e2a375d5d7e79fabe140c80/tex.lisp | lisp |
want a literal -- not an ndash | Copyright ( c ) 2005 , 2017 , Gigamonkeys Consulting All rights reserved .
(in-package :com.gigamonkeys.yamp)
(defvar *tex-preamble* nil)
(defvar *tex-postamble* nil)
Render Markup data into TeX
(defun generate-tex (file)
(with-output-to-file (out (ensure-directories-exist (tex-filename file)))
(when *tex... |
f6c09c6edd941a6d275037defa6d501069b77167339d829f7381e084fd07ca61 | anoma/juvix | ParsedInfoTable.hs | module Juvix.Compiler.Concrete.Data.ParsedInfoTable where
import Juvix.Compiler.Concrete.Data.ParsedItem
import Juvix.Compiler.Concrete.Language
import Juvix.Prelude
data InfoTable = InfoTable
{ _infoParsedItems :: [ParsedItem],
_infoParsedComments :: Comments,
_infoParsedModules :: HashMap TopModulePath (M... | null | https://raw.githubusercontent.com/anoma/juvix/447f2f1dcf6dc0b4b6513f4396daf5eca0c99652/src/Juvix/Compiler/Concrete/Data/ParsedInfoTable.hs | haskell | module Juvix.Compiler.Concrete.Data.ParsedInfoTable where
import Juvix.Compiler.Concrete.Data.ParsedItem
import Juvix.Compiler.Concrete.Language
import Juvix.Prelude
data InfoTable = InfoTable
{ _infoParsedItems :: [ParsedItem],
_infoParsedComments :: Comments,
_infoParsedModules :: HashMap TopModulePath (M... | |
4d03084bb86dc7f3a768161ae47cc49e3ce25127aba0ba43b097eed14f9a7957 | takikawa/racket-ppa | beginner.rkt | #lang racket/base
(require syntax/docprovide
deinprogramm/sdp/private/module-begin
deinprogramm/sdp/private/primitives)
(provide #%app #%top (rename-out (beginner-module-begin #%module-begin)) #%datum #%top-interaction
require lib planet provide
only-in except-in prefix-in rename-in combin... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/share/pkgs/deinprogramm/deinprogramm/sdp/beginner.rkt | racket | #lang racket/base
(require syntax/docprovide
deinprogramm/sdp/private/module-begin
deinprogramm/sdp/private/primitives)
(provide #%app #%top (rename-out (beginner-module-begin #%module-begin)) #%datum #%top-interaction
require lib planet provide
only-in except-in prefix-in rename-in combin... | |
85f7d5da056345e5e0fc51fc69c071ddf6035763b452e5c7a24acce1cf13515f | osa1/sc-plugin | Process3.hs | # LANGUAGE GeneralizedNewtypeDeriving , RankNTypes , ImpredicativeTypes #
module Supercompile.Drive.Process3 (supercompile) where
import Supercompile . Drive . Match
import Supercompile.Drive.MSG
import Supercompile.Drive.Split2
import Supercompile.Drive.Process
import Supercompile.Core.FreeVars
import Supercompile.C... | null | https://raw.githubusercontent.com/osa1/sc-plugin/1969ad81f16ca8ed8110ca8dadfccf6f3d463635/src/Supercompile/Drive/Process3.hs | haskell |
Name assigned in output program
Abstracted over these variables
Minimum adequate term
Already rolled back, and hence inaccessible?
^ Longer list
^ Shorter list
Pair of the prefix present in the longer list and the common suffix (== shorter list)
We can only roll back to direct ancestors, or we risk loops/othe... | # LANGUAGE GeneralizedNewtypeDeriving , RankNTypes , ImpredicativeTypes #
module Supercompile.Drive.Process3 (supercompile) where
import Supercompile . Drive . Match
import Supercompile.Drive.MSG
import Supercompile.Drive.Split2
import Supercompile.Drive.Process
import Supercompile.Core.FreeVars
import Supercompile.C... |
f50f188af611067bdb90032902948097e9676af1cdc88b6973d46eb2d1fb4931 | arrayfire/arrayfire-haskell | VisionSpec.hs | # LANGUAGE TypeApplications #
module ArrayFire.VisionSpec where
import qualified ArrayFire as A
import Test.Hspec
spec :: Spec
spec =
describe "Vision spec" $ do
it "Should construct Features for fast feature detection" $ do
let arr = A.vector @Int 30000 [1..]
let feats = A.fast arr 1.0 9... | null | https://raw.githubusercontent.com/arrayfire/arrayfire-haskell/5d621602bb925ce5122a66011003498cbe638e2b/test/ArrayFire/VisionSpec.hs | haskell | # LANGUAGE TypeApplications #
module ArrayFire.VisionSpec where
import qualified ArrayFire as A
import Test.Hspec
spec :: Spec
spec =
describe "Vision spec" $ do
it "Should construct Features for fast feature detection" $ do
let arr = A.vector @Int 30000 [1..]
let feats = A.fast arr 1.0 9... | |
ea9022ea5d4b699b239a82bf8fc9aaffe9369bbfbf9f1f87cef0f413e79cbde6 | smart-chain-fr/tokenomia | Error.hs | # LANGUAGE LambdaCase #
module Tokenomia.Common.Error
( TokenomiaError (..)
, whenNullThrow
, whenSomethingThrow
, whenNothingThrow
, whenLeftThrow) where
import Control.Monad.Except
import Data.List.NonEmpty (nonEmpty, NonEmpty)
import Tokenomia.Common.Address ( Add... | null | https://raw.githubusercontent.com/smart-chain-fr/tokenomia/dfb46829f0a88c559eddb3181e5320ed1a33601e/src/Tokenomia/Common/Error.hs | haskell | # LANGUAGE LambdaCase #
module Tokenomia.Common.Error
( TokenomiaError (..)
, whenNullThrow
, whenSomethingThrow
, whenNothingThrow
, whenLeftThrow) where
import Control.Monad.Except
import Data.List.NonEmpty (nonEmpty, NonEmpty)
import Tokenomia.Common.Address ( Add... | |
46a499112cd58181a151344d54307e2132e2a28b5d40c938847ae58fbb6740f8 | serefayar/ayatori | interface.clj | (ns ayatori.lra-engine.interface
(:require
[ayatori.lra-engine.core :as engine]))
(defn create
[]
(engine/make-lraengine))
| null | https://raw.githubusercontent.com/serefayar/ayatori/dbe171681e7f3fe574e3026577b94ca18d4beaff/components/lra_engine/src/ayatori/lra_engine/interface.clj | clojure | (ns ayatori.lra-engine.interface
(:require
[ayatori.lra-engine.core :as engine]))
(defn create
[]
(engine/make-lraengine))
| |
1cde9c2cd949fe15c40b35fbeeb50e8a39dff8b7d1c1ccbbf59eaa5b495efbac | dyoo/whalesong | simple-structs.rkt | #lang whalesong/base
(define-struct pair (f r))
(define-struct color (r g b))
(define p1 (make-pair 3 4))
(pair-f p1)
(pair-r p1)
(color-r (make-color 3 4 5))
(color-g (make-color 3 4 5))
(color-b (make-color 3 4 5))
| null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/tests/more-tests/simple-structs.rkt | racket | #lang whalesong/base
(define-struct pair (f r))
(define-struct color (r g b))
(define p1 (make-pair 3 4))
(pair-f p1)
(pair-r p1)
(color-r (make-color 3 4 5))
(color-g (make-color 3 4 5))
(color-b (make-color 3 4 5))
| |
06c7dde963a32eba57a66a7f48dd264d723e3547a521bac835cb50973aff193d | ghc/packages-dph | Base.hs | {-# OPTIONS -Wall -fno-warn-orphans -fno-warn-missing-signatures #-}
# LANGUAGE CPP #
#include "fusion-phases.h"
-- | Distribution of Segment Descriptors
module Data.Array.Parallel.Unlifted.Distributed.Data.USSegd.Base
( lengthD
, takeLengthsD
, takeIndicesD
, takeElementsD
, ta... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-prim-par/Data/Array/Parallel/Unlifted/Distributed/Data/USSegd/Base.hs | haskell | # OPTIONS -Wall -fno-warn-orphans -fno-warn-missing-signatures #
| Distribution of Segment Descriptors
| O(1). Yield the overall number of segments.
| O(1). Yield the lengths of the individual segments.
| O(1). Yield the segment indices.
| O(1). Yield the number of data elements.
| O(1). Yield the starting indice... | # LANGUAGE CPP #
#include "fusion-phases.h"
module Data.Array.Parallel.Unlifted.Distributed.Data.USSegd.Base
( lengthD
, takeLengthsD
, takeIndicesD
, takeElementsD
, takeStartsD
, takeSourcesD
, takeUSegdD)
where
import Data.Array.Parallel.Unlifted.Distributed.D... |
a852e2f3547e7a81f071f9d0988cce50644fd2352e3586b3e11c8bbad2b0fda7 | adolenc/cl-messagepack-rpc | utils.lisp | (in-package #:messagepack-rpc.utils)
(defun symbol-concat (&rest symbols)
"Concatenate symbol names."
(intern (apply #'concatenate 'string (mapcar #'symbol-name symbols))))
(defmacro while (test &rest body)
"Imitate the standard while loop."
`(do ()
((not ,test))
,@body))
(defun zip (&rest lists... | null | https://raw.githubusercontent.com/adolenc/cl-messagepack-rpc/8583fe16424d79a56c72c73571adc3e6b198ef61/src/utils.lisp | lisp | (in-package #:messagepack-rpc.utils)
(defun symbol-concat (&rest symbols)
"Concatenate symbol names."
(intern (apply #'concatenate 'string (mapcar #'symbol-name symbols))))
(defmacro while (test &rest body)
"Imitate the standard while loop."
`(do ()
((not ,test))
,@body))
(defun zip (&rest lists... | |
cf8f25fcf5d0b363635b5494694f03e8ddd720a8295f20631435536af5106c51 | kazu-yamamoto/quic | IOSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module IOSpec where
import Control.Monad
import qualified Data.ByteString as BS
import Test.Hspec
import UnliftIO.Async
import UnliftIO.Concurrent
import qualified Network.QUIC.Client as C
import Network.QUIC
import Network.QUIC.Server
import Config
spec :: Spec
spec = do
sc ... | null | https://raw.githubusercontent.com/kazu-yamamoto/quic/2a5dd2d4733f8f1bd5b6659afaa91fd7e8852384/test/IOSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module IOSpec where
import Control.Monad
import qualified Data.ByteString as BS
import Test.Hspec
import UnliftIO.Async
import UnliftIO.Concurrent
import qualified Network.QUIC.Client as C
import Network.QUIC
import Network.QUIC.Server
import Config
spec :: Spec
spec = do
sc <- runIO makeTestServerConfigR
... |
7d5b5ca3196b504a8e1944de755814d6bf4293c1d576aabf1a5f0f804a2dadd6 | raaz-crypto/raaz | Usage.hs | module Usage( usage, errorBailout ) where
import Prelude
import System.Console.GetOpt
import System.IO
import System.Exit
-- | The usage message for the program.
usage :: [OptDescr a] -- ^ options
-> String -- ^ Header
-> [String] -- ^ errors
-> String
usage options header errs
| null... | null | https://raw.githubusercontent.com/raaz-crypto/raaz/91799e1ae528e909ad921f6c0d6f51ebd8c7328f/raaz/bin/Usage.hs | haskell | | The usage message for the program.
^ options
^ Header
^ errors
| Bail out on error
^ Options
^ Header
^ Errors | module Usage( usage, errorBailout ) where
import Prelude
import System.Console.GetOpt
import System.IO
import System.Exit
-> String
usage options header errs
| null errs = usageInfo header options
| otherwise = "raaz: " ++ unlines errs ++ usageInfo header options
-> IO b
errorBailout opts st... |
ddffb6fea4732fe2a6a6df0efd6ab7efaac03e97cf643c84ee321d9b9938d554 | willemdj/erlsom | erlsom_write.erl | Copyright ( C ) 2006 - 2008
%%%
This file is part of Erlsom .
%%%
Erlsom is free software : you can redistribute it and/or modify
%%% it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) any later ... | null | https://raw.githubusercontent.com/willemdj/erlsom/e00d2c7426fe7a8c49f8959da38a11d21b8b2168/src/erlsom_write.erl | erlang |
it under the terms of the GNU Lesser General Public License as
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
</>.
Author contact:
====================================================================
=============================... | Copyright ( C ) 2006 - 2008
This file is part of Erlsom .
Erlsom is free software : you can redistribute it and/or modify
published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) any later version .
Erlsom is distributed in the hope that it will be useful ,
GN... |
adfd80c0b116497f494200ef986ae1609af174e02137e1e41597abd8e652bed4 | erlyvideo/gen_tracker | gen_tracker.erl | %% @doc gen_tracker module
MIT license .
%%
-module(gen_tracker).
-author('Max Lapshin <>').
-behaviour(gen_server).
-include_lib("stdlib/include/ms_transform.hrl").
-include_lib("kernel/include/logger.hrl").
-export([start_link/1, find/2, find_or_open/2, info/2, list/1, setattr/3, setattr/4, getattr/3, getattr/4,... | null | https://raw.githubusercontent.com/erlyvideo/gen_tracker/76d149d7cd8855b703de568c397fd5fd06d368f9/src/gen_tracker.erl | erlang | @doc gen_tracker module
Name == <<"aa">>
[{
{{'$1','$2'},'$3'},
[{'andalso',{'==','$1',{const,<<"aa">>}},
{'orelse',{'==','$2',<<"key">>},{'==','$2',key2}}}],
}]
ets:insert(attr_table(Zone), [{{Name, K}, V} || {K,V} <- Attributes]).
ets:insert(attr_table(Zone), {{Name, Key}, Value}).
et... | MIT license .
-module(gen_tracker).
-author('Max Lapshin <>').
-behaviour(gen_server).
-include_lib("stdlib/include/ms_transform.hrl").
-include_lib("kernel/include/logger.hrl").
-export([start_link/1, find/2, find_or_open/2, info/2, list/1, setattr/3, setattr/4, getattr/3, getattr/4, increment/4,increment/5,delat... |
671fde813783d0aeefc7af159cf115cc6f1fc1628c08d246caa239f6c1c8e97f | glutamate/bugpan | FunSearch.hs | {-# LANGUAGE DeriveDataTypeable #-}
module FunSearch where
import Data.Generics
import Math.Probably.Sampler
import Control.Monad
import System.Cmd
data E = X | One | Two | BinOp Op E E | Exp E | Pow Int E deriving (Eq, Show, Typeable, Data)
data Op = Add | Sub | Mul | Div deriving (Eq, Show, Typeable, Data)
pp X ... | null | https://raw.githubusercontent.com/glutamate/bugpan/d0983152f5afce306049262cba296df00e52264b/FunSearch.hs | haskell | # LANGUAGE DeriveDataTypeable # |
module FunSearch where
import Data.Generics
import Math.Probably.Sampler
import Control.Monad
import System.Cmd
data E = X | One | Two | BinOp Op E E | Exp E | Pow Int E deriving (Eq, Show, Typeable, Data)
data Op = Add | Sub | Mul | Div deriving (Eq, Show, Typeable, Data)
pp X = "x"
pp One = "1"
pp Two = "2"
pp (... |
c05ab0738fc2bc2cef1c8fc99a4b37f15427dfc6c20330fe5745a16e61ad4fc7 | jumarko/web-development-with-clojure | core.clj | ;---
Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
; courses, books, articles, and the like. Contact us if you are in doubt.
; We make no guarantees that this code is fit fo... | null | https://raw.githubusercontent.com/jumarko/web-development-with-clojure/dfff6e40c76b64e9fcd440d80c7aa29809601b6b/code/guestbook-websockets/test/clj/guestbook/test/db/core.clj | clojure | ---
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
(ns guestbook.test.db.core
(:require [guestbook.db.core :refer [*db*] :as db]
[luminus-migrations.core :as migrat... |
0c3d62847e4f6be98acd43d59264288dd7f4f4f3f0ba218dd39d8cf9774ded2a | moby/datakit | cI_eval.mli | module Make (C : CI_s.CONTEXT) : sig
include CI_s.TERM with type context = C.t and type 'a key = C.t -> 'a
val run : context -> 'a t -> ('a CI_result.t * CI_output.logs) Lwt.t
(** [run context term] is the result of evaluating [term] in [context]. *)
end
| null | https://raw.githubusercontent.com/moby/datakit/e047e55a2dfa3aaec02398d7d7699f4f7afd2b47/ci/src/cI_eval.mli | ocaml | * [run context term] is the result of evaluating [term] in [context]. | module Make (C : CI_s.CONTEXT) : sig
include CI_s.TERM with type context = C.t and type 'a key = C.t -> 'a
val run : context -> 'a t -> ('a CI_result.t * CI_output.logs) Lwt.t
end
|
65a3f26afcadca65c5739263c567a98c5d6932b28800f4c4d7022dca78fe1a49 | KestrelInstitute/Specware | system.lisp | Parser for to C Translation Pragmas
(in-package :Parser4)
;; This is a common load file for all the build files in this direcrtory.
;; This loads and compiles all the files pertaining to the specializer.
(defparameter *lm-parser* nil)
(defmacro define-lm-parser-rule (name &optional pattern semantics
... | null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/Languages/MetaSlang/CodeGen/Handwritten/Lisp/system.lisp | lisp | This is a common load file for all the build files in this direcrtory.
This loads and compiles all the files pertaining to the specializer.
load-parser binds *current-parser*
no parents | Parser for to C Translation Pragmas
(in-package :Parser4)
(defparameter *lm-parser* nil)
(defmacro define-lm-parser-rule (name &optional pattern semantics
&key documentation)
',name
',pattern
',semantics... |
e897d4d51f2a21c56535cdf2aa38eacec815f06eca7b87485c6f6cc2060dd61e | cuplv/raz.ocaml | batNumber.ml |
* Number - Generic interface for numbers
* Copyright ( C ) 2007 Bluestorm < bluestorm dot dylc on - the - server gmail dot com >
* 2008
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as publi... | null | https://raw.githubusercontent.com/cuplv/raz.ocaml/b9b42d87d95cb1db34b8b35b3e30b4d4da41dea6/batNumber.ml | ocaml | *
The infix operators
*
The full set of operations of a type of numbers
Removed compare operators from base module, as they shadow
polymorphic ones from stdlib
include Compare with type bat__compare_t = t
*
The smallest set of operations supported by every set of numbers
* A type of numbers
* Co... |
* Number - Generic interface for numbers
* Copyright ( C ) 2007 Bluestorm < bluestorm dot dylc on - the - server gmail dot com >
* 2008
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as publi... |
003ea0b3ec9fe18ed11b561bba2bc714bcb60bca87cf896a8f6c4afee9e38bda | noprompt/garden | media.cljc | (ns garden.media
"Utility functions for working with media queries.")
;; See: -mediaqueries/#media1
(def media-features
#{:all
:aspect-ratio :min-aspect-ratio :max-aspect-ratio
:braille
:color :min-color :max-color
:color-index :min-color-index :max-color-index
:device-height :min-device-height... | null | https://raw.githubusercontent.com/noprompt/garden/025c4d8c6a88fdb58def34122af0459e51e309a9/src/garden/media.cljc | clojure | See: -mediaqueries/#media1 | (ns garden.media
"Utility functions for working with media queries.")
(def media-features
#{:all
:aspect-ratio :min-aspect-ratio :max-aspect-ratio
:braille
:color :min-color :max-color
:color-index :min-color-index :max-color-index
:device-height :min-device-height :max-device-height
:devic... |
d69833af00637dcb7248283078f7f0a6055cf45447aa77856b891b9a4f0842bf | ocaml-multicore/tezos | proxy.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2020 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_client/proxy.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2020 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
b2ec368c0509660566e997c97cde781811189b4d91158face6b49d5042eddf73 | mzp/coq-ruby | common.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/contrib/extraction/common.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
s Some pretty-print utility function... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : common.ml 13200 2... |
767a202043b28da0bc83e824e83c476d9531cae8981cdd7fb9d05ed806599df1 | chenyukang/eopl | 11.scm |
;; this is mutual recursive
;; subst-in-s-exp call subst, subst call a smaller substructure on subst-in-s-exp
;; this is halt
| null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch1/11.scm | scheme | this is mutual recursive
subst-in-s-exp call subst, subst call a smaller substructure on subst-in-s-exp
this is halt | |
2a9b20d9a9d958d1ace217d110cd3582293c6ead72f03631c1f812edfc3d2800 | pfdietz/ansi-test | types-and-class-2.lsp | ;-*- Mode: Lisp -*-
Author :
Created : We d Feb 5 21:20:05 2003
;;;; Contains: More tests of types and classes
(in-package :cl-test)
;;; Union of a type with its complement is universal
(deftest type-or-not-type-is-everything
(loop for l in *disjoint-types-list2*
append
(loop
... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/types-and-classes/types-and-class-2.lsp | lisp | -*- Mode: Lisp -*-
Contains: More tests of types and classes
Union of a type with its complement is universal
Check that disjointness of types in *disjoint-types-list*
is respected by all the elements of *universe*
| Author :
Created : We d Feb 5 21:20:05 2003
(in-package :cl-test)
(deftest type-or-not-type-is-everything
(loop for l in *disjoint-types-list2*
append
(loop
for type in l
append (check-subtypep t `(or ,type (not ,type)) t)
append (check-subtypep t `(or (not... |
5f4b593d1b37fe9b5fe4d037c26fd502a0fda8ffbd47a0d3eface197a25c8e19 | bjorng/wings | wpc_connect_tool.erl | %%
wpc_connect_tool.erl --
%%
Connect / Cut mode plugin .
%%
Copyright ( c ) 2004 - 2011
%%
%% See the file "license.terms" for information on usage and redistribution
%% of this file, and for a DISCLAIMER OF ALL WARRANTIES.
%%
%% $Id$
%%
-module(wpc_connect_tool).
-export([init/0,menu/2,command/2]... | null | https://raw.githubusercontent.com/bjorng/wings/1e2c2d62e93a98c263b167c7a41f8611e0ff08cd/plugins_src/commands/wpc_connect_tool.erl | erlang |
See the file "license.terms" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
$Id$
Connected vertices
Last vertex selected (for ending loop)
Current we
or slide
Cut all around
Original St
,face
Event handler for connect mode
FIXME: Don't compare s... | wpc_connect_tool.erl --
Connect / Cut mode plugin .
Copyright ( c ) 2004 - 2011
-module(wpc_connect_tool).
-export([init/0,menu/2,command/2]).
-export([line_intersect2d/4]).
-define(NEED_ESDL, 1).
-define(NEED_OPENGL, 1).
-include_lib("wings/src/wings.hrl").
State info
Working St
Cursor Position... |
925eaacde12245031ba5c78e0b9a0bfeae02eded8a86641deac773366ec3a374 | rotatef/cl-html5-parser | tree-help.lisp | ;;;; HTML5 parser for Common Lisp
;;;;
Copyright ( C ) 2012 < >
Copyright ( C ) 2012 < >
Copyright ( C ) 2012
Copyright ( C ) 2012 < >
;;;;
;;;; This library is free software: you can redistribute it and/or modify
;;;; it under the terms of the GNU Lesser General Public License as published
... | null | https://raw.githubusercontent.com/rotatef/cl-html5-parser/74a92eb3a183a0afd089ea33350e816e6b9aeefa/tree-help.lisp | lisp | HTML5 parser for Common Lisp
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
(at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without ... | Copyright ( C ) 2012 < >
Copyright ( C ) 2012 < >
Copyright ( C ) 2012
Copyright ( C ) 2012 < >
by the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package :html5-parser)
(defmacro pop-end (place)
"... |
912bcd5b31e88b632d45f24fd8b6e4d53d18f905fbe93545031ca55c002bfb18 | ocaml-gospel/gospel | exception_no_pattern.mli | exception E of int
val f : int -> int
(*@ y = f x
raises E *)
{ gospel_expected|
[ 125 ] File " exception_no_pattern.mli " , line 5 , characters 11 - 12 :
5 | raises E
[125] File "exception_no_pattern.mli", line 5, characters 11-12:
5 | raises E *)
^
... | null | https://raw.githubusercontent.com/ocaml-gospel/gospel/79841c510baeb396d9a695ae33b290899188380b/test/negative/exception_no_pattern.mli | ocaml | @ y = f x
raises E | exception E of int
val f : int -> int
{ gospel_expected|
[ 125 ] File " exception_no_pattern.mli " , line 5 , characters 11 - 12 :
5 | raises E
[125] File "exception_no_pattern.mli", line 5, characters 11-12:
5 | raises E *)
^
Error: Type checkin... |
9f8806d32ec0e7680b7e8d437f2f6a4fbc65d69f56013f465c1635deb44705ad | shayne-fletcher/ghc-lib-parser-ex | Binds.hs | Copyright ( c ) 2020 , . All rights reserved .
SPDX - License - Identifier : BSD-3 - Clause .
# LANGUAGE CPP #
#include "ghclib_api.h"
module Language.Haskell.GhclibParserEx.GHC.Hs.Binds(
isPatSynBind
)
where
#if defined (GHCLIB_API_HEAD) || defined (GHCLIB_API_906) || defined (GHCLIB_API_904) || defined(GHC... | null | https://raw.githubusercontent.com/shayne-fletcher/ghc-lib-parser-ex/e7e6af7a687dff6b57fe8938610ca2e752901134/src/Language/Haskell/GhclibParserEx/GHC/Hs/Binds.hs | haskell | Copyright ( c ) 2020 , . All rights reserved .
SPDX - License - Identifier : BSD-3 - Clause .
# LANGUAGE CPP #
#include "ghclib_api.h"
module Language.Haskell.GhclibParserEx.GHC.Hs.Binds(
isPatSynBind
)
where
#if defined (GHCLIB_API_HEAD) || defined (GHCLIB_API_906) || defined (GHCLIB_API_904) || defined(GHC... | |
4a537482957876e1f8b3758bfdbc9f377295385117c336fd5a9ff33c551650b7 | rbrito/pkg-mp3packer | list2_test.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This file is a part of mp3packer .
mp3packer is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public Lic... | null | https://raw.githubusercontent.com/rbrito/pkg-mp3packer/ac75f1d9cfd492f96248c6446147d0e510c1e299/list2_test.ml | ocaml |
let a = pop_last q;;
Printf.printf ">%d\n" a;;
| * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This file is a part of mp3packer .
mp3packer is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public Lic... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.