_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
7073c74271a1da75f5632f0f9e45c234aef733cd87d22ce84995745590cceef2
mchakravarty/language-c-inline
PosixC.hs
# LANGUAGE TemplateHaskell , QuasiQuotes # module Test.PosixC ( cPlusOne , cStringCompare , cGetString , cPassString , cSin , cSinF , cInvertSin , cInvertSinF -- The module initialisation function. , posixCInit ) where import Control.Applicative import Language.C.Quote.C ...
null
https://raw.githubusercontent.com/mchakravarty/language-c-inline/034128f80abc917040f42a10ce982775ae5e7387/Test/PosixC.hs
haskell
The module initialisation function.
# LANGUAGE TemplateHaskell , QuasiQuotes # module Test.PosixC ( cPlusOne , cStringCompare , cGetString , cPassString , cSin , cSinF , cInvertSin , cInvertSinF , posixCInit ) where import Control.Applicative import Language.C.Quote.C import Language.C.Inline.C import Language...
9daecdeeec736dba6996fb0504412925e67a5422b7bbab2bb2e6d8323b114e2c
mbutterick/typesetting
main.rkt
#lang racket/base (require "bitfield-test.rkt" "bytes-test.rkt" "dict-test.rkt" "enum-test.rkt" "list-test.rkt" "number-test.rkt" "optional-test.rkt" "pointer-test.rkt" "reserved-test.rkt" "stream-test.rkt" "string-test.rkt" ...
null
https://raw.githubusercontent.com/mbutterick/typesetting/6f7a8bbc422a64d3a54cbbbd78801a01410f5c92/xenomorph/xenomorph/test/main.rkt
racket
#lang racket/base (require "bitfield-test.rkt" "bytes-test.rkt" "dict-test.rkt" "enum-test.rkt" "list-test.rkt" "number-test.rkt" "optional-test.rkt" "pointer-test.rkt" "reserved-test.rkt" "stream-test.rkt" "string-test.rkt" ...
3ae1d246fa804212777e290eda7064e8d875d7ad7c90cf3182786e395cfb8b03
willghatch/racket-rash
infix-math.rkt
#lang rash ;; This is to demonstrate a quick-and-easy way to get infix math in your shell... ;; But a *better* way is to do this stuff with the k-infix package instead of ;; my simplistic `basic-infix-math` macro. (provide infix-math pipeline-or-math =infix-math= =unix-or-math= ) (require (rename-in "basic-inf...
null
https://raw.githubusercontent.com/willghatch/racket-rash/c40c5adfedf632bc1fdbad3e0e2763b134ee3ff5/rash-demos/rash/demo/infix-math.rkt
racket
This is to demonstrate a quick-and-easy way to get infix math in your shell... But a *better* way is to do this stuff with the k-infix package instead of my simplistic `basic-infix-math` macro.
#lang rash (provide infix-math pipeline-or-math =infix-math= =unix-or-math= ) (require (rename-in "basic-infix-math.rkt" [infix-math basic-infix-math]) racket/stxparam (for-syntax racket/base syntax/parse )) (define-line-macro infix-math (syntax-parser [(_ arg ...) #'(basic-infix-math arg ...)])) (...
013229c8e78a71add6953b0720b93a11a038dfcf16dcdf8799fb2c39235efe74
slagyr/gaeshi
layout.hiccup.clj
(doctype :html5) [:html [:head [:meta {:http-equiv "Content-Type" :content "text/html" :charset "iso-8859-1"}] [:title "!-APP_NAME-!"] (include-css "/stylesheets/!-DIR_NAME-!.css") (include-js "/javascript/!-DIR_NAME-!.js")] [:body (eval (:template-body joodo.views/*view-context*)) ]]
null
https://raw.githubusercontent.com/slagyr/gaeshi/a5677ed1c8d9269d412f07a7ab33bbc40aa7011a/lein-gaeshi/resources/gaeshi/kuzushi/templates/src/app/view/layout.hiccup.clj
clojure
(doctype :html5) [:html [:head [:meta {:http-equiv "Content-Type" :content "text/html" :charset "iso-8859-1"}] [:title "!-APP_NAME-!"] (include-css "/stylesheets/!-DIR_NAME-!.css") (include-js "/javascript/!-DIR_NAME-!.js")] [:body (eval (:template-body joodo.views/*view-context*)) ]]
f597a8175257028d983d0bcdc94e34fd9eec274c7cf97120c9915cb581afe164
hyperfiddle/electric
dataflow6.clj
(ns dustin.dataflow6) ; trying to understand physical types that the compiler produces ; biz effect (defn submissions! [x] :! a -> Flow b (m/via m/cpu (d/q ...))) := (Flow [{:db/id 1 :name x}]) ; submissions :: a -> m b ; x :: m a ; x >>= submissions! ; wrong type (defn submissions! [x] :! a -> Flow b (m/sig...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2021/dataflow/dataflow6.clj
clojure
trying to understand physical types that the compiler produces biz effect submissions :: a -> m b x :: m a x >>= submissions! wrong type submissions! :: m a -> m b x :: m a submissions! (extend x) (extend x) :: m (m a) incr-call submissions (extend x) :: m b incr-call :: m (m a) -> m (m a -> m b) -> m b in...
(ns dustin.dataflow6) (defn submissions! [x] :! a -> Flow b (m/via m/cpu (d/q ...))) := (Flow [{:db/id 1 :name x}]) (defn submissions! [x] :! a -> Flow b (m/signal! (m/cp ... [{:db/id 1 :name x}]))) := (Flow [{:db/id 1 :name x}]) -then-else
5b423054ad4d643629ec2781a8770099860dce4e9c6c8277cc3ff7cfe71a647f
gregr/ina
assoc.scm
((provide test assoc:empty assoc-ref assoc-set assoc-set/remove assoc-filter assoc-remove assoc-remove* assoc-keep* assoc-simplify)) (define assoc:empty '()) (define (assoc-ref d k default) (define rib (assoc k d)) (if rib (cdr rib) default)) (define (assoc-set d k v) (cons (cons k v) d)) (defin...
null
https://raw.githubusercontent.com/gregr/ina/5e0a5b7ec44c8c9575b22ce5c394f7a96b766545/nscheme/old/old-5/lib/assoc.scm
scheme
((provide test assoc:empty assoc-ref assoc-set assoc-set/remove assoc-filter assoc-remove assoc-remove* assoc-keep* assoc-simplify)) (define assoc:empty '()) (define (assoc-ref d k default) (define rib (assoc k d)) (if rib (cdr rib) default)) (define (assoc-set d k v) (cons (cons k v) d)) (defin...
150a206201cae20df87ea9d341a135cc0da252929a4a527bf10eaac4f229a880
m2ym/clache
api.lisp
(in-package :cl-cache-test) (defun test-storage-via-api (storage) (format t "Running ~A test suite~%" (type-of storage)) (let ((*default-storage* storage)) ;; Basic tests (clrcache) (is (multiple-value-list (getcache "none")) '(nil nil) "Getting non-existed cache should return nil, ni...
null
https://raw.githubusercontent.com/m2ym/clache/0e70a06f2b14f0075828a8f0cce19e273aac7992/tests/api.lisp
lisp
Basic tests Expiration tests TODO CLOS tests Cleanup
(in-package :cl-cache-test) (defun test-storage-via-api (storage) (format t "Running ~A test suite~%" (type-of storage)) (let ((*default-storage* storage)) (clrcache) (is (multiple-value-list (getcache "none")) '(nil nil) "Getting non-existed cache should return nil, nil") (is (setca...
527af41fb5a7db5fc0fb885eb5f2ca2afb8506166717e4739c1794b405558227
5outh/textlunky
Entity.hs
module Types.Entity( Entity(..), randMinesEntity, randMinesBottomEntity, randMinesTopEntity, randJewel', randItem', randMinesGroundItem', randMinesBlock', randMinesEnemy', randMinesTopEnemy', randMinesBottomEnemy', canPickUp ) where import Data.List(intercalate) import Data.Universe import Data...
null
https://raw.githubusercontent.com/5outh/textlunky/8dd4d975ed86b761262e3026dd4c22a36b532104/src/Types/Entity.hs
haskell
| Only spawn things that can show up on the ground
module Types.Entity( Entity(..), randMinesEntity, randMinesBottomEntity, randMinesTopEntity, randJewel', randItem', randMinesGroundItem', randMinesBlock', randMinesEnemy', randMinesTopEnemy', randMinesBottomEnemy', canPickUp ) where import Data.List(intercalate) import Data.Universe import Data...
d33062d37b4f557c08b5e0e08fbf56a21d7bffa0656806b53741ba6ad6964b51
nextjournal/freerange
context.clj
(ns re-frame.context (:refer-clojure :exclude [bound-fn]) (:require [cljs.env] [cljs.analyzer])) (defmacro defc "For definining Reagent components that honor the contextual frame. Like defn but sets a :context-type metadata on the function, which Reagent will pick up on, so that the correct React...
null
https://raw.githubusercontent.com/nextjournal/freerange/c43e848758d1e7cf259ed8ac06a0a9089317a6a6/src/re_frame/context.clj
clojure
is not picking this up though.
(ns re-frame.context (:refer-clojure :exclude [bound-fn]) (:require [cljs.env] [cljs.analyzer])) (defmacro defc "For definining Reagent components that honor the contextual frame. Like defn but sets a :context-type metadata on the function, which Reagent will pick up on, so that the correct React...
ba6b477e85ee593d50405d8938736f18ab537203430095d68bdf25800291fe69
janestreet/bonsai
data.mli
open! Core open! Gen_js_api (** This API does not yet support errorBars, customBars, or fractions. Feel free to add. *) type t val t_to_js : t -> Ojs.t (** [create] is the right constructor when your x-values are floats. *) val create : float array array -> t (** [create_option] is for when your x-value...
null
https://raw.githubusercontent.com/janestreet/bonsai/c202b961f41e20e0b735c4e33c2bbac57a590941/bindings/dygraph/src/data.mli
ocaml
* This API does not yet support errorBars, customBars, or fractions. Feel free to add. * [create] is the right constructor when your x-values are floats. * [create_option] is for when your x-values are floats, and your y-values are optional. * [create_date] is for when your x-values are dates. Remem...
open! Core open! Gen_js_api type t val t_to_js : t -> Ojs.t val create : float array array -> t val create_option : (float * float option array) array -> t val create_date : (Date.t * float array) array -> zone:Timezone.t -> t val create_time_ns : (Time_ns.t * float array) array -> t val...
1d0c731499d917e31968824379badc68a4e0530a140a90f999c7d83108cd9e67
clojure/core.typed
tvar_env.clj
Copyright ( c ) , contributors . ;; 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/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/tvar_env.clj
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 ) , contributors . (ns ^:skip-wiki ^{:core.typed {:collect-only true}} clojure.core.typed.checker.tvar-env (:require [clojure.core.typed.contract-utils :as con] [clojure.core.typed.checker.type-rep :as r] [clojure.core.typed :as t]) (:import (clojure.core.typed....
4c19e3d352b03fcbaea39d71b62fadb4dd82177a656431f1a1d86243ab2974b4
andreasabel/helf
OperatorPrecedenceParser.hs
| operator precedence parser , translated from SML to Haskell . module OperatorPrecedenceParser where import Control.Applicative import Control.Monad.Except Adaption of operator precedence parser for Twelf . Original code in SML . Original code in SML. -} -- | Associativity of infix operators. data ...
null
https://raw.githubusercontent.com/andreasabel/helf/52bc10751f5dac7338adcb085553ba8157692420/src/OperatorPrecedenceParser.hs
haskell
| Associativity of infix operators. | Types and binding strength of operators. | Nofix | Items of the parse stack are either atoms or operators. | Expression language @a@ is assumed to have a juxtaposition operator. ^ application operation. | Juxtaposition. | Stack invariants, refinements of operator list. @ ...
| operator precedence parser , translated from SML to Haskell . module OperatorPrecedenceParser where import Control.Applicative import Control.Monad.Except Adaption of operator precedence parser for Twelf . Original code in SML . Original code in SML. -} data Associativity = AssocLeft | AssocRi...
0c2e9bb4e4ba674f2f23cd8df55821404cc14693501f91bdbe9cc92fe51ef0bc
robert-stuttaford/bridge
api.clj
(ns bridge.web.api (:require [bridge.web.api.base :as api.base] [clojure.spec.alpha :as s])) TODO use ` transit ` in production (defn check-spec-error [payload] (let [spec (api.base/api-spec payload)] (when (and (some? spec) (not (s/valid? spec payload))) {:status 400 :body (s/exp...
null
https://raw.githubusercontent.com/robert-stuttaford/bridge/867d81354457c600cc5c25917de267a8e267c853/src/bridge/web/api.clj
clojure
Routes
(ns bridge.web.api (:require [bridge.web.api.base :as api.base] [clojure.spec.alpha :as s])) TODO use ` transit ` in production (defn check-spec-error [payload] (let [spec (api.base/api-spec payload)] (when (and (some? spec) (not (s/valid? spec payload))) {:status 400 :body (s/exp...
c69ef012319a0cfeb5a6db8cea3e856d264b97bbf2eb114b9df79a0ce41fd243
nasa/PRECiSA
SMT.hs
-- Notices: -- Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved . -- Disclaimers No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTO...
null
https://raw.githubusercontent.com/nasa/PRECiSA/91e1e7543c5888ad5fb123d3462f71d085b99741/PRECiSA/src/SMT/SMT.hs
haskell
Notices: Disclaimers let fileName = combine filePath "config.txt"
Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved . No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , INCLUDING , BUT NOT LIMIT...
7d183024b2957c06122b3befa77fdbb0e589fab3e06bf3f0fadec328de6834b6
vernemq/vernemq
vmq_cluster_com_SUITE.erl
-module(vmq_cluster_com_SUITE). -compile(export_all). -compile(nowarn_export_all). -include_lib("common_test/include/ct.hrl"). %% =================================================================== %% common_test callbacks %% =================================================================== init_per_suite(Config) -...
null
https://raw.githubusercontent.com/vernemq/vernemq/c144d0a69d156c4079d96222aca2f7ad81f0d721/apps/vmq_server/test/vmq_cluster_com_SUITE.erl
erlang
=================================================================== common_test callbacks =================================================================== this might help, might not... Actual Tests send test message recv this message check that message isn't lost close this socket send test message, will...
-module(vmq_cluster_com_SUITE). -compile(export_all). -compile(nowarn_export_all). -include_lib("common_test/include/ct.hrl"). init_per_suite(Config) -> S = vmq_test_utils:get_suite_rand_seed(), os:cmd(os:find_executable("epmd")++" -daemon"), {ok, Hostname} = inet:gethostname(), case net_kernel:start(...
1292d7c7128ea273d4ee42821c7a001e903d0ab804138ec9282b765c18939dad
evilbinary/scheme-lib
json.scm
( json ) --- Guile JSON implementation . Copyright ( C ) 2013 Flaque < > ;; ;; This file is part of guile-json. ;; ;; guile-json 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 versio...
null
https://raw.githubusercontent.com/evilbinary/scheme-lib/6df491c1f616929caa4e6569fa44e04df7a356a7/packages/json/json.scm
scheme
This file is part of guile-json. guile-json is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either guile-json is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS...
( json ) --- Guile JSON implementation . Copyright ( C ) 2013 Flaque < > version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA JSON modu...
b6704055eff483644194796f7efc12f1bf3015b4f94d95f2b985e37289c4b9f6
open-company/open-company-web
org_settings_modal.cljs
(ns oc.web.components.org-settings-modal (:require [rum.core :as rum] [goog.dom :as gdom] [oops.core :refer (oget)] [cuerdas.core :as string] [oc.web.utils.color :as color-utils] [oc.lib.color :as lib-color] [oc.web.utils.rum :as rutils] ...
null
https://raw.githubusercontent.com/open-company/open-company-web/d79936bc2bee77960ae49245bc60046147b85a83/src/main/oc/web/components/org_settings_modal.cljs
clojure
Locals Auto-expand the content visibility settings (aka advanced settings) only if the org tweaked them from default values: {:disallow-public-board false :disallow-public-share false :disallow-secure-links false} (-> current-brand-color :primary :hex) Prompts copy
(ns oc.web.components.org-settings-modal (:require [rum.core :as rum] [goog.dom :as gdom] [oops.core :refer (oget)] [cuerdas.core :as string] [oc.web.utils.color :as color-utils] [oc.lib.color :as lib-color] [oc.web.utils.rum :as rutils] ...
072d59f9ae8c81e13161ac6f207766cbbeedc41e26cd3b0d11de031afeafed01
realworldocaml/examples
binary_larger.ml
class square w = object(self) method width = w method area = Float.of_int (self#width * self#width) method larger other = self#area > other#area end
null
https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/classes/binary_larger.ml
ocaml
class square w = object(self) method width = w method area = Float.of_int (self#width * self#width) method larger other = self#area > other#area end
93a5b5a1402036e9d2ecec328efb4ece0a20e4ad1e3fc59ae9f94d4a70ae9356
nanopass/nanopass-framework-racket
synforms.rkt
#lang racket Copyright ( c ) 2000 - 2013 , , , ;;; See the accompanying file Copyright for details ;;; AWK - TODO - Once the meta-parser can handle language passes that match ;;; a single variable. FIXME - For Ikarus , I needed to use " dots " instead of the " .. " beca...
null
https://raw.githubusercontent.com/nanopass/nanopass-framework-racket/deac3a4bf937e1217ec54c5439710712b227fc5a/tests/synforms.rkt
racket
See the accompanying file Copyright for details AWK - TODO - Once the meta-parser can handle language passes that match a single variable. exported as an auxiliary keyword. (time-stamp generated by emacs: Type M-x time-stamp anywhere to update) syncase is a pattern matcher where patter...
#lang racket Copyright ( c ) 2000 - 2013 , , , FIXME - For Ikarus , I needed to use " dots " instead of the " .. " because Ikarus sees .. as a syntax error , even when it is Time - stamp : < 2000 - 01 - 10 12:29:38 > [ ` ( let ( [ , var , rhs ] .. ) , body0 , body1 .. ) `...
22ba7cd7dd330e0f9c993bfefb590d364d9ff436eb89721a3075ba7e4c729c24
cram2/cram
cholesky.lisp
Cholesky Decomposition , We d May 3 2006 - 16:38 Time - stamp : < 2011 - 05 - 26 12:37:33EDT cholesky.lisp > ;; Copyright 2006 , 2007 , 2008 , 2009 , 2011 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or modify it under ...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/linear-algebra/cholesky.lisp
lisp
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publi...
Cholesky Decomposition , We d May 3 2006 - 16:38 Time - stamp : < 2011 - 05 - 26 12:37:33EDT cholesky.lisp > Copyright 2006 , 2007 , 2008 , 2009 , 2011 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as published by the Free Softwar...
2f288cc902f708a8f594184fb27147807d78fdd59133050945d93dcbc723d515
orbitz/ocaml-pastry
routing_table.mli
type 'a t val create : me:Key.t -> b:int -> 'a t val add : node:'a Node.t -> 'a t -> 'a t val remove : k:Key.t -> 'a t -> 'a t val lookup : k:Key.t -> 'a t -> 'a Node.t option val nodes : 'a t -> 'a Node.t list
null
https://raw.githubusercontent.com/orbitz/ocaml-pastry/9a31bf0328ae44b4130d729845119b5bf0413b36/lib/pastry/routing_table.mli
ocaml
type 'a t val create : me:Key.t -> b:int -> 'a t val add : node:'a Node.t -> 'a t -> 'a t val remove : k:Key.t -> 'a t -> 'a t val lookup : k:Key.t -> 'a t -> 'a Node.t option val nodes : 'a t -> 'a Node.t list
b7d8af764f86d68e8635bb6f0b1d9a0a12eea34a3eca214941c944a2aa7de299
airalab/hs-web3
Net.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} -- | -- Module : Network.Ethereum.Api.Net Copyright : 2016 - 2021 -- License : Apache-2.0 -- -- Maintainer : -- Stability : experimental -- Portability : unknown -- Ethereum node JSON - RPC API methods with ` net _ ` prefix...
null
https://raw.githubusercontent.com/airalab/hs-web3/c03b86eb621f963886a78c39ee18bcec753f17ac/packages/ethereum/src/Network/Ethereum/Api/Net.hs
haskell
# LANGUAGE OverloadedStrings # | Module : Network.Ethereum.Api.Net License : Apache-2.0 Maintainer : Stability : experimental Portability : unknown | Returns the current network id. | Returns true if client is actively listening for network connections. | Returns number of peers currently ...
# LANGUAGE FlexibleContexts # Copyright : 2016 - 2021 Ethereum node JSON - RPC API methods with ` net _ ` prefix . module Network.Ethereum.Api.Net where import Data.Text (Text) import Network.Ethereum.Api.Types (Quantity) import Network.JsonRpc.TinyClient (...
c6e6e363a62f32c8de270295c8b0841590527e94a3c1b290c667c79986e9f922
yziquel/OCaml-R
main.ml
module Stub = struct (* Information about the content of R standard library: * -manual/R-patched/doc/html/packages.html *) Information about the R base package : * -manual/R-patched/library/base/html/00Index.html * -manual/R-patched/library/base/html/00Index.html *) let sample = R.symbol ...
null
https://raw.githubusercontent.com/yziquel/OCaml-R/4690dd0ede4858d7048f573d75519e4643a40532/src/r-base/main.ml
ocaml
Information about the content of R standard library: * -manual/R-patched/doc/html/packages.html It would be nice to solve once and for all the typing of R.t values by using the 'private' keyword to access the underlying R.sexp value by subtyping, and by using polymorphic variants for the parame...
module Stub = struct Information about the R base package : * -manual/R-patched/library/base/html/00Index.html * -manual/R-patched/library/base/html/00Index.html *) let sample = R.symbol "sample" let lapply = R.symbol "lapply" let tilde = R.symbol "~" let t = R.symbol "t" let cbind = R...
cb7e98903e86fc839996b90c43c2720564171d34e8c419a9ad131643c2d4c362
borkdude/advent-of-cljc
mfikes.cljc
(ns aoc.y2018.d16.mfikes (:refer-clojure :exclude [read-string format defmacro]) (:require [aoc.utils :as u :refer [deftest read-string format map-vals fixed-point]] [aoc.y2018.d16.data :refer [input answer-1 answer-2]] [chivorcam.core :refer [defmacro]] [clojure.string :as string] [clojure.set :as s...
null
https://raw.githubusercontent.com/borkdude/advent-of-cljc/17c8abb876b95ab01eee418f1da2e402e845c596/src/aoc/y2018/d16/mfikes.cljc
clojure
(ns aoc.y2018.d16.mfikes (:refer-clojure :exclude [read-string format defmacro]) (:require [aoc.utils :as u :refer [deftest read-string format map-vals fixed-point]] [aoc.y2018.d16.data :refer [input answer-1 answer-2]] [chivorcam.core :refer [defmacro]] [clojure.string :as string] [clojure.set :as s...
dc594d03c0aa7be986d172b7883e9f8ed20daa52a8e33fd02a41bd95d80d2390
mattmundell/nightshade
do-files.lisp
;;; Tests of file iteration functions in package lisp. ;;; ;;; These include lisp:map-files, lisp:do-files, lisp:list-files, ;;; lisp:map-dirs, lisp:do-dirs and list:list-dirs. ;;; ;;; FIX Test list-* with more restrictive predicates. ;;; FIX /.a/b/c when all () similar for hidden... (in-package "LISP") (import '(d...
null
https://raw.githubusercontent.com/mattmundell/nightshade/68e960eff95e007462f2613beabc6cac11e0dfa1/src/tests/code/filesys.lisp/do-files.lisp
lisp
Tests of file iteration functions in package lisp. These include lisp:map-files, lisp:do-files, lisp:list-files, lisp:map-dirs, lisp:do-dirs and list:list-dirs. FIX Test list-* with more restrictive predicates. FIX /.a/b/c when all () similar for hidden... FIX this should :check-for-links t FIX this should :c...
(in-package "LISP") (import '(deftest:deftest deftest:with-test-dir deftest:with-test-search-list)) (defmacro def-map-files-test (number type files pathname expect-files &optional args dirp) "Define a test of `map-files' or `map-dirs'. $number unique number for test, appended to name $ty...
fa1a9207e9a2906503f103e7a039f4668ff86d58f19e0edc07fa57d1624a0c05
PhDP/Akarui
Term.hs
| Parsers for first - order logic and other important structures ( e.g. -- logic networks). module Akarui.Parser.Term ( parseFunForm, parseTerm ) where import Data.Char (isLower) import qualified Data.Text as T import Text.Parsec import Text.Parsec.String (Parser) import Akarui.Parser.Core import Akarui.FOL.Ter...
null
https://raw.githubusercontent.com/PhDP/Akarui/4ad888d011f7115677e8f9ba18887865f5150746/Akarui/Parser/Term.hs
haskell
logic networks). | Parse basic terms.
| Parsers for first - order logic and other important structures ( e.g. module Akarui.Parser.Term ( parseFunForm, parseTerm ) where import Data.Char (isLower) import qualified Data.Text as T import Text.Parsec import Text.Parsec.String (Parser) import Akarui.Parser.Core import Akarui.FOL.Term | Parse functio...
9e40ef402f19e07d4787002d97385a3b2bff235feeadee9c260437ba89271616
5outh/chaosbox
Angle.hs
-- | Angles module ChaosBox.Geometry.Angle ( Angle(..) , fromRadians , fromDegrees , unit , addRadians , addDegrees , rotateP2 , rotateP2Around ) where import ChaosBox.Geometry.P2 import Data.Fixed (mod') import Linear.V2 newtype Angle = Angle { getAngle :: Do...
null
https://raw.githubusercontent.com/5outh/chaosbox/991ca3db48d8828287567302ba3293314b9127bd/src/ChaosBox/Geometry/Angle.hs
haskell
| Angles | The unit vector in the direction of 'Angle' | Add radians to an 'Angle' | Add radians to an 'Angle' | Rotate a 'P2' about the origin (@(0,0)@) | Rotate a 'P2' around a specified point ^ Point to rotate around ^ Rotation angle ^ Point to rotate
module ChaosBox.Geometry.Angle ( Angle(..) , fromRadians , fromDegrees , unit , addRadians , addDegrees , rotateP2 , rotateP2Around ) where import ChaosBox.Geometry.P2 import Data.Fixed (mod') import Linear.V2 newtype Angle = Angle { getAngle :: Double } der...
fa62abf3cdccf4c594ec2d9f36a4ef2ae546f05a0389a1dfdb2d887e3df03b17
GlideAngle/flare-timing
Weighting.hs
module Flight.Gap.Weighting ( Weights(..) , Lw(..) , Aw(..) , Rw(..) , Ew(..) , DistanceRatio(..) , distanceRatio , distanceWeight , reachWeight , effortWeight , leadingWeight , arrivalWeight , timeWeight ) where import Data.Ratio ((%)) import GHC.Generics (Gener...
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/gap-weight/library/Flight/Gap/Weighting.hs
haskell
| Best distance versus task distance. | Leading weight varies between disciplines and in paragliding its calculation inputs change depending on whether any pilots make goal or not. | Arrival weight is only for hang gliding. | Reach weight varies between disciplines. | Effort weight is only for hang gliding.
module Flight.Gap.Weighting ( Weights(..) , Lw(..) , Aw(..) , Rw(..) , Ew(..) , DistanceRatio(..) , distanceRatio , distanceWeight , reachWeight , effortWeight , leadingWeight , arrivalWeight , timeWeight ) where import Data.Ratio ((%)) import GHC.Generics (Gener...
d0225181fac06b1ca0f76543ad1933e2e467bf819b597c5f8ffee2c347452128
obfusk/koneko
doctests.hs
import System.Environment (getArgs) import Test.DocTest (doctest) main :: IO () main = do args <- getArgs; doctest $ ["-isrc", "src/"] ++ args
null
https://raw.githubusercontent.com/obfusk/koneko/ec86a1c09632943c8d0e6c2873be8e18a348f623/test/doctests.hs
haskell
import System.Environment (getArgs) import Test.DocTest (doctest) main :: IO () main = do args <- getArgs; doctest $ ["-isrc", "src/"] ++ args
129f8d0c440b7c6f690a3a397ccdc73ec1c285ee3a65c9ebecf617af03349a80
schmidt73/guidescan-web
annotations.clj
(ns guidescan-web.genomics.annotations "Defines a component that efficiently finds all overlapping gene annotations for a given genomic interval." (:import htsjdk.tribble.index.interval.IntervalTree htsjdk.tribble.index.interval.Interval) (:require [com.stuartsierra.component :as component] ...
null
https://raw.githubusercontent.com/schmidt73/guidescan-web/5f50a7d1abc5cdeec52a99ebcc6a933efb231de5/src/guidescan_web/genomics/annotations.clj
clojure
I need a macro that allows me to combine let and conditionals in a more flexible way.
(ns guidescan-web.genomics.annotations "Defines a component that efficiently finds all overlapping gene annotations for a given genomic interval." (:import htsjdk.tribble.index.interval.IntervalTree htsjdk.tribble.index.interval.Interval) (:require [com.stuartsierra.component :as component] ...
04ae4f987b6b2f2b794fe27a2105aa933b349003348239c786f7a76d4e09a769
bkirwi/ethereum-haskell
RLPSpec.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric # module Ethereum.RLPSpec(spec, One(..), Other(..), Union(..)) where import Control.Applicative import Data.Aeson as A import qualified Data.ByteString as BS import qualified Data.Text as T import Data.Text.Encoding(encodeUtf8) import GHC.Generics import Eth...
null
https://raw.githubusercontent.com/bkirwi/ethereum-haskell/ee995281bad4eed488c174bd8982ed174cfe26af/test/Ethereum/RLPSpec.hs
haskell
# LANGUAGE OverloadedStrings # [ [], [[]], [ [], [[]] ] ]
# LANGUAGE DeriveGeneric # module Ethereum.RLPSpec(spec, One(..), Other(..), Union(..)) where import Control.Applicative import Data.Aeson as A import qualified Data.ByteString as BS import qualified Data.Text as T import Data.Text.Encoding(encodeUtf8) import GHC.Generics import Ethereum.Prelude import qualified Ethe...
57209ed5d355699545c3b0d585351f966fd66c3720bb5e8c78f3d60821b4513b
samcf/ogres
render.cljs
(ns ogres.app.render (:require [clojure.string :refer [join trim]] [ogres.app.env :as env] [ogres.app.provider.storage :refer [initialize]] [uix.core.alpha :as uix])) (defn css [& class-names] (->> (reduce (fn [names value] (cond (string? val...
null
https://raw.githubusercontent.com/samcf/ogres/c6441f6556403b3c4ed4300f38718173c18e8838/src/main/ogres/app/render.cljs
clojure
(ns ogres.app.render (:require [clojure.string :refer [join trim]] [ogres.app.env :as env] [ogres.app.provider.storage :refer [initialize]] [uix.core.alpha :as uix])) (defn css [& class-names] (->> (reduce (fn [names value] (cond (string? val...
f69ad517902e5e6d6644ff5f978e975ad75c70194ecacf5c31d90fdb062cd44e
BranchTaken/Hemlock
test_of_real_to_real.ml
open! Basis.Rudiments open! Basis open Zint let test () = let rec test_rs rs = begin match rs with | [] -> () | r :: rs' -> begin let x = of_real r in File.Fmt.stdout |> Fmt.fmt "of_real " |> Real.fmt ~alt:true ~radix:Radix.Hex r |> Fmt.fmt " -> " |> fmt ~a...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/zint/test_of_real_to_real.ml
ocaml
open! Basis.Rudiments open! Basis open Zint let test () = let rec test_rs rs = begin match rs with | [] -> () | r :: rs' -> begin let x = of_real r in File.Fmt.stdout |> Fmt.fmt "of_real " |> Real.fmt ~alt:true ~radix:Radix.Hex r |> Fmt.fmt " -> " |> fmt ~a...
ad23b9739130a9ae6cbc6d2ee584ebb37cecce193901e7e1caae9c7bfa7bbc5d
ghc/packages-dph
Perm.hs
-- | Generation of arbitrary permutations. module DPH.Arbitrary.Perm (Perm (..)) where import Test.QuickCheck import qualified Data.Vector as V import Data.Vector (Vector) import Data.List -- | Permutation of [0..n-1] with all values appearing exactly once. data Perm = Perm (Vector I...
null
https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-test/framework/DPH/Arbitrary/Perm.hs
haskell
| Generation of arbitrary permutations. | Permutation of [0..n-1] with all values appearing exactly once. generate a random permutation of the given list choose random element of the list and place it at head
module DPH.Arbitrary.Perm (Perm (..)) where import Test.QuickCheck import qualified Data.Vector as V import Data.Vector (Vector) import Data.List data Perm = Perm (Vector Int) deriving (Eq, Show) instance Arbitrary Perm where arbitrary = sized $ \n -> (Perm . V.fromLi...
bdd685277f1a6735c49421babd55649323caffca4614bc2943c3489ba6003370
pashatsyganenko/main
09122020.ml
type 'a tree = Leaf | Node of ('a tree) * ('a tree) * 'a ;; (* Дерово отрезков *) let rec sum t = match t with | Node (t1,t2,(k,x)) -> sum t1 + sum t2 + x | Leaf -> 0 ;; let rec tree_line t = match t with | Node (t1,t2,(k,x)) -> Node (tree_line t1, tree_line t2, (k,x,sum t1 + sum t2 + x)) | Leaf -> L...
null
https://raw.githubusercontent.com/pashatsyganenko/main/de86975f0bb6f87efa394e80d66a4f938de9b530/09122020.ml
ocaml
Дерово отрезков
type 'a tree = Leaf | Node of ('a tree) * ('a tree) * 'a ;; let rec sum t = match t with | Node (t1,t2,(k,x)) -> sum t1 + sum t2 + x | Leaf -> 0 ;; let rec tree_line t = match t with | Node (t1,t2,(k,x)) -> Node (tree_line t1, tree_line t2, (k,x,sum t1 + sum t2 + x)) | Leaf -> Leaf ;;
d28b4327e01c9ba3ca4c0f3a5f969eea4516512c7ee98af3f7f3c4b11a0d4a08
white-silence88/cse
configs.lisp
;; configs.lisp (in-package #:cse) ;; by-folder/get-fullpath ;; ;; ;; Description: ;; procedure for get fullpath to file by folderpath and filename ;; Params: ;; folder [String] fullpath to project folder ;; filename [String] name of files ;; Returns: ;; fullpath to file (defun by-folder/get-fullpath ...
null
https://raw.githubusercontent.com/white-silence88/cse/9d938129a86f701fbe618a545b45c8f16f27b879/src/utils/configs.lisp
lisp
configs.lisp by-folder/get-fullpath Description: procedure for get fullpath to file by folderpath and filename Params: folder [String] fullpath to project folder filename [String] name of files Returns: fullpath to file get-filename-by-type Description: procedure for get default file...
(in-package #:cse) (defun by-folder/get-fullpath (folder filename) (cond ((not filename) nil) (t (concatenate 'string folder filename)))) (defun get-filename-by-type (type) (cond ((string= type *default-redirection-field*) *default-redirection-config-name*) ((string= type *default-informational-fie...
68d515c93da2097332fabd3c8d1a13bbce30b21cea41d87d275ab1b6ffae1952
well-typed/optics
Misc.hs
# LANGUAGE TemplateHaskell # {-# OPTIONS_GHC -fplugin=Test.Inspection.Plugin -dsuppress-all #-} module Optics.Tests.Misc (miscTests) where import Test.Tasty import Test.Tasty.HUnit import Test.Inspection import qualified Data.Map as M import qualified Data.Sequence as S import Optics import Optics.Tests.Utils miscTe...
null
https://raw.githubusercontent.com/well-typed/optics/7cc3f9c334cdf69feaf10f58b11d3dbe2f98812c/optics/tests/Optics/Tests/Misc.hs
haskell
# OPTIONS_GHC -fplugin=Test.Inspection.Plugin -dsuppress-all #
# LANGUAGE TemplateHaskell # module Optics.Tests.Misc (miscTests) where import Test.Tasty import Test.Tasty.HUnit import Test.Inspection import qualified Data.Map as M import qualified Data.Sequence as S import Optics import Optics.Tests.Utils miscTests :: TestTree miscTests = testGroup "Miscellaneous" [ testCase ...
238e4c37cf9b0792bd0c27549ad59dcba1e2716113e8958d09a296e8f6c25198
gfngfn/otfed
encodeBasic.ml
module Error = EncodeError type 'a ok = ('a, Error.t) result type table = { tag : Value.Tag.t; contents : string; }
null
https://raw.githubusercontent.com/gfngfn/otfed/aa2624d29f2fea934c65308816fb6788f3bd818a/src/encodeBasic.ml
ocaml
module Error = EncodeError type 'a ok = ('a, Error.t) result type table = { tag : Value.Tag.t; contents : string; }
b8449ce50f9c311684b696900010d5348f5960f760311cb7a31a36693aa8ce93
chaoxu/fancy-walks
98.hs
{-# OPTIONS_GHC -O2 #-} import Data.Function import Data.List import Data.Bits import Data.Int import Data.Maybe import Data.Char isSq :: Int64 -> Bool isSq n = sqrtn * sqrtn == n where func x = (x + n `div` x) `shiftR` 1 sqrtn = go 1 (func 1) go x y | x == y || x + 1 == y = x go x y = go y (func ...
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/projecteuler.net/98.hs
haskell
# OPTIONS_GHC -O2 #
import Data.Function import Data.List import Data.Bits import Data.Int import Data.Maybe import Data.Char isSq :: Int64 -> Bool isSq n = sqrtn * sqrtn == n where func x = (x + n `div` x) `shiftR` 1 sqrtn = go 1 (func 1) go x y | x == y || x + 1 == y = x go x y = go y (func y) solvePair :: (S...
f1a9fbcf482f6ecb3644a64ba29c201a9e5df2ac2b4da3206e707350251806a5
guildhall/guile-sly
rect.scm
Copyright ( C ) 2013 , 2014 > ;;; ;;; 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 ...
null
https://raw.githubusercontent.com/guildhall/guile-sly/92f5f21da76986c5b606b36afc4bb984cc63da5b/sly/math/rect.scm
scheme
This program is free software: you can redistribute it and/or 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 PARTICULAR PURPOSE. See the GNU General P...
Copyright ( C ) 2013 , 2014 > modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the You should have received a copy of the GNU General Public License (define-module (sly math rect) #:use-module (ice-9 match) #:use-module (...
cd920b0a34c6b9f556fd54dbcd7746ec82c71c48caa387cd004ea36ec77d02a2
clojure/core.typed.runtime.jvm
rules.clj
Copyright ( c ) , contributors . ;; 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/core.typed.runtime.jvm/10cf4b7ca8c3bef1b3fc6ea94940f501d52654a3/src/main/clojure/clojure/core/typed/rules.clj
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 ) , contributors . (ns clojure.core.typed.rules (:require [clojure.core.typed :as t] [clojure.core.typed.internal :as internal] [clojure.core.typed.analyzer :as ana2])) (t/defalias TCType t/Any) (t/defalias MsgFnOpts (t/HMap)) (t/defalias AST (t/Map t/Any t/Any)) (...
b4e6d34c56743a1cc3a6fa40315d616748ca96d94078c77f45e88a90f76a042b
argp/bap
piqi_compile.ml
pp camlp4o -I ` ocamlfind query piqi.syntax ` pa_labelscope.cmo pa_openin.cmo Copyright 2009 , 2010 , 2011 , 2012 , 2013 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 ...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/libtracewrap/libtrace/piqi/piqi/piqi-tools/piqi_compile.ml
ocaml
command-line arguments overrid the original setter but keep the option name and the description; * we do this, because although it means the same, it is applied at a later * stage -- we control it manually below don't resolve defaults -- they should be resolved already get necessary piqtypes from the self-...
pp camlp4o -I ` ocamlfind query piqi.syntax ` pa_labelscope.cmo pa_openin.cmo Copyright 2009 , 2010 , 2011 , 2012 , 2013 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 ...
793b027eca725129fac0641242d8605a3a788ab1c5390dbfcc19e9d19ad6a781
monadbobo/ocaml-core
atomic_edit.ml
open Core.Std type return_type = | Ok | Changed of string * string | Abort type file_state = { path : string; stat : Unix.stats; } let record_state filepath = { path = filepath; stat = Unix.stat filepath; } (* the peer is an unlocked shadow copy of the master which will then atomically re...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib/atomic_edit.ml
ocaml
the peer is an unlocked shadow copy of the master which will then atomically replace the master if the user function completes ok and the master has not changed since the peer was created
open Core.Std type return_type = | Ok | Changed of string * string | Abort type file_state = { path : string; stat : Unix.stats; } let record_state filepath = { path = filepath; stat = Unix.stat filepath; } let peer_name master_state = Filename.temp_file ~perm:master_state.stat.Unix.s...
3407f5f24d34d3113bf969532a585c1dcd44db50f801f49edbadf20e060a6c0d
ucsd-progsys/liquidhaskell
ProfilingDriver.hs
| This program calls ghc using the provided command line arguments . -- Use it to profile the liquidhaskell plugin. -- Build liquid - platform first with profiling enabled . -- -- > cabal build --enable-profiling liquid-platform -- -- Then build this program. -- > cabal exec --enable - profiling -- ghc -prof scri...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/71f43cec74468bb2f1759e01418c87c5626a7b1f/scripts/ProfilingDriver.hs
haskell
Use it to profile the liquidhaskell plugin. > cabal build --enable-profiling liquid-platform Then build this program. enable - profiling -- ghc -prof scripts / ProfilingDriver.hs Then run the liquidhaskell executable pointing it to this driver with the LIQUID_GHC_PATH env var. > LIQUID_GHC_PATH=scripts/Prof...
| This program calls ghc using the provided command line arguments . Build liquid - platform first with profiling enabled . module Main where import GHC as G import GHC.Driver.Session as G import Control.Monad import Control.Monad.IO.Class import System.Environment import GHC.Paths (libdir) import GHC.Utils.Logge...
947ac37d26075022b180c962f53ceef63605b8e1953567cafebb4c6500ebecfa
gafiatulin/codewars
FreqSeq.hs
-- Frequency sequence -- module Kata (freqSeq) where import Data.Char (intToDigit) import Data.List (foldl', intersperse) import qualified Data.Map.Strict as Map freqSeq :: String -> Char -> String freqSeq str = (`intersperse` (f str)) where f s = let m = foldl' (\acc c -> Map.insertWith (+) c 1 acc) Map.empty ...
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/FreqSeq.hs
haskell
Frequency sequence
module Kata (freqSeq) where import Data.Char (intToDigit) import Data.List (foldl', intersperse) import qualified Data.Map.Strict as Map freqSeq :: String -> Char -> String freqSeq str = (`intersperse` (f str)) where f s = let m = foldl' (\acc c -> Map.insertWith (+) c 1 acc) Map.empty s in map (\c -> intToDigit...
da4fef7da62c37d20fd015ea9389ad096710d5b47cf6d32be255b0c63e7d30a9
den1k/vimsical
queries.cljc
(ns vimsical.remotes.backend.vcs.queries (:require [clojure.spec.alpha :as s] [vimsical.remotes.event :as event] [vimsical.vims :as vims])) (defmethod event/event-spec ::delta-by-branch-uid [_] (s/cat :id any? :vims-uid ::vims/uid))
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/common/vimsical/remotes/backend/vcs/queries.cljc
clojure
(ns vimsical.remotes.backend.vcs.queries (:require [clojure.spec.alpha :as s] [vimsical.remotes.event :as event] [vimsical.vims :as vims])) (defmethod event/event-spec ::delta-by-branch-uid [_] (s/cat :id any? :vims-uid ::vims/uid))
db68400a6f1b8d0501a95f5d04507e3656c7da16b868c2bd8190ea7d9dedef97
circuithub/haskell-gerber
ApertureDefinition.hs
module Gerber.ApertureDefinition where data ApertureDefinition = Circle !CircleModifiers | Rectangle !RectangleModifiers | Obround !RectangleModifiers | Polygon !PolygonModifiers deriving ( Eq, Ord, Show ) data CircleModifiers = CircleModifiers { diameter :: !Float , circleHoleDiameter :: !( Maybe Flo...
null
https://raw.githubusercontent.com/circuithub/haskell-gerber/06745de36de6110df72d57bd33c09277a4e7b445/gerber/lib/Gerber/ApertureDefinition.hs
haskell
module Gerber.ApertureDefinition where data ApertureDefinition = Circle !CircleModifiers | Rectangle !RectangleModifiers | Obround !RectangleModifiers | Polygon !PolygonModifiers deriving ( Eq, Ord, Show ) data CircleModifiers = CircleModifiers { diameter :: !Float , circleHoleDiameter :: !( Maybe Flo...
f6339e69cc379aa4fb63837dc2d716815b0bc72ca6cb77ce5472f92e7b0398ef
distrap/lambdadrive
Utils.hs
# LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # # LANGUAGE DataKinds # # LANGUAGE ScopedTypeVariables # module LDrive.Utils where import Data.Char (ord) import Ivory.Language import Ivory.Stdlib import Ivory.Tower import Ivory.Tower.HAL.Bus.Interface import Ivory.BSP.STM32.Peripheral.GPIOF4 isChar :: Uint8 ->...
null
https://raw.githubusercontent.com/distrap/lambdadrive/2bbf6b173fbc1c6d1f809ee4f95ec0bf737d7064/src/LDrive/Utils.hs
haskell
blink on `pin` on every `chan` input
# LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # # LANGUAGE DataKinds # # LANGUAGE ScopedTypeVariables # module LDrive.Utils where import Data.Char (ord) import Ivory.Language import Ivory.Stdlib import Ivory.Tower import Ivory.Tower.HAL.Bus.Interface import Ivory.BSP.STM32.Peripheral.GPIOF4 isChar :: Uint8 ->...
9ab73d888fd9565cf1647d343b6e291ea2c781ac3d0054f14ab83f09e747f575
igorhvr/bedlam
irregex#.scm
(##namespace ("irregex#" irregex string->irregex sre->irregex string->sre maybe-string->sre irregex? irregex-match-data? irregex-new-matches irregex-reset-matches! irregex-search irregex-search/matches irregex-match irregex-search/chun...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/irregex/irregex-0.9.8/irregex#.scm
scheme
(##namespace ("irregex#" irregex string->irregex sre->irregex string->sre maybe-string->sre irregex? irregex-match-data? irregex-new-matches irregex-reset-matches! irregex-search irregex-search/matches irregex-match irregex-search/chun...
f39178156955f6ee93f4a2e7e2b063909632fbba9125d46c7a642d86ba7ad047
themoritz/diener
Diener.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE InstanceSigs # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} # LANGUAGE StandaloneDeriving ...
null
https://raw.githubusercontent.com/themoritz/diener/31f7de2a2d8a8dedcd117a8f69a2f0a993a64ee2/src/Diener.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE InstanceSigs # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies ...
c223cab9f475c35ac0b23edf4c93a0093432e717eadb55fa5511998e26877788
marigold-dev/pollinate
networking.mli
open Types open Common * Sends a message via datagram from the given [ Types.node ] to a specified peer within the [ Message.t ] . Construct a message with one of the [ create _ * ] functions to then feed to this function . to a specified peer within the [Message.t]. Construct a message with one of the [create_*] ...
null
https://raw.githubusercontent.com/marigold-dev/pollinate/cd3ccaecc89d687962c144c6542cb5780fa2caa1/lib/node/networking.mli
ocaml
* Waits for the next incoming message and returns it. * Advances a node's disseminator by disseminating the messages in the queue and pruning outdated messages from the queue.
open Types open Common * Sends a message via datagram from the given [ Types.node ] to a specified peer within the [ Message.t ] . Construct a message with one of the [ create _ * ] functions to then feed to this function . to a specified peer within the [Message.t]. Construct a message with one of the [create_*] ...
73045e7d0a19722e6249a1c0b90effc7f2c66c7297699d4d01867631153e4c56
mfp/ocaml-stomp
mq.ml
Copyright ( c ) 2009 > (** Message queue (MQ): message and error type definitions, module types. *) (** Type of received messages. *) type received_msg = { msg_id : string; msg_destination : string; msg_headers : (string * string) list; msg_body : string } (** {3 Errors } *) (** Suggested error recover...
null
https://raw.githubusercontent.com/mfp/ocaml-stomp/5dd4319af7212a0a82b1db8e373642d9d7891580/mq.ml
ocaml
* Message queue (MQ): message and error type definitions, module types. * Type of received messages. * {3 Errors } * Suggested error recovery strategy. Type of connection error. * Base MQ module. * Acknowledge the reception of a message. * Acknowledge the reception of a message using its message-id. * Higher-l...
Copyright ( c ) 2009 > type received_msg = { msg_id : string; msg_destination : string; msg_headers : (string * string) list; msg_body : string } type restartable = Retry | Reconnect | Abort type connection_error = Access_refused | Connection_refused | Closed type message_queue_error = Connection...
cb51c73f380e9fdc0080001a4a653300ca88d038772eff116e042dfc008e725c
gcv/appengine-magic
datastore.clj
(ns appengine-magic.services.datastore (:use appengine-magic.utils) (:import [com.google.appengine.api.datastore DatastoreService DatastoreServiceFactory DatastoreServiceConfig DatastoreServiceConfig$Builder EntityNotFoundException ReadPolicy ReadPolicy$Consistency ImplicitTransa...
null
https://raw.githubusercontent.com/gcv/appengine-magic/facc9fe4945b3becd772d6b053844e572dcc1c73/src/appengine_magic/services/datastore.clj
clojure
types ---------------------------------------------------------------------------- forward declarations ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- helper variables and constants ------------------------...
(ns appengine-magic.services.datastore (:use appengine-magic.utils) (:import [com.google.appengine.api.datastore DatastoreService DatastoreServiceFactory DatastoreServiceConfig DatastoreServiceConfig$Builder EntityNotFoundException ReadPolicy ReadPolicy$Consistency ImplicitTransa...
4cb9197b6b931bf1cf0a6222d51b4f403fc35c1893bc42f47ff41b9b952ba276
robrix/isometry
Time.hs
module Isometry.Time ( Time(..) , Instant(..) , Duration(..) , Epoch(..) , now , since , timed , sinceEpoch ) where import Control.Carrier.Time.System as System import Control.Effect.Reader import Control.Effect.State import Data.Fixed import Data.Time.Clock.System newtype Epoch = Epoch { getEpoch :: System.Instant }...
null
https://raw.githubusercontent.com/robrix/isometry/28543f998bbd8b1c3eea33db82fd5701c718b906/src/Isometry/Time.hs
haskell
module Isometry.Time ( Time(..) , Instant(..) , Duration(..) , Epoch(..) , now , since , timed , sinceEpoch ) where import Control.Carrier.Time.System as System import Control.Effect.Reader import Control.Effect.State import Data.Fixed import Data.Time.Clock.System newtype Epoch = Epoch { getEpoch :: System.Instant }...
16cded313656c6ed56b1975ca5d62e338c21dacb9bedf30bf1d9a0556b418059
mirage/ocaml-git
git_unix.ml
* Copyright ( c ) 2013 - 2017 < > * * 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 " AND...
null
https://raw.githubusercontent.com/mirage/ocaml-git/37c9ef41944b5b19117c34eee83ca672bb63f482/src/git-unix/git_unix.ml
ocaml
ignore [.git/objects] [.git/objects/pack] [.git] XXX(dinosaure): see [elements]. TODO(dinosaure): [stat] directories.
* Copyright ( c ) 2013 - 2017 < > * * 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 " AND...
928dada44056a65103bfb97eef5c28b876a88183daac1b2ae196f547ee201f82
reborg/clojure-essential-reference
2.clj
< 1 > ;; (0 1 2 3 4 5 6 7 8 9)
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Sequences/AbstractGenerators/iterate/2.clj
clojure
(0 1 2 3 4 5 6 7 8 9)
< 1 >
74ecbd103ea7d047a0b85bb4443d5a958209b244e892581fe81b04ead4164ca3
RefactoringTools/wrangler
refac_create_behav_instance.erl
%%%------------------------------------------------------------------- @author Seijas < > @author < > ( C ) 2015 , , %%% @doc %%% Creates a file with the skeleton of a behaviour instance. %%% It adds the behaviour declaration if it is not there already. %%% @end Created : 7 Jul 2015 by %%%-------...
null
https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/gen_refacs/refac_create_behav_instance.erl
erlang
------------------------------------------------------------------- @doc Creates a file with the skeleton of a behaviour instance. It adds the behaviour declaration if it is not there already. @end ------------------------------------------------------------------- Include files ===================================...
@author Seijas < > @author < > ( C ) 2015 , , Created : 7 Jul 2015 by -module(refac_create_behav_instance). -behaviour(gen_refac). -include("wrangler.hrl"). -export([input_par_prompts/0,select_focus/1, check_pre_cond/1, selective/0, transform/1]). -export([create_behav_instance/5]). ...
a580edc0860ad8e8bf4d881661230a0359abd8974f42d4893004aec80d610682
arohner/spectrum
keyword_invoke.clj
(ns spectrum.examples.good.keyword-invoke) (:foo {:foo 1})
null
https://raw.githubusercontent.com/arohner/spectrum/72b47a91a5ce4567eed547507d25b2528f48c2d1/test/spectrum/examples/good/keyword_invoke.clj
clojure
(ns spectrum.examples.good.keyword-invoke) (:foo {:foo 1})
4e94cfa3e8d407c95cf480445da4edd7fd38bf5b048692aa0250631b295f36d6
braidchat/braid
impl.cljs
(ns braid.popovers.impl (:require [reagent.core :as r])) (def popover (r/atom nil)) (defn view [] (when-let [{:keys [view target modal?]} @popover] (let [bounds (if modal? #js {:width js/document.documentElement.clientWidth :height js/document.documentElement.clie...
null
https://raw.githubusercontent.com/braidchat/braid/1353d0fa613baf4f35d455a695914216cc2dda75/src/braid/popovers/impl.cljs
clojure
(ns braid.popovers.impl (:require [reagent.core :as r])) (def popover (r/atom nil)) (defn view [] (when-let [{:keys [view target modal?]} @popover] (let [bounds (if modal? #js {:width js/document.documentElement.clientWidth :height js/document.documentElement.clie...
cb4253aa6a71d1315ef448e9dbf57fcd2dda698dd7f4bc1b5e0777b722885782
cognitect-labs/vase
respond_test.clj
(ns com.cognitect.vase.respond-test (:require [clojure.test :refer :all] [io.pedestal.interceptor :as interceptor] [com.cognitect.vase.actions :as actions] [com.cognitect.vase.test-helper :as helper] [com.cognitect.vase.actions-test :refer [expect-response with-query-pa...
null
https://raw.githubusercontent.com/cognitect-labs/vase/d882bc8f28e8af2077b55c80e069aa2238f646b7/test/com/cognitect/vase/respond_test.clj
clojure
(ns com.cognitect.vase.respond-test (:require [clojure.test :refer :all] [io.pedestal.interceptor :as interceptor] [com.cognitect.vase.actions :as actions] [com.cognitect.vase.test-helper :as helper] [com.cognitect.vase.actions-test :refer [expect-response with-query-pa...
1137685825a386030eb520ac885416ee26b7f4377594c545b692e98bcd16e82d
dfinity/motoko
source_token.ml
open Mo_def.Trivia type token = | EOF | DISALLOWED | LET | VAR | LPAR | RPAR | LBRACKET | RBRACKET | LCURLY | RCURLY | AWAIT | AWAITSTAR | ASYNC | ASYNCSTAR | BREAK | CASE | CATCH | CONTINUE | LABEL | DEBUG | DO | FLEXIBLE | IF | IGNORE | IN | ELSE | SWITCH | LOO...
null
https://raw.githubusercontent.com/dfinity/motoko/44ecd2695d34ca27fa397d61d91218e4ef27049f/src/mo_frontend/source_token.ml
ocaml
shudders Trivia
open Mo_def.Trivia type token = | EOF | DISALLOWED | LET | VAR | LPAR | RPAR | LBRACKET | RBRACKET | LCURLY | RCURLY | AWAIT | AWAITSTAR | ASYNC | ASYNCSTAR | BREAK | CASE | CATCH | CONTINUE | LABEL | DEBUG | DO | FLEXIBLE | IF | IGNORE | IN | ELSE | SWITCH | LOO...
aec9e156d0fbf2d82534e8c89746ed564fe11aa05f754ff52179b13589ebb0f8
metabase/sparksql-deps
FixedHiveConnection.clj
(ns metabase.driver.FixedHiveConnection (:import [org.apache.hive.jdbc HiveConnection] [java.sql ResultSet SQLException] java.util.Properties) (:gen-class :extends org.apache.hive.jdbc.HiveConnection :init init :constructors {[String java.util.Properties] [String java.util.Properties]...
null
https://raw.githubusercontent.com/metabase/sparksql-deps/8946c2d5de50f8aef25cfd85b2bfc250004b47dc/src/metabase/driver/FixedHiveConnection.clj
clojure
(ns metabase.driver.FixedHiveConnection (:import [org.apache.hive.jdbc HiveConnection] [java.sql ResultSet SQLException] java.util.Properties) (:gen-class :extends org.apache.hive.jdbc.HiveConnection :init init :constructors {[String java.util.Properties] [String java.util.Properties]...
ff54f4d8dc4cf782a44e8f160c7e938b2b73b0d3c57f03b98427fc3a2ab55934
sicmutils/sicmutils
factorial_test.cljc
#_"SPDX-License-Identifier: GPL-3.0" (ns sicmutils.special.factorial-test (:require [clojure.test :refer [is deftest testing]] [clojure.test.check.generators :as gen] [com.gfredericks.test.chuck.clojure-test :refer [checking]] [sicmutils.generic :as g] [sicmutils.polyn...
null
https://raw.githubusercontent.com/sicmutils/sicmutils/f181f153f1432e9648206f903282e7cb4cdd9644/test/sicmutils/special/factorial_test.cljc
clojure
they are the confirmed via wolfram simple but inefficient implementation for comparison with the more efficient method in the library.
#_"SPDX-License-Identifier: GPL-3.0" (ns sicmutils.special.factorial-test (:require [clojure.test :refer [is deftest testing]] [clojure.test.check.generators :as gen] [com.gfredericks.test.chuck.clojure-test :refer [checking]] [sicmutils.generic :as g] [sicmutils.polyn...
7415653637da934e86625271fc1ceded00d6f570e103ec71f40cc4325209fa89
mishadoff/project-euler
problem022.clj
(ns project-euler.problem022) (defn score [string] (reduce + (map #(- (int %) 64) string))) Elapsed time : 34.330959 msecs (defn euler-022 [] (->> "res/problem022.txt" (slurp) (re-seq #"\w+") (sort) (map-indexed #(* (inc %1) (score %2))) (reduce +)))
null
https://raw.githubusercontent.com/mishadoff/project-euler/45642adf29626d3752227c5a342886b33c70b337/src/project_euler/problem022.clj
clojure
(ns project-euler.problem022) (defn score [string] (reduce + (map #(- (int %) 64) string))) Elapsed time : 34.330959 msecs (defn euler-022 [] (->> "res/problem022.txt" (slurp) (re-seq #"\w+") (sort) (map-indexed #(* (inc %1) (score %2))) (reduce +)))
e08b533855d47a181057349596432a3e53c973169df6aab23bf2dc7655a0babb
static-analysis-engineering/codehawk
cHCanvas.mli
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Graphical User Interface Basis Author : ------------------------------------------------------------------------------ The MIT Licen...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CH_gui/cHCanvas.mli
ocaml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Graphical User Interface Basis Author : ------------------------------------------------------------------------------ The MIT Licen...
669b3d0923ce65de00f29d9e21823a0037c4d9bf26ce657556d83b666334e87a
bldl/magnolisp
test-type-infer-3.rkt
#lang magnolisp (require (only-in racket/base)) (typedef int #:: (foreign)) (function (f x) #:: (export (type (-> int int))) (define (local-g x) x) (local-g x)) (f 1)
null
https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/tests/test-type-infer-3.rkt
racket
#lang magnolisp (require (only-in racket/base)) (typedef int #:: (foreign)) (function (f x) #:: (export (type (-> int int))) (define (local-g x) x) (local-g x)) (f 1)
cdcd2a9f7d9bff78e8bd5fff973f30da90de121ce37b3136ee337d4d492cd8f0
ekmett/constraints
Unsafe.hs
# LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleInstances # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE TypeOperators # {-# LANGUAGE Rank2Types #-} {-# LANGUAGE GADTs #-} # LANGUAGE Unsafe # # OPTIONS_GHC -fno - warn - redundant - constraints # -- | Copyright : ( C ) 2011 - 2021 -- License : BSD-styl...
null
https://raw.githubusercontent.com/ekmett/constraints/b950709040040933fa789ad770ab7fd368b5c0e2/src/Data/Constraint/Unsafe.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE Rank2Types # # LANGUAGE GADTs # | License : BSD-style (see the file LICENSE) Stability : experimental Portability : non-portable | Coerce a dictionary unsafely from a newtype of a type to the base type
# LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleInstances # # LANGUAGE TypeOperators # # LANGUAGE Unsafe # # OPTIONS_GHC -fno - warn - redundant - constraints # Copyright : ( C ) 2011 - 2021 Maintainer : < > module Data.Constraint.Unsafe ( Coercible , unsafeCoerceConstraint , unsafeDerive ...
832324c3e58f06b5ea20179c36650fd2dfca40c8610887000a7ef16dbb15b99f
kasta-ua/i18n
po_test.clj
(ns kasta.i18n.po-test (:require [clojure.test :as t] [clojure.java.io :as io] [kasta.i18n.po :as po])) (defn test-data [name] (slurp (io/file (str "test/fixtures/" name)))) (t/deftest reading-po (t/testing "reading po file" (t/is (= {::po/msgid '(utils/plural warehouses " отделе...
null
https://raw.githubusercontent.com/kasta-ua/i18n/dca6477f365f9e4aa12d664dadc4103c7840107e/test/kasta/i18n/po_test.clj
clojure
(ns kasta.i18n.po-test (:require [clojure.test :as t] [clojure.java.io :as io] [kasta.i18n.po :as po])) (defn test-data [name] (slurp (io/file (str "test/fixtures/" name)))) (t/deftest reading-po (t/testing "reading po file" (t/is (= {::po/msgid '(utils/plural warehouses " отделе...
c7b79e6a8bf6e7ae7172ebfc92a9a3de303c08f401308479436855ebd3bcce0e
remyzorg/pendulum
machine_js_example.ml
open Flickr open Method let%sync flick_gallery = js_input (onchange, oninput, onkeyup) input_txt; input gallery; let username_response = "" in let photos_response = "" in let one_photo = "" in let gallery_div = createDiv document in loop begin present input_txt ( atom ( Js.Opt.iter...
null
https://raw.githubusercontent.com/remyzorg/pendulum/a532681c6f99d77129e31fbe27cc56c396a7c63c/examples/flickr/machine_js_example.ml
ocaml
open Flickr open Method let%sync flick_gallery = js_input (onchange, oninput, onkeyup) input_txt; input gallery; let username_response = "" in let photos_response = "" in let one_photo = "" in let gallery_div = createDiv document in loop begin present input_txt ( atom ( Js.Opt.iter...
c38527ebcdefc15f6e4d5f8d870021fb73b326a58eb5a10072fa4590ade3076e
erlang-ls/erlang_ls
els_protocol.erl
%%============================================================================== The Language Server Protocol %%============================================================================== -module(els_protocol). %%============================================================================== %% Exports %%=========...
null
https://raw.githubusercontent.com/erlang-ls/erlang_ls/d19557a4018cde392006202be8407e4a983d5237/apps/els_core/src/els_protocol.erl
erlang
============================================================================== ============================================================================== ============================================================================== Exports ==========================================================================...
The Language Server Protocol -module(els_protocol). -export([ notification/2, request/2, request/3, response/2, error/2 ]). -export([range/1]). -include("els_core.hrl"). -include_lib("kernel/include/logger.hrl"). -spec notification(binary(), any()) -> binary(). notification(Method, Params) -> ...
76761ea24298e47d53a5233fcb37e0913ce42976f90ff438c15b47efd1cf6cb9
soegaard/little-helper
heap-signature.scm
heap-signature.scm -- -- 6th nov 2005 (module heap-signature mzscheme (provide provide-heap) (require-for-syntax "macro-utilities.scm") (define-syntax (provide-heap stx) (syntax-case stx () [(_) (with-captures stx (count delete delet...
null
https://raw.githubusercontent.com/soegaard/little-helper/26249c688e5adf1e2535c405c6289030eff561b4/planet/galore.plt/2/2/signatures/heap-signature.scm
scheme
heap-signature.scm -- -- 6th nov 2005 (module heap-signature mzscheme (provide provide-heap) (require-for-syntax "macro-utilities.scm") (define-syntax (provide-heap stx) (syntax-case stx () [(_) (with-captures stx (count delete delet...
d90ca1b44f87572c60297aaac1208f0949d0bd212f06c6cadaf3b3516d385801
callum-oakley/advent-of-code
19.clj
(ns aoc.2018.19 (:require [aoc.2018.16 :refer [tick]] [clojure.test :refer [deftest is]])) (defn parse [s] (let [[_ ip & instructions] (map read-string (re-seq #"\w+" s))] [ip (vec (partition 4 instructions))])) (defn run [reg [ip instructions]] (loop [reg reg] (if (< (reg ip) (count instructions)...
null
https://raw.githubusercontent.com/callum-oakley/advent-of-code/c8d9d912471415b0014707f768946b18f29b4531/src/aoc/2018/19.clj
clojure
see notes at the bottom of this file 03: mulr 1 3 5 \ r5 = r1 * r3 06: addi 4 1 4 | test if r1 * r3 = r2, and if they do, increment r0 by r1. in other words: they find the sum of the divisors of r2
(ns aoc.2018.19 (:require [aoc.2018.16 :refer [tick]] [clojure.test :refer [deftest is]])) (defn parse [s] (let [[_ ip & instructions] (map read-string (re-seq #"\w+" s))] [ip (vec (partition 4 instructions))])) (defn run [reg [ip instructions]] (loop [reg reg] (if (< (reg ip) (count instructions)...
f9360949aed48317d0075bb469853ff652309af929ddb91a269600cbab68e98c
FreekPaans/clojure-ddd-layered-example
mysql_cargo_repository_test.clj
(ns layered-example.data.mysql-cargo-repository-test (:require [layered-example.data.mysql-cargo-repository :refer [new-cargo-repository]] [layered-example.domain.cargo.cargo :refer [map->Cargo create-new-cargo book-onto-voyage]] [layered-example.domain.cargo.cargo-repository :refer [-find -up...
null
https://raw.githubusercontent.com/FreekPaans/clojure-ddd-layered-example/1c306f7a95a59da29a0545a074b6117657cf0847/test/layered_example/data/mysql_cargo_repository_test.clj
clojure
(ns layered-example.data.mysql-cargo-repository-test (:require [layered-example.data.mysql-cargo-repository :refer [new-cargo-repository]] [layered-example.domain.cargo.cargo :refer [map->Cargo create-new-cargo book-onto-voyage]] [layered-example.domain.cargo.cargo-repository :refer [-find -up...
870dd031a9dc434492767afb83ad303bccd648112a0529f4fbeefd7c20b4a206
Jannis/om-next-kanban-demo
lanes.cljs
(ns cards.lanes (:require [devcards.core :as dc :refer-macros [defcard]] [om.next :as om] [om.dom :as dom] [kanban.components.lane :as kanban-lane] [cards.util :refer [render-cb-info update-cb-info]])) (def ^:export front-matter {:base-card-options {:frame false}}) ...
null
https://raw.githubusercontent.com/Jannis/om-next-kanban-demo/84719bfb161d82f1d4405e263f258730277c7783/src/cards/lanes.cljs
clojure
(ns cards.lanes (:require [devcards.core :as dc :refer-macros [defcard]] [om.next :as om] [om.dom :as dom] [kanban.components.lane :as kanban-lane] [cards.util :refer [render-cb-info update-cb-info]])) (def ^:export front-matter {:base-card-options {:frame false}}) ...
aae41dd151aa2802e3f23a038d18a068f8d9c3e67119ca1d793b792b9498e50b
simplex-chat/simplex-chat
View.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Simplex.Chat.View where import Data.Aeson (ToJSON) im...
null
https://raw.githubusercontent.com/simplex-chat/simplex-chat/01acbb970ae7762e1551e352131453e77a601764/src/Simplex/Chat/View.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # [ttyGroup' g <> ": joining the group..."] deletedText_ Nothing should be impossible here without fullName as as it was shown in joinedGroupMemberConnecting these case is not used TODO show verification time? shouldn't happen shouldn't happen recipient tried to a...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Simplex.Chat.View where import Data.Aeson (ToJSON) import qualified Data.Aeson as J import qualified Data.ByteS...
c7cd3e5f23fe17e45fba68061af74f4a8a8a3098687d214b8d93b3afb1387b32
gsakkas/rite
2941.ml
let rec clone x n = match n with | 0 -> [] | _ -> [clone x (n - 1); x];; (* fix let rec clone x n = match n with | 0 -> [] | _ -> (clone x (n - 1)) @ [x];; *) changed spans ( 2,51)-(2,71 ) clone x ( n - 1 ) @ [ x ] AppG [ AppG [ EmptyG , EmptyG],ListG [ EmptyG ] ] (2,51)-(2,71) clone x (n - 1) @ [x] Ap...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/2941.ml
ocaml
fix let rec clone x n = match n with | 0 -> [] | _ -> (clone x (n - 1)) @ [x];;
let rec clone x n = match n with | 0 -> [] | _ -> [clone x (n - 1); x];; changed spans ( 2,51)-(2,71 ) clone x ( n - 1 ) @ [ x ] AppG [ AppG [ EmptyG , EmptyG],ListG [ EmptyG ] ] (2,51)-(2,71) clone x (n - 1) @ [x] AppG [AppG [EmptyG,EmptyG],ListG [EmptyG]] *) type error slice ( 2,4)-(2,73 ) ( 2,...
66e0601f501578d14b5e1970694df37d7a586f961b057b46fc7f3c2cade26437
tiensonqin/lymchat
main.cljs
(ns ^:figwheel-no-load env.android.main (:require [reagent.core :as r] [lymchat.android.core :as core] [figwheel.client :as figwheel :include-macros true])) (enable-console-print!) (def cnt (r/atom 0)) (defn reloader [] @cnt [core/app-root]) (def root-el (r/as-element [reloader])) (figwhe...
null
https://raw.githubusercontent.com/tiensonqin/lymchat/824026607d30c12bc50afb06f677d1fa95ff1f2f/env/dev/env/android/main.cljs
clojure
(ns ^:figwheel-no-load env.android.main (:require [reagent.core :as r] [lymchat.android.core :as core] [figwheel.client :as figwheel :include-macros true])) (enable-console-print!) (def cnt (r/atom 0)) (defn reloader [] @cnt [core/app-root]) (def root-el (r/as-element [reloader])) (figwhe...
5bdb7a35087e8d6900683da8e48a8ad7a1db93b0be9a1f5877e5d6a57a9d0caf
cryogen-project/cryogen-core
compiler_test.clj
(ns cryogen-core.compiler-test (:require [clojure.java.io :as io] [clojure.test :refer :all] [me.raynes.fs :as fs] [net.cgrand.enlive-html :as enlive] [cryogen-core.compiler :refer :all] [cryogen-core.markup :as m]) (:import [java.io File])) ; Test that t...
null
https://raw.githubusercontent.com/cryogen-project/cryogen-core/8318bde771d39515b5f5a7f5af53ba5c55aeec35/test/cryogen_core/compiler_test.clj
clojure
Test that the content-until-more-marker return nil or correct html text. text without more marker, return nil text with more marker, return text before more marker with closing tags.
(ns cryogen-core.compiler-test (:require [clojure.java.io :as io] [clojure.test :refer :all] [me.raynes.fs :as fs] [net.cgrand.enlive-html :as enlive] [cryogen-core.compiler :refer :all] [cryogen-core.markup :as m]) (:import [java.io File])) (deftest test...
1f64dbc832c157daa0dfbf1193781f460c8d1ef84b53fd59b3affc29564cbaef
anwarmamat/cmsc330spring20
testUtils.ml
open OUnit2 let assert_true x = assert_equal true x let assert_false x = assert_equal false x let string_of_list f xs = "[" ^ (String.concat "; " (List.map f xs)) ^ "]" let string_of_pair f g (x, y) = "(" ^ (f x) ^ ", " ^ (g y) ^ ")" let string_of_string_list = string_of_list (fun x -> x) let string_of_int_pair...
null
https://raw.githubusercontent.com/anwarmamat/cmsc330spring20/c16a34bdcddaf9deb386310a7a25ff82c5578167/project2b/test/testUtils.ml
ocaml
open OUnit2 let assert_true x = assert_equal true x let assert_false x = assert_equal false x let string_of_list f xs = "[" ^ (String.concat "; " (List.map f xs)) ^ "]" let string_of_pair f g (x, y) = "(" ^ (f x) ^ ", " ^ (g y) ^ ")" let string_of_string_list = string_of_list (fun x -> x) let string_of_int_pair...
ad99016a6995640108c48217df710692d1509f9d674e620a1ea608f8925bb2f6
nasa/Common-Metadata-Repository
atom_results_handler.clj
(ns cmr.search.results-handlers.atom-results-handler "Handles the ATOM results format and related functions" (:require [cheshire.core :as json] [clj-time.core :as time] [clojure.data.xml :as x] [clojure.edn :as edn] [clojure.set :as set] [clojure.walk :as walk] [cmr.common-app.services.search :...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/fc0fb6cf741f43c1cc747c4d8478b22be8a30010/search-app/src/cmr/search/results_handlers/atom_results_handler.clj
clojure
only non-browse links are inherited from the collection remove duplicate links from the collection links if it already exists in the granule set the inherited flag for collection links add relence url to header attributes if our entries have scores
(ns cmr.search.results-handlers.atom-results-handler "Handles the ATOM results format and related functions" (:require [cheshire.core :as json] [clj-time.core :as time] [clojure.data.xml :as x] [clojure.edn :as edn] [clojure.set :as set] [clojure.walk :as walk] [cmr.common-app.services.search :...
a5f88f7950ec1b9712845f84419164b0b371aabac4f4abb516e1f46ca8f05794
matterhorn-chat/matterhorn
Command.hs
{-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Matterhorn.Command ( commandList , dispatchCommand , printArgSpec , toggleMessagePreview ) where import Prelude () import Matterhorn.Prelude import Brick.Main ( invalidateCache ) import qualified Control.Exception...
null
https://raw.githubusercontent.com/matterhorn-chat/matterhorn/19a73ce833a8a8de3616cf884c03e9f08a4db0a7/src/Matterhorn/Command.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # 'token' (i.e. any sequence of non-whitespace characters) as well as the trailing rest of the string, after any whitespace. This is used subsequent chunks unchanged, preserving newlines and other important formatting. n.b. this is identical to "msg", but is provided...
module Matterhorn.Command ( commandList , dispatchCommand , printArgSpec , toggleMessagePreview ) where import Prelude () import Matterhorn.Prelude import Brick.Main ( invalidateCache ) import qualified Control.Exception as Exn import qualified Data.Char as Char import qualifie...
7fb784def1636140947b18aee832d4507e32e84fdd5d8a8eebf9bf4bbca5d188
death/formgrep
if-let-multiple-bindings.lisp
;;;; +----------------------------------------------------------------+ ;;;; | formgrep | ;;;; +----------------------------------------------------------------+ (defpackage #:formgrep/examples/if-let-multiple-bindings (:documentation "Find occurrences of IF-L...
null
https://raw.githubusercontent.com/death/formgrep/f0818f7aedcd224f71f8453838ea316b1f589f36/examples/if-let-multiple-bindings.lisp
lisp
+----------------------------------------------------------------+ | formgrep | +----------------------------------------------------------------+
(defpackage #:formgrep/examples/if-let-multiple-bindings (:documentation "Find occurrences of IF-LET forms with multiple bindings.") (:use #:cl) (:import-from #:formgrep) (:export #:show-if-let-multiple-bindings)) (in-package #:formgrep/examples/if-let-multiple-bindings) (defun graph-some (function ...
10011de438fb80416183476a140259e431acdeadc683ab74d2d7e58a869017a2
rabbitmq/rabbitmq-stomp
rabbit_stomp_internal_event_handler.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-stomp/925d78e2c7152723a68452b38fbc2713d2797b8b/src/rabbit_stomp_internal_event_handler.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. we should close...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights re...
dc30d15e46bb6535dd8577d9ba068feb72d84dd8f3082a11be60dd8ee5b88ef0
oakes/tile-soup
data_xml.cljc
(ns tile-soup.data-xml (:require [clojure.spec.alpha :as s] [tile-soup.utils :as u])) (defn- tile [tile] (or (some->> tile :attrs :gid (u/parse u/str->long)) 0)) (defmulti spec :tag) (defmethod spec :tile [_] (s/conformer tile)) (defmethod spec :default [x] (throw (ex-info (str (:tag x) " not ...
null
https://raw.githubusercontent.com/oakes/tile-soup/e2d495523af59322891f667859d39478d118a7c2/src/tile_soup/data_xml.cljc
clojure
(ns tile-soup.data-xml (:require [clojure.spec.alpha :as s] [tile-soup.utils :as u])) (defn- tile [tile] (or (some->> tile :attrs :gid (u/parse u/str->long)) 0)) (defmulti spec :tag) (defmethod spec :tile [_] (s/conformer tile)) (defmethod spec :default [x] (throw (ex-info (str (:tag x) " not ...
3278844f25fcc2efb6eca538e79c56e2912d10c89d7471ac057cc410c461010e
Heliosmaster/life-in-parens
chart.clj
(ns life-in-parens.chart (:require [quil.core :as q] [quil.middleware :as m])) (def offset 50) (def vlines-at 250) (def size 500) (def nlines 5) (def total-size (+ size (* 2 offset))) (def colors [[255 0 0] [0 0 255] [0 255 0]]) (defn reduce-sampling-by [dataset n] (->> (part...
null
https://raw.githubusercontent.com/Heliosmaster/life-in-parens/e5141670a1441535cb9ccda21ce6700783efe1e1/src/life_in_parens/chart.clj
clojure
setup function called only once, during sketch initialization. update-state is called on each iteration before draw-state. This sketch uses functional-mode middleware. Check quil wiki for more info about middlewares and particularly fun-mode. setup function called only once, during sketch initialization. update-...
(ns life-in-parens.chart (:require [quil.core :as q] [quil.middleware :as m])) (def offset 50) (def vlines-at 250) (def size 500) (def nlines 5) (def total-size (+ size (* 2 offset))) (def colors [[255 0 0] [0 0 255] [0 255 0]]) (defn reduce-sampling-by [dataset n] (->> (part...
2ec267229ea533edf6d6a0840796a44939b13a5d508ec69e950645bb26cdd556
gonzojive/elephant
query-parse.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;;; ;;; query-parse.lisp -- Parse expressions to constraints ;;; Copyright ( c ) 2009 ;;; <ieslick common-lisp net> ;;; ;;; part of ;;; Elephant : an object - oriented database for Common Lisp ;;; ;;; Elephant users are granted the rights to distr...
null
https://raw.githubusercontent.com/gonzojive/elephant/b29a012ab75ccea2fc7fc4f1e9d5e821f0bd60bf/src/elephant/query-parse.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- query-parse.lisp -- Parse expressions to constraints <ieslick common-lisp net> part of Elephant users are granted the rights to distribute and use this software (), also known as the LLGPL. Turn constraint expressions into a grouped constraint table =========...
Copyright ( c ) 2009 Elephant : an object - oriented database for Common Lisp as governed by the terms of the Lisp Lesser GNU Public License (in-package :elephant) (defun extract-query-constraints (bindings constraint-expr) (mapcar #'optimize-constraints (group-constraints (parse-and-flatten-con...
dfea54772e53966f1df7a5f4d83007c06c10b01fe9634801b11c14520b76a551
PeterDWhite/Osker
DeviceMap.hs
Copyright ( c ) , 2001 , 2002 , 2003 Copyright ( c ) OHSU , 2001 , 2002 , 2003 module DeviceMap ( DeviceMap -- Mapping device Id to thread information , DeviceConfig (..) -- Configuration of a device driver ) where ---------------------------------------------------------------------- A ta...
null
https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Kernel/Platform/DeviceMap.hs
haskell
Mapping device Id to thread information Configuration of a device driver -------------------------------------------------------------------- -------------------------------------------------------------------- Haskell imports Utility imports A device Id must be converted to an int to access this map tid is speci...
Copyright ( c ) , 2001 , 2002 , 2003 Copyright ( c ) OHSU , 2001 , 2002 , 2003 module DeviceMap ) where A table of thread Ids for the Osker devices import qualified FiniteMap as FM import qualified Null as N Braid imports import qualified BraidUtilities as BU imports import qualified ProcessName as ...
56fe375e4ddfae664e754e7650bd31411418be8d7b7aba2592adab26f4ae818a
ndmitchell/catch
Simplify.hs
module Reqs.Simplify(simplifyReqs, simplifyReqsFull, simplifyReqAllsFull, simpMore) where import Hite import Reqs.Type import Reqs.Path import Reqs.Show --import Pred.Type --import Pred.Simplify --import Pred.Form import General.Simplify import General.General import Maybe import List import Star.Type import Pred...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Reqs/Simplify.hs
haskell
import Pred.Type import Pred.Simplify import Pred.Form * Super Simplify Section * Standard Simplify Section should be redundant, if pathSubset is == implies simplify all the forall statements Must all be Nothing as their within property if the set is null , then try and prove the path is not reachable by follow...
module Reqs.Simplify(simplifyReqs, simplifyReqsFull, simplifyReqAllsFull, simpMore) where import Hite import Reqs.Type import Reqs.Path import Reqs.Show import General.Simplify import General.General import Maybe import List import Star.Type import Pred.Predicate data Wrap = Wrap {unwrap :: Req} deriving Eq ...
ba88969337f4a91f7349a945f3358f1dd7a2f77b4272b1aa76d139c1053bc7a3
bugczw/Introduction-to-Functional-Programming-in-OCaml
W3_S5.ml
ADVANCED PATTERNS ( 60/60 points ) Let 's rewrite some pattern matching with advanced constructs . Factorize the pattern matching of function simplify using or - patterns . It should boil down to three cases . The only_small_lists function takes a list as input and returns this list only if it contains two o...
null
https://raw.githubusercontent.com/bugczw/Introduction-to-Functional-Programming-in-OCaml/13c4d1f92e7479f8eb10ea5d4c43a598b6676d0f/OCaml_MOOC_W3_ALL/Exercise/W3_S5.ml
ocaml
ADVANCED PATTERNS ( 60/60 points ) Let 's rewrite some pattern matching with advanced constructs . Factorize the pattern matching of function simplify using or - patterns . It should boil down to three cases . The only_small_lists function takes a list as input and returns this list only if it contains two o...
7dd0cf2994870e7010b62ea3a798e564e6a6a86ae7dac0511a0d23b816386f85
lasp-lang/lasp
lasp_sup.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2017 . All Rights Reserved . %% This file is provided to you 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...
null
https://raw.githubusercontent.com/lasp-lang/lasp/1701c8af77e193738dfc4ef4a5a703d205da41a1/src/lasp_sup.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2017 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(lasp_sup). -author("...
269e1a32ad9ba47f10b2ac4ca7931353928a1bf479753b31666e183a412265bf
ptressel/LISPSearch
polygons-test-1.lsp
A trivial case , to serve as a first test . One polygon -- a triangle . Its first two vertices are repeated at the end , for a total of 5 points . (setf *polygons* (list (list (list -1.0 0.0) (list 1.0 0.0) (list 0.0 1.0)...
null
https://raw.githubusercontent.com/ptressel/LISPSearch/791c0eb65d6be9d232143795adba2e5b8057f61d/polygons-test-1.lsp
lisp
Goal is above and on the same side.
A trivial case , to serve as a first test . One polygon -- a triangle . Its first two vertices are repeated at the end , for a total of 5 points . (setf *polygons* (list (list (list -1.0 0.0) (list 1.0 0.0) (list 0.0 1.0)...
15b53921e168519fefd1ed16c6de2d6b326c8a830b57aa059503d4ca04dd355b
WorksHub/client
views.cljc
(ns wh.company.profile.views (:require #?(:cljs [wh.common.logo]) #?(:cljs [wh.common.upload :as upload]) #?(:cljs [wh.components.conversation.views :refer [codi-message]]) #?(:cljs [wh.components.forms.views :refer [tags-field text-field select-field logo-field toggle]]) ...
null
https://raw.githubusercontent.com/WorksHub/client/e05a66f512bd37d0c3372e3d305fdfaa43290c79/common-pages/src/wh/company/profile/views.cljc
clojure
must be admin or owner to get here no subtype no subtype add unselected add unselected display nothing if no issues add unselected add unselected 1 & 2
(ns wh.company.profile.views (:require #?(:cljs [wh.common.logo]) #?(:cljs [wh.common.upload :as upload]) #?(:cljs [wh.components.conversation.views :refer [codi-message]]) #?(:cljs [wh.components.forms.views :refer [tags-field text-field select-field logo-field toggle]]) ...
6bb7a9d653b15b4afa7160a805bfe2b4661a686d88f097cbc837f2e47a78bb07
unnohideyuki/bunny
sample181.hs
main = print ((1, 2), [3, 4])
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample181.hs
haskell
main = print ((1, 2), [3, 4])
8ae7c81cb0d61b9de15d0a2840ed98fa21a879a90c7458c119828806f458156b
imrehg/ypsilon
gtkglext.scm
#!nobacktrace Ypsilon Scheme System Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited . See license.txt for terms and conditions of use . (library (ypsilon gtkglext) (export GDK_GL_ACCUM_ALPHA_SIZE GDK_GL_ACCUM_BLUE_SIZE GDK_GL_ACCUM_BUFFER_BIT GDK_GL_ACCUM_GREEN_...
null
https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gtkglext.scm
scheme
GType gdk_gl_config_attrib_get_type (void) GdkGLConfig* gdk_gl_config_new (const int* attrib_list) gboolean gdk_gl_context_copy (GdkGLContext* glcontext, GdkGLContext* src, unsigned long mask) void gdk_gl_context_destroy (GdkGLContext* glcontext) GdkGLContext* gdk_gl_context_get_current (void) GdkGLConfig* gdk_gl...
#!nobacktrace Ypsilon Scheme System Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited . See license.txt for terms and conditions of use . (library (ypsilon gtkglext) (export GDK_GL_ACCUM_ALPHA_SIZE GDK_GL_ACCUM_BLUE_SIZE GDK_GL_ACCUM_BUFFER_BIT GDK_GL_ACCUM_GREEN_...
e432ca7c53600bdee8fbb431c58e11afa2e37f7dec66dc5c13ce9e7a13a76893
quernd/tea-chess
Lichess.ml
open Tea open! Util type msg = | Load_games | Games_data of (string, string Http.error) Result.t | Load_game of string | Game_data of string * (string, string Http.error) Result.t [@@bs.deriving {accessors}] type 'a transfer = | Idle | Loading | Failed | Received of 'a type player = { name : string ...
null
https://raw.githubusercontent.com/quernd/tea-chess/7dc929f406eeada5a72117b1c748fa0edda4c48c/src/Lichess.ml
ocaml
open Tea open! Util type msg = | Load_games | Games_data of (string, string Http.error) Result.t | Load_game of string | Game_data of string * (string, string Http.error) Result.t [@@bs.deriving {accessors}] type 'a transfer = | Idle | Loading | Failed | Received of 'a type player = { name : string ...
d0f4cadf57349d24f0f42bd465adc0912b0a6d8ff4499f5df4ad690fe53feb6a
haskell-lisp/yale-haskell
dependency-analysis.scm
depend / depend.scm Author : ;;; This performs dependency analysis. All module definitions are gathered ;;; into a single nested let/let*. (define-walker depend ast-td-depend-walker) ;;; This extracts the declarations out of the top level of the modules and ;;; creates a single let defining all values from ...
null
https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/depend/dependency-analysis.scm
scheme
This performs dependency analysis. All module definitions are gathered into a single nested let/let*. This extracts the declarations out of the top level of the modules and creates a single let defining all values from the modules. This makes default walkers for dependency analysis. Expressions are walked into;...
depend / depend.scm Author : (define-walker depend ast-td-depend-walker) (define (do-dependency-analysis modules) (let ((all-decls '())) (dolist (mod modules) (setf all-decls (append (module-decls mod) all-decls))) (analyze-dependency-top (**let all-decls (make void))))) (define *dep...
095349e48ab0d5625381333c0ea817cb3e68e5ae36d73beca6b7ad25ea58a212
spechub/Hets
Result.hs
# LANGUAGE CPP , TypeFamilies , DeriveDataTypeable # module PGIP.GraphQL.Result where import PGIP.GraphQL.Result.DGraph import PGIP.GraphQL.Result.OMS import PGIP.GraphQL.Result.Serialization import PGIP.GraphQL.Result.Signature import PGIP.GraphQL.Result.SignatureMorphism import Common.Json (ppJson, asJson) import...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/PGIP/GraphQL/Result.hs
haskell
# LANGUAGE CPP , TypeFamilies , DeriveDataTypeable # module PGIP.GraphQL.Result where import PGIP.GraphQL.Result.DGraph import PGIP.GraphQL.Result.OMS import PGIP.GraphQL.Result.Serialization import PGIP.GraphQL.Result.Signature import PGIP.GraphQL.Result.SignatureMorphism import Common.Json (ppJson, asJson) import...
ba09f94908ae0a79fa77468ef568afad42bcb767987a947da12038ca0eb49dab
fused-effects/fused-effects
Ignoring.hs
# LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # -- | A carrier for the 'Trace' effect that ignores all traced results. Useful when you wish to disable tr...
null
https://raw.githubusercontent.com/fused-effects/fused-effects/9790ed4fb2cbaaf8933ce0eb42d7c55bc38f12ac/src/Control/Carrier/Trace/Ignoring.hs
haskell
# LANGUAGE GADTs # | A carrier for the 'Trace' effect that ignores all traced results. Useful when you wish to disable tracing without removing all trace statements. * Trace carrier * Trace effect | Run a 'Trace' effect, ignoring all traces. @ @ @ @
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # @since 1.0.0.0 module Control.Carrier.Trace.Ignoring runTrace , TraceC(..) , module Control.Effect.Trace ) where import Con...
b46f21f1d8bbb3e5ed53bada3143e9dc96f9c45875ca48689bcf232d16b654f0
janestreet/accessor
many.ml
open! Base open! Import module Applicative = struct type 'w t = { return : 'a. 'a -> ('a, 'w) Hk.t1 ; map : 'a 'b. ('a, 'w) Hk.t1 -> f:('a -> 'b) -> ('b, 'w) Hk.t1 ; apply : 'a 'b. ('a -> 'b, 'w) Hk.t1 -> ('a, 'w) Hk.t1 -> ('b, 'w) Hk.t1 } end module T = struct type ('bt, 'a, 'b) t = { f : 'w....
null
https://raw.githubusercontent.com/janestreet/accessor/e905e32c808dfda6950be29987a4bf4f2595fbfc/src/many.ml
ocaml
open! Base open! Import module Applicative = struct type 'w t = { return : 'a. 'a -> ('a, 'w) Hk.t1 ; map : 'a 'b. ('a, 'w) Hk.t1 -> f:('a -> 'b) -> ('b, 'w) Hk.t1 ; apply : 'a 'b. ('a -> 'b, 'w) Hk.t1 -> ('a, 'w) Hk.t1 -> ('b, 'w) Hk.t1 } end module T = struct type ('bt, 'a, 'b) t = { f : 'w....
86c1f94b6db59508d4631a9834b37e685b12bf080391f024b9b625b79a3fc982
boot-clj/boot
project.clj
(import [java.util Properties]) (require '[clojure.java.io :as io]) (def propsfile "../../version.properties") (def version (-> (doto (Properties.) (.load (io/input-stream propsfile))) (.getProperty "version"))) (defproject boot/pod version :aot [#"^(?!boot\.repl-server).*$"] :jar-exclusi...
null
https://raw.githubusercontent.com/boot-clj/boot/64334b4d5744b1444634f4a5a5a52b3ae67dddeb/boot/pod/project.clj
clojure
(import [java.util Properties]) (require '[clojure.java.io :as io]) (def propsfile "../../version.properties") (def version (-> (doto (Properties.) (.load (io/input-stream propsfile))) (.getProperty "version"))) (defproject boot/pod version :aot [#"^(?!boot\.repl-server).*$"] :jar-exclusi...