_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 |
|---|---|---|---|---|---|---|---|---|
f70cb39da955febed4aa1c853d49df238f4421162c343804860731bab12beeeb | ryanpbrewster/haskell | find_a_square.hs | -- find_a_square.hs
- You have coordinates of four points on a plane . Check whether they make
- a square .
- Input sample :
-
- Your program should accept as its first argument a path to a filename .
- Input example is the following
-
- ( 1,6 ) , ( 6,7 ) , ( 2,7 ) , ( 9,1 )
-... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/CodeEval/find_a_square.hs | haskell | find_a_square.hs |
- You have coordinates of four points on a plane . Check whether they make
- a square .
- Input sample :
-
- Your program should accept as its first argument a path to a filename .
- Input example is the following
-
- ( 1,6 ) , ( 6,7 ) , ( 2,7 ) , ( 9,1 )
- ( 4,1 ) , ( 3... |
19af207dddb7c51df54657f55cf8832abf2b48dd9d232ddbf9f7bc2f0b5ec9a9 | kit-ty-kate/visitors | expr.ml | type expr =
| EConst of int
| EAdd of expr * expr
| null | https://raw.githubusercontent.com/kit-ty-kate/visitors/fc53cc486178781e0b1e581eced98e07facb7d29/test/expr.ml | ocaml | type expr =
| EConst of int
| EAdd of expr * expr
| |
c3b4124bf6a4e838b0027e419fb22daa70b163de32e3014a53b4a4e6da28c800 | replikativ/replikativ | peer.cljc | (ns replikativ.peer
"Managing the peers which bind everything together."
(:require [replikativ.crdt.materialize :refer [crdt-read-handlers crdt-write-handlers]]
[replikativ.environ :refer [*id-fn* store-blob-trans-id store-blob-trans-value]]
[replikativ.core :refer [wire]]
[repli... | null | https://raw.githubusercontent.com/replikativ/replikativ/1533a7e43e46bfb70e8c8eb34dc5708e611a478d/src/replikativ/peer.cljc | clojure | (ns replikativ.peer
"Managing the peers which bind everything together."
(:require [replikativ.crdt.materialize :refer [crdt-read-handlers crdt-write-handlers]]
[replikativ.environ :refer [*id-fn* store-blob-trans-id store-blob-trans-value]]
[replikativ.core :refer [wire]]
[repli... | |
565f6dabf19db83e634af1074715aac7498246fc86502f8ca55ca95f3a2ef2ca | mattjbray/ocaml-decoders | decode.mli | (** Turn Yaml values into Ocaml values. *)
include Decoders.Decode.S with type value = Ocyaml.yaml
| null | https://raw.githubusercontent.com/mattjbray/ocaml-decoders/da05e541c1c587151ee3ccadf929e86b287215bb/src-ocyaml/decode.mli | ocaml | * Turn Yaml values into Ocaml values. |
include Decoders.Decode.S with type value = Ocyaml.yaml
|
9bb1a1513c7384497fb02fe350c2445dfe3b19f0687a91ce717d98321577423c | fujita-y/digamma | glfw-demo.scm | ;; Translated from C version at /
;; ./digamma --r6rs --top-level-program demo/glfw-demo.scm
(import (rnrs)
(rnrs programs)
(digamma gl)
(digamma glfw)
(digamma c-ffi)
(digamma c-types)
(only (core) format))
(define char*->string
(lambda (p)
(utf8->string (make-by... | null | https://raw.githubusercontent.com/fujita-y/digamma/5a31f9fd67737fd857ada643d5548155a2ed0e76/demo/glfw-demo.scm | scheme | Translated from C version at /
./digamma --r6rs --top-level-program demo/glfw-demo.scm |
(import (rnrs)
(rnrs programs)
(digamma gl)
(digamma glfw)
(digamma c-ffi)
(digamma c-types)
(only (core) format))
(define char*->string
(lambda (p)
(utf8->string (make-bytevector-mapping p 1024))))
(define error-callback
(lambda (error description)
(format... |
0f792b3c779a564b688d6135a692da1a8be98d6a69502d8f38d6bfbb9c5980e7 | clojure/clojurescript | alpha.cljc | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/main/cljs/cljs/spec/alpha.cljc | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns cljs.spec.alpha
(:refer-clojure :exclude [+ * and or cat def keys merge resolve assert])
(:require [cljs.core :as c]
[cljs.analyzer :as ana]
[cljs.env :as env]
[cljs.analyzer.api :refer [resolve]]
[clojure.walk :as wa... |
5cdfd1df457adc7b8b2b4fd8cbb822ab36dfc573c838f9ec0281af002ffc066d | sgbj/MaximaSharp | mdefun.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/mdefun.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
Compilati... |
(in-package :maxima)
(macsyma-module mdefun macro)
(load-macsyma-macros transm)
It will punt since the macro scheme is now
( DEFMTRFUN - EXTERNAL ( $ FOO < mode > < property > < & restp > ) )
(defmacro defmtrfun-external (&rest ig)
(declare (ignore ig))
nil)
(defmacro defmtrfun ((name mode prop restp... |
1006b6ac4e2474fc3f0d2ea3e87bb31164ffb1b9b1d5532107dd5e8ba2b383ac | cracauer/sbcl-ita | condition.impure.lisp | This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This software is in the public domain and is provided with
;;;;... | null | https://raw.githubusercontent.com/cracauer/sbcl-ita/f85a8cf0d1fb6e8c7b258e898b7af3233713e0b9/tests/condition.impure.lisp | lisp | more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
Bug from CLOCC.
The PICKY-RESTART should be applicable for the
PRINT-OBJECT method --- the... | This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(cl:in-package :cl-user)
(use-package :test-util)
(defpackage :p1
(:use :cl)
(:export #:code #:code-msg #:%code-msg))
(in-package :p1)
(define-condition code ()
... |
53de50053161a84302582b4e1dd027df441737b9e3abf70ad6c264e91e53171a | kazzmir/master-of-magic | uTF8.ml |
* UTF-8 - UTF-8 encoded Unicode string
* Copyright 2002 , 2003 ( C ) .
*
* 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 by the Free Software Foundation ; either
* version 2.1 of the Licen... | null | https://raw.githubusercontent.com/kazzmir/master-of-magic/830bfd1c549a5ac7370fa6a72bb06be5d3435fa0/lib/extlib-1.5/uTF8.ml | ocaml |
* UTF-8 - UTF-8 encoded Unicode string
* Copyright 2002 , 2003 ( C ) .
*
* 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 by the Free Software Foundation ; either
* version 2.1 of the Licen... | |
06081a7505252702792936ba7d1e600ba359ee45e82e261993ba9792e2ca068c | rowangithub/DOrder | prog4.ml | let rec loop b x y =
if (x < 10) then
if 0 <= b then
loop b (x+1) (y+1)
else loop b (x+1) (y-1)
else
assert ((y = 0) || (y >= 0 && b >= 0) || (b <= (-1) && y <= 0))
let main b =
let x = 0 in
let y = 0 in
loop b x y
let _ = main 2
let _ = main (-3) | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/icfp/prog4.ml | ocaml | let rec loop b x y =
if (x < 10) then
if 0 <= b then
loop b (x+1) (y+1)
else loop b (x+1) (y-1)
else
assert ((y = 0) || (y >= 0 && b >= 0) || (b <= (-1) && y <= 0))
let main b =
let x = 0 in
let y = 0 in
loop b x y
let _ = main 2
let _ = main (-3) | |
f4525770c053a511130f642c97868384127ac63cb9c1d693b7cff2c49d6a9833 | samirose/sicp-compiler-project | cond.scm | (define-library
(cond)
(export single-exp
single-exp-else
test-and-exp
test-and-exp-else
only-else
nested
short-circuit
sequence-exps
lambda-exps)
(import (scheme base))
(begin
(define (single-exp x)
(cond (x)))
(d... | null | https://raw.githubusercontent.com/samirose/sicp-compiler-project/2bc8a481044b5a653408f8595b2a2396600b8ad6/test-compiler/cond.scm | scheme | (define-library
(cond)
(export single-exp
single-exp-else
test-and-exp
test-and-exp-else
only-else
nested
short-circuit
sequence-exps
lambda-exps)
(import (scheme base))
(begin
(define (single-exp x)
(cond (x)))
(d... | |
30eb97f3b60fccc9b8a2640f132035a18cf7af4e7a01af699f9a0593ef0016ce | colis-anr/colis-language | toColis.ml | open Format
let rec print_list_pre sep print fmt = function
| [] -> ()
| x :: r -> sep fmt (); print fmt x; print_list_pre sep print fmt r
let print_list sep print fmt = function
| [] -> ()
| [x] -> print fmt x
| x :: r -> print fmt x; print_list_pre sep print fmt r
(* let comma fmt () = fprintf fmt ",@ " ... | null | https://raw.githubusercontent.com/colis-anr/colis-language/14b8087fa6323fb817d32c07236a2a084def01a1/src/language/toColis.ml | ocaml | let comma fmt () = fprintf fmt ",@ " | open Format
let rec print_list_pre sep print fmt = function
| [] -> ()
| x :: r -> sep fmt (); print fmt x; print_list_pre sep print fmt r
let print_list sep print fmt = function
| [] -> ()
| [x] -> print fmt x
| x :: r -> print fmt x; print_list_pre sep print fmt r
let semi fmt () = fprintf fmt ";@ "
op... |
1011edbb31ff4e4a18b58e3c44714a4e89f3911ddff8f8710d9c8f649a05f12e | HealthSamurai/stresty | core.clj | (ns stresty.reports.core
(:require
[stresty.reports.html]
[cheshire.core]
[clojure.java.io :as io]))
(defmulti do-report (fn [ztx opts data] (:report opts)))
(defn build-report [ztx opts data]
(when-let [out (and (:report opts) (:output opts))]
(println "Write report to " out)
(io/make-parents o... | null | https://raw.githubusercontent.com/HealthSamurai/stresty/23fdafb67b57cf165585956018faa75e7143476d/src/stresty/reports/core.clj | clojure | (ns stresty.reports.core
(:require
[stresty.reports.html]
[cheshire.core]
[clojure.java.io :as io]))
(defmulti do-report (fn [ztx opts data] (:report opts)))
(defn build-report [ztx opts data]
(when-let [out (and (:report opts) (:output opts))]
(println "Write report to " out)
(io/make-parents o... | |
77304dfe2056315381d4f4fc529d6683373f9e38b6c30209b51a43f4d0908a9f | LauraVoinea/protocol-reengineering-implementation | tan_stub.erl | -module(tan_stub).
-behaviour(gen_statem).
-define(SERVER, ?MODULE).
-export([act_fail/1,
act_ok/1,
callback_mode/0,
init/1,
receive_tan/1,
send_id/1,
start_link/0,
state1/3,
state2/3,
state3/3,
stop/0]).
start_link() -> gen_s... | null | https://raw.githubusercontent.com/LauraVoinea/protocol-reengineering-implementation/c20263e4fb7f88005444638cb23227407d29d698/src/examples/pintan/tan_stub.erl | erlang | require pin
assert tan | -module(tan_stub).
-behaviour(gen_statem).
-define(SERVER, ?MODULE).
-export([act_fail/1,
act_ok/1,
callback_mode/0,
init/1,
receive_tan/1,
send_id/1,
start_link/0,
state1/3,
state2/3,
state3/3,
stop/0]).
start_link() -> gen_s... |
4b9c42c861ca86e672c022ffe47776986bae4ff6c9a8cbc950f1ef9c476e45b9 | ocaml-sf/learn-ocaml-corpus | bmove_naive.ml | open Seq
(* -------------------------------------------------------------------------- *)
(* The size of a tree. *)
let rec size (t : tree) : int =
match t with
| TLeaf _ ->
1
| TNonLeaf offspring ->
1 + size_offspring offspring
and size_offspring (offspring : offspring) : int =
match offspring(... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/alpha_beta/wrong/bmove_naive.ml | ocaml | --------------------------------------------------------------------------
The size of a tree.
--------------------------------------------------------------------------
The height of a tree.
--------------------------------------------------------------------------
Evaluating a tree, with a sense parameter:... | open Seq
let rec size (t : tree) : int =
match t with
| TLeaf _ ->
1
| TNonLeaf offspring ->
1 + size_offspring offspring
and size_offspring (offspring : offspring) : int =
match offspring() with
| Nil ->
0
| Cons ((_move, t), offspring) ->
size t + size_offspring offspring
le... |
1dfa6f3b1f601ae22e9c6f5693dba85a8b0dd9c119c8979c2b58060cd98c42f3 | orbitz/ocaml-protobuf | builder.ml | open Core.Std
module Value = Protocol.Value
type t = Buffer.t
type error = [ `Overflow ]
type tag = int
let create () = Buffer.create 100
let to_string = Buffer.contents
let to_field tag v =
Protocol.Field.create tag v
let int32_of_int64 v =
match Int32.of_int64 v with
| Some v ->
Ok v
| None ... | null | https://raw.githubusercontent.com/orbitz/ocaml-protobuf/66228bbde1aba144b5b6b4b016df0d48e8092744/lib/protobuf/builder.ml | ocaml |
* NOTE:
* Going back and forth between a string
* and a bitstring is not free. Might
* need to adjust protocol to not require
* the conversion
| open Core.Std
module Value = Protocol.Value
type t = Buffer.t
type error = [ `Overflow ]
type tag = int
let create () = Buffer.create 100
let to_string = Buffer.contents
let to_field tag v =
Protocol.Field.create tag v
let int32_of_int64 v =
match Int32.of_int64 v with
| Some v ->
Ok v
| None ... |
b643e7c7743d783ed02e9c47f4bf8903534511751ff7581c98a705826e9fb1a3 | NoRedInk/jetpack | DependenciesSpec.hs | module DependenciesSpec where
import Config
import qualified Control.Exception.Safe as ES
import Control.Monad.Except (runExceptT)
import Control.Monad.State (modify)
import Data.List as L
import Data.Tree as Tree
import Dependencies
import DependencyTree
import Parser.Ast as Ast
import System.FilePath ((<.>), (</>))
... | null | https://raw.githubusercontent.com/NoRedInk/jetpack/721d12226b593c117cba26ceb7c463c7c3334b8b/test/DependenciesSpec.hs | haskell | module DependenciesSpec where
import Config
import qualified Control.Exception.Safe as ES
import Control.Monad.Except (runExceptT)
import Control.Monad.State (modify)
import Data.List as L
import Data.Tree as Tree
import Dependencies
import DependencyTree
import Parser.Ast as Ast
import System.FilePath ((<.>), (</>))
... | |
54684ef0ac64707c67eebe7c2ba9c3e1afaca51ffbacc3b508ea527ec161db6e | LaurentMazare/ocaml-minipy | b64.ml |
* Copyright ( c ) 2006 - 2009 Citrix Systems Inc.
* Copyright ( c ) 2010 < >
*
* 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 .
... | null | https://raw.githubusercontent.com/LaurentMazare/ocaml-minipy/059d980bb228d1a553e0756af647132a463d4418/examples/b64.ml | ocaml | rounded up |
* Copyright ( c ) 2006 - 2009 Citrix Systems Inc.
* Copyright ( c ) 2010 < >
*
* 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 .
... |
edbce6da0ab5053ba246fe6be0cf14c34c08f124a4b445e1a40d563c8d292bfa | mirage/mirage | makefile.ml |
* Copyright ( c ) 2013 - 2020 < >
* Copyright ( c ) 2013 - 2020 Anil Madhavapeddy < >
* Copyright ( c ) 2015 - 2020 < >
*
* 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 an... | null | https://raw.githubusercontent.com/mirage/mirage/c84e7f02af9552226e955f9002a9fe140ee07e35/lib/functoria/makefile.ml | ocaml |
* Copyright ( c ) 2013 - 2020 < >
* Copyright ( c ) 2013 - 2020 Anil Madhavapeddy < >
* Copyright ( c ) 2015 - 2020 < >
*
* 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 an... | |
1228577d9e5133396b7c32e66901465edd195f84d759e5c18676d152106b5b01 | sapur/hexe | History.hs | module History (
History, emptyHistory,
getStats,
setVersion, undo, redo, trim
) where
data History t = History
{ histPast :: [t]
, histPresent :: Maybe t
, histFuture :: [t]
, histEOT :: Maybe t
}
deriving (Eq, Show, Read)
emptyHistory = History
{ histPast = []
... | null | https://raw.githubusercontent.com/sapur/hexe/e01036a1f8213938f9e1c72afc6aff48ba7fb0fd/src/History.hs | haskell | module History (
History, emptyHistory,
getStats,
setVersion, undo, redo, trim
) where
data History t = History
{ histPast :: [t]
, histPresent :: Maybe t
, histFuture :: [t]
, histEOT :: Maybe t
}
deriving (Eq, Show, Read)
emptyHistory = History
{ histPast = []
... | |
e3ff5fca5cd1a042c8daa860a7ce8e4ed04e1c9b830c4e29fe06a9623d6ea6f4 | fukamachi/cl-locale | ja_JP.lisp | (("Lisping" . "舌足らず")
("~A Lisp" . "~A りすぷ")
("date-format" . (:year "." :month "." :day)))
| null | https://raw.githubusercontent.com/fukamachi/cl-locale/0a36cc0dcf5e0a8c8bf97869cd6199980ca25eec/t/i18n/ja_JP.lisp | lisp | (("Lisping" . "舌足らず")
("~A Lisp" . "~A りすぷ")
("date-format" . (:year "." :month "." :day)))
| |
0ab824b1a3be1d74e228d7fe39aa11035a8592f0aff8fea698cafd114812bdf1 | reborg/clojure-essential-reference | 4.clj | (def d (delay (println :evaluated)))
< 1 >
:delay
:normal)
;; :delay | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OtherFunctions/Concurrency/delay/4.clj | clojure | :delay | (def d (delay (println :evaluated)))
< 1 >
:delay
:normal) |
b309055974e2072068c056ff1240ae78fd3673783a3fb7a39ec25aa863ef90b1 | esb-lwb/lwb | ltl_test.clj | lwb Logic WorkBench -- Linear Temporla Logic , tests
Copyright ( c ) 2017 , THM . All rights reserved .
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php ) .
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this li... | null | https://raw.githubusercontent.com/esb-lwb/lwb/bba51ada7f7316341733d37b0dc4848c4891ef3a/test/lwb/ltl_test.clj | clojure | The use and distribution terms for this software are covered by the
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
manual test
nnf, nnf? -------------------------------------------------------------
P is not an atom
inital is not a node
:s_4 is not a node
ther... | lwb Logic WorkBench -- Linear Temporla Logic , tests
Copyright ( c ) 2017 , THM . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php ) .
(ns lwb.ltl-test
(:require [clojure.test :refer :all]
[lwb.ltl :refer :all]
[lwb.ltl.kripke :as ks]
[lwb.ltl.sat :refer [sat s... |
ff4ff5d3964841b2c87f91f660fd3502fe0cf9715f552898278413729af62b1a | mpickering/apply-refact | Import10.hs | import A as A | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Import10.hs | haskell | import A as A | |
0a2efbb732d06b39e9aa8c7cf273eb550d96e44a74a24b4b5c7567c7747eb658 | Liqwid-Labs/plutus-extra | Internal.hs | {-# LANGUAGE MultiWayIf #-}
# LANGUAGE TemplateHaskell #
module PlutusTx.Natural.Internal (
-- * Types,
Natural (..),
Parity (..),
-- * Functions
parity,
) where
import Control.DeepSeq (NFData)
import Control.Monad (guard)
import Data.Aeson (FromJSON (parseJSON), ToJSON)
import Data.Kind (Type)
import Data... | null | https://raw.githubusercontent.com/Liqwid-Labs/plutus-extra/19c03bf6f66fadef4465c3eff849472d4ac8bc05/plutus-numeric/src/PlutusTx/Natural/Internal.hs | haskell | # LANGUAGE MultiWayIf #
* Types,
* Functions
# INLINEABLE fromEnum # | # LANGUAGE TemplateHaskell #
module PlutusTx.Natural.Internal (
Natural (..),
Parity (..),
parity,
) where
import Control.DeepSeq (NFData)
import Control.Monad (guard)
import Data.Aeson (FromJSON (parseJSON), ToJSON)
import Data.Kind (Type)
import Data.OpenApi.Schema (ToSchema)
import PlutusTx.Builtins (matchD... |
792d8ef0fc761ff57dec2030e7cea7b5cd7bc32f93847bbbbaa3ef5a1e3cc962 | discus-lang/ddc | Graph.hs | -- Manipulate graphs for metadata generation
# LANGUAGE TupleSections #
module DDC.Core.Llvm.Metadata.Graph
( -- * Graphs and Trees for TBAA metadata
UG(..), DG(..)
, orientUG, partitionDG
, Tree(..)
, sources, anchor
-- * Quickcheck Testing ONLY
, Dom, Rel
... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core-llvm/DDC/Core/Llvm/Metadata/Graph.hs | haskell | Manipulate graphs for metadata generation
* Graphs and Trees for TBAA metadata
* Quickcheck Testing ONLY
Binary relations -----------------------------------------------------------
| A binary relation.
| Convert a relation.
| Convert a list to a relation.
| Find the transitive closure of a binary relation
Gra... | # LANGUAGE TupleSections #
module DDC.Core.Llvm.Metadata.Graph
UG(..), DG(..)
, orientUG, partitionDG
, Tree(..)
, sources, anchor
, Dom, Rel
, fromList, toList
, transClosure, transOrient
, aliasMeasure, isTree )
where
import Data.List
import Data.Ord
import... |
e897b8d8f5fb670e6543cb7ec9331a12298ba6dc1ad480783b7f70cb93fbedfb | GaloisInc/semmc | Sync.hs | # LANGUAGE DataKinds #
# LANGUAGE ImplicitParams #
{-# LANGUAGE RankNTypes #-}
-- | This module contains the definitions of memory synchronization instructions.
--
-- Note that many of the semantics here are *vastly* simplified and do not
-- encode any of the synchronization semantics. We don't currently have a way
--... | null | https://raw.githubusercontent.com/GaloisInc/semmc/4dc4439720b3b0de8812a68f8156dc89da76da57/semmc-ppc/src/SemMC/Architecture/PPC/Base/Sync.hs | haskell | # LANGUAGE RankNTypes #
| This module contains the definitions of memory synchronization instructions.
Note that many of the semantics here are *vastly* simplified and do not
encode any of the synchronization semantics. We don't currently have a way
to talk about those yet. Once we have one, these semantic will ... | # LANGUAGE DataKinds #
# LANGUAGE ImplicitParams #
module SemMC.Architecture.PPC.Base.Sync (
baseSync
) where
import Prelude hiding ( concat )
import Control.Monad ( when )
import SemMC.DSL
import SemMC.Architecture.PPC.Base.Core
import SemMC.Architecture.PPC.Base.Core.Memory
baseSync :: (?bitSize :: BitSize) => ... |
7ce9ba935f90d683a3ffa15528a82229556018671637ed6b3f81539c8805ec34 | dgiot/dgiot | dgiot_mnesia_helper.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy... | null | https://raw.githubusercontent.com/dgiot/dgiot/c9f2f78af71692ba532e4806621b611db2afe0c9/apps/dgiot/src/storage/dgiot_mnesia_helper.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(dgiot_mnesia_helper).
-behaviour(gen_server).
-include("dgiot.hrl").
-include("logge... |
8be33ac6d5d21f225e93624ee328156e0c5ca5064b132888adbaa71c8ec93e6c | gentoo-haskell/hackport | Overlay.hs | module Portage.Overlay
( ExistingEbuild(..)
, Overlay(..)
, loadLazy
, readOverlay, readOverlayByPackage
, getDirectoryTree, DirectoryTree
, reduceOverlay
, filterByEmail
, inOverlay
)
where
import qualified Portage.PackageId as Portage
import qualified Portage.Metadata as Portage
import qualifie... | null | https://raw.githubusercontent.com/gentoo-haskell/hackport/558298950ed1e1f0c0b51f0595212a857fa373e4/src/Portage/Overlay.hs | haskell | | Type describing an overlay.
the highest ebuild version revision)
gah!
those speed things up a bit
and reduse memory consumption | module Portage.Overlay
( ExistingEbuild(..)
, Overlay(..)
, loadLazy
, readOverlay, readOverlayByPackage
, getDirectoryTree, DirectoryTree
, reduceOverlay
, filterByEmail
, inOverlay
)
where
import qualified Portage.PackageId as Portage
import qualified Portage.Metadata as Portage
import qualifie... |
3fe4a4e9ecfbb464a4d654faa3cdd8263063031e7d5ab742831d11de134f885d | slipstream/SlipStreamServer | graphite.clj | (ns com.sixsq.slipstream.ssclj.app.graphite
(:require
[clojure.tools.logging :as log]
[environ.core :refer [env]]
[metrics.reporters.graphite :as graphite])
(:import
[com.codahale.metrics MetricFilter]
[java.util.concurrent TimeUnit]))
(def ^:dynamic *reporter* nil)
(defn set-reporter!
[re... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/src/com/sixsq/slipstream/ssclj/app/graphite.clj | clojure | (ns com.sixsq.slipstream.ssclj.app.graphite
(:require
[clojure.tools.logging :as log]
[environ.core :refer [env]]
[metrics.reporters.graphite :as graphite])
(:import
[com.codahale.metrics MetricFilter]
[java.util.concurrent TimeUnit]))
(def ^:dynamic *reporter* nil)
(defn set-reporter!
[re... | |
899d5788bfe2d4ae451901893820d3ac8795a6546179eb09b8d2fa0cf99e21e1 | dongcarl/guix | gnupg.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2010 , 2011 , 2013 , 2014 , 2016 , 2018 , 2019 < >
Copyright © 2013 < >
Copyright © 2020 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU Gene... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/guix/gnupg.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2010 , 2011 , 2013 , 2014 , 2016 , 2018 , 2019 < >
Copyright © 2013 < >
Copyright © 2020 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gu... |
6110918446ea03aa7f3cc5aa7ecfbb79d1855b3d4fd551f7b21e07f1ca27c084 | bldl/magnolisp | lib-names-3.rkt | #lang magnolisp/2014
(define (f) 7)
(provide (rename-out [f seven]))
(define (g) 8)
(provide g)
| null | https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/tests/lib-names-3.rkt | racket | #lang magnolisp/2014
(define (f) 7)
(provide (rename-out [f seven]))
(define (g) 8)
(provide g)
| |
3487cf3510ef5e151295a1c1baa1956cb958d9d1f83f1fc388a3fce5eba04a81 | facebookarchive/duckling_old | numbers.clj | (
"number (0..16)"
#"(?i)(z[eé]ro|une?|deux|trois|quatre|cinq|six|sept|huit|neuf|dix|onze|douze|treize|quatorze|quinze|seize)"
{:dim :number
:integer true
:value (get {"zéro" 0 "zero" 0 "un" 1 "une" 1 "deux" 2 "trois" 3 "quatre" 4 "cinq" 5
"six" 6 "sept" 7 "huit" 8 "neuf" 9 "dix" 10 "onze" 11
... | null | https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/fr/rules/numbers.clj | clojure | separate rule to avoid too many entries in the 'get' map above
Numeric
Decimals
prefixes
cleaner if we have the right type
suffixes
cleaner if we have the right type
Ordinal numbers
read-string not the safest | (
"number (0..16)"
#"(?i)(z[eé]ro|une?|deux|trois|quatre|cinq|six|sept|huit|neuf|dix|onze|douze|treize|quatorze|quinze|seize)"
{:dim :number
:integer true
:value (get {"zéro" 0 "zero" 0 "un" 1 "une" 1 "deux" 2 "trois" 3 "quatre" 4 "cinq" 5
"six" 6 "sept" 7 "huit" 8 "neuf" 9 "dix" 10 "onze" 11
... |
1552702801341292bd9cfb6060bf2adcc8b72aa3dffceecead24a6a6c8813bb6 | jeromesimeon/Galax | namespace_names.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/namespace/namespace_names.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : namespace_names.mli , v 1.9 2007/09/19 20:01:50 mff Exp $
Module : Namespace_names
Description :
This module implements basic operations on XML names .
Description:
This module implements basic operations on XM... |
d26f196c8c504fdc7a18186269a5a4a208a7ed9ab2af40ee1e315e36cc7be17a | schmidt73/guidescan-web | add_organism.clj | (ns add-organism
(:require [next.jdbc :as jdbc]
[honeysql.core :as sql]
[honeysql.helpers :as h]
[honeysql.format :as fmt]
[taoensso.timbre :as timbre]
[failjure.core :as f]
[script-utils :refer :all])
(:gen-class))
(defn- parse-gtf-field
[p... | null | https://raw.githubusercontent.com/schmidt73/guidescan-web/130f189c88aadcce7a2d857943d16be54f789059/scripts/add_organism.clj | clojure | " | (ns add-organism
(:require [next.jdbc :as jdbc]
[honeysql.core :as sql]
[honeysql.helpers :as h]
[honeysql.format :as fmt]
[taoensso.timbre :as timbre]
[failjure.core :as f]
[script-utils :refer :all])
(:gen-class))
(defn- parse-gtf-field
[p... |
a241b50e2054e555d98f516c66cec98c09468335767a9deb5494b646a80cda7c | eryx67/etracker | etracker_udp_srv.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2012 ,
%%% @doc
%%%
%%% @end
Created : 12 Nov 2012 by < >
%%%-------------------------------------------------------------------
-module(etracker_udp_srv).
-behaviour(gen_server).
%% API
-export([start_link/0, j... | null | https://raw.githubusercontent.com/eryx67/etracker/f41f5d2172d2a0cf5aeebcc7442c7523a9338340/src/etracker_udp_srv.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_server callbacks
===================================================================
=================================================================== | @author < >
( C ) 2012 ,
Created : 12 Nov 2012 by < >
-module(etracker_udp_srv).
-behaviour(gen_server).
-export([start_link/0, job_queue_name/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-define(SERVER, ?MODULE).
-define(SECRET_TIMEOUT,... |
06dab9b45db878c7f6ab832442407319e0b1693d039463e558ba1c46966c4544 | erlang/rebar3 | rebar_new_SUITE.erl | %%% This suite can't run tests for built-in templates because
%%% they require being escriptize and we currently don't support
%%% this in here!
-module(rebar_new_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
all() -> [app_git_user, app_hg_user, app_... | null | https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/test/rebar_new_SUITE.erl | erlang | This suite can't run tests for built-in templates because
they require being escriptize and we currently don't support
this in here!
Can't find escript templates unless we run | -module(rebar_new_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
all() -> [app_git_user, app_hg_user, app_with_fallbacks,
app_with_flags1, app_with_flags2, plugin_tpl, unknown_template].
init_per_testcase(plugin_tpl, Config) ->
applica... |
a9e39df75c7142cf11051a84f32e0f53740dae9988ee4aa32533a32e66818e56 | SRI-CSL/f3d | gl-pkg.lisp | (in-package :cl-user)
(defpackage :gl
(:use :common-lisp :qffi :lcl :lx :common-symbols)
(:export "GLMAKECURRENT"
"GLSWAPBUFFERS"
"COLOR-NAME-TO-GL"
"*BREAK-ON-DISPLAY-ERROR*"
"GLTRANSLATEDV"
"GL_NO_ERROR"
"MAKE-GL-COLOR")
)
( load - system - library " libf3dglffi " )
#+never
(qffi::lo... | null | https://raw.githubusercontent.com/SRI-CSL/f3d/93285f582198bfbab33ca96ff71efda539b1bec7/f3d-geom/gl-ffi/gl-pkg.lisp | lisp | (in-package :cl-user)
(defpackage :gl
(:use :common-lisp :qffi :lcl :lx :common-symbols)
(:export "GLMAKECURRENT"
"GLSWAPBUFFERS"
"COLOR-NAME-TO-GL"
"*BREAK-ON-DISPLAY-ERROR*"
"GLTRANSLATEDV"
"GL_NO_ERROR"
"MAKE-GL-COLOR")
)
( load - system - library " libf3dglffi " )
#+never
(qffi::lo... | |
a8996103426b8baced1ed00baf1a6baf8eded0c2b6da505b589a265718ad2419 | simmsb/calamity | AuditLog.hs | # LANGUAGE TemplateHaskell #
-- | Audit Log models
module Calamity.Types.Model.Guild.AuditLog (
AuditLog (..),
AuditLogEntry (..),
AuditLogEntryInfo (..),
AuditLogChange (..),
AuditLogAction (..),
) where
import Calamity.Internal.SnowflakeMap (SnowflakeMap)
import Calamity.Types.Model.Channel
import Calamit... | null | https://raw.githubusercontent.com/simmsb/calamity/be310255b446e87e7432673de1fbc67ef46de3ae/calamity/Calamity/Types/Model/Guild/AuditLog.hs | haskell | | Audit Log models
no safe toEnum :S | # LANGUAGE TemplateHaskell #
module Calamity.Types.Model.Guild.AuditLog (
AuditLog (..),
AuditLogEntry (..),
AuditLogEntryInfo (..),
AuditLogChange (..),
AuditLogAction (..),
) where
import Calamity.Internal.SnowflakeMap (SnowflakeMap)
import Calamity.Types.Model.Channel
import Calamity.Types.Model.User
imp... |
9f18f52fbf8d987b4ec6eb3f9de7ca35fed1cf7f9b6f5afe51da0df142065a71 | ragkousism/Guix-on-Hurd | libusb.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 , 2016 < >
Copyright © 2016 < >
Copyright © 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or mo... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/libusb.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 , 2016 < >
Copyright © 2016 < >
Copyright © 2016 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . ... |
c98e9e2de0f429f27538aaaf21c0f8f9ddd4c5f5e8819d91913a0bbe8db504df | REPROSEC/dolev-yao-star | Spec_Hash_Lemmas.ml | open Prims
let (pad_length : Spec_Hash_Definitions.hash_alg -> Prims.nat -> Prims.nat) =
fun a ->
fun len ->
if
match a with
| Spec_Hash_Definitions.Blake2S -> true
| Spec_Hash_Definitions.Blake2B -> true
| uu___ -> false
then
((Spec_Hash_Definitions.b... | null | https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Spec_Hash_Lemmas.ml | ocaml | open Prims
let (pad_length : Spec_Hash_Definitions.hash_alg -> Prims.nat -> Prims.nat) =
fun a ->
fun len ->
if
match a with
| Spec_Hash_Definitions.Blake2S -> true
| Spec_Hash_Definitions.Blake2B -> true
| uu___ -> false
then
((Spec_Hash_Definitions.b... | |
0c37917eb98540230352f19c869035563c20bb70f96732d79e0477ab736730c1 | rubenbarroso/EOPL | 5_20.scm | (load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm")
;The following methods need to be aware of this
change : class - name->field - ids , class - name->methods , class - name->field - length
... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/chapter5/5_20.scm | scheme | The following methods need to be aware of this
''
(define initialize-class-env!
(lambda ()
(set! the-class-env
(list (scan&parse
"class object extends none
top level and tests ;;;;;;;;;;;;;;;;
needed for testing
^;;;;;;;;;;;;;;; grammatical specification ;;;;;;;;;;;;;;;;
^;;;;;;;;;;;;;;; new... | (load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm")
change : class - name->field - ids , class - name->methods , class - name->field - length
method initialize ( ) 1 " ) )... |
52f056e4802868b07efc8a5d5200d24e994292b2b49bbd01f4250ada2377b2ac | haskell-opengl/OpenGLRaw | TextureBarrier.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.TextureBarrier
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
----------------------------------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ARB/TextureBarrier.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.ARB.TextureBarrier
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Functions | Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.ARB.TextureBarrier (
glGetARBTextureBarrier,
gl_ARB_texture_barrier,
glTextureBarrier
) where
import Graphics.GL.ExtensionPredicates
import Graphics.GL.Functions
|
8ab22e9f0b68cb315d18a39dff29fe505d8d23b3aaefa7f7abb5c3d8e3ad8aae | spawnfest/eep49ers | ssl_eqc_handshake.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2018 - 2020 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/ssl/test/property_test/ssl_eqc_handshake.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2018 - 2020 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(ssl_eqc_handshake).
-compile(expo... |
aa04afb5f51d60ec3730dc42c0182d3297ec0c88b9dbdd73d2e35d5b37fe098d | scicloj/kindly | index.clj | ;; # Kindly
Kindly is a proposed common ground for Clojure literate programming .
;;
;; It is a small library for specifying in what kind of way things should be displayed.
;;
;; It can offer its advice to various tools for data visualization and literate programming, with sensible defaults which are user customizab... | null | https://raw.githubusercontent.com/scicloj/kindly/2b92f4980510474aeceb2b049d03639da87c45c9/notebooks/index.clj | clojure | # Kindly
It is a small library for specifying in what kind of way things should be displayed.
It can offer its advice to various tools for data visualization and literate programming, with sensible defaults which are user customizable.
## Status
- still alpha
- currently supported tools:
- [Clay](/)
- wil... |
Kindly is a proposed common ground for Clojure literate programming .
It grew out of the [ visual - tools group]( / docs / community / groups / visual - tools/ ) and has been inspired by converstions with , , , , , , , and many other friends .
( v3 , 2023 - 02 - 05 )
- will soon be used in co... |
ad73f1f132434d973403762a8b6986461bf2a98d34f12e990384d96b2e0098df | dmitryvk/sbcl-win32-threads | std-class.lisp | This software is part of the SBCL system . See the README file for
;;;; more information.
This software is derived from software originally released by Xerox
;;;; Corporation. Copyright and release statements follow. Later modifications
;;;; to the software are in the public domain and are provided with
;;;; absol... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/pcl/std-class.lisp | lisp | more information.
Corporation. Copyright and release statements follow. Later modifications
to the software are in the public domain and are provided with
absolutely no warranty. See the COPYING and CREDITS files for more
information.
All rights reserved.
Use and copying of this software and preparation of der... | This software is part of the SBCL system . See the README file for
This software is derived from software originally released by Xerox
copyright information from original PCL sources :
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
derivative works must comply with all applicabl... |
1fad6b5f9cb9f673e4e23941f9159704c19c20df5fc5f4662eca2b93d8df13c2 | bobzhang/fan | langInclude.mli |
(** [include] DDSL in Fan *)
val include_quot : Astf.stru Gramf.t
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/cold/langInclude.mli | ocaml | * [include] DDSL in Fan |
val include_quot : Astf.stru Gramf.t
|
b997024fe93a9198358d214ca12240627ddcad7b0be9d57f1f47fc2fa7fcec6d | racket/frtime | gui.rkt | #lang frtime
(provide (all-defined-out))
(require frtime/gui/fred)
(module test racket/base)
(define frame (new ft-frame% [label "GUI"] [min-height 150] [min-width 200] [shown #t]))
(define (make-button str)
(send (new ft-button% [parent frame] [label str]) get-value-e))
(define (make-message str~)
(new... | null | https://raw.githubusercontent.com/racket/frtime/9b9db67581107f4d7b995541c70f2d08f03ae89e/gui.rkt | racket | #lang frtime
(provide (all-defined-out))
(require frtime/gui/fred)
(module test racket/base)
(define frame (new ft-frame% [label "GUI"] [min-height 150] [min-width 200] [shown #t]))
(define (make-button str)
(send (new ft-button% [parent frame] [label str]) get-value-e))
(define (make-message str~)
(new... | |
fc6bd31d8097e0062a5c624182fd1ba1083394a3600efec0285123133ad67fb7 | np/camllexer | input.ml | "\2"
| null | https://raw.githubusercontent.com/np/camllexer/5222a062cb4f0d651e41a66a875c39941137b67d/tests/string-backslash-2.t/input.ml | ocaml | "\2"
| |
66aaf100a04ddf07c74d1626514282048640fd0d3b06910fefc0d114390a1281 | danilkolikov/dfl | Parser.hs | |
Module : Frontend . Syntax . Parser
Description : for DFL
Copyright : ( c ) , 2019
License : MIT
Parser for DFL .
Module : Frontend.Syntax.Parser
Description : Parser for DFL
Copyright : (c) Danil Kolikov, 2019
License : MIT
Parser for DFL.
-}
module Frontend.Sy... | null | https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/src/Frontend/Syntax/Parser.hs | haskell | | State of the parser. State contains location of the last parsed token
| Errors which can be encountered during parsing
^ Standard parser error
^ Unknown error from the parser's machinery
| Run parser and return its state
^ File name
^ List of tokens, returned by a lexer
| Runs a parser and ignores its state
... | |
Module : Frontend . Syntax . Parser
Description : for DFL
Copyright : ( c ) , 2019
License : MIT
Parser for DFL .
Module : Frontend.Syntax.Parser
Description : Parser for DFL
Copyright : (c) Danil Kolikov, 2019
License : MIT
Parser for DFL.
-}
module Frontend.Sy... |
e508eea00416aecd92075666fe62eb808cb1982b80223738cc1f1de10f8ccc35 | locusmath/locus | permutation.clj | (ns locus.set.mapping.effects.global.permutation
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.con.core.object :refer :all]
[locus.con.core.setpart :refer :all]
... | null | https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/set/mapping/effects/global/permutation.clj | clojure | Permutations
A permutation is simply an automorphism in the topos Sets, which means thatit can be composed
with itself, and it can be inverted.
Convert permutations into transformations
Generalized multimethods for converting things into permutations
Create an involution as a permutation by a partition
Compositi... | (ns locus.set.mapping.effects.global.permutation
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.con.core.object :refer :all]
[locus.con.core.setpart :refer :all]
... |
8651a947f9e996cb820cc8b5d0bcc0ed8c9f8bc7870cda6e839c3fd99ec58246 | mseri/ocaml-clz | clz_decompress.mli | (** The implementation of the functions below is mostly extracted from the [decompress] library documentation.*)
val inflate_string_de : string -> (string, [> `Msg of string ]) result
(** [inflate_string_de s] inflates a string using the deflate algorithm. *)
val deflate_string_de : string -> string
(** [deflate_stri... | null | https://raw.githubusercontent.com/mseri/ocaml-clz/7f9fdd8f23025d75a412ff5219818f1fa701b3e3/src/clz_decompress.mli | ocaml | * The implementation of the functions below is mostly extracted from the [decompress] library documentation.
* [inflate_string_de s] inflates a string using the deflate algorithm.
* [deflate_string_de s] deflates a string using the deflate algorithm.
* [inflate_string_gz s] inflates a string using the gzip algorithm.... |
val inflate_string_de : string -> (string, [> `Msg of string ]) result
val deflate_string_de : string -> string
val inflate_string_gz : string -> (string, [> `Msg of string ]) result
val deflate_string_gz :
cfg:unit Gz.Higher.configuration -> ?level:int -> string -> string
|
1bf2fa4e6f875258008656bc6113b2970762cecacb03ba4eb10bb684fdb86157 | patoline/patoline | gen_colors_impl.ml | let _ =
if Array.length Sys.argv <> 2 then
failwith "This program expects one argument.";
let datafile = open_in Sys.argv.(1) in
try while true do
let line = input_line datafile in
let print n r g b =
let r = float_of_int r /. 255.0 in
let g = float_of_int g /. 255.0 in
let b = flo... | null | https://raw.githubusercontent.com/patoline/patoline/3dcd41fdff64895d795d4a78baa27d572b161081/patoraw/color_data/gen_colors_impl.ml | ocaml | let _ =
if Array.length Sys.argv <> 2 then
failwith "This program expects one argument.";
let datafile = open_in Sys.argv.(1) in
try while true do
let line = input_line datafile in
let print n r g b =
let r = float_of_int r /. 255.0 in
let g = float_of_int g /. 255.0 in
let b = flo... | |
4ca7088a748c5433119d3d729d787bf92b2f7533ddacf7b57a775c63ce7a1e01 | mlabs-haskell/plutus-pioneer-program | EnglishAuction.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamT... | null | https://raw.githubusercontent.com/mlabs-haskell/plutus-pioneer-program/b50b196d57dc35559b7526fe17b49dd2ba4790bc/code/week01/src/Week01/EnglishAuction.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators # | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies ... |
c6e246123c9bc4cd764a17cfb7933c913bdefa84c00fe7802ab9601f47b1e761 | Helium4Haskell/helium | MonadInstance2.hs |
fail = Nothing
main = do
x <- return 3
y <- Just "Hello"
fail
let z = undefined
return (x, y, z) | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeClasses/MonadInstance2.hs | haskell |
fail = Nothing
main = do
x <- return 3
y <- Just "Hello"
fail
let z = undefined
return (x, y, z) | |
6493657715cab0f56ef3b5e328aa3652a558f7567b45fc52325d869199549d38 | camllight/camllight | frx_lbutton.ml | #open "tk";;
let version = "$Id$"
;;
(*
* Simulate a button with a bitmap AND a label
*)
let rec sort_options but lab com = function
[] -> but,lab,com
|(Command f as o)::l -> sort_options (o::but) lab com l
|(Bitmap b as o)::l -> sort_options (o::but) lab com l
|(Text t as o)::l -> sort_options but (o::l... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/camltk4/frx/frx_lbutton.ml | ocaml |
* Simulate a button with a bitmap AND a label
| #open "tk";;
let version = "$Id$"
;;
let rec sort_options but lab com = function
[] -> but,lab,com
|(Command f as o)::l -> sort_options (o::but) lab com l
|(Bitmap b as o)::l -> sort_options (o::but) lab com l
|(Text t as o)::l -> sort_options but (o::lab) com l
|o::l -> sort_options but lab (o::com) l
;... |
dd402aea84b7e04a183e04f19fd604c50c5310b60da68857b19cd753919d1286 | dgiot/dgiot | data_sup.erl |
-module(data_sup).
-behaviour(supervisor).
-export([start_link/1, init/1]).
start_link(Name) ->
supervisor:start_link({local, Name}, ?MODULE, []).
init([]) ->
Child = [
{data_worker, {data_worker, start_link, []}, transient, 5000, worker, [data_worker]}],
{ok, {{simple_one_for_one, 5, 10}, Chi... | null | https://raw.githubusercontent.com/dgiot/dgiot/4305eaa059d6bb63fadd5526d3c4cc8cf76a3239/apps/dgiot_api/src/data_sup.erl | erlang |
-module(data_sup).
-behaviour(supervisor).
-export([start_link/1, init/1]).
start_link(Name) ->
supervisor:start_link({local, Name}, ?MODULE, []).
init([]) ->
Child = [
{data_worker, {data_worker, start_link, []}, transient, 5000, worker, [data_worker]}],
{ok, {{simple_one_for_one, 5, 10}, Chi... | |
57d40dd76ed78b2a04ea493b1fab7e67593eeae103a434c6c1ffd819a13eaaf2 | ulricha/dsh | Construct.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeSynonymInstances #-}
-- | Constructor functions for Segment Language primitives
module Database.DSH.SL.Construct where
import qualified Database.DSH.Common.Lang as L
import Database.DSH.Common.Vector
import ... | null | https://raw.githubusercontent.com/ulricha/dsh/e6cd5c6bea575e62a381e89bfc4cc7cb97485106/src/Database/DSH/SL/Construct.hs | haskell | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeSynonymInstances #
| Constructor functions for Segment Language primitives
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-------------------------------------... | # LANGUAGE FlexibleInstances #
module Database.DSH.SL.Construct where
import qualified Database.DSH.Common.Lang as L
import Database.DSH.Common.Vector
import Database.DSH.Common.VectorLang
import Database.DSH.Common.Nat
import Database.Algebra.Dag.Build
import ... |
8b6bd2ad2545ea04a3c685c721751a50d1c3ef30693bf26264c953bb6cc3f803 | pirapira/bamboo | type.mli | val assign_types :
unit Syntax.toplevel Assoc.contract_id_assoc -> Syntax.typ Syntax.toplevel Assoc.contract_id_assoc
| null | https://raw.githubusercontent.com/pirapira/bamboo/1cca98e0b6d2579fe32885e66aafd0f5e25d9eb5/src/ast/type.mli | ocaml | val assign_types :
unit Syntax.toplevel Assoc.contract_id_assoc -> Syntax.typ Syntax.toplevel Assoc.contract_id_assoc
| |
a13d20a36d1f3646b4c3132d56402d00147f59d376adc6da1f0d0ef69be8933f | axelarge/advent-of-code | day11.clj | (ns advent-of-code.y2020.day11
(:require [advent-of-code.support :refer :all]
[clojure.string :as str]))
(def input (get-input 2020 11))
(defn parse [input]
(mapv vec (str/split-lines input)))
(defn adjacent-seats [grid pos]
(->> (neighbors8 pos)
(filter #(#{\L} (get-in grid %)))))
(defn vi... | null | https://raw.githubusercontent.com/axelarge/advent-of-code/ef8cc4e279e6fc17512bdca5005037b4f842a0c2/src/advent_of_code/y2020/day11.clj | clojure | (ns advent-of-code.y2020.day11
(:require [advent-of-code.support :refer :all]
[clojure.string :as str]))
(def input (get-input 2020 11))
(defn parse [input]
(mapv vec (str/split-lines input)))
(defn adjacent-seats [grid pos]
(->> (neighbors8 pos)
(filter #(#{\L} (get-in grid %)))))
(defn vi... | |
44b1df1a6aff77495ca83a8e0055f39be225d13bdbb2087b21c0bfeeef6f0172 | camllight/camllight | map.ml | (* Association tables over ordered types *)
#open "baltree";;
type ('a, 'b) binding =
{ key: 'a; data: 'b; prev: 'b list };;
type ('a, 'b) t =
{ tree: ('a, 'b) binding baltree__t;
order: 'a -> ('a, 'b) binding -> int };;
let empty ord =
{ tree = Empty; order = fun x y -> ord x y.key };;
let bind x y b =
... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/windows/src/lib/map.ml | ocaml | Association tables over ordered types |
#open "baltree";;
type ('a, 'b) binding =
{ key: 'a; data: 'b; prev: 'b list };;
type ('a, 'b) t =
{ tree: ('a, 'b) binding baltree__t;
order: 'a -> ('a, 'b) binding -> int };;
let empty ord =
{ tree = Empty; order = fun x y -> ord x y.key };;
let bind x y b =
Something
{ key = x;
data = y;
... |
9db37195f86026fdbfc35055ec7c60fe1ba5924030a9aa4c44a8376c163366d4 | tamasjung/maker | dev.clj | (ns maker.dev
"Developer utilities."
(:require [clojure.string :as str]
[clojure.pprint :refer [pprint]]))
(defmacro trace
"Macro tracing macro, prints the output or the Throwable."
[print-fn m & args]
(let [p-fn (eval print-fn)]
(try (let [output (apply (resolve m) &form &env args)]
... | null | https://raw.githubusercontent.com/tamasjung/maker/640bf4b61c0d19013e5b7c366b45035d80aa622c/src/maker/dev.clj | clojure | (ns maker.dev
"Developer utilities."
(:require [clojure.string :as str]
[clojure.pprint :refer [pprint]]))
(defmacro trace
"Macro tracing macro, prints the output or the Throwable."
[print-fn m & args]
(let [p-fn (eval print-fn)]
(try (let [output (apply (resolve m) &form &env args)]
... | |
b23201242a8c5f9818b58c0bd0020fd732b34359122e7811295b63ba2a29c7bb | expipiplus1/update-nix-fetchgit | Span.hs |
-- | This module deals with updating spans of characters in values of type Text.
--
-- It defines some helper types and functions to apply these "updates".
module Update.Span
( SpanUpdate(..)
, SrcSpan(..)
, SourcePos(..)
, updateSpan
, updateSpans
, linearizeSourcePos
, prettyPrintSourcePos
, split
... | null | https://raw.githubusercontent.com/expipiplus1/update-nix-fetchgit/ee0efa386a747b2524d374585f42fc0bddecfefd/src/Update/Span.hs | haskell | | This module deals with updating spans of characters in values of type Text.
It defines some helper types and functions to apply these "updates".
| A span and some text to replace it with.
They don't have to be the same length.
| Update many spans in a file. They must be non-overlapping.
| Update a single span ... |
module Update.Span
( SpanUpdate(..)
, SrcSpan(..)
, SourcePos(..)
, updateSpan
, updateSpans
, linearizeSourcePos
, prettyPrintSourcePos
, split
) where
import Control.Exception ( assert )
import Data.Data ( Data )
import Data.Int ... |
c13fb53af17cb64e09c649b12866c4cefaf0cae376f88f402b89c8010d5ce94a | IBM/wcs-ocaml | io_util.ml |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* 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... | null | https://raw.githubusercontent.com/IBM/wcs-ocaml/b237b7057f44caa09d36e466be015e2bc3173dd5/examples/rulebot/src/io_util.ml | ocaml | input |
* This file is part of the Watson Conversation Service OCaml API project .
*
* Copyright 2016 - 2017 IBM Corporation
*
* 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... |
16ade4ee35884eb2a0ccdd25f6a96dad4eefed91ff2522c0742886e285db3a14 | bcc32/advent-of-code | b.ml | open! Core
module T = Tuple.Hashable (Int) (Int)
let visited = T.Hash_set.create ()
let rec dfs array i j =
if i >= 0
&& i < 128
&& j >= 0
&& j < 128
&& array.(i).(j)
&& not (Hash_set.mem visited (i, j))
then (
Hash_set.add visited (i, j);
dfs array i (j - 1);
dfs array i (j + 1);
dfs ar... | null | https://raw.githubusercontent.com/bcc32/advent-of-code/653c0f130e2fb2f599d4e76804e02af54c9bb19f/2017/14/b.ml | ocaml | open! Core
module T = Tuple.Hashable (Int) (Int)
let visited = T.Hash_set.create ()
let rec dfs array i j =
if i >= 0
&& i < 128
&& j >= 0
&& j < 128
&& array.(i).(j)
&& not (Hash_set.mem visited (i, j))
then (
Hash_set.add visited (i, j);
dfs array i (j - 1);
dfs array i (j + 1);
dfs ar... | |
1d871eddc5aad58282cc16c0e80be11b8e555c2bcce70c29cf33e8af49c54fa2 | brendanhay/gogol | Annotate.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-vision/gen/Gogol/Vision/Projects/Images/Annotate.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Run image detection and annotation for a batch of images.
/See:/ </ Cloud Vision API Reference> for @vision.projects.images.annotate@.
* Resource
** Constructing a Request
| A resource alias for @vision.projects.images.annota... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
6980a6d7b0979e40dbb8085e3f8af9c60a7762a3a27d3139dee49ca1ac7a940b | art-w/mcavl | bench.ml | let nb = try int_of_string Sys.argv.(1) with _ -> 100_000
let max_domains = try int_of_string Sys.argv.(2) with _ -> 8
module T = Domainslib.Task
module type SET = sig
type elt = int
type t
val empty : unit -> t
val copy : t -> t
val add : elt -> t -> unit
val remove : elt -> t -> bool
val cardin... | null | https://raw.githubusercontent.com/art-w/mcavl/37e13df8bc57a6f422adfdfe69e6d0aeef561fd6/tests/bench.ml | ocaml | let nb = try int_of_string Sys.argv.(1) with _ -> 100_000
let max_domains = try int_of_string Sys.argv.(2) with _ -> 8
module T = Domainslib.Task
module type SET = sig
type elt = int
type t
val empty : unit -> t
val copy : t -> t
val add : elt -> t -> unit
val remove : elt -> t -> bool
val cardin... | |
acff90b06bb2cdd0d6ec9ed93b6e9943c8c1fa0ab3c03b5121abe6efa772fc78 | egison/egison-scheme | recursion.scm | (load "./egison.scm")
(define fact
(lambda [n r]
(if (eq? n 0)
r
(fact (- n 1) (+ n r)))))
(define fact2
(lambda [n]
(if (eq? n 0)
1
(+ n (fact2 (- n 1))))))
(define fact3
(lambda [n r]
(match-first n Integer
[,0 1]
[_ (fact (- n 1) (+ n r))])))
( pr... | null | https://raw.githubusercontent.com/egison/egison-scheme/49188f4bcf91199a9e1d5142851a48ed2eb916e1/benchmark/recursion.scm | scheme | 2.57s
(print (fact2 100000000)) ; 17.85s
2.56s | (load "./egison.scm")
(define fact
(lambda [n r]
(if (eq? n 0)
r
(fact (- n 1) (+ n r)))))
(define fact2
(lambda [n]
(if (eq? n 0)
1
(+ n (fact2 (- n 1))))))
(define fact3
(lambda [n r]
(match-first n Integer
[,0 1]
[_ (fact (- n 1) (+ n r))])))
|
5e5ff48b41ede7592f69d9c3a68aa0b074f66b26bfc9ff4419d3b3191a5a6c22 | RefactoringTools/HaRe | VisiblePNs.hs | # LANGUAGE CPP #
module TypeUtils.VisiblePNs where
import Test.Hspec
-- import Test.QuickCheck
import TestUtils
import qualified Digraph as GHC
import qualified GHC as GHC
import qualified HscTypes as GHC
import Control . Exception
import Control . Monad . ... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/TypeUtils/VisiblePNs.hs | haskell | import Test.QuickCheck
---------------------------------------------------------------------
GHC.pm_parsed_source $ GHC.tm_parsed_module t
: : Maybe ( GHC.Located ( GHC.HsExpr GHC.RdrName ) )
((_, _, mod), toks) <- parsedFileBGhc
GHC.pm_parsed_source $ GHC.tm_parsed_module t
---------------------------... | # LANGUAGE CPP #
module TypeUtils.VisiblePNs where
import Test.Hspec
import TestUtils
import qualified Digraph as GHC
import qualified GHC as GHC
import qualified HscTypes as GHC
import Control . Exception
import Control . Monad . State
import Data . Maybe
import... |
db826c474312a034c049311b01d6731bc4611034750ae070b519e5d08253aeb4 | MLstate/opalang | jsIdent.ml |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/jslang/jsIdent.ml | ocaml | -- |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... |
8ff901c6826aef643f7850f455ec23bbb23e5dbb33bdd3fcffbd4d0931b1ceae | egraphdb/egraphdb | egraph_dfs_algo.erl | %%%-------------------------------------------------------------------
@author neerajsharma
( C ) 2018 ,
%%% @doc
%%%
%%% @end
%%%
%%% %CopyrightBegin%
%%%
Copyright < > 2017 .
All Rights Reserved .
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file ... | null | https://raw.githubusercontent.com/egraphdb/egraphdb/41a0131be227f7f0a35ba0e2c1cb23d70cd86b03/src/egraph_dfs_algo.erl | erlang | -------------------------------------------------------------------
@doc
@end
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDIT... | @author neerajsharma
( C ) 2018 ,
Copyright < > 2017 .
All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(egraph_dfs_algo).
-author("neerajsharma").
-export([dfs/3]).
-spec dfs(Trav... |
025231eb8cf030d5da497d7a1ba80b799bb63565482911105256a7854dd3ce32 | tnelson/Forge | desugar_test.rkt | #lang forge/core
(require "../desugar/desugar.rkt")
(require "forge_ex.rkt")
(require "test_helpers.rkt")
(require "../desugar/desugar_helpers.rkt")
(require "../lift-bounds/lift-bounds.rkt")
(require (prefix-in @ rackunit))
(require rackunit/text-ui)
(run udt
#:preds [isUndirectedTree]
#:scope [(Node 7)])
... | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/amalgam/tests/desugar_test.rkt | racket | no
lone
implies
JOIN | #lang forge/core
(require "../desugar/desugar.rkt")
(require "forge_ex.rkt")
(require "test_helpers.rkt")
(require "../desugar/desugar_helpers.rkt")
(require "../lift-bounds/lift-bounds.rkt")
(require (prefix-in @ rackunit))
(require rackunit/text-ui)
(run udt
#:preds [isUndirectedTree]
#:scope [(Node 7)])
... |
7d26342331131bd4083bc5211e46f343a67251b387a02a19258b84aa2b9cb2a0 | exercism/ocaml | atbash_cipher.mli | Encoding from English to atbash cipher . The default for block_size is 5
val encode : ?block_size:int -> string -> string
Decoding from atbash to English
val decode : string -> string
| null | https://raw.githubusercontent.com/exercism/ocaml/bfd6121f757817865a34db06c3188b5e0ccab518/exercises/practice/atbash-cipher/atbash_cipher.mli | ocaml | Encoding from English to atbash cipher . The default for block_size is 5
val encode : ?block_size:int -> string -> string
Decoding from atbash to English
val decode : string -> string
| |
9b7e638a6e545d031870ddf6ff0bc24717ca9389b0d3f1fe4c17c25bf4a01aa3 | arcticmatt/dino-brick | Dino.hs | # LANGUAGE TemplateHaskell , RankNTypes #
module Dino where
import qualified Data.Map as M
import Data.Ratio ((%))
import Control.Monad.Random
import Control.Monad (guard)
import Data.Maybe (fromMaybe)
import Lens.Micro.TH (makeLenses)
import Lens.Micro ((&), (.~), (%~), (^.))
import Linear.V2 (V2(..))
import System.... | null | https://raw.githubusercontent.com/arcticmatt/dino-brick/8c505f272ca74108868c4687772b79e6b6fee842/src/Dino.hs | haskell | Types
^ dinosaur
^ direction of left foot
^ sequence of barriers on screen
^ random barrier dimensions
^ random barrier positions
^ game's difficulty level
^ game's difficulty map
^ game over flag
^ paused flag
^ controls how often we update the score
^ score
^ highscore of current sesh
^ countdown for st... | # LANGUAGE TemplateHaskell , RankNTypes #
module Dino where
import qualified Data.Map as M
import Data.Ratio ((%))
import Control.Monad.Random
import Control.Monad (guard)
import Data.Maybe (fromMaybe)
import Lens.Micro.TH (makeLenses)
import Lens.Micro ((&), (.~), (%~), (^.))
import Linear.V2 (V2(..))
import System.... |
5e449cf5446cb00d2fdb5264bc671366411098fcaccca58ef48443247a77a322 | eslick/cl-registry | package.lisp | (in-package :cl-user)
(defpackage #:registry
(:use :cl :weblocks :stdutils :elephant :cl-ppcre :langutils :f-underscore)
#+ccl (:import-from :ccl #:quit)
(:shadow :with-html)
(:shadowing-import-from :weblocks #:open-store #:close-store)
(:shadowing-import-from :ps #:@ #:new)
(:shadowing-import-from :cl-wh... | null | https://raw.githubusercontent.com/eslick/cl-registry/d4015c400dc6abf0eeaf908ed9056aac956eee82/package.lisp | lisp | #:start-logging #:stop-logging) | (in-package :cl-user)
(defpackage #:registry
(:use :cl :weblocks :stdutils :elephant :cl-ppcre :langutils :f-underscore)
#+ccl (:import-from :ccl #:quit)
(:shadow :with-html)
(:shadowing-import-from :weblocks #:open-store #:close-store)
(:shadowing-import-from :ps #:@ #:new)
(:shadowing-import-from :cl-wh... |
95bb6cb051880d4a2959d58f5aebf322cfcefcc4937a44773589fb4af471fc3f | spurious/sagittarius-scheme-mirror | https.scm | ;; -*- scheme -*-
#!read-macro=sagittarius/regex
(import (rnrs)
(rfc http)
(rfc mime)
(rfc :5322)
(sagittarius)
(sagittarius io)
(sagittarius regex)
(sagittarius control)
(sagittarius socket)
(match)
(shorten)
(clos user)
(util port)
(srfi :18 multithreading)
(srfi :19 time)
(srfi :26 cut)
(srfi :64 tes... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/rfc/https.scm | scheme | -*- scheme -*-
the same as HTTP test but using HTTPS
it's invokded. Thus if the port is created with the
flag close? then the socket and port would be closed
during reading/writing data. This causes unexpected
test failure. To avoid such a situation, we need to
create socket port without socket closing so that
... | #!read-macro=sagittarius/regex
(import (rnrs)
(rfc http)
(rfc mime)
(rfc :5322)
(sagittarius)
(sagittarius io)
(sagittarius regex)
(sagittarius control)
(sagittarius socket)
(match)
(shorten)
(clos user)
(util port)
(srfi :18 multithreading)
(srfi :19 time)
(srfi :26 cut)
(srfi :64 testing)
(only (bina... |
eb4a3b930b46cdfa7c3cc4216fbe9fd96b327ae589073ac42d636e488c84f9ae | LexiFi/menhir | gSet.ml | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/gSet.ml | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
554b8107c7dcaea77da63f5fa3e7f5a69a6bcc6d294a922b49f01a68f883624f | dongcarl/guix | java.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2019 , 2020 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of t... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/guix/build/maven/java.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2019 , 2020 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix build maven java)
#:use-module (ice-9 peg)
#:use-module (ice-9 textual-ports)
#:... |
be95ece05344d6ad00c96509ae500a712a60e0fa3da56d3e1cdc9a2eb5426f65 | pgourlain/vscode_erlang | lsp_utils.erl | -module(lsp_utils).
-export([client_range/3,
file_uri_to_file/1, file_uri_to_vscode_uri/1, file_to_file_uri/1,
glob_to_regexp/1,
is_path_excluded/2,
search_exclude_globs_to_regexps/1,
to_string/1,
is_erlang_lib_file/1]).
client_range(Line, StartChar, EndChar) ->
... | null | https://raw.githubusercontent.com/pgourlain/vscode_erlang/34a40fb743984c7d4b5a5307e90e02d251dc9809/apps/erlangbridge/src/lsp_utils.erl | erlang | -------------------------------------------------------------------
@doc Replace file globs to regular expressions in search exclude filters
@end
-------------------------------------------------------------------
-------------------------------------------------------------------
@doc Translate a Unix-style file... | -module(lsp_utils).
-export([client_range/3,
file_uri_to_file/1, file_uri_to_vscode_uri/1, file_to_file_uri/1,
glob_to_regexp/1,
is_path_excluded/2,
search_exclude_globs_to_regexps/1,
to_string/1,
is_erlang_lib_file/1]).
client_range(Line, StartChar, EndChar) ->
... |
f9c6128f0eff9dc32d6dc5114999a313dcf3750a09da441b6306cd4bbfcf11a4 | albertoruiz/easyVision | Stat.hs | -----------------------------------------------------------------------------
|
Module : Util . Stat
Copyright : ( c ) 2006 - 10
License : GPL
Maintainer : ( aruiz at um dot es )
Stability : provisional
Deprecated data analysis tools .
Module : Util.Stat
Copyrig... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/base/src/Util/Stat.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
^ homogeneous transformation which includes centering
| Creates a 'Stat' structure from a matrix. Of course, due to laziness, only the fields required by the particul... | |
Module : Util . Stat
Copyright : ( c ) 2006 - 10
License : GPL
Maintainer : ( aruiz at um dot es )
Stability : provisional
Deprecated data analysis tools .
Module : Util.Stat
Copyright : (c) Alberto Ruiz 2006-10
License : GPL
Maintainer : Alberto Ru... |
ed465b9e6c62b1d65ee15353133c8df01c2d651555a856e1d0424464b24b62ee | mtt-lang/mtt-lang | PrettyPrinter.ml | open Base
open PPrint
open Ast
module type DOC = sig
val of_type : Type.t -> PPrint.document
val of_expr : Expr.t -> PPrint.document
val of_val : Val.t -> PPrint.document
end
(** Convert ASTs to [doc] *)
module Doc : DOC = struct
* concat two documents with an unbreakable space
let ( ^^^ ) left right = left ^... | null | https://raw.githubusercontent.com/mtt-lang/mtt-lang/5cdb563aada085bb2b807f4b785261e23dd68232/core/PrettyPrinter.ml | ocaml | * Convert ASTs to [doc]
keywords
* Pretty-print expressions with free vars substituited with
their corresponding values from a regular environment
This prints an expression as-is, i.e. no substitutions for free vars
when print out closures, substitute the free vars in its body with
the corresp... | open Base
open PPrint
open Ast
module type DOC = sig
val of_type : Type.t -> PPrint.document
val of_expr : Expr.t -> PPrint.document
val of_val : Val.t -> PPrint.document
end
module Doc : DOC = struct
* concat two documents with an unbreakable space
let ( ^^^ ) left right = left ^^ space ^^ right
let cross... |
576b6573b0b2352501ba68035572e9310da9c38452e7f817f0cce84154f7c20e | cac-t-u-s/om-sharp | math.lisp | ;============================================================================
; om#: visual programming language for computer-assisted music composition
;============================================================================
;
; This program is free software. For information on usage
; and redistribution, see... | null | https://raw.githubusercontent.com/cac-t-u-s/om-sharp/74aa97891177de1d167aa5963be00f0d453a3bcd/src/packages/score/math/math.lisp | lisp | ============================================================================
om#: visual programming language for computer-assisted music composition
============================================================================
This program is free software. For information on usage
and redistribution, see the "... | File author :
(in-package :om)
(load (merge-pathnames "cercle/n-cercle" *load-pathname*))
(load (merge-pathnames "cercle/n-cercle-editor" *load-pathname*))
(omNG-make-package
"Math"
:container-pack *om-package-tree*
:doc "Mathematical tools / Set theory / ..."
:classes '(n-cercle)
:functions '(chord2c c2ch... |
1cfed4c6422a942e48942ed6d986d44eb61b6d50c0ec7805259964c22c64c41b | aeolus-project/zephyrus | engine_helper.mli | (****************************************************************************)
(* *)
This file is part of Zephyrus .
(* *)
Z... | null | https://raw.githubusercontent.com/aeolus-project/zephyrus/0b52de4038bbab724e6a9628430165a7f09f77ae/src/engine/engine_helper.mli | ocaml | **************************************************************************
(at your option) any later version.
... | This file is part of Zephyrus .
Zephyrus 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
Zephyru... |
333355b1e3dbbe677f4fe8aa91a44f065ceb8929cf8000364434ab59696a09e2 | GlideAngle/flare-timing | Zone.hs | module Zone
( QLL, MkZone
, point, vector, cylinder, line, conical, semicircle
, dotZones, areaZones, describedZones
, showQ
) where
import Data.UnitsOfMeasure (u, zero, toRational')
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.Units.DegMinSec (fromQ)
import Flight.LatLng (Lat(... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/earth/test-suite/zone/Zone.hs | haskell | module Zone
( QLL, MkZone
, point, vector, cylinder, line, conical, semicircle
, dotZones, areaZones, describedZones
, showQ
) where
import Data.UnitsOfMeasure (u, zero, toRational')
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.Units.DegMinSec (fromQ)
import Flight.LatLng (Lat(... | |
7b071dbaf03ecd82a772726bb5062e8fd69f80e2603f22b2440dfd1cae58cc9e | pqwy/notty | notty_grapheme_cluster.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/pqwy/notty/67c602e3b32fdd6f4356c8e6b7537ff811ac14bf/src/no-uucp/notty_grapheme_cluster.mli | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | |
b83573df8bcdc28f444458c80827b9077828f443f92e8e876ade9361674b5e09 | hannesm/domain-name | domain_name.ml | ( c ) 2017 , all rights reserved
type 'a s = string array
let root = Array.make 0 ""
let [@inline always] is_letter = function
| 'a'..'z' | 'A'..'Z' -> true
| _ -> false
let [@inline always] is_ldh = function
| '0'..'9' | 'a'..'z' | 'A'..'Z' | '-' -> true
| _ -> false
from OCaml 4.13 bytes.ml
let for... | null | https://raw.githubusercontent.com/hannesm/domain-name/e9833486ee40ef2c49c43dd72976022a627b4a34/domain_name.ml | ocaml | leading may not be '-'
only LDH (letters, digits, hyphen)!
we support both example.com. and example.com | ( c ) 2017 , all rights reserved
type 'a s = string array
let root = Array.make 0 ""
let [@inline always] is_letter = function
| 'a'..'z' | 'A'..'Z' -> true
| _ -> false
let [@inline always] is_ldh = function
| '0'..'9' | 'a'..'z' | 'A'..'Z' | '-' -> true
| _ -> false
from OCaml 4.13 bytes.ml
let for... |
b23d23f1fe9990beeb8b6cca70ac5b89fa29f279e1f88accebf70568323fe35a | reborg/fluorine | system.clj | (ns ^:skip-aot net.reborg.fluorine.system
(:gen-class)
(:require [net.reborg.fluorine]
[net.reborg.fluorine.bootstrap]
[clojure.tools.nrepl.server :as nrepl]
[net.reborg.fluorine.config :as c]
[net.reborg.fluorine.bus :as bus]
[net.reborg.fluorine.watcher ... | null | https://raw.githubusercontent.com/reborg/fluorine/58d533646adce8537ca5c57692a0a998f06e1d25/src/net/reborg/fluorine/system.clj | clojure | (ns ^:skip-aot net.reborg.fluorine.system
(:gen-class)
(:require [net.reborg.fluorine]
[net.reborg.fluorine.bootstrap]
[clojure.tools.nrepl.server :as nrepl]
[net.reborg.fluorine.config :as c]
[net.reborg.fluorine.bus :as bus]
[net.reborg.fluorine.watcher ... | |
cec1767341970b86248f128d68dd1e7e676c1130fc10bdd684d55eef4ea65a81 | txyyss/Project-Euler | Euler079.hs | -- A common security method used for online banking is to ask the user
for three random characters from a passcode . For example , if the
passcode was 531278 , they may ask for the 2nd , 3rd , and 5th
characters ; the expected reply would be : 317 .
The text file , keylog.txt , contains fifty successful login
... | null | https://raw.githubusercontent.com/txyyss/Project-Euler/d2f41dad429013868445c1c9c1c270b951550ee9/Euler079.hs | haskell | A common security method used for online banking is to ask the user
attempts.
analyse the file so as to determine the shortest possible secret
passcode of unknown length. | for three random characters from a passcode . For example , if the
passcode was 531278 , they may ask for the 2nd , 3rd , and 5th
characters ; the expected reply would be : 317 .
The text file , keylog.txt , contains fifty successful login
Given that the three characters are always asked for in order ,
mod... |
92878f6e25e1a200d8bfb77fadb2bd47e009433d517de8628c09ce5bd5222c60 | 2600hz/kazoo | kazoo_yodb_maintenance.erl | %%%-----------------------------------------------------------------------------
( C ) 2011 - 2020 , 2600Hz
%%% @doc
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% @end
%%%--------... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_yodb/src/kazoo_yodb_maintenance.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
------------------------------------------------------------------------------
@doc
@end
------------------------------------------------------------... | ( C ) 2011 - 2020 , 2600Hz
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kazoo_yodb_maintenance).
-export([delete_yodbs/1
,delete_yodbs/2
]).
-export([archive_yod... |
814c6dcb8201fe1e07418aa5936bebd3d56631ed9600c3af421d032b96595dde | ssm-lang/sslang | Type.hs | {-# LANGUAGE OverloadedStrings #-}
module IR.Constraint.Type where
import qualified Common.Identifiers as Ident
import Control.Monad.Trans ( liftIO )
import qualified Data.Map.Strict as Map
import qualified IR.Constraint.Canonical as Can
import qualified IR.Constrai... | null | https://raw.githubusercontent.com/ssm-lang/sslang/d23597773d471fb222890e31a984d54289b45d28/src/IR/Constraint/Type.hs | haskell | # LANGUAGE OverloadedStrings #
| CONSTRAINTS
| TYPE PRIMITIVES
| DESCRIPTORS
for instantiation
| RANKS
No rank means that the variable is generic
| MARKS
| BUILT-IN TYPES
| MAKE FLEX VARIABLES
| TO CANONICAL TYPE
| TO ERROR TYPE |
module IR.Constraint.Type where
import qualified Common.Identifiers as Ident
import Control.Monad.Trans ( liftIO )
import qualified Data.Map.Strict as Map
import qualified IR.Constraint.Canonical as Can
import qualified IR.Constraint.Error as ET
import ... |
829212ff7fe0e644c193a6dcb838946acb69cb1b218b31444e65b77cbef179c3 | antifuchs/autobench | arrays.lisp | ;; benchmarks speed of array and sequence operations
;;
Author : < >
Time - stamp : < 2009 - 04 - 17 11:32:49 asf >
;;
;;
;; Timing tests for creation, initialization, access and garbage
;; collection for arrays, vectors, bitvectors and strings.
;;
NOTE : be careful running these in CMUCL on Linux with sizes l... | null | https://raw.githubusercontent.com/antifuchs/autobench/acc14ee2a8899cb630aa8dd02f3ffd7f5858ce28/cl-bench/files/arrays.lisp | lisp | benchmarks speed of array and sequence operations
Timing tests for creation, initialization, access and garbage
collection for arrays, vectors, bitvectors and strings.
than your RAM; you will most likely crash your machine.
certain implementations such as OpenMCL have an array (and thus
sizes | Author : < >
Time - stamp : < 2009 - 04 - 17 11:32:49 asf >
NOTE : be careful running these in CMUCL on Linux with sizes larger
(in-package :cl-bench.arrays)
(defmacro def-array-benchmark-fun ((name (size-var size-default))
(&rest bindings)
... |
6ae770d44f4d4729eeff4eb4e5461b3b877f77f61e2981956d63975941f919ce | camoy/trace-contract | trace-contract-macro.rkt | #lang racket/base
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; provide
(provide (for-syntax trace-clause-macro
trace-clause-macro?
trace-clause-literals
trace-clause-expand)
trace/c
accumulate
... | null | https://raw.githubusercontent.com/camoy/trace-contract/06f2778c1ab63a773c029783152a070f3ab4feba/private/trace-contract-macro.rkt | racket |
provide
require
`decls` syntax class
`inners` syntax class
`clauses` syntax class
expander
compiler
Natural → (Procedure → Boolean)
`trace/c` interface macro
tests | #lang racket/base
(provide (for-syntax trace-clause-macro
trace-clause-macro?
trace-clause-literals
trace-clause-expand)
trace/c
accumulate
combine)
(require (for-syntax ee-lib
racket/base
... |
fa0299b5ca9b18ac92f607dc7ae29615200c347b2a1d5c287197aed5e60e7eeb | DegenCoden/wt | SelectFile.hs | {-# LANGUAGE OverloadedStrings #-}
module Wt.UI.SelectFile where
import Brick
import Data.Text hiding (last)
import Graphics.Vty
import Wt.UI.Select
import Prelude hiding (unwords)
data Action a
= Watch a
| Exit
attrs :: [(AttrName, Attr)]
attrs = []
drawElement :: FilePath -> [Widget ()]
drawElement fp = [pad... | null | https://raw.githubusercontent.com/DegenCoden/wt/d8785a85878bd3048fd6f53082a4333f3828b99b/src/Wt/UI/SelectFile.hs | haskell | # LANGUAGE OverloadedStrings # |
module Wt.UI.SelectFile where
import Brick
import Data.Text hiding (last)
import Graphics.Vty
import Wt.UI.Select
import Prelude hiding (unwords)
data Action a
= Watch a
| Exit
attrs :: [(AttrName, Attr)]
attrs = []
drawElement :: FilePath -> [Widget ()]
drawElement fp = [padRight Max $ txtWrap $ last (splitOn... |
9e2cf63193cdcaea445945725ccf192821652d6ee5fdfbadffba76a8ceb49869 | valderman/haste-compiler | TailrecClosures.hs | -- | Tests mutually recursive closures inside a tail recursive function
module Tests.TailrecClosures where
import Data.Set (Set)
import qualified Data.Set as S
runTest :: IO [String]
runTest = return $ S.toList $ S.map S.toList $ cartProd xs ys
xs = S.fromList "abc"
ys = S.fromList "def"
cartProd xs ys = S.fold oute... | null | https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/Tests/TailrecClosures.hs | haskell | | Tests mutually recursive closures inside a tail recursive function | module Tests.TailrecClosures where
import Data.Set (Set)
import qualified Data.Set as S
runTest :: IO [String]
runTest = return $ S.toList $ S.map S.toList $ cartProd xs ys
xs = S.fromList "abc"
ys = S.fromList "def"
cartProd xs ys = S.fold outerFold S.empty xs
where outerFold x zss = S.fold (innerFold x) S.empty ... |
bc33a98de8a067e22f5c6990b8dbab0a31a3dd9940eceb41340bad90726b579e | theodormoroianu/SecondYearCourses | LambdaChurch_20210415164259.hs | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415164259.hs | haskell | alpha-equivalence
subst u x t defines [u/x]t, i.e., substituting u for x in t
This substitution avoids variable captures so it is safe to be used when
reducing terms with free variables (e.g., if evaluating inside lambda abstractions)
^ substitution term
^ variable to be substitutes
^ term in which the substit... | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... |
afdd6cba8fb970c3b5d70d9a4e4f15d20773eb9af5355213c3f06f1524a8ad39 | cedlemo/OCaml-GI-ctypes-bindings-generator | Recent_manager_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Recent_manager_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Recent_manager_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Recent_manager_private"
| |
7e1dd2ffd57e6fb1f5ca12c9c67ee1021d95fd8a5bbfeff603961074d2f7fde4 | asakeron/cljs-webgl | framebuffer_object.cljs | (ns cljs-webgl.constants.framebuffer-object)
(def framebuffer 0x8D40)
(def renderbuffer 0x8D41)
(def rgba4 0x8056)
(def rgb5-a1 0x8057)
(def rgb565 ... | null | https://raw.githubusercontent.com/asakeron/cljs-webgl/f4554fbee6fbc6133a4eb0416548dabd284e735c/src/cljs/cljs_webgl/constants/framebuffer_object.cljs | clojure | (ns cljs-webgl.constants.framebuffer-object)
(def framebuffer 0x8D40)
(def renderbuffer 0x8D41)
(def rgba4 0x8056)
(def rgb5-a1 0x8057)
(def rgb565 ... | |
9d1876bd6db824431e340fb73b6d55a41298b104c699795eef311b8cc4a2a0fd | alpaca-lang/alpaca | alpaca_SUITE.erl | -module(alpaca_SUITE).
%%-compile(export_all).
-export([
all/0,
proper_compile/1,
g_function/0,
g_function_name/0,
g_function_body/0,
g_basic_value/0,
g_boolean/0,
g_number/0,
g_float/0,
g_atom/0,
g_string/0,
g... | null | https://raw.githubusercontent.com/alpaca-lang/alpaca/aa2bb5594dda8292ca0bffb8e8a6ebc0f60e8dbc/test/alpaca_SUITE.erl | erlang | -compile(export_all).
Module generators
@doc Generate module declaration.
@doc Generate a module name.
Module names are turned into atoms. The module name is internally prefixed
@end
Type generators
unique constructors
unique type name
name is not a keyword
Function generators
Value generators
Basic values
... | -module(alpaca_SUITE).
-export([
all/0,
proper_compile/1,
g_function/0,
g_function_name/0,
g_function_body/0,
g_basic_value/0,
g_boolean/0,
g_number/0,
g_float/0,
g_atom/0,
g_string/0,
g_char_list/0,
g... |
b4d2393ef7a60fbe1d41cfa21f0b8a1aa38ce7bcf48866a0be7afd6961e41716 | CmdrDats/clj-minecraft | repl.clj | (ns cljminecraft.repl
(:require [cljminecraft.bukkit :as bk]
[cljminecraft.events :as ev]
[cljminecraft.entity :as ent]
[cljminecraft.player :as plr]
[cljminecraft.util :as util]
[cljminecraft.logging :as log]
[cljminecraft.config :as cfg]
... | null | https://raw.githubusercontent.com/CmdrDats/clj-minecraft/d69a1453e6b3cbb2c08b6a2ba554520a0265c43d/src/cljminecraft/repl.clj | clojure | that you can play around a build stuff
Handy reference to plugin | (ns cljminecraft.repl
(:require [cljminecraft.bukkit :as bk]
[cljminecraft.events :as ev]
[cljminecraft.entity :as ent]
[cljminecraft.player :as plr]
[cljminecraft.util :as util]
[cljminecraft.logging :as log]
[cljminecraft.config :as cfg]
... |
fb1bdb1ab059216cb5765dc1ec6bad277e46e812fb4edaa7a2ccecb7fb53d481 | ghc/ghc | Terminal.hs | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
module GHC.SysTools.Terminal (stderrSupportsAnsiColors) where
import GHC.Prelude
#if !defined(mingw32_HOST_OS)
import System.Environment (lookupEnv)
import System.IO (hIsTerminalDevice, stderr)
#else
import GHC.IO (catchException)
import GHC.Utils.Exception (try)
impo... | null | https://raw.githubusercontent.com/ghc/ghc/3c0f0c6d99486502c72e6514a40e7264baaa6afc/compiler/GHC/SysTools/Terminal.hs | haskell | | Does the controlling terminal support ANSI color sequences?
| Check if ANSI escape sequences can be used to control color in stderr. | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
module GHC.SysTools.Terminal (stderrSupportsAnsiColors) where
import GHC.Prelude
#if !defined(mingw32_HOST_OS)
import System.Environment (lookupEnv)
import System.IO (hIsTerminalDevice, stderr)
#else
import GHC.IO (catchException)
import GHC.Utils.Exception (try)
impo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.