_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
26f3bfa7d2e3a9516a9b0359d22e1f8d19f83d6208dbfaee72f1c3bc2c722e99
biscuit-auth/biscuit-haskell
ScopedExecutor.hs
{-# LANGUAGE DerivingStrategies #-} # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes ...
null
https://raw.githubusercontent.com/biscuit-auth/biscuit-haskell/35e4cf44ae06e9d4bbd69699104c7a066be553b2/biscuit/src/Auth/Biscuit/Datalog/ScopedExecutor.hs
haskell
# LANGUAGE DerivingStrategies # # LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # | A subset of 'ExecutionError' that can only happen during fact generation | Proof that a biscuit was authorized successfully. In addition to the matched @allow query@, the generated facts are kept...
# LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # module Auth.Biscuit.Datalog.Scoped...
5583608d0a9af1067e143a63c85b0629508b042d4ae8441c4c77542c2297c67a
dym/movitz
restarts.lisp
;;;;------------------------------------------------------------------ ;;;; Copyright ( C ) 2001 , 2003 - 2005 , Department of Computer Science , University of Tromso , Norway . ;;;; ;;;; For distribution policy, see the accompanying file COPYING. ;;;; ;;;; Filename: restarts.lisp ;;;; Description:...
null
https://raw.githubusercontent.com/dym/movitz/56176e1ebe3eabc15c768df92eca7df3c197cb3d/losp/muerte/restarts.lisp
lisp
------------------------------------------------------------------ For distribution policy, see the accompanying file COPYING. Filename: restarts.lisp Description: ------------------------------------------------------------------
Copyright ( C ) 2001 , 2003 - 2005 , Department of Computer Science , University of Tromso , Norway . Author : < > Created at : Tue Oct 28 09:27:13 2003 $ I d : restarts.lisp , v 1.6 2005/05/05 20:51:51 Exp $ (require :muerte/basic-macros) (provide :muerte/restarts) (in-package muerte...
b23c2a97fe8eb5f714a9ecf462cc8d57b20eb250c42bef21b830980842249c42
hopv/MoCHi
parser_wrapper_4.10.ml
# 2 "parser_wrapper_4.10.ml" open Util open Asttypes open Typedtree open Types open Syntax open Term_util open Type open Parser_wrapper_common module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end) let () = Compmisc.init_path () let add_load_path = Load_path.add_dir let report_error e = ...
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/parser_wrapper_4.10.ml
ocaml
TODO: fix to return attribute? for readable variable names I don't know why, but the type environment of e is not appropriate for this context
# 2 "parser_wrapper_4.10.ml" open Util open Asttypes open Typedtree open Types open Syntax open Term_util open Type open Parser_wrapper_common module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end) let () = Compmisc.init_path () let add_load_path = Load_path.add_dir let report_error e = ...
73e368a76ae7ac64c6e4e088546259b7b766bcbb1bfef17e8fb3a322638ddbec
mirage/irmin-server
irmin_client_unix.mli
module Error = Irmin_client.Error module IO : Irmin_client.IO module Info (I : Irmin.Info.S) : sig include Irmin.Info.S with type t = I.t val init : ?author:string -> ?message:string -> int64 -> t val v : ?author:string -> ('b, Format.formatter, unit, f) format4 -> 'b end module Make (Store : Irmin.Generic_key...
null
https://raw.githubusercontent.com/mirage/irmin-server/3ba5661e3513edac7fc8664179983e6ab5f05ac1/src/irmin-client-unix/irmin_client_unix.mli
ocaml
module Error = Irmin_client.Error module IO : Irmin_client.IO module Info (I : Irmin.Info.S) : sig include Irmin.Info.S with type t = I.t val init : ?author:string -> ?message:string -> int64 -> t val v : ?author:string -> ('b, Format.formatter, unit, f) format4 -> 'b end module Make (Store : Irmin.Generic_key...
d0b0292d90a9023656fe77d6a99ef7d81a697acc7fcc172e44fbaedee686bc7d
LexiFi/dead_code_analyzer
mod.ml
module type G = sig val is_even: int -> bool val is_odd: int -> bool end module I: G = struct let is_even x = x mod 2 = 0 let is_odd x = not @@ is_even x end module M(G: G) = struct module G = G let f = G.is_even let g = G.is_odd end module MG = M(I) let test = MG.f 12
null
https://raw.githubusercontent.com/LexiFi/dead_code_analyzer/c44dc2ea5ccb13df2145e9316e21c39f09dad506/examples/dir/mod.ml
ocaml
module type G = sig val is_even: int -> bool val is_odd: int -> bool end module I: G = struct let is_even x = x mod 2 = 0 let is_odd x = not @@ is_even x end module M(G: G) = struct module G = G let f = G.is_even let g = G.is_odd end module MG = M(I) let test = MG.f 12
d513174529f13c7c99beb99881ace4b4fb0f2cd2fd7a7733343b648112eb72d9
well-typed/large-records
R080.hs
#if PROFILE_CORESIZE {-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-} #endif #if PROFILE_TIMING {-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} #endif {-# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #-} module Experiment.ParseJSON.Sized.R080 where import Data.Aeson (Value,) import Data.A...
null
https://raw.githubusercontent.com/well-typed/large-records/78d0966e4871847e2c17a0aa821bacf38bdf96bc/large-records-benchmarks/bench/large-anon/Experiment/ParseJSON/Sized/R080.hs
haskell
# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl # # OPTIONS_GHC -ddump-to-file -ddump-timings # # OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #
#if PROFILE_CORESIZE #endif #if PROFILE_TIMING #endif module Experiment.ParseJSON.Sized.R080 where import Data.Aeson (Value,) import Data.Aeson.Types (parseMaybe) import Data.Maybe (fromJust) import Data.Record.Anon.Simple (Record) import Data.Record.Generic.JSON (gparseJSON) import Common.RowOfSize.Row080 recFrom...
5a73297886995c58518b15005052c94df93f89241dfc4c362b0cc54c0f5fed94
hasktorch/hasktorch
Tuple.hs
-- generated by using spec/tuples.yaml # LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # module Torch.Internal.Managed.Type.Tuple where impo...
null
https://raw.githubusercontent.com/hasktorch/hasktorch/6233c173e1dd9fd7218fd13b104da15fc457f67e/libtorch-ffi/src/Torch/Internal/Managed/Type/Tuple.hs
haskell
generated by using spec/tuples.yaml # LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # module Torch.Internal.Managed.Type.Tuple where import Foreign.C.String import Foreign.C.Types import Foreign import Torch.Int...
5f48e488068b0745972d31143b39377b9970fb30719e59a4bc105230561165ce
bhauman/figwheel-core
exceptions.clj
(ns figwheel.tools.exceptions (:require [clojure.string :as string] [clojure.java.io :as io]) (:import [java.util.regex Pattern])) #_(remove-ns 'figwheel.tools.exceptions) ;; utils (defn map-keys [f m] (into {} (map (fn [[k v]] (clojure.lang.MapEntry. (f k) v)) m))) (defn un-clojure...
null
https://raw.githubusercontent.com/bhauman/figwheel-core/ecdc74128f05cb364390bee00eb780c6c97afb54/src/figwheel/tools/exceptions.clj
clojure
utils compile time exceptions are syntax errors so we need to break them down into message line column file return relative path because it isn't lossy Excerpts
(ns figwheel.tools.exceptions (:require [clojure.string :as string] [clojure.java.io :as io]) (:import [java.util.regex Pattern])) #_(remove-ns 'figwheel.tools.exceptions) (defn map-keys [f m] (into {} (map (fn [[k v]] (clojure.lang.MapEntry. (f k) v)) m))) (defn un-clojure-error-ke...
f86f03e9cb7337f7d779cd6f2086a356365d40c6962d6de3ba0ead2f0e8343b1
ScottBrooks/Erlcraft
mochiweb_headers.erl
@author < > 2007 Mochi Media , Inc. %% @doc Case preserving (but case insensitive) HTTP Header dictionary. -module(mochiweb_headers). -author(''). -export([empty/0, from_list/1, insert/3, enter/3, get_value/2, lookup/2]). -export([delete_any/2, get_primary_value/2]). -export([default/3, enter_from_list/2, def...
null
https://raw.githubusercontent.com/ScottBrooks/Erlcraft/ed336eb8da4d83e937687ce34feecb76b4128288/deps/mochiweb-src/src/mochiweb_headers.erl
erlang
@doc Case preserving (but case insensitive) HTTP Header dictionary. @type headers(). @type key() = atom() | binary() | string(). @type value() = atom() | binary() | string() | integer(). @spec empty() -> headers() @doc Create an empty headers structure. assume a tuple is already mochiweb_headers. @spec from_bin...
@author < > 2007 Mochi Media , Inc. -module(mochiweb_headers). -author(''). -export([empty/0, from_list/1, insert/3, enter/3, get_value/2, lookup/2]). -export([delete_any/2, get_primary_value/2]). -export([default/3, enter_from_list/2, default_from_list/2]). -export([to_list/1, make/1]). -export([from_binary/...
8d2e2f32b49dffc152f70beab8dec6aa4588d5b17334b5333feeae1423397ec8
stedolan/malfunction
malfunction_sexp.mli
exception SyntaxError of (Lexing.position * Lexing.position) * string type sexp = (Lexing.position * Lexing.position) * rawsexp and rawsexp = | Atom of string | Var of string | String of string | List of sexp list val read_next_sexp : Lexing.lexbuf -> sexp val read_only_sexp : Lexing.lexbuf -> sexp val print : For...
null
https://raw.githubusercontent.com/stedolan/malfunction/eb69eb74802540f95cf89f7b490678eedca6a2f9/src/malfunction_sexp.mli
ocaml
exception SyntaxError of (Lexing.position * Lexing.position) * string type sexp = (Lexing.position * Lexing.position) * rawsexp and rawsexp = | Atom of string | Var of string | String of string | List of sexp list val read_next_sexp : Lexing.lexbuf -> sexp val read_only_sexp : Lexing.lexbuf -> sexp val print : For...
5a38675d40e080c4a10e839808f9e5305ed5dc88e6d52a74cf320e0f18fbdc63
ucsd-progsys/nate
demo.ml
(***********************************************************************) (* *) MLTk , Tcl / Tk interface of Objective Caml (* *) , , and ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/examples_labltk/demo.ml
ocaml
********************************************************************* described in file LICENSE found in the...
MLTk , Tcl / Tk interface of Objective Caml , , and projet Cristal , INRIA Rocquencourt , Kyoto University RIMS Copyright 2002 Institut National de Recherche en Informatique et en Automatique and...
94aab1928b3a7e6fa7d18752a8449ba1862d74fe9ff8faf640eeff27401a2805
smallhadroncollider/taskell
Help.hs
# LANGUAGE OverloadedLists # module Taskell.Events.Actions.Modal.Help ( event , events ) where import Graphics.Vty.Input.Events import Taskell.Events.Actions.Types as A (ActionType(..)) import Taskell.Events.State import Taskell.Events.State.Modal.Help (moveHelpMenuDown, moveHelpMenuUp) import Taskell.Eve...
null
https://raw.githubusercontent.com/smallhadroncollider/taskell/5e5d7d3454daef4373607e6f02f599fc39045b11/src/Taskell/Events/Actions/Modal/Help.hs
haskell
# LANGUAGE OverloadedLists # module Taskell.Events.Actions.Modal.Help ( event , events ) where import Graphics.Vty.Input.Events import Taskell.Events.Actions.Types as A (ActionType(..)) import Taskell.Events.State import Taskell.Events.State.Modal.Help (moveHelpMenuDown, moveHelpMenuUp) import Taskell.Eve...
b90f25f3ec7c038f0d7e84e7e86499a87a3a3f00b2f1bb64cbdacf2d7e90fb4d
okTurtles/strings
html.mli
open! Core include S.Parser
null
https://raw.githubusercontent.com/okTurtles/strings/bd399039d2a792d7e026ad1efc6a90c4ba5e09cf/src/parsing/html.mli
ocaml
open! Core include S.Parser
a16429d180937b7b763cc881d0d8de0ae3b0ad674495964da690bd371a7e97fc
slyrus/abcl
abcl-build.lisp
(in-package :abcl/build/t) (if (not (ignore-errors (asdf:find-system :abcl))) (prove:diag "Unable to find 'abcl.asd'.~&Enable ASDF to find 'abcl.asd' by adding symlink to ~~/common-lisp/ to ABCL source directory.") (prove:subtest "Testing BUILD-ABCL." (prove:plan 2) (prove:ok (abcl-build:bu...
null
https://raw.githubusercontent.com/slyrus/abcl/881f733fdbf4b722865318a7d2abe2ff8fdad96e/contrib/abcl-build/build/t/abcl-build.lisp
lisp
(in-package :abcl/build/t) (if (not (ignore-errors (asdf:find-system :abcl))) (prove:diag "Unable to find 'abcl.asd'.~&Enable ASDF to find 'abcl.asd' by adding symlink to ~~/common-lisp/ to ABCL source directory.") (prove:subtest "Testing BUILD-ABCL." (prove:plan 2) (prove:ok (abcl-build:bu...
65ac83a523e273a75440e4f53feafdb4d696686a9e121995d26aaf7a5593dd16
cljfx/cljfx
e21_extension_lifecycles.clj
(ns e21-extension-lifecycles (:require [cljfx.api :as fx] [cljfx.ext.node :as fx.ext.node]) (:import [javafx.scene Node] [javafx.animation TranslateTransition Interpolator] [javafx.util Duration] [javafx.scene.layout Region])) (defn- animate-entrance [^Node node] (dot...
null
https://raw.githubusercontent.com/cljfx/cljfx/ec3c34e619b2408026b9f2e2ff8665bebf70bf56/examples/e21_extension_lifecycles.clj
clojure
Imperative escape hatch in declarative world: you can use ext-on-instance-lifecycle to execute code when instance is created, replaced or deleted Use ext-instance-factory to just create an instance Use ext-let-refs and ext-get-ref to decouple lifecycles from scene graph. It allows to have same exact component inst...
(ns e21-extension-lifecycles (:require [cljfx.api :as fx] [cljfx.ext.node :as fx.ext.node]) (:import [javafx.scene Node] [javafx.animation TranslateTransition Interpolator] [javafx.util Duration] [javafx.scene.layout Region])) (defn- animate-entrance [^Node node] (dot...
603d65af611a6e63b22ec86cd6713c283ee24acea34a18fce52040f4ce75dd86
circuithub/rel8
Text.hs
# language DataKinds # module Rel8.Expr.Text ( -- * String concatenation (++.) -- * Regular expression operators , (~.), (~*), (!~), (!~*) -- * Standard SQL functions , bitLength, charLength, lower, octetLength, upper -- * PostgreSQL functions , ascii, btrim, chr, convert, convertFrom, c...
null
https://raw.githubusercontent.com/circuithub/rel8/50646730d9ed6514534e0f91338bcaa1293b7505/src/Rel8/Expr/Text.hs
haskell
* String concatenation * Regular expression operators * Standard SQL functions * PostgreSQL functions * @LIKE@ and @ILIKE@ base bytestring rel8 text | The PostgreSQL string concatenation operator. * Regular expression operators | Matches regular expression, case sensitive Corresponds to the @~.@ operator....
# language DataKinds # module Rel8.Expr.Text ( (++.) , (~.), (~*), (!~), (!~*) , bitLength, charLength, lower, octetLength, upper , ascii, btrim, chr, convert, convertFrom, convertTo, decode, encode , initcap, left, length, lengthEncoding, lpad, ltrim, md5 , pgClientEncoding, quoteIdent, quoteLitera...
d02daddc03b01000ad8cfae24e6e5897a4aee7640fed9280ebe1fbfbc1f6d652
Jarzka/stylefy
styles.cljs
(ns stylefy.examples.reagent.styles (:require [reagent.core :as r] [stylefy.core :as stylefy])) (def phone-width "414px") (stylefy/keyframes "simple-animation" [:0% {:background-color "red"}] [:100% {:background-color "blue"}]...
null
https://raw.githubusercontent.com/Jarzka/stylefy/8e465fb6088897c66f30d25bec2213c17fd515d2/examples/reagent/src/cljs/stylefy/examples/reagent/styles.cljs
clojure
other libraries / frameworks. Normally there is no need to create custom classes when using stylefy. sub-styles can also contain sub-styles sub-styles can also contain sub-styles
(ns stylefy.examples.reagent.styles (:require [reagent.core :as r] [stylefy.core :as stylefy])) (def phone-width "414px") (stylefy/keyframes "simple-animation" [:0% {:background-color "red"}] [:100% {:background-color "blue"}]...
180083afd09f694e026aff221070ed558c56797e8332c480aaa64ccc80f5dd2f
orx/ocaml-orx
render.ml
include Orx_gen.Render let get_world_position vector viewport = Vector.get_optional_vector (fun () v -> get_world_position vector viewport v) () let get_screen_position vector viewport = Vector.get_optional_vector (fun () v -> get_screen_position vector viewport v) ()
null
https://raw.githubusercontent.com/orx/ocaml-orx/ce3be01870b04a1498dbb24bbe4ad0f13d36615c/src/lib/render.ml
ocaml
include Orx_gen.Render let get_world_position vector viewport = Vector.get_optional_vector (fun () v -> get_world_position vector viewport v) () let get_screen_position vector viewport = Vector.get_optional_vector (fun () v -> get_screen_position vector viewport v) ()
e9344f4b8ea69cfaf183f30393133271cfb6c5947bd43c25236150facbd902cc
input-output-hk/marlowe-cardano
Spec.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE GADTs #-} # LANGUAGE PolyKinds # module Network.Protocol.Codec.Spec where import Data.ByteString.Lazy (ByteString, fromStrict, toChunks) import qualified Data.ByteString.Lazy as LBS import Data.Function ((&)) import Data.Functor.Identity (Identity(..)) import GHC.Show (...
null
https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/bc9a0325f13b886e90ea05196ffb70a46c2ab095/marlowe-protocols/src/Network/Protocol/Codec/Spec.hs
haskell
# LANGUAGE GADTs #
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE PolyKinds # module Network.Protocol.Codec.Spec where import Data.ByteString.Lazy (ByteString, fromStrict, toChunks) import qualified Data.ByteString.Lazy as LBS import Data.Function ((&)) import Data.Functor.Identity (Identity(..)) import GHC.Show (showSpace) import Netwo...
0eccc935eb5ef577baded8466fd533651d4eca45bd274cb5d265abd97e3fe938
jasonrudolph/one-rep-max
model.cljs
(ns one.repmax.model (:refer-clojure :exclude [set]) (:require [clojure.string :as string] [one.dispatch :as dispatch] [one.repmax.cookies :as cookies] [one.repmax.mongohq :as mongo])) (def initial-state {:state :start :datastore-configuration {:state :obtain...
null
https://raw.githubusercontent.com/jasonrudolph/one-rep-max/8bdc8eccd4f36cf91b0dd57b0a378efb1b24f7a3/src/app/cljs/one/repmax/model.cljs
clojure
Receiving events that update state TODO Add docs => State only changes as the result of an action message Managing the Datastore Configuration The :datastore-configuration map contains the following elements: the database from which the app will read/write its data the state of the datastore initiali...
(ns one.repmax.model (:refer-clojure :exclude [set]) (:require [clojure.string :as string] [one.dispatch :as dispatch] [one.repmax.cookies :as cookies] [one.repmax.mongohq :as mongo])) (def initial-state {:state :start :datastore-configuration {:state :obtain...
dadffd38948b0f7bfb7dbded7ff63534365003037b9199fc7132ac60c6081b24
clojure-interop/aws-api
core.clj
(ns core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[com.amazonaws.services.workmail.core])
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.workmail/src/core.clj
clojure
(ns core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[com.amazonaws.services.workmail.core])
455565cd04163126466217d99988a22b0904c2b30b4e9f5da57c5c6be0794e80
ocsigen/eliom
eliom_shared.server.mli
Ocsigen * * Copyright ( C ) 2014 * * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the License , or ( at ...
null
https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/lib/eliom_shared.server.mli
ocaml
* [to_signal ~init s] converts the Lwt-wrapped signal [s] into a regular signal with initial value [init]. * Accessing shared values * Shared implementation of React
Ocsigen * * Copyright ( C ) 2014 * * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the License , or ( at ...
740a13ef377fb1e531e8de58c05b19da0e0e53a108266edeb729129cd4d5133a
exoscale/ex
http.clj
(ns exoscale.ex.http (:require [exoscale.ex :as ex])) (defmulti response->ex-info! "Throws the matching ex exception for status HTTP response. Clients are expected to have already handled success status codes." :status) (defn- ex! [type message data] (throw (ex/ex-info message [:exosc...
null
https://raw.githubusercontent.com/exoscale/ex/a2172c271014dff3238f6a05b465af273252e87c/modules/ex-http/src/clj/exoscale/ex/http.clj
clojure
backward compat
(ns exoscale.ex.http (:require [exoscale.ex :as ex])) (defmulti response->ex-info! "Throws the matching ex exception for status HTTP response. Clients are expected to have already handled success status codes." :status) (defn- ex! [type message data] (throw (ex/ex-info message [:exosc...
e4ae2cfa1d4b9c671537446eca71b64216c7a7fe2d88579260a047b58516139e
v-kolesnikov/sicp
1_14_test.clj
(ns sicp.chapter01.1-14-test (:require [clojure.test :refer :all] [sicp.test-helper :refer :all] [sicp.chapter01.1-14 :refer :all])) (deftest test-count-change (assert-equal 1 (count-change 0)) (assert-equal 0 (count-change -1)) (assert-equal 4 (count-change 11)) (assert-equal 292 (co...
null
https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter01/1_14_test.clj
clojure
(ns sicp.chapter01.1-14-test (:require [clojure.test :refer :all] [sicp.test-helper :refer :all] [sicp.chapter01.1-14 :refer :all])) (deftest test-count-change (assert-equal 1 (count-change 0)) (assert-equal 0 (count-change -1)) (assert-equal 4 (count-change 11)) (assert-equal 292 (co...
874c6b87d71dbcccaf920a7acdc30fe09e09b13bbaf3883639c11e6606cb8b73
afainer/cleven
game.lisp
Copyright ( c ) 2015 - 2016 , < > ;;; ;;; Permission is hereby granted, free of charge, to any person obtaining ;;; a copy of this software and associated documentation files (the " Software " ) , to deal in the Software without restriction , including ;;; without limitation the rights to use, copy, modify, merg...
null
https://raw.githubusercontent.com/afainer/cleven/24e3102f01c4f18152b2618c994aa7b6a7598755/game.lisp
lisp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the without limitation the rights to use, copy, modify, merge, publish, the following conditions: The above copyright notice and this permission notice shall be EXPRESS OR IMPLIED, ...
Copyright ( c ) 2015 - 2016 , < > " Software " ) , to deal in the Software without restriction , including distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , subject to included in all copies or substantial portions of the Softw...
d7ca995d20a44b32ced8d40c2368b1252a253933b2c64f1aa4c874a6d648a1ef
marcoonroad/ocaml-cuid
cuid_unix.ml
include Cuid_core.Make (struct let digest text = Digest.to_hex (Digest.string text) let string_to_char_list string = let rec loop acc i = if i < 0 then acc else loop (string.[i] :: acc) (i - 1) in loop [] (String.length string - 1) let sum text = let number = text |> string_to_...
null
https://raw.githubusercontent.com/marcoonroad/ocaml-cuid/478e927c7ecdc688cd0b216dea3b4574323f24e5/lib/cuid-unix/cuid_unix.ml
ocaml
include Cuid_core.Make (struct let digest text = Digest.to_hex (Digest.string text) let string_to_char_list string = let rec loop acc i = if i < 0 then acc else loop (string.[i] :: acc) (i - 1) in loop [] (String.length string - 1) let sum text = let number = text |> string_to_...
3d8a49881cfef292181277bc9b6e5966e53d77873e1a4795641c287137c89362
karlhof26/gimp-scheme
melcher-selective-coloring.scm
; ; The GIMP -- an image manipulation program Copyright ( C ) 1995 and ; selective - colouring script for GIMP 2.10.22 Original author : ( ) At xMedia , The Netherlands ; ; Tags: photo, selection, color ; ; Author statement: ; ; Allows you to change the overall color or the color balance of a selectio...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/2a1258bc3771287f83bd0ae94b6e7341a7bb4371/melcher-selective-coloring.scm
scheme
The GIMP -- an image manipulation program Tags: photo, selection, color Author statement: Allows you to change the overall color or the color balance of a selection -------------------------------------------------------------------- -------------------------------------------------------------------- -...
Copyright ( C ) 1995 and selective - colouring script for GIMP 2.10.22 Original author : ( ) At xMedia , The Netherlands and all the area around it at the same time , using two different adjustments . Distributed by Gimp FX Foundry project it under the terms of the GNU General Public License a...
0eeb7be5b44c7b9c98dbcfa4f20bff7a859603ddb9a2ef2f60a04100127691cf
takikawa/racket-ppa
info.rkt
(module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote (("base" #:version "6.2.900.6")))) (define build-deps (quote ("rackunit-lib"))) (define pkg-desc "implementation (no documentation) part of \"data\"") (define pkg-authors (quote (ryanc))) (define version "1.1") (define lice...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/data-lib/info.rkt
racket
(module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote (("base" #:version "6.2.900.6")))) (define build-deps (quote ("rackunit-lib"))) (define pkg-desc "implementation (no documentation) part of \"data\"") (define pkg-authors (quote (ryanc))) (define version "1.1") (define lice...
f2c68768b34f3d4a86ba109ddd4bb9ed99b8267bf045510e04910c7198727e26
vascokk/NumEr
numer_blas_tests.erl
-module(numer_blas_tests). -compile(export_all). -include("numer.hrl"). -include_lib("eunit/include/eunit.hrl"). -define(setup(F), {setup, fun start/0, fun stop/1, F}). transpose([[]|_]) -> []; transpose(M) -> [lists:map(fun hd/1, M) | transpose(lists:map(fun tl/1, M))]. transpose_gpu(Ctx, Buf_A, Buf_B) -> ...
null
https://raw.githubusercontent.com/vascokk/NumEr/0d22c31633ef2ab43dde50809a9dbbb6a736f5b7/test/numer_blas_tests.erl
erlang
Matrix-matrix multiplication benchmark CPU test ?debugMsg(io_lib:format("~n M result:~p",[ResM])), GPU CUBLAS test CPU multiplication with GPU transpose Print results GEMM: C = α op ( A ) op ( B ) + β C row major row major num_cols_A num_cols_B row major row major row major num cols transpose_op(A) and rows tran...
-module(numer_blas_tests). -compile(export_all). -include("numer.hrl"). -include_lib("eunit/include/eunit.hrl"). -define(setup(F), {setup, fun start/0, fun stop/1, F}). transpose([[]|_]) -> []; transpose(M) -> [lists:map(fun hd/1, M) | transpose(lists:map(fun tl/1, M))]. transpose_gpu(Ctx, Buf_A, Buf_B) -> ...
294e3cea9dbaab67f49f6b82f798bba372c1ac2070d19589085c0768fda15fd5
NorfairKing/cursor
Types.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE RankNTypes #-} module Cursor.Types where import Control.Applicative import Data.Functor.Compose import qualified Data.Text.Internal as T import Data.Validity import GHC.Generics (Generic) import Lens.Micro isSafeChar :: Char -> Bool isSafeChar c = T.safe c == c data DeleteOrU...
null
https://raw.githubusercontent.com/NorfairKing/cursor/71ec3154809e229efbf35d500ac6d1a42ae5fdc0/cursor/src/Cursor/Types.hs
haskell
# LANGUAGE RankNTypes #
# LANGUAGE DeriveGeneric # module Cursor.Types where import Control.Applicative import Data.Functor.Compose import qualified Data.Text.Internal as T import Data.Validity import GHC.Generics (Generic) import Lens.Micro isSafeChar :: Char -> Bool isSafeChar c = T.safe c == c data DeleteOrUpdate a = Deleted | Upda...
0dcf49183f1da170fa5da407581f6693f0f58eb4024e5b6412bdb447fb0dab83
Airini/FEECa
FailEgs.hs
# LANGUAGE FlexibleContexts # module FEECa.FailEgs where import FEECa.Internal.Form import FEECa.Internal.Vector import FEECa.DifferentialForm import FEECa.Internal.Spaces n01 = 49 (ar01a, ar01b) = (1,5) form01 = Form { arity = 1 , dimVec = 6 , terms = [ (-16.0,[5]),(-52.0,[2]),(-41.0,[4]),(79.0,[2]),(34...
null
https://raw.githubusercontent.com/Airini/FEECa/3ffae7177fca159d965b70e3763a20ab84cd8a8b/tests/logs/FailEgs.hs
haskell
# LANGUAGE FlexibleContexts # module FEECa.FailEgs where import FEECa.Internal.Form import FEECa.Internal.Vector import FEECa.DifferentialForm import FEECa.Internal.Spaces n01 = 49 (ar01a, ar01b) = (1,5) form01 = Form { arity = 1 , dimVec = 6 , terms = [ (-16.0,[5]),(-52.0,[2]),(-41.0,[4]),(79.0,[2]),(34...
e9d03052a084ae405e4dc3622d105fd57baf332ae2844a6849bf887119a2298f
erlio/vmq_commons
on_register_hook.erl
-module(on_register_hook). -include("vmq_types.hrl"). %% called as an 'all' hook, return value is ignored -callback on_register(Peer :: peer(), SubscriberId :: subscriber_id(), UserName :: username()) -> any().
null
https://raw.githubusercontent.com/erlio/vmq_commons/847d92d23ec212430bd8bace097ee91a033a8ff9/src/on_register_hook.erl
erlang
called as an 'all' hook, return value is ignored
-module(on_register_hook). -include("vmq_types.hrl"). -callback on_register(Peer :: peer(), SubscriberId :: subscriber_id(), UserName :: username()) -> any().
283b018f1edcdd6c6c2d19095c91708a944d9e5fa1c6ef37d42dedac3b2d6a34
metosin/reitit
impl_test.cljc
(ns reitit.impl-test (:require [clojure.test :refer [are deftest is]] [reitit.impl :as impl])) (deftest strip-nils-test (is (= {:a 1, :c false} (impl/strip-nils {:a 1, :b nil, :c false})))) (deftest url-encode-and-decode-test (is (= "reitit.impl-test%2Fkikka" (-> ::kikka ...
null
https://raw.githubusercontent.com/metosin/reitit/e5bd1237400dcd25f211fc2999b38e6fe1e9033b/test/cljc/reitit/impl_test.cljc
clojure
test from -> UriEncodingSpec.scala
(ns reitit.impl-test (:require [clojure.test :refer [are deftest is]] [reitit.impl :as impl])) (deftest strip-nils-test (is (= {:a 1, :c false} (impl/strip-nils {:a 1, :b nil, :c false})))) (deftest url-encode-and-decode-test (is (= "reitit.impl-test%2Fkikka" (-> ::kikka ...
c22b778c3914513efc89827b80f55a0e9ec3930c974cee1db0e9a69dee6ca016
Andreshk/FunctionalProgramming2018
20181220-week12.hs
data Tree a = Empty | Node a (Tree a) (Tree a) deriving Show t :: Tree Int t = Node 5 (Node 2 (Node 10 Empty Empty) (Node 4 (Node 3 Empty Empty) Empty)) (Node 3 (Node 1 Empty Empty) Empty) можем да избягваме използването функции ...
null
https://raw.githubusercontent.com/Andreshk/FunctionalProgramming2018/9ac91beb503c2d06ba3d882b3d38d469ffca3288/20181220-week12.hs
haskell
и да използваме само pattern matching treeMap :: (a -> b) -> Tree a -> Tree b treeMap _ Empty = Empty Ако искаме pretty-printing, трябва да инстанцираме Show data Maybe a = Nothing | Just a
data Tree a = Empty | Node a (Tree a) (Tree a) deriving Show t :: Tree Int t = Node 5 (Node 2 (Node 10 Empty Empty) (Node 4 (Node 3 Empty Empty) Empty)) (Node 3 (Node 1 Empty Empty) Empty) можем да избягваме използването функции ...
cac8b5ecc5ab848d0665d290655daadb0130cabda0bef34379e88cf5218382e3
dbuenzli/ptime
test_rand.ml
--------------------------------------------------------------------------- Copyright ( c ) 2015 The ptime programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c)...
null
https://raw.githubusercontent.com/dbuenzli/ptime/119855a330424914fdccce82e5bf7b111e64bab8/test/test_rand.ml
ocaml
Random state auto-seed auto seed inclusive Random times max of Random.int N.B. We don't cover the whole spectrum Random loop length Command line helpers
--------------------------------------------------------------------------- Copyright ( c ) 2015 The ptime programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c)...
13a27debe064b6679071c1bdcb977565e22520c9224165a5f7c836e782f3bb48
higherkindness/mu-haskell
Definition.hs
# language CPP # # language DataKinds # {-# language DeriveAnyClass #-} # language DeriveGeneric # {-# language DerivingVia #-} # language DuplicateRecordFields # # language FlexibleContexts # # language FlexibleInstances # # language MultiParamTypeCl...
null
https://raw.githubusercontent.com/higherkindness/mu-haskell/e41ba786f556cfac962e0f183b36bf9ae81d69e4/examples/health-check/src/Definition.hs
haskell
# language DeriveAnyClass # # language DerivingVia # # language OverloadedLabels #
# language CPP # # language DataKinds # # language DeriveGeneric # # language DuplicateRecordFields # # language FlexibleContexts # # language FlexibleInstances # # language MultiParamTypeClasses # # language PolyKinds # # language TemplateHaskell ...
a60c18d68b3f868a9409f13d83b819c76e6436322d91d6f5428e8d504a2c059b
tdrhq/fiveam-matchers
described-as.lisp
(defpackage :fiveam-matchers/described-as (:use #:cl) (:import-from #:fiveam-matchers/delegating #:delegating-matcher) (:import-from #:fiveam-matchers/core #:describe-self) (:local-nicknames (#:a #:alexandria)) (:export #:described-as)) (in-package :fiveam-matchers/described...
null
https://raw.githubusercontent.com/tdrhq/fiveam-matchers/3dd3a3580e9c3b513d876266538cd35490fd25ca/described-as.lisp
lisp
The reason this is a macro and not a function is just because of these were arguments.
(defpackage :fiveam-matchers/described-as (:use #:cl) (:import-from #:fiveam-matchers/delegating #:delegating-matcher) (:import-from #:fiveam-matchers/core #:describe-self) (:local-nicknames (#:a #:alexandria)) (:export #:described-as)) (in-package :fiveam-matchers/described...
aee21d7e464cc75e7e2b459a7b9dff1f576c3ba2c51a1e4896ada7026df68450
ralsei/graphite
renderers.rkt
#lang racket (require data-frame graphite rackunit racket/runtime-path "util.rkt") (define-runtime-path points-1-data "./test-data/points-1.dat") (define points-1-df (let ([int-data (make-data-frame)] [xs (build-vector 10000 add1)]) (df-add-series! int-data (make-series "x-var" #:data x...
null
https://raw.githubusercontent.com/ralsei/graphite/9b3de31156543dd135e6286132a88a48af2b8298/graphite-test/renderers.rkt
racket
#lang racket (require data-frame graphite rackunit racket/runtime-path "util.rkt") (define-runtime-path points-1-data "./test-data/points-1.dat") (define points-1-df (let ([int-data (make-data-frame)] [xs (build-vector 10000 add1)]) (df-add-series! int-data (make-series "x-var" #:data x...
7ac8e9d0cf7430ae2bdc14d8ecc09766e48da53101ee7efc31a64f6dcec5c553
vernemq/vernemq
vmq_ql_app.erl
Copyright 2018 Erlio GmbH Basel Switzerland ( ) %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, sof...
null
https://raw.githubusercontent.com/vernemq/vernemq/eb1a262035af47e90d9edf07f36c1b1503557c1f/apps/vmq_ql/src/vmq_ql_app.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright 2018 Erlio GmbH Basel Switzerland ( ) Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(vmq_ql_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> vmq_ql_sup...
e80f88904b13f5e7a401683e51e007f6de7f9e391e4d095cab170010ce47c52d
callum-oakley/advent-of-code
09.clj
(ns aoc.2020.09 (:require [clojure.math.combinatorics :as comb] [clojure.string :as str] [clojure.test :refer [deftest is]])) (defn parse [s] (mapv read-string (str/split-lines s))) (defn part-1 ([numbers] (part-1 25 numbers)) ([preamble-len numbers] (when (> (count numbers) preamble-len) (le...
null
https://raw.githubusercontent.com/callum-oakley/advent-of-code/e24c126fdfa4852c1380f5d1b1fda96da1ebe553/src/aoc/2020/09.clj
clojure
(ns aoc.2020.09 (:require [clojure.math.combinatorics :as comb] [clojure.string :as str] [clojure.test :refer [deftest is]])) (defn parse [s] (mapv read-string (str/split-lines s))) (defn part-1 ([numbers] (part-1 25 numbers)) ([preamble-len numbers] (when (> (count numbers) preamble-len) (le...
92f6fa3c6e044711fca8b69298078e52321820959374326129d5de81c9c25987
anoma/juvix
Backends.hs
module Juvix.Data.Backends where import Juvix.Data.WithLoc import Juvix.Prelude.Base data Backend = BackendGhc | BackendC deriving stock (Show, Eq, Ord, Generic, Data) instance Hashable Backend data BackendItem = BackendItem { _backendItemBackend :: WithLoc Backend, _backendItemCode :: Text } derivi...
null
https://raw.githubusercontent.com/anoma/juvix/88ab62235378f669799e3112603277dca00e58c6/src/Juvix/Data/Backends.hs
haskell
module Juvix.Data.Backends where import Juvix.Data.WithLoc import Juvix.Prelude.Base data Backend = BackendGhc | BackendC deriving stock (Show, Eq, Ord, Generic, Data) instance Hashable Backend data BackendItem = BackendItem { _backendItemBackend :: WithLoc Backend, _backendItemCode :: Text } derivi...
5c6be7423813dc314813eab50a66e4f96968d0cf44d40a8ac3f19a57c7b35768
barrucadu/yukibot
Monad.hs
-- | Module : . Monad Copyright : ( c ) 2016 License : MIT -- Stability : experimental -- Portability : portable module Yukibot.Monad where import Control.Applicative ((<*)) import Control.Monad.Trans.Free (liftF, iterT) import Data.Text (Text) import qualified Database.MongoDB as M import qu...
null
https://raw.githubusercontent.com/barrucadu/yukibot/7b12153e2cc71b62f86ab3a851a250dce83343b8/yukibot-core/Yukibot/Monad.hs
haskell
| Stability : experimental Portability : portable ----------------------------------------------------------------------------- * Monad | Run a 'BackendM' computation. ^ The state of the \"builtin\" plugin. ^ Connection info for the MongoDB database. ^ The instantiated backend. ^ The currently-executing plug...
Module : . Monad Copyright : ( c ) 2016 License : MIT module Yukibot.Monad where import Control.Applicative ((<*)) import Control.Monad.Trans.Free (liftF, iterT) import Data.Text (Text) import qualified Database.MongoDB as M import qualified Yukibot.Backend as Backend import qualified Yukibot.P...
40b8f7333d58494dd3bc149292aad4aec980f1d86045292088418e1e0d759892
Javran/advent-of-code
Day12.hs
module Javran.AdventOfCode.Y2019.Day12 ( ) where import Control.Lens import qualified Data.Map.Strict as M import Data.Monoid import Javran.AdventOfCode.NumberTheory import Javran.AdventOfCode.Prelude import Linear.Affine import Linear.V3 hiding (ex) import Text.ParserCombinators.ReadP hiding (count, many) data Day...
null
https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2019/Day12.hs
haskell
pos vel do nothing
module Javran.AdventOfCode.Y2019.Day12 ( ) where import Control.Lens import qualified Data.Map.Strict as M import Data.Monoid import Javran.AdventOfCode.NumberTheory import Javran.AdventOfCode.Prelude import Linear.Affine import Linear.V3 hiding (ex) import Text.ParserCombinators.ReadP hiding (count, many) data Day...
4bc1f5e4af2b5f81a7143d5a5f92ed1b1f8d3e8eca3f36d50836dfa951c77899
ghcjs/jsaddle-dom
HTMLElement.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.HTMLElement (newHTMLElement, click, focus, blur, setTitle, getTitle, setLang, getLang, setTranslate, getTra...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/HTMLElement.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/HTMLElement.outerText Mozilla HTMLElement.outerText documentation> | <-US/docs/Web/API/HTMLElement.outerText Mozilla HTMLElement.outerText documentation>
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.HTMLElement (newHTMLElement, click, focus, blur, setTitle, getTitle, setLang, getLang, setTranslate, getTranslate, setDir, getDir, getDataset, setHidden, getHidden, setTabIndex, getTabIndex, setAcce...
02c2625286c33b117586c2a473a25233e0565643d21911359e8b5906deba8247
poroh/ersip
ersip_hdr_test.erl
%% Copyright ( c ) 2017 , 2018 Dmitry Poroh %% All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . %% %% iolist tests %% -module(ersip_hdr_test). -include_lib("eunit/include/eunit.hrl"). %%%=================================================================== %%% Cases %%%=...
null
https://raw.githubusercontent.com/poroh/ersip/f1b0d3c5713fb063a6cc327ea493f06cff6a6e5e/test/message/ersip_hdr_test.erl
erlang
All rights reserved. iolist tests =================================================================== Cases =================================================================== For headers that are proteced from separation by ",": The exceptions to this rule are the WWW-Authenticate, header fields. ============...
Copyright ( c ) 2017 , 2018 Dmitry Poroh Distributed under the terms of the MIT License . See the LICENSE file . -module(ersip_hdr_test). -include_lib("eunit/include/eunit.hrl"). as_integer_test() -> H0 = ersip_hdr:new(<<"Content-Length">>), H1 = ersip_hdr:add_value([<<"1">>, <<"0">>], H0), ?assertE...
34d1e2d36ec49f755343a3b72ad38283bdf9c2aa6dc7c46104b09e404cf57b45
biocad/math-grads
Angem.hs
-- | Module providing miscellaneous functions for working with -- coordinates, vectors and matrices. -- module Math.Grads.Angem ( alignmentFunc , areIntersected , eqV2 , rotation2D , reflectPoint ) where import Math.Grads.Angem.Internal.MatrixOperations (alignmentFunc, ...
null
https://raw.githubusercontent.com/biocad/math-grads/df7bdc48f86f57f3d011991c64188489e8d73bc1/src/Math/Grads/Angem.hs
haskell
| Module providing miscellaneous functions for working with coordinates, vectors and matrices.
module Math.Grads.Angem ( alignmentFunc , areIntersected , eqV2 , rotation2D , reflectPoint ) where import Math.Grads.Angem.Internal.MatrixOperations (alignmentFunc, rotation2D) import Math.Grads.Angem.Internal.VectorOperation...
e35cb0ce7a1b3d33e363c085095cc34c7b479bf09bfbbc8014c2dc7058a4a21d
nomeata/haskell-candid
Parse.hs
{-# LANGUAGE DeriveTraversable #-} module Codec.Candid.Parse ( DidFile(..) , DidDef , TypeName , parseDid , parseDidType , parseValue , parseValues , CandidTestFile(..) , CandidTest(..) , TestInput(..) , TestAssertion(..) , parseCandidTests ) where import qualified Data.ByteString.Lazy as BS...
null
https://raw.githubusercontent.com/nomeata/haskell-candid/87a4f01eb9cb93c827a0a7f5f29af0ee19135308/src/Codec/Candid/Parse.hs
haskell
# LANGUAGE DeriveTraversable # | Parses a Candid description (@.did@) from a string | Parses a Candid textual value from a string | Parses a sequence of Candid textual values from a string NOTE: This discards "init" arguments: #core-grammar See also -candid/issues/16 slightly too liberal: allows leading _ TODO...
module Codec.Candid.Parse ( DidFile(..) , DidDef , TypeName , parseDid , parseDidType , parseValue , parseValues , CandidTestFile(..) , CandidTest(..) , TestInput(..) , TestAssertion(..) , parseCandidTests ) where import qualified Data.ByteString.Lazy as BS import qualified Data.Text.Encodin...
6e507325de9c2ff23957c81ebfa7aeb16535f5fd9415b5153e08cc9e6f9ec3b8
silviucpp/erl_hash
erl_hash_app.erl
%%%------------------------------------------------------------------- %% @doc erl_hash public API %% @end %%%------------------------------------------------------------------- -module(erl_hash_app). -behaviour(application). %% Application callbacks -export([start/2, stop/1]). %%===================================...
null
https://raw.githubusercontent.com/silviucpp/erl_hash/fff240f350c8f0aa3968a0c843f84fa153a8529a/src/erl_hash_app.erl
erlang
------------------------------------------------------------------- @doc erl_hash public API @end ------------------------------------------------------------------- Application callbacks ==================================================================== API =======================================================...
-module(erl_hash_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> erl_hash_sup:start_link(). stop(_State) -> ok. Internal functions
5aef45cecbd7eaaae30d4e7ef9087f58837e39c6223afb893a74412aa151b3dc
greglook/merkle-db
tablet_test.clj
(ns merkle-db.tablet-test (:require [clojure.spec.alpha :as s] [clojure.test :refer :all] [merkle-db.key :as key] [merkle-db.tablet :as tablet] [merkle-db.test-utils])) (def empty-tablet (tablet/from-records [])) (deftest tablet-spec (is (invalid? ::tablet/node-data nil)) (is (invalid? :...
null
https://raw.githubusercontent.com/greglook/merkle-db/449f58005cac0390a40ea15f9bf5403443f3be7d/lib/core/test/merkle_db/tablet_test.clj
clojure
(ns merkle-db.tablet-test (:require [clojure.spec.alpha :as s] [clojure.test :refer :all] [merkle-db.key :as key] [merkle-db.tablet :as tablet] [merkle-db.test-utils])) (def empty-tablet (tablet/from-records [])) (deftest tablet-spec (is (invalid? ::tablet/node-data nil)) (is (invalid? :...
77fc9ec24d9bda25d779b07ffaf8a2450c40bbe2db0cb69c1a516032760a3db8
VisionsGlobalEmpowerment/webchange
views.cljs
(ns webchange.lesson-builder.tools.script.track-selector.views (:require [re-frame.core :as re-frame] [reagent.core :as r] [webchange.lesson-builder.tools.script.block.views :refer [block]] [webchange.lesson-builder.tools.script.track-selector.state :as state] [webchange.ui.index :as ui])) (defn-...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/4be2784b170befe245d60e32271b88e6fae31c13/src/cljs/webchange/lesson_builder/tools/script/track_selector/views.cljs
clojure
(ns webchange.lesson-builder.tools.script.track-selector.views (:require [re-frame.core :as re-frame] [reagent.core :as r] [webchange.lesson-builder.tools.script.block.views :refer [block]] [webchange.lesson-builder.tools.script.track-selector.state :as state] [webchange.ui.index :as ui])) (defn-...
064d4887c05b07b469bdd3e678a6c543983ab32f577c96e36dba58aabb056645
stumpwm/stumpwm-contrib
package.lisp
package.lisp (defpackage #:maildir (:use #:cl :stumpwm))
null
https://raw.githubusercontent.com/stumpwm/stumpwm-contrib/a7dc1c663d04e6c73a4772c8a6ad56a34381096a/modeline/maildir/package.lisp
lisp
package.lisp (defpackage #:maildir (:use #:cl :stumpwm))
f209c1986138255ac05a2efa43ff18d5f3842d82af3649eeafa919585412c3b5
sibylfs/sibylfs_src
abstract_string.ml
(****************************************************************************) Copyright ( c ) 2013 , 2014 , 2015 , , , , ( as part of the SibylFS project ) (* *) (* Permission to use, copy, modify, and/or d...
null
https://raw.githubusercontent.com/sibylfs/sibylfs_src/30675bc3b91e73f7133d0c30f18857bb1f4df8fa/fs_spec/src/abstract_string.ml
ocaml
************************************************************************** Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright no...
Copyright ( c ) 2013 , 2014 , 2015 , , , , ( as part of the SibylFS project ) THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL PROFITS , WHETHER IN AN ACTION OF CONTRACT , NEGLIGENCE OR OTHER TORTIOUS ACTION , ARISING OUT OF OR IN CONNE...
df1a865af03a200a207f4143c0581d82d6e6c63cab57abfd1d9bdb8d8e04bf11
kompendium-ano/factom-haskell-client
Spec.hs
import Control.Exception (evaluate) import Test.Hspec import Test.QuickCheck main :: IO () main = hspec $ do describe "Prelude.head" $ do it "returns the first element of a list" $ do head [23 ..] `shouldBe` (23 :: Int) it "returns the first element of an *arbitr...
null
https://raw.githubusercontent.com/kompendium-ano/factom-haskell-client/87a73bb9079859f6223f8259da0dc9da568d1233/tests/Spec.hs
haskell
import Control.Exception (evaluate) import Test.Hspec import Test.QuickCheck main :: IO () main = hspec $ do describe "Prelude.head" $ do it "returns the first element of a list" $ do head [23 ..] `shouldBe` (23 :: Int) it "returns the first element of an *arbitr...
8a8c0e423483bc11dab196b3213742ebf39112f11b6fae67fbd12f4fc05bb4a6
nikodemus/SBCL
backq.lisp
;;;; the backquote reader macro This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the public domain and is ;;...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/code/backq.lisp
lisp
the backquote reader macro more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. The flags passed back by BACKQUOTIFY can be interpreted as follows: |`,|: [a] => a the NIL flag is used only w...
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB!IMPL") (/show0 "entering backq.lisp") : [ a ] = > ( APPEND . a ) \ car || otherwise | ...
2326b063c26322804cb6a74da1d0289cfdc0f2948a7853d307ac42693aa1f205
nick8325/quickspec
IntSet.hs
-- Laws about Data.IntSet. -- Illustrates user-defined data types. import QuickSpec import qualified Data.IntSet as IntSet import Data.IntSet(IntSet) main = quickSpec [ monoType (Proxy :: Proxy IntSet), withMaxTests 10000, series [sig1, sig2, sig3]] where sig1 = [ con "union" IntSet.union, con...
null
https://raw.githubusercontent.com/nick8325/quickspec/cb61f719d3d667674431867037ff44dec22ca4f9/examples/IntSet.hs
haskell
Laws about Data.IntSet. Illustrates user-defined data types.
import QuickSpec import qualified Data.IntSet as IntSet import Data.IntSet(IntSet) main = quickSpec [ monoType (Proxy :: Proxy IntSet), withMaxTests 10000, series [sig1, sig2, sig3]] where sig1 = [ con "union" IntSet.union, con "intersection" IntSet.intersection, con "empty" IntSet.empty...
e56b2d6647ebda9c311c78acc154e5a82fb416af5e37ceb5e7d9e7105bd5d584
glguy/advent
17.hs
{-# Language QuasiQuotes #-} | Module : Main Description : Day 17 solution Copyright : ( c ) , 2021 License : ISC Maintainer : < > Launch probes to hit a target . This solution relies on the target being in quadrant IV . You could do the math for the other quadrants , but I did ...
null
https://raw.githubusercontent.com/glguy/advent/7ab9f9e47208fd5720e36bac33fee2b78d4ec50b/solutions/src/2021/17.hs
haskell
# Language QuasiQuotes # | The state of a traveling probe ^ x-position y-position x-velocity y-velocity | >>> :main | Run a simulation returning the maximum height seen if the probe ever succeeds in hitting the target. ^ target x lo ^ target x hi ^ target y lo ^ target y hi ^ initial x velocity ^ initi...
| Module : Main Description : Day 17 solution Copyright : ( c ) , 2021 License : ISC Maintainer : < > Launch probes to hit a target . This solution relies on the target being in quadrant IV . You could do the math for the other quadrants , but I did n't bother ! Boundary co...
d394fdcc232b938e2358897d604377071e84f00ed504b06367745c7222bc9e29
argp/bap
oper.ml
(**************************************************************************) (* *) : a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and (* ...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocamlgraph/src/oper.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
: a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking module t...
30264c20d04f521821d9ac50c8fa4b03b699fc8ab919ea8e7ea911ce13ff44c3
mirage/ocaml-dns-forward
dns_forward_config.mli
* Copyright ( C ) 2016 < > * * 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 THE AU...
null
https://raw.githubusercontent.com/mirage/ocaml-dns-forward/1b253cbf0e1c15b80facbb13ced762a0dfa99bdf/lib/dns_forward_config.mli
ocaml
* Copyright ( C ) 2016 < > * * 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 THE AU...
80cf25621953a156d8d291d509195dc89e0c7f52eff0ac64184d60c4d20bf95a
spechub/Hets
Util.hs
| Module : ./Maude / Util.hs Description : Utility Functions Copyright : ( c ) , Uni Bremen 2009 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable Utility functions used in the language module . Module ...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Maude/Util.hs
haskell
| Apply the given Map as a function. Works as the identity function for items not contained in the Map.
| Module : ./Maude / Util.hs Description : Utility Functions Copyright : ( c ) , Uni Bremen 2009 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable Utility functions used in the language module . Module ...
20cb1a9bcf15ced400b0dc4f5e0014e761b880c025c10a8bd293effe9524b411
input-output-hk/plutus-apps
VSqlite.hs
module Marconi.Core.Index.VSqlite ( -- * API SqliteIndex , new , newBoxed , S.insert , S.insertL , S.size , S.rewind , S.getEvents , S.getBuffer , S.handle , S.storage ) where import Control.Monad.Primitive (PrimState) import Data.Vector qualified as V import Data.Vector.Generic qualified a...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/813d18f755a75b348251345d8ce2d9659a712e35/marconi-core/src/Marconi/Core/Index/VSqlite.hs
haskell
* API
module Marconi.Core.Index.VSqlite SqliteIndex , new , newBoxed , S.insert , S.insertL , S.size , S.rewind , S.getEvents , S.getBuffer , S.handle , S.storage ) where import Control.Monad.Primitive (PrimState) import Data.Vector qualified as V import Data.Vector.Generic qualified as VG import D...
4f202ebb56583bacaba678c71b02dfb1f2fe48f0e22c5d1e4100ee95fb94ada2
compiling-to-categories/concat
Satisfy.hs
# LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE AllowAmbiguousTypes # # OPTIONS_GHC -Wall # {-# OPTIONS_GHC -Wno-unused-imports #-} -- TEMP -- | Magic function interface to ConCat.Satisfy.Plugin module ConCat.Satisfy where -- | M...
null
https://raw.githubusercontent.com/compiling-to-categories/concat/49e554856576245f583dfd2484e5f7c19f688028/satisfy/src/ConCat/Satisfy.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE RankNTypes # # OPTIONS_GHC -Wno-unused-imports # TEMP | Magic function interface to ConCat.Satisfy.Plugin | Magic function to satisfy a constraint. Requires -fplugin=ConCat.Satisfy.Plugin to work. # NOINLINE [0] satisfy # The a argument contains a tuple of dictionary variable...
# LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables # # LANGUAGE AllowAmbiguousTypes # # OPTIONS_GHC -Wall # module ConCat.Satisfy where satisfy :: forall c z. (c => z) -> z satisfy _ = error "satisfy: Use -fplugin=ConCat.Satisfy.Plugin" satisfy' :: forall ev c z. ev -> (c => z) -> z satisfy' _ _ = error ...
9a8b896ce3e2a975b91378c4641a6cfa8a51c8085a57286adf4e808feb848d03
mpickering/apply-refact
Default102.hs
bar = [x| (x,_) <- pts]
null
https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Default102.hs
haskell
bar = [x| (x,_) <- pts]
626082c60e012bc72927b76bc3a868fd3efa4865170e66b8f71158dcb623f092
tmattio/js-bindings
semanticTokens.mli
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"] ] open Ts2ocaml_baselib unknown identifiers : - BaseLanguageClient - ClientCapabilities - DocumentSelector - SemanticTokensOptions - SemanticTokensRegistrationOptions - ServerCapabilities - TextDocu...
null
https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/vscode-languageclient/_gen/semanticTokens.mli
ocaml
import * as vscode from 'vscode'; import { BaseLanguageClient, TextDocumentFeature } from './client';
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"] ] open Ts2ocaml_baselib unknown identifiers : - BaseLanguageClient - ClientCapabilities - DocumentSelector - SemanticTokensOptions - SemanticTokensRegistrationOptions - ServerCapabilities - TextDocu...
7782056284d3894f09f1d2b7721fe35456dd300808f7e4d64dde97b8112c6e18
cuter-testing/cuter
cuter_iserver.erl
-*- erlang - indent - level : 2 -*- %%------------------------------------------------------------------------------ -module(cuter_iserver). -behaviour(gen_server). -include("include/cuter_macros.hrl"). %% external exports -export([start/6, node_servers/2, int_return/2, send_error_report/3, monitor_logs/2, send_map...
null
https://raw.githubusercontent.com/cuter-testing/cuter/290e38c61cb0e87a764fd1fa2511c22d10ef8233/src/cuter_iserver.erl
erlang
------------------------------------------------------------------------------ external exports gen_server callbacks Internal type declarations Server's state --------------- depth :: cuter:depth() Number of branches to log per process. Intended for the MonitorServer. info :: logs() int :: {pid(), runnin...
-*- erlang - indent - level : 2 -*- -module(cuter_iserver). -behaviour(gen_server). -include("include/cuter_macros.hrl"). -export([start/6, node_servers/2, int_return/2, send_error_report/3, monitor_logs/2, send_mapping/2, Access logs logs_foreach/2, int_of_node_logs/1, mapping_of_node_logs/1, monitorLog...
18ac8184c9b194981b85bd631a423a883c6b0f62df22e5930fc438813397804b
ghc/testsuite
tcfail137.hs
# LANGUAGE DatatypeContexts # -- Test the stupid context on newtypes ( GHC 6.4 dropped it on the floor by mistake ) module ShouldFail where newtype Floating a => Test a = Test [a] x = Test [False, True]
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail137.hs
haskell
Test the stupid context on newtypes
# LANGUAGE DatatypeContexts # ( GHC 6.4 dropped it on the floor by mistake ) module ShouldFail where newtype Floating a => Test a = Test [a] x = Test [False, True]
2c5f20cca49b6769792e58080c75228001dacf9871cddadc520006acc9a1921a
RyanGlScott/text-show-instances
Time.hs
# LANGUAGE CPP # #if MIN_VERSION_time(1,8,0) # LANGUAGE DeriveGeneric # # LANGUAGE StandaloneDeriving # # OPTIONS_GHC -Wno - orphans # #endif | Module : Instances . Data . Time Copyright : ( C ) 2014 - 2017 License : BSD - style ( see the file LICENSE ) Maintainer : Stability : ...
null
https://raw.githubusercontent.com/RyanGlScott/text-show-instances/b08f4b46466cdc3c3f3c979b7a0abf5590fa2916/tests/Instances/Data/Time.hs
haskell
# LANGUAGE CPP # #if MIN_VERSION_time(1,8,0) # LANGUAGE DeriveGeneric # # LANGUAGE StandaloneDeriving # # OPTIONS_GHC -Wno - orphans # #endif | Module : Instances . Data . Time Copyright : ( C ) 2014 - 2017 License : BSD - style ( see the file LICENSE ) Maintainer : Stability : ...
59d56315d54d82e852c1df3e02378e59b002743f3b05bb4f3725a1fc2de7e259
DogLooksGood/holdem
table_cards.cljs
(ns poker.components.table-cards (:require [poker.components.table :as sut] [nubank.workspaces.core :as ws] [nubank.workspaces.card-types.react :as ct.react] [nubank.workspaces.model :as wsm] [reagent.core :as reagent])) (ws/defcard render-community-cards-3 (ct.react/react-card (reagent/as-elemen...
null
https://raw.githubusercontent.com/DogLooksGood/holdem/bc0f93ed65cab54890c91f78bb95fe3ba020a41f/test/cljs/poker/components/table_cards.cljs
clojure
(ns poker.components.table-cards (:require [poker.components.table :as sut] [nubank.workspaces.core :as ws] [nubank.workspaces.card-types.react :as ct.react] [nubank.workspaces.model :as wsm] [reagent.core :as reagent])) (ws/defcard render-community-cards-3 (ct.react/react-card (reagent/as-elemen...
5bd904dfdf7829a55056557357d544ac556de6b3c563ad5d727e4c1448af991a
eriksoe/ErlangQuest
quest_webboard_socketio.erl
-module(quest_webboard_socketio). -behaviour(gen_event). %% API -export([start_link/0]). %% gen_event callbacks -export([init/1, handle_event/2, handle_call/2, handle_info/2, terminate/2, code_change/3]). %% socketio callbacks -export([handle_request/3]). -include_lib("socketio/include/socketio.hrl"). -d...
null
https://raw.githubusercontent.com/eriksoe/ErlangQuest/74ca90a04df6582ae4e85526d26a090108298cda/lib/quest_webboard/src/quest_webboard_socketio.erl
erlang
API gen_event callbacks socketio callbacks =================================================================== gen_event callbacks =================================================================== gen_event:start_link({local, ?SERVER}). -------------------------------------------------------------------- @d...
-module(quest_webboard_socketio). -behaviour(gen_event). -export([start_link/0]). -export([init/1, handle_event/2, handle_call/2, handle_info/2, terminate/2, code_change/3]). -export([handle_request/3]). -include_lib("socketio/include/socketio.hrl"). -define(SERVER, ?MODULE). -record(state, {}). start...
76c314547779a055ce43801794ec2f0006af9e1afc0f2b9b710c6b09fa234301
elaforge/karya
EList.hs
Copyright 2019 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt # LANGUAGE DeriveFunctor , , DeriveTraversable # | EList is a stream of elements , which may either carry a value , or be -- some kind of metadata, and functions to process values and ...
null
https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Util/EList.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt some kind of metadata, and functions to process values and ignore the metadata.
Copyright 2019 # LANGUAGE DeriveFunctor , , DeriveTraversable # | EList is a stream of elements , which may either carry a value , or be module Util.EList where import Prelude hiding (concatMap, either, map, zip, zip3) import qualified Control.Monad.Identity as Identity import qualified Data.Bifunctor...
b50dd5d398f01f96653695a109f09abc87acb69642f78a8b9d35ca35f266a53a
juxt/shop
db.clj
Copyright © 2015 , JUXT LTD . (ns edge.phonebook.db (:require [clojure.tools.logging :refer :all] [integrant.core :as ig] [manifold.bus :refer [publish!]])) (defn add-entry "Add a new entry to the database. Returns the id of the newly added entry." [db entry] (dosync Why use 2 refs when one ato...
null
https://raw.githubusercontent.com/juxt/shop/c23fc55bca1852bfbabb681a72debc12373c3a36/examples/phonebook-api/src/edge/phonebook/db.clj
clojure
to return nextval from this function. While this is possible to do with an atom, its feels less elegant.
Copyright © 2015 , JUXT LTD . (ns edge.phonebook.db (:require [clojure.tools.logging :refer :all] [integrant.core :as ig] [manifold.bus :refer [publish!]])) (defn add-entry "Add a new entry to the database. Returns the id of the newly added entry." [db entry] (dosync Why use 2 refs when one ato...
03d610158758a50dc2d2ad44219dfc5ab7cb55a72c0695a5e10d053d53141e74
simplegeo/erlang
snmpm_network_interface_filter.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public Lic...
null
https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/snmp/src/manager/snmpm_network_interface_filter.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(snmpm_network_interface_filter). -export(...
31a37cd76cb91670031c741ed02083e3392969b977f536ff8ac4033f11d6bbc8
reagent-project/reagent-cookbook
core.cljs
(ns reagent-server-rendering.core (:require [reagent.core :as reagent] [reagent.dom :as rdom] [reagent.dom.server :as reagent-server])) (defn home-page [] [:div [:h2 "Welcome to reagent-server-rendering"] [:div [:a {:href "/about"} "go to about page"]]]) (defn about-page [] [:di...
null
https://raw.githubusercontent.com/reagent-project/reagent-cookbook/ccda91a74377098d27e2707c306a0187243cb290/recipes/reagent-server-rendering/src/cljs/reagent_server_rendering/core.cljs
clojure
(ns reagent-server-rendering.core (:require [reagent.core :as reagent] [reagent.dom :as rdom] [reagent.dom.server :as reagent-server])) (defn home-page [] [:div [:h2 "Welcome to reagent-server-rendering"] [:div [:a {:href "/about"} "go to about page"]]]) (defn about-page [] [:di...
558bb6c04b948797d2df5951da14931b7742457fa5ac6f21321cd785fdd666ca
beetleman/shadow-cljs-hooks
spec.clj
(ns shadow-cljs-hooks.spec (:require [expound.alpha :as expound] [taoensso.timbre :as log] [clojure.spec.gen.alpha :as gen] [clojure.spec.alpha :as s] [clojure.string :as string])) (s/def ::not-empty-string (s/and string? (complement empty?))) (defn file-name-generato...
null
https://raw.githubusercontent.com/beetleman/shadow-cljs-hooks/1b0543124da8bc2dca04213bd3183ace14d2a1e1/src/shadow_cljs_hooks/spec.clj
clojure
(ns shadow-cljs-hooks.spec (:require [expound.alpha :as expound] [taoensso.timbre :as log] [clojure.spec.gen.alpha :as gen] [clojure.spec.alpha :as s] [clojure.string :as string])) (s/def ::not-empty-string (s/and string? (complement empty?))) (defn file-name-generato...
67fff7b7fda64a6de38b847ebb6cf008395f124f161a45ffdf6f039b7198f356
emilaxelsson/ag-graph
TypeInf.hs
{-# LANGUAGE DeriveTraversable #-} # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE TypeOperators # # LANGUAGE ImplicitParams # # LANGUAGE MultiParamTypeClasses # module TypeInf where import Control.Monad (join) import Data.Foldable (Foldable (..)) import qualified Data.Foldable as Foldable impor...
null
https://raw.githubusercontent.com/emilaxelsson/ag-graph/50fb1ebb819e1ed0bd3b97e8a9f82bb9310e782f/examples/TypeInf.hs
haskell
# LANGUAGE DeriveTraversable # Only for testing ------------------------------------------------------------------------------ * Reference EDSL ------------------------------------------------------------------------------ Equality Addition Condition Variable ------------------------------------------------------...
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE TypeOperators # # LANGUAGE ImplicitParams # # LANGUAGE MultiParamTypeClasses # module TypeInf where import Control.Monad (join) import Data.Foldable (Foldable (..)) import qualified Data.Foldable as Foldable import Data.IntMap (IntMap) import quali...
d20c1ab8be8dc6624ab09a15c279ea9bcc80301b5e400b3f62baa72c3ee76ef1
headwinds/reagent-reframe-material-ui
utils.cljs
(ns ^:figwheel-no-load figwheel.client.utils (:require [clojure.string :as string] [goog.string :as gstring] [goog.object :as gobj] [cljs.reader :refer [read-string]] [cljs.pprint :refer [pprint]] [goog.userAgent.product :as product]) (:import [goog] ...
null
https://raw.githubusercontent.com/headwinds/reagent-reframe-material-ui/8a6fba82a026cfedca38491becac85751be9a9d4/resources/public/js/out/figwheel/client/utils.cljs
clojure
don't auto reload this file it will mess up the debug printing Custom Event must exist before calling this in windows world this will probably not work at some point in Deferred helpers that focus on guaranteed successful side effects not very monadic but it meets our needs persistent storage of configuration ke...
(ns ^:figwheel-no-load figwheel.client.utils (:require [clojure.string :as string] [goog.string :as gstring] [goog.object :as gobj] [cljs.reader :refer [read-string]] [cljs.pprint :refer [pprint]] [goog.userAgent.product :as product]) (:import [goog] ...
bd0c07cb1f853c7e03f2ef89e79d2b0fa65f86f42456ecc2ed987511dbb6b2ff
ocaml/dune
lib_flags.mli
open Import (** Operation on list of libraries and modules *) module Lib_and_module : sig type t = | Lib of Lib.t | Module of Path.t Obj_dir.t * Module.t module L : sig type nonrec t = t list val link_flags : Super_context.t -> t -> lib_config:Lib_config.t -> mode:Link_...
null
https://raw.githubusercontent.com/ocaml/dune/4e83d1b80bd9a37de7e0d39d6f22873850314557/src/dune_rules/lib_flags.mli
ocaml
* Operation on list of libraries and modules * Operations on list of libraries * The list of files that will be read by the compiler when linking an executable against this library
open Import module Lib_and_module : sig type t = | Lib of Lib.t | Module of Path.t Obj_dir.t * Module.t module L : sig type nonrec t = t list val link_flags : Super_context.t -> t -> lib_config:Lib_config.t -> mode:Link_mode.t -> _ Command.Args.t end end module...
ba92fe3e76966f2938d707d8ccc16102a4c87dea6f177647276a07b586ab13b5
mejgun/haskell-tdlib
SetSupergroupStickerSet.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Query.SetSupergroupStickerSet where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U -- | -- Changes the sticker set of a supergroup; requires can_change_info administrator right @supergroup_id Identifier of the supe...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/9bd82101be6e6218daf816228f6141fe89d97e8b/src/TD/Query/SetSupergroupStickerSet.hs
haskell
# LANGUAGE OverloadedStrings # | | Changes the sticker set of a supergroup; requires can_change_info administrator right @supergroup_id Identifier of the supergroup @sticker_set_id New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set | |
module TD.Query.SetSupergroupStickerSet where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U data SetSupergroupStickerSet = SetSupergroupStickerSet sticker_set_id :: Maybe Int, supergroup_id :: Maybe Int } deriving (Eq) instance Show SetSupergroupStic...
5147d131fd4b0786d29260340565e31a044eb8e7bb919de5b996b5c2cf85eb7a
BranchTaken/Hemlock
test_trig.ml
open! Basis.Rudiments open! Basis open Real let test () = let rec fn = function | [] -> () | t :: ts' -> begin let sin_t = sin t in let cos_t = cos t in let tan_t = tan t in File.Fmt.stdout |> Fmt.fmt "sin cos tan " |> fmt ~pmode:Fmt.Fixed ~precision:5L ~notati...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/real/test_trig.ml
ocaml
open! Basis.Rudiments open! Basis open Real let test () = let rec fn = function | [] -> () | t :: ts' -> begin let sin_t = sin t in let cos_t = cos t in let tan_t = tan t in File.Fmt.stdout |> Fmt.fmt "sin cos tan " |> fmt ~pmode:Fmt.Fixed ~precision:5L ~notati...
23ccde4a19764cfe771ebea9d95adcf2a59e0f17ac2651041c18e31349e8088a
jaseemabid/mit-scheme
utabmd.scm
;;; -*-Scheme-*- ;;; Copyright ( c ) 1987 - 1999 Massachusetts Institute of Technology ;;; ;;; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the ;;; License, or (at your o...
null
https://raw.githubusercontent.com/jaseemabid/mit-scheme/d30da6b2c103e34b6e0805bd5cbefeb9501382c1/v8/src/microcode/utabmd.scm
scheme
-*-Scheme-*- This program is free software; you can redistribute it and/or either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PAR...
Copyright ( c ) 1987 - 1999 Massachusetts Institute of Technology modify it under the terms of the GNU General Public License as You should have received a copy of the GNU General Public License Foundation , Inc. , 675 Mass Ave , Cambridge , , USA . (declare (usual-integrations)) (vector-set! (get-fixed...
6f31fb978893dc829cc168814508a88847bc36a278aa4cfddf753fa554be8e18
RedPRL/stagedtt
Debug.ml
let [@inline] dump_callstack ?(depth = 100) msg = Format.eprintf "[DEBUG] %s@." msg; let callstack = Printexc.get_callstack depth in Printexc.print_raw_backtrace Out_channel.stderr callstack let debug_enabled = ref false let debug_mode is_debug = debug_enabled := is_debug let is_debug_mode () = !debug_ena...
null
https://raw.githubusercontent.com/RedPRL/stagedtt/f88538036b51cebb83ebb0b418ec9b089550275d/lib/prelude/Debug.ml
ocaml
let [@inline] dump_callstack ?(depth = 100) msg = Format.eprintf "[DEBUG] %s@." msg; let callstack = Printexc.get_callstack depth in Printexc.print_raw_backtrace Out_channel.stderr callstack let debug_enabled = ref false let debug_mode is_debug = debug_enabled := is_debug let is_debug_mode () = !debug_ena...
952f002cd2cc758f005de393b1a5d07270be608a5c7b61b68c49251a2daeeaa9
mark-watson/haskell_tutorial_cookbook_examples
Main.hs
module Main where import NlpWebClient main :: IO () main = do putStrLn "Enter text (all on one line)" s <- getLine response <- (nlpClient s) :: IO NlpResponse putStr "response from NLP server:\n" putStrLn $ show response main
null
https://raw.githubusercontent.com/mark-watson/haskell_tutorial_cookbook_examples/0f46465b67d245fa3853b4e320d79b7d7234e061/HybridHaskellPythonNlp/app/Main.hs
haskell
module Main where import NlpWebClient main :: IO () main = do putStrLn "Enter text (all on one line)" s <- getLine response <- (nlpClient s) :: IO NlpResponse putStr "response from NLP server:\n" putStrLn $ show response main
534d8df19a9d432835549a9e4b60c35d0c4a53b4c5b44c1ef5a33c4c6cc8d169
brendanhay/gogol
Update.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-tagmanager/gen/Gogol/TagManager/Accounts/Containers/Workspaces/Clients/Update.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated /See:/ <-manager Tag Manager API Reference> for @tagmanager.accounts.containers.workspaces.clients.update@. * Resource ** Constructing a Request | A resource alias for @tagmanager.accounts.containers.workspaces.clients.update@...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
0367e27e8c1245dab8d152af9ac5e95bad943f5bb631a66f86795045dcb3f150
wdebeaum/step
crowd.lisp
;;;; ;;;; W::CROWD ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::CROWD (SENSES ((LF-PARENT ONT::social-group) (TEMPL classifier-count-pl-templ) (example "the crowd of people cheered") (PREFERENCE 0.97) ) ((meta-data :origin monroe :entry-date 20031217 :change-date...
null
https://raw.githubusercontent.com/wdebeaum/step/a28ce9dc0acd732be9cf762ffdf7cbcb501d4200/src/LexiconManager/Data/new/crowd.lisp
lisp
W::CROWD (TEMPL agent-affected-goal-optional-templ (xp (% w::pp (w::ptype (? t w::on w::into w::in))))) ; like pack like pack
(define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::CROWD (SENSES ((LF-PARENT ONT::social-group) (TEMPL classifier-count-pl-templ) (example "the crowd of people cheered") (PREFERENCE 0.97) ) ((meta-data :origin monroe :entry-date 20031217 :change-date nil :comments s7) ...
812afb769d6812066d54e85e27ab3f3d8a860ea81ac7b1f1fc8b1512abcca2c1
mmottl/gsl-ocaml
cheb.ml
gsl - ocaml - OCaml interface to GSL Copyright ( © ) 2002 - 2012 - Olivier Andrieu Distributed under the terms of the GPL version 3 let () = Error.init () type t external _alloc : int -> t = "ml_gsl_cheb_alloc" external _free : t -> unit = "ml_gsl_cheb_f...
null
https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/src/cheb.ml
ocaml
gsl - ocaml - OCaml interface to GSL Copyright ( © ) 2002 - 2012 - Olivier Andrieu Distributed under the terms of the GPL version 3 let () = Error.init () type t external _alloc : int -> t = "ml_gsl_cheb_alloc" external _free : t -> unit = "ml_gsl_cheb_f...
ebf3d8b477df665aae40a18c23cab230dfa9a5f67f7bd5c799d37f640b874cb2
jrh13/hol-light
environment.ml
(******************************************************************************) (* FILE : environment.ml *) (* DESCRIPTION : Environment of definitions and pre-proved theorems for use *) (* in automation. ...
null
https://raw.githubusercontent.com/jrh13/hol-light/ea44a4cacd238d7fa5a397f043f3e3321eb66543/Boyer_Moore/environment.ml
ocaml
**************************************************************************** FILE : environment.ml DESCRIPTION : Environment of definitions and pre-proved theorems for use in automation. ...
AUTHOR : R.J.Boulton DATE : 8th May 1991 LAST MODIFIED : R.J.Boulton DATE : 12th October 1992 LAS...
0c30d106f66fdb3d1def61a0586bf5892bd902339e8665336b92ab830a50ce7e
walkable-server/walkable
expressions_test.cljc
(ns walkable.sql-query-builder.expressions-test (:require [walkable.sql-query-builder.expressions :as sut] [walkable.sql-query-builder.helper :as helper] [clojure.spec.alpha :as s] [clojure.string :as string] [clojure.test :as t :refer [deftest testing is]])) (deftest ...
null
https://raw.githubusercontent.com/walkable-server/walkable/d1a1670aa4741cbeb7b23eaa2581e5a6b6c515d5/test/walkable/sql_query_builder/expressions_test.cljc
clojure
(ns walkable.sql-query-builder.expressions-test (:require [walkable.sql-query-builder.expressions :as sut] [walkable.sql-query-builder.helper :as helper] [clojure.spec.alpha :as s] [clojure.string :as string] [clojure.test :as t :refer [deftest testing is]])) (deftest ...
da78065bb16b2357cc1e22f5b98ac631178936630d2d9ed3cbed3fbe61c529c5
lotabout/axe
reader.rkt
#lang racket/base (provide read read-syntax get-info) (require (prefix-in - "reader-no-wrap.rkt") "../axe-reader.rkt") (define (read in p ln col pos) (axe-wrapper (lambda () (-read in p ln col pos)))) (define (read-syntax src in p ln col pos) (axe-wrapper (λ () (-read-syntax src in p ln col pos)))) (define g...
null
https://raw.githubusercontent.com/lotabout/axe/234c2d1f6849f3719c3fc3c2354a4d257e53943b/base/lang/reader.rkt
racket
#lang racket/base (provide read read-syntax get-info) (require (prefix-in - "reader-no-wrap.rkt") "../axe-reader.rkt") (define (read in p ln col pos) (axe-wrapper (lambda () (-read in p ln col pos)))) (define (read-syntax src in p ln col pos) (axe-wrapper (λ () (-read-syntax src in p ln col pos)))) (define g...
c1a894e234a4b5fa020b54700d8db52780a9c63e6dcc93a91bdbe82f2333fa69
andrewthad/impure-containers
Mutable.hs
module Data.Graph.Mutable ( -- * Graph Operations $ mutgraph insertVertex , insertEdge , insertEdgeWith -- * Vertices Operations -- $mutvertices , verticesReplicate , verticesUReplicate , verticesWrite , verticesUWrite , verticesRead , verticesURead ) where import Control.Mo...
null
https://raw.githubusercontent.com/andrewthad/impure-containers/20f14e3c671543cbb5af142767188e5111bebc65/src/Data/Graph/Mutable.hs
haskell
* Graph Operations * Vertices Operations $mutvertices $mutgraph Operations that mutate a 'MGraph'. Vertices and edges can both be added, and edges can be deleted, but vertices cannot be deleted. Providing such an operation would undermine the safety that this library provides. * Check to see if a vert...
module Data.Graph.Mutable $ mutgraph insertVertex , insertEdge , insertEdgeWith , verticesReplicate , verticesUReplicate , verticesWrite , verticesUWrite , verticesRead , verticesURead ) where import Control.Monad.Primitive import Data.Graph.Types.Internal import D...
4a9cb6c6ed5372c67f9909796f5ac9bdc3f0ab9c3945c22d50382c09c421b3f2
Soyn/sicp
Ex2.56.rkt
#lang racket Ex2.56 ;-----------------------Support Fuction--------------------------- ( define ( variable? x) ( symbol? x)) ( define ( same-variable? v1 v2) ( and ( variable? v1) ( variable? v2) ( eq? v1 v2))) ( define ( make-sum a1 a2) ( cond ( ( = number? a1 0) a2) ( ( = number? a2 0) a1) ...
null
https://raw.githubusercontent.com/Soyn/sicp/d2aa6e3b053f6d4c8150ab1b033a18f61fca7e1b/CH2/CH2.3/Ex2.56.rkt
racket
-----------------------Support Fuction--------------------------- --------------------------------------------------------------------------------------------------------------------------- 数的导数是0 判断表达式是不是和式,是和式的话按照和式的求导法则运算 判断是不是乘式,若是按照乘式的法则求导 判断是不是幂,是幂按照幂的求导法则
#lang racket Ex2.56 ( define ( variable? x) ( symbol? x)) ( define ( same-variable? v1 v2) ( and ( variable? v1) ( variable? v2) ( eq? v1 v2))) ( define ( make-sum a1 a2) ( cond ( ( = number? a1 0) a2) ( ( = number? a2 0) a1) ( ( and (number? a1) ( number? a2)) ( + a1 a2)) ( else ( l...
d5ae38a5793891c731499a7da00f2150a80cb21d2f989890f7d0d1677d0d4e94
m4b/rdr
RdrObject.ml
type t = | Mach of bytes | Elf of bytes | PE32 of bytes | Unknown of string * string let get ?verbose:(verbose=false) filename = let ic = open_in_bin filename in if (in_channel_length ic < 4) then 4 bytes , less than any magic number we 're looking for begin close_in ic; Unknown (filename...
null
https://raw.githubusercontent.com/m4b/rdr/2bf1f73fc317cd74f8c7cacd542889df729bd003/lib/RdrObject.ml
ocaml
BEGIN Binary cases MACH FAT cafe babe hack to avoid java class file errors which have same magic num backwards cause we read the 32bit int big E style PE
type t = | Mach of bytes | Elf of bytes | PE32 of bytes | Unknown of string * string let get ?verbose:(verbose=false) filename = let ic = open_in_bin filename in if (in_channel_length ic < 4) then 4 bytes , less than any magic number we 're looking for begin close_in ic; Unknown (filename...
ecd472fab6122071dd529ec5639a2f0c64d3adbfd1cf812a92dc82ca2c1f200f
yueyoum/make-proxy
mp_server_worker.erl
-module(mp_server_worker). -behaviour(gen_server). -behaviour(ranch_protocol). %% API -export([start_link/4]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(state, { key :: string(), ref :: ranch:ref(), soc...
null
https://raw.githubusercontent.com/yueyoum/make-proxy/7f52591b9066cec57a1a8e701f6b3e9ed4f8f0ea/src/server/mp_server_worker.erl
erlang
API gen_server callbacks =================================================================== API =================================================================== -------------------------------------------------------------------- @doc Starts the server @end ---------------------------------------------------...
-module(mp_server_worker). -behaviour(gen_server). -behaviour(ranch_protocol). -export([start_link/4]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(state, { key :: string(), ref :: ranch:ref(), socket :: any(), transport :: ...
013181b999bf89ba75bd72bae06b9784ea170c997600c24c818235d28c3430a7
linkfluence/inventory
record.clj
(ns com.linkfluence.dns.record (:import [java.io File] [java.time Instant Duration]) (:require [chime.core :as chime :refer [chime-at]] [clojure.string :as str] [clojure.tools.logging :as log] [com.linkfluence.store :as store] [com.linkfluence...
null
https://raw.githubusercontent.com/linkfluence/inventory/b69110494f8db210d14cc7093834c441440cd4e8/src/clj/com/linkfluence/dns/record.clj
clojure
Bind basic record mgt Record structure : { :type "A" } for testing In memory view of db files Structure db_file -> record_name USefull predicate We select only recort-type that interest us # Spec section Specs for record add a records (do not replace if already exist) update a record (replace if already exist) ...
(ns com.linkfluence.dns.record (:import [java.io File] [java.time Instant Duration]) (:require [chime.core :as chime :refer [chime-at]] [clojure.string :as str] [clojure.tools.logging :as log] [com.linkfluence.store :as store] [com.linkfluence...
3f621f10af204adb0e019673c518e77a80a52a118be76067bb8b024cf4a41fe0
t-sin/rosa
indite.lisp
(in-package :cl-user) (uiop:define-package :rosa/tests/indite (:use :cl :rosa :prove) (:import-from :alexandria :plist-hash-table)) (in-package :rosa/tests/indite) (plan 5) (defun test-indite (actual-plist expected-string) (is (indite actual-plist) expected-string) (let ((actu...
null
https://raw.githubusercontent.com/t-sin/rosa/dfa505fa035ccc1811e575034ba79dbb36d9c159/tests/indite.lisp
lisp
(in-package :cl-user) (uiop:define-package :rosa/tests/indite (:use :cl :rosa :prove) (:import-from :alexandria :plist-hash-table)) (in-package :rosa/tests/indite) (plan 5) (defun test-indite (actual-plist expected-string) (is (indite actual-plist) expected-string) (let ((actu...
bda2b8f337f0196215dff40f89e9f77a564e6cad0ac201e2edeb19ce84a303c5
dyoo/whalesong
test-parse-bytecode.rkt
#lang racket/base (require compiler/zo-parse rackunit racket/match racket/path "../parameters.rkt" "../parser/parse-bytecode.rkt" "../compiler/lexical-structs.rkt" "../compiler/expression-structs.rkt" racket/runtime-path (for-syntax racke...
null
https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/tests/test-parse-bytecode.rkt
racket
global variables Lambdas let1's racket's compiler optimizes away the sequence and lookup to y. (make-Seq (list (make-LocalRef 1 #f) Another example of an optimization that Racket is doing for us. it is smart enough branches Another example where Racket's compiler is helping: constant propagation, dead code rem...
#lang racket/base (require compiler/zo-parse rackunit racket/match racket/path "../parameters.rkt" "../parser/parse-bytecode.rkt" "../compiler/lexical-structs.rkt" "../compiler/expression-structs.rkt" racket/runtime-path (for-syntax racke...
3d839f343e59f00c829f2e3b6bd2289f317872ec02bb817d7d9bd08254eec0a9
gas2serra/cldk
graft.lisp
(in-package :cldk-backend) (defclass cldk-graft-mixin (standard-graft) ()) (defmethod initialize-instance :after ((graft cldk-graft-mixin) &rest args) (climi::%%set-sheet-region (clim:make-bounding-rectangle 0 0 (clim:graft-width graft) (clim:graft-height graft)) graft)) (defmethod clim:pointer-position (...
null
https://raw.githubusercontent.com/gas2serra/cldk/63c8322aedac44249ff8f28cd4f5f59a48ab1441/mcclim/Backends/Standard/graft.lisp
lisp
(in-package :cldk-backend) (defclass cldk-graft-mixin (standard-graft) ()) (defmethod initialize-instance :after ((graft cldk-graft-mixin) &rest args) (climi::%%set-sheet-region (clim:make-bounding-rectangle 0 0 (clim:graft-width graft) (clim:graft-height graft)) graft)) (defmethod clim:pointer-position (...
dd86d43a664c5d59056db45abef520e98fa3ed998cb10763c3c85656e0fb96a1
tyehle/llvm-lambda
Infer.hs
# LANGUAGE FlexibleContexts # module Infer where import Control.Monad.Except import Control.Monad.State import Data.Map (Map) import qualified Data.Map as Map import qualified Data.Set as Set -- import Debug.Trace (trace) import Expr import Pretty import Scope import Types type TypeEnv = Map VarIdent PolyType type...
null
https://raw.githubusercontent.com/tyehle/llvm-lambda/679a9e1cc1d288fc9731a6f43fc45714c455741b/src/Infer.hs
haskell
import Debug.Trace (trace) | Create a fresh type variable | Core types delete from the sub so we can't hang | Resolves all bound instances of type variables in a type Don't loop forever | Infer the type of an expression | Recursively infer the type of an expression with all the state needed to make that happen ...
# LANGUAGE FlexibleContexts # module Infer where import Control.Monad.Except import Control.Monad.State import Data.Map (Map) import qualified Data.Map as Map import qualified Data.Set as Set import Expr import Pretty import Scope import Types type TypeEnv = Map VarIdent PolyType type Subs = Map TVarIdent MonoType...
4cd9024ef460cc5d5acc99edae488784565d56e4903d13eff5f340994a7788a4
google/ormolu
separation-0a-out.hs
instance Stream s => Monad (ParsecT e s m) where return = pure (>>=) = pBind #if !(MIN_VERSION_base(4,13,0)) fail = Fail.fail #endif
null
https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/other/cpp/separation-0a-out.hs
haskell
instance Stream s => Monad (ParsecT e s m) where return = pure (>>=) = pBind #if !(MIN_VERSION_base(4,13,0)) fail = Fail.fail #endif
92e43cf6f79c84b4adf5ebbc60ece34ce9e4e3708170da2da03c1c9d93c9e822
shayan-najd/NativeMetaprogramming
T9196.hs
{-# LANGUAGE RankNTypes #-} module T9196 where f :: (forall a. Eq a) => a -> a f x = x g :: (Eq a => Ord a) => a -> a g x = x
null
https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_fail/T9196.hs
haskell
# LANGUAGE RankNTypes #
module T9196 where f :: (forall a. Eq a) => a -> a f x = x g :: (Eq a => Ord a) => a -> a g x = x
447ff95b7292be6188a35bf7b14b198996dfb24bafb872b74025937248d73cef
screenshotbot/screenshotbot-oss
tutorial.lisp
BKNR Datastore ;;;# Introduction ;;; ;;;## The prevalence model ;;; The BKNR datastore is a persistence solution for Lisp data . It ;;; uses the prevalence model, which is based on the following ;;; assumptions: ;;; All data is held in RAM . ;;; ;;; Data can be saved to disk at once into a snapshot file and is r...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/1faeba2a45c639354e1298eb8a75aa82805a9ad5/third-party/bknr.datastore/src/data/tutorial.lisp
lisp
# Introduction ## The prevalence model uses the prevalence model, which is based on the following assumptions: Data can be saved to disk at once into a snapshot file and is read from that file at startup time. Changes to persistent data are written to a transaction log file immediately, which can be replayed...
BKNR Datastore The BKNR datastore is a persistence solution for Lisp data . It All data is held in RAM . simplest model used by the ` mp - store ' , transactions are serialized # # BKNR Datastore Design Previous versions of the BKNR Datastore allowed the creation of developing applications . The new versio...
6de0de4cf1bbfeae97df40e2ad25c2fe49ce589c5f5bb9789d721f019206aedd
gentoo-haskell/hackport
Util.hs
| Author : < > Stability : experimental Portability : haskell98 Ungrouped utilitary stuff lays here until someone finds better place for it :] Author : Sergei Trofimovich <> Stability : experimental Portability : haskell98 Ungrouped utilitary stuff...
null
https://raw.githubusercontent.com/gentoo-haskell/hackport/ddf49dd8e35d017b7ddc22dc5212a552af43c139/src/Util.hs
haskell
:: String -> IO (Maybe String) 'run_cmd' executes command and returns it's standard output as 'String'. TODO: propagate error to caller | Terminate with an error message
| Author : < > Stability : experimental Portability : haskell98 Ungrouped utilitary stuff lays here until someone finds better place for it :] Author : Sergei Trofimovich <> Stability : experimental Portability : haskell98 Ungrouped utilitary stuff...