_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
7106508ab4da9a72740502d088a1ba4d22013b209e859352834ef6ff88bf930e
simonmichael/hledger
Utils.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # | Utilities for top - level modules and ghci . See also Hledger . Read and Hledger . Utils . Utilities for top-level modules and ghci. See also Hledger.Read and Hledger.Utils. -} module Hledger.Cli.Utils ( ...
null
https://raw.githubusercontent.com/simonmichael/hledger/b46cb8a7f77df569373d0b2b12bba5e97eff76c7/hledger/Hledger/Cli/Utils.hs
haskell
# LANGUAGE OverloadedStrings # Or, throw an error. We kludgily read the file before parsing to grab the full text, unless to let the add command work. PARTIAL: | Apply some extra post-parse transformations to the journal, if specified by options. These happen after journal validation, but before report calculati...
# LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # | Utilities for top - level modules and ghci . See also Hledger . Read and Hledger . Utils . Utilities for top-level modules and ghci. See also Hledger.Read and Hledger.Utils. -} module Hledger.Cli.Utils ( unsupportedOutputFormatError, ...
84fe962c3787aca7ab3815266d9389c6171c9c4b8f0a24f75c77b669f37a6d88
FranklinChen/learn-you-some-erlang
hhfuns.erl
-module(hhfuns). -compile(export_all). one() -> 1. two() -> 2. add(X,Y) -> X() + Y(). increment([]) -> []; increment([H|T]) -> [H+1|increment(T)]. decrement([]) -> []; decrement([H|T]) -> [H-1|decrement(T)]. map(_, []) -> []; map(F, [H|T]) -> [F(H)|map(F,T)]. incr(X) -> X + 1. decr(X) -> X - 1...
null
https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/hhfuns.erl
erlang
bases/1. Refered as the same function refactored in the book base(A) -> B = A + 1, F = fun() -> C = A * B end, F(), find the maximum of a list find the minimum of a list sum of all the elements of a list
-module(hhfuns). -compile(export_all). one() -> 1. two() -> 2. add(X,Y) -> X() + Y(). increment([]) -> []; increment([H|T]) -> [H+1|increment(T)]. decrement([]) -> []; decrement([H|T]) -> [H-1|decrement(T)]. map(_, []) -> []; map(F, [H|T]) -> [F(H)|map(F,T)]. incr(X) -> X + 1. decr(X) -> X - 1...
624f118dcb02861dcde011ee0597660026155e9caf14ad7f7d92e048ee57b918
ruhler/smten
Ppr.hs
# LANGUAGE FlexibleInstances # # LANGUAGE PatternGuards # {-# LANGUAGE TypeSynonymInstances #-} module Smten.Plugin.Output.Ppr ( Smten.Plugin.Output.Ppr.renderToFile ) where import Data.Text.Lazy (pack) import System.IO import Smten.Plugin.Output.Syntax import Text.PrettyPrint.Leijen.Text class Ppr a where...
null
https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten/Smten/Plugin/Output/Ppr.hs
haskell
# LANGUAGE TypeSynonymInstances # displayIO h (renderCompact (ppr x)) Note: we need to pretty print function types as: (a -> b), a is unlifted.
# LANGUAGE FlexibleInstances # # LANGUAGE PatternGuards # module Smten.Plugin.Output.Ppr ( Smten.Plugin.Output.Ppr.renderToFile ) where import Data.Text.Lazy (pack) import System.IO import Smten.Plugin.Output.Syntax import Text.PrettyPrint.Leijen.Text class Ppr a where ppr :: a -> Doc renderToFile :...
68c9722a6816782ac54db4b43f9715c552ddb792d440bf985907acf25e2d2146
metaocaml/ber-metaocaml
recursive.ml
(* TEST * expect *) (* PR#7324 *) module rec T : sig type t = T.t end = T;; [%%expect{| Line 1, characters 0-39: 1 | module rec T : sig type t = T.t end = T;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error: The type abbreviation T.t is cyclic |}]
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-modules/recursive.ml
ocaml
TEST * expect PR#7324
module rec T : sig type t = T.t end = T;; [%%expect{| Line 1, characters 0-39: 1 | module rec T : sig type t = T.t end = T;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error: The type abbreviation T.t is cyclic |}]
a215d29cec9a8a70976c2a642096e165322ebc3c383b8fdbf7fd33a4e21e12c0
Octachron/codept
b.mli
type t = A.t list type w = Z.t
null
https://raw.githubusercontent.com/Octachron/codept/2d2a95fde3f67cdd0f5a1b68d8b8b47aefef9290/tests/complex/deep-eps/b.mli
ocaml
type t = A.t list type w = Z.t
ae14e4e6f012ad21daf3fda0d49addb4d153b8ef09191f08762addc1c3165edc
cndreisbach/clojure-web-dev-workshop
system.clj
(ns we-owe.system (:require [we-owe.handler :refer [create-handler]] [ring.adapter.jetty :refer [run-jetty]])) (defn system "Returns a new instance of the application." [] (let [db (atom {:debts []}) handler (create-handler db)] {:db db :handler handler :server-port 3002 ...
null
https://raw.githubusercontent.com/cndreisbach/clojure-web-dev-workshop/95d9fdf94b39f8a1e408b8bf75a81b92899ee7d9/code/02-compojure/src/we_owe/system.clj
clojure
(ns we-owe.system (:require [we-owe.handler :refer [create-handler]] [ring.adapter.jetty :refer [run-jetty]])) (defn system "Returns a new instance of the application." [] (let [db (atom {:debts []}) handler (create-handler db)] {:db db :handler handler :server-port 3002 ...
a365666a82f8e4a0841ac74d9a7c6a6d04890c6e7f846282b82281ff56ae487f
containium/containium
commands.clj
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns containium.commands "Namespace for command handling." (:require [clojure.java.io :refer (resource as-file)] [clojure.pprint...
null
https://raw.githubusercontent.com/containium/containium/dede4098de928bed9ce8fccfc0a3891655ee162e/src/containium/commands.clj
clojure
Helper functions. else Actual commands. Shortcuts
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns containium.commands "Namespace for command handling." (:require [clojure.java.io :refer (resource as-file)] [clojure.pprint...
10ab9a14ce25f45bead8a803122b8794f5b51628a2231b8458337f6447ddc7c9
quchen/generative-art
Bezier.hs
-- | Bezier curves. -- module Geometry.Bezier ( Bezier(..) -- * Indexing , bezierT , bezierS -- * Subdividing , bezierSubdivideT , bezierSubdivideS -- * Interpolation , bezierSmoothen , bezierSmoothenOpen , bezierSmoothenLoop -- * References -- $references ) where...
null
https://raw.githubusercontent.com/quchen/generative-art/57b1e123bacaa4f9ecd4dbadc7b41b0017553e05/src/Geometry/Bezier.hs
haskell
| Bezier curves. * Indexing * Subdividing * Interpolation * References $references The suffix @T@ indicates the »simple formula« parameterization, which makes this curve easy to compute. \[ \] The suffix @T@ indicates the »simple formula« parameterization, which makes this curve easy to compute. \[ \...
module Geometry.Bezier ( Bezier(..) , bezierT , bezierS , bezierSubdivideT , bezierSubdivideS , bezierSmoothen , bezierSmoothenOpen , bezierSmoothenLoop ) where import Control.DeepSeq import Data.Vector (Vector, (!)) import qualified Data.Vector as V i...
f80ad4c8501ea560e4a194131cd97045394c0ab2b131b30c1e68c70de4080236
well-typed/large-records
R070.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 module Experiment.ApBaseline.Sized.R070 where import Bench.Types import Common.FunOfArity.F070 applyF :: Applicative f => F r -> f r apply...
null
https://raw.githubusercontent.com/well-typed/large-records/551f265845fbe56346988a6b484dca40ef380609/large-records-benchmarks/bench/typelet/Experiment/ApBaseline/Sized/R070.hs
haskell
# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl # # OPTIONS_GHC -ddump-to-file -ddump-timings # 00 .. 09
#if PROFILE_CORESIZE #endif #if PROFILE_TIMING #endif module Experiment.ApBaseline.Sized.R070 where import Bench.Types import Common.FunOfArity.F070 applyF :: Applicative f => F r -> f r applyF f = pure f <*> pure (MkT 00) <*> pure (MkT 01) <*> pure (MkT 02) <*> pure (MkT 03) <*> pure (Mk...
cd7f143241a19b6515a9fc6a74f03e17540d5d4cb1cb2a16acd9adacdce390e3
metametadata/carry
project.clj
(defproject counter-datascript "0.1.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.9.229"] [reagent "0.6.0" :exclusions [cljsjs/react]] [cljsjs/react-with-addons "15.3.1-0"] [org.clojure/core.match "0.3.0-a...
null
https://raw.githubusercontent.com/metametadata/carry/fa5c7cd0d8f1b71edca70330acc97c6245638efb/examples/counter-datascript/project.clj
clojure
(defproject counter-datascript "0.1.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.9.229"] [reagent "0.6.0" :exclusions [cljsjs/react]] [cljsjs/react-with-addons "15.3.1-0"] [org.clojure/core.match "0.3.0-a...
be69d930611f49654fc7aca488ced2c3f7d4ea91528d30f3dea7acbdd36b38c6
hipsleek/hipsleek
sleekcommons.ml
#include "xdebug.cppo" open VarGen let $ a = < formula > . let $ b = compose . let $ c = < formula > . Nested composition ? How to perform the composition and keep the simplified result ? let $ a = compose ... let $ b = compose[x]($a , ... ) . checkentail $ a |- $ b. What problem : no...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/sleekcommons.ml
ocaml
An Hoa [4/10/2011] An Hoa 0 - any; -1 may; +1 must R{..} I{..} RA{..} An Hoa : String representation of meta_formula TODO Implement TODO Implement
#include "xdebug.cppo" open VarGen let $ a = < formula > . let $ b = compose . let $ c = < formula > . Nested composition ? How to perform the composition and keep the simplified result ? let $ a = compose ... let $ b = compose[x]($a , ... ) . checkentail $ a |- $ b. What problem : no...
9638174037527117e42db931dd9792db9e4bc23fe31611c47df65f57a9a16ac7
dmp1ce/DMSS
DMSS-doctest.hs
import System.FilePath.Glob import Test.DocTest main :: IO () main = glob "src/**/*.hs" >>= doctest
null
https://raw.githubusercontent.com/dmp1ce/DMSS/fd88690d97ed267e76f8345e6a76cd3727ef4efb/src-bin/DMSS-doctest.hs
haskell
import System.FilePath.Glob import Test.DocTest main :: IO () main = glob "src/**/*.hs" >>= doctest
f227e4750dabe8ab68955481d8be0bda1407b217959c51987d27576c7982022f
melange-re/melange
config_util.ml
Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P. * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later...
null
https://raw.githubusercontent.com/melange-re/melange/a8f6ddf9f46d51ffd1dde6095f655a8ca9fb6aa5/jscomp/core/config_util.ml
ocaml
ATTENTION: lazy to wait [Config.load_path] populated
Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P. * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later...
c02342636af69fddeddfda1cbf6e17138a7f359c5288045f17db392e47f5c92b
binaryage/env-config
core.cljc
(ns env-config.core (:require [env-config.impl.read :as read] [env-config.impl.coerce :as coerce] [env-config.impl.coercers :as coercers] [env-config.impl.report :as report])) -- public api -----------------------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/binaryage/env-config/27a99a5c2d5ca0941339508484853c45de555a49/src/lib/env_config/core.cljc
clojure
(ns env-config.core (:require [env-config.impl.read :as read] [env-config.impl.coerce :as coerce] [env-config.impl.coercers :as coercers] [env-config.impl.report :as report])) -- public api -----------------------------------------------------------------------------------------...
a24066653c5b39b06a1592e775a92b72b4ce083f39ddcb18a526429902855d78
TaylanUB/scheme-srfis
54.upstream.scm
Copyright ( C ) ( 2004 ) . All Rights Reserved . ;;; 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, modif...
null
https://raw.githubusercontent.com/TaylanUB/scheme-srfis/2d2b306e7a20a7155f639001a02b0870d5a3d3f7/srfi/54.upstream.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to rights to use, copy, modify, merge, publish, distribute, sublicense, and/or furnished to do so, subject to the following conditions: The above copyright notice and t...
Copyright ( C ) ( 2004 ) . All Rights Reserved . deal in the Software without restriction , including without limitation the sell copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRAN...
c25adae2242e7719f288cd9149332418e44581fc3f01fa5ebcf62acc4b9cd63c
pixlsus/registry.gimp.org_static
advancedtonemapping.scm
Advanced Tone Mapping is a script for The GIMP ; ; Reduce global contrast while increasing local contrast and shadow/highlight ; detail. ; Advanced Tone Mapping is a fork / continuation of Tonemapping script originally written by and . The 2.0 version was created by Vit ' tasuki ' Brunner . ; ; The script i...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/advancedtonemapping.scm
scheme
Reduce global contrast while increasing local contrast and shadow/highlight detail. The script is located in menu "<Image> / Filters / Enhance" -------------------------------------------------------------------- Changelog: - Moved the script to Filters/Enhance where it IMHO belongs - Removed result...
Advanced Tone Mapping is a script for The GIMP Advanced Tone Mapping is a fork / continuation of Tonemapping script originally written by and . The 2.0 version was created by Vit ' tasuki ' Brunner . Last changed : 13 June 2008 Version 2.0 codename ' tasuki ' ( Friday the 13th , June 2008 ) ( de...
bc7e832023490ec734b579b11e9af52494fd755141ff30ab2a1bd669d21479bf
camllight/camllight
ouster-f16.15.ml
#open "tk";; let top = OpenTk() in let mbar = frame__create top [Relief Raised; Borderwidth (Pixels 2)] and dummy = frame__create top [Width (Centimeters 10.); Height (Centimeters 5.)] in pack [mbar; dummy] [Side Side_Top; Fill Fill_X]; let file = menubutton__create mbar [Text "File"; UnderlinedChar ...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/camltk/books-examples/ouster-f16.15.ml
ocaml
same code as chap16-14
#open "tk";; let top = OpenTk() in let mbar = frame__create top [Relief Raised; Borderwidth (Pixels 2)] and dummy = frame__create top [Width (Centimeters 10.); Height (Centimeters 5.)] in pack [mbar; dummy] [Side Side_Top; Fill Fill_X]; let file = menubutton__create mbar [Text "File"; UnderlinedChar ...
cc4222277ff12b8a31183ca9c01fd5be9d8783b5cfa2c0617b5781e849576549
weavejester/codox
boot.clj
(ns codox.boot {:boot/export-tasks true} (:require [clojure.java.io :as io] [boot.core :as core :refer [deftask]] [boot.pod :as pod] [boot.util :as util])) (defn- pod-deps [] (remove pod/dependency-loaded? '[[codox "0.10.8"]])) (defn- init [fresh-pod] (pod/require-in fresh-...
null
https://raw.githubusercontent.com/weavejester/codox/0313832eb17339ffcb60003ee0c3af149bbf1cb9/boot-codox/src/codox/boot.clj
clojure
(ns codox.boot {:boot/export-tasks true} (:require [clojure.java.io :as io] [boot.core :as core :refer [deftask]] [boot.pod :as pod] [boot.util :as util])) (defn- pod-deps [] (remove pod/dependency-loaded? '[[codox "0.10.8"]])) (defn- init [fresh-pod] (pod/require-in fresh-...
b74410ac3eeb7c50b9a594ebbcac682744a5e9e409d9ad5d53c655457403a544
Verites/verigraph
GraphsSpec.hs
module Data.GraphsSpec where import Data.Maybe import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck import Test.QuickCheck.Function import Base.Valid import Data.Graphs import Data.Graphs.QuickCheck spec :: Spec spec = ...
null
https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/tests/Data/GraphsSpec.hs
haskell
> > _ = True > p = p >
module Data.GraphsSpec where import Data.Maybe import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck import Test.QuickCheck.Function import Base.Valid import Data.Graphs import Data.Graphs.QuickCheck spec :: Spec spec = ...
a44b08ed91402a10e68c2208d6deef2fae3f9627400301fe8c8679ae65766357
somnusand/Poker
hackney.erl
%%% -*- erlang -*- %%% This file is part of hackney released under the Apache 2 license . %%% See the NOTICE for more information. %%% -module(hackney). -export([start/0, start/1, stop/0]). -export([connect/1, connect/2, connect/3, connect/4, close/1, request_info/1, location/1, r...
null
https://raw.githubusercontent.com/somnusand/Poker/4934582a4a37f28c53108a6f6e09b55d21925ffa/server/deps/hackney/src/hackney.erl
erlang
-*- erlang -*- See the NOTICE for more information. @doc Start the hackney process. Useful when testing using the shell. @doc Stop the hackney process. Useful when testing using the shell. @doc connect a socket and create a client state. @doc Assign a new controlling process <em>Pid</em> to <em>Client</em>. @d...
This file is part of hackney released under the Apache 2 license . -module(hackney). -export([start/0, start/1, stop/0]). -export([connect/1, connect/2, connect/3, connect/4, close/1, request_info/1, location/1, request/1, request/2, request/3, request/4, request/5, send_...
9e1322e217aa3af2a5a07d450541abac36c401df34cef846926dd4b88ae140be
haskell-github/github
GitLsTree.hs
module GitLsTree where import qualified Github.GitData.Trees as Github import Data.List (intercalate) main = do possibleTree <- Github.tree "thoughtbot" "paperclip" "fe114451f7d066d367a1646ca7ac10e689b46844" case possibleTree of (Left error) -> putStrLn $ "Error: " ++ show error (Right tree) -> put...
null
https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/samples/GitData/Trees/GitLsTree.hs
haskell
module GitLsTree where import qualified Github.GitData.Trees as Github import Data.List (intercalate) main = do possibleTree <- Github.tree "thoughtbot" "paperclip" "fe114451f7d066d367a1646ca7ac10e689b46844" case possibleTree of (Left error) -> putStrLn $ "Error: " ++ show error (Right tree) -> put...
43c0107c19d1269ba45687e0eb6f699de013edebf1a0d228594bfd407babff38
michiakig/LispInSmallPieces
tester.scm
$ I d : tester.scm , v 1.18 1997/12/07 16:22:44 ;;;(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) ;;; This file is part of the files that accompany the book: LISP Implantation Semantique Programmation ( InterEditions , France ) or Lisp In Small Pieces ( Cambridge University Pr...
null
https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/src/tester.scm
scheme
(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) This file is part of the files that accompany the book: Newest version may be retrieved from: -spi.lip6.fr/~queinnec/WWW/LiSP.html (((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) *********...
$ I d : tester.scm , v 1.18 1997/12/07 16:22:44 LISP Implantation Semantique Programmation ( InterEditions , France ) or Lisp In Small Pieces ( Cambridge University Press ) . By Christian Queinnec < > Christian Queinnec | ( oblist ) some compilers . Two ca...
1ae9d1bca5a96ccc4618d15b728ff159c60d942469eeb18eade73390c345587c
ocaml/ocaml-lsp
configuration.mli
open Import type t val default : unit -> t Fiber.t val wheel : t -> Lev_fiber.Timer.Wheel.t val update : t -> DidChangeConfigurationParams.t -> t Fiber.t
null
https://raw.githubusercontent.com/ocaml/ocaml-lsp/a112044881aaefed2d47d6d26808840951306d92/ocaml-lsp-server/src/configuration.mli
ocaml
open Import type t val default : unit -> t Fiber.t val wheel : t -> Lev_fiber.Timer.Wheel.t val update : t -> DidChangeConfigurationParams.t -> t Fiber.t
f178836bb27cc50dd1564936514a9dd95f2794876a2b866334457a6c35390159
jwiegley/notes
Unlift.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # module Unlift where import Control.Applicative import Control.Exception import Control.Concurrent.Async as Async import Control.Concurrent.STM import Control.Monad import Control.Monad.ST import Control.Monad.Trans.Control impo...
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/Unlift.hs
haskell
# LANGUAGE RankNTypes # | Monoids which are also commutative This type class introduces no new operations, but rather a single law: @ mappend x y = mappend y x @ | Applicative functors which are also commutative This type class introduces no new operations, but rather a single law: @ liftA2 ($) x y = liftA2 ...
# LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # module Unlift where import Control.Applicative import Control.Exception import Control.Concurrent.Async as Async import Control.Concurrent.STM import Control.Monad import Control.Monad.ST import Control.Monad.Trans.Control import Control.Monad.Trans.Eithe...
d243aa268a4e7af68137071c79b02ffe5acedeaea636e362185f3b23215283c5
ekmett/ersatz
Z001.hs
# language KindSignatures , DataKinds , FlexibleContexts # # language GeneralizedNewtypeDeriving # # language TypeFamilies , ScopedTypeVariables # {-# language UndecidableInstances #-} # language NoMonomorphismRestriction # import Prelude hiding ( not, and, or, (&&), (||) ) import Ersatz import GHC.TypeLits import D...
null
https://raw.githubusercontent.com/ekmett/ersatz/d2107df8dc90d89f7a5f4db9e7e3c4cc0eb4a1ea/tests/Z001.hs
haskell
# language UndecidableInstances # assert $ gt (a^2 * b^2) (b^3 * a^3) | square matrices (if overflow occurs, constraint is unsatisfiable)
# language KindSignatures , DataKinds , FlexibleContexts # # language GeneralizedNewtypeDeriving # # language TypeFamilies , ScopedTypeVariables # # language NoMonomorphismRestriction # import Prelude hiding ( not, and, or, (&&), (||) ) import Ersatz import GHC.TypeLits import Data.Proxy import Data.List ( transpose...
e72123b326ce05a19f60e3a6cbc3d41a33f10d2538f1201fc5f3d1ef32654554
wireapp/wire-server
V72_AddNonceTable.hs
# LANGUAGE QuasiQuotes # -- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , eithe...
null
https://raw.githubusercontent.com/wireapp/wire-server/3b2084c77cda3841f83fcc9056d01968166842bc/services/brig/schema/src/V72_AddNonceTable.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under 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 PARTI...
# LANGUAGE QuasiQuotes # Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module...
d9fe608bfe1b678aec89e2afbf0bdf137c7352e8ecd6f9b322de71f8b696bbaa
aaronallen8455/hi-fi
HkdSetField.hs
# LANGUAGE RecordWildCards # module HiFi.TcPlugin.HkdSetField ( mkHkdSetFieldExpr ) where import qualified HiFi.GhcFacade as Ghc import HiFi.TcPlugin.PluginInputs import HiFi.TcPlugin.RecordParts mkHkdSetFieldExpr :: PluginInputs -> Ghc.Type -> Ghc.Type -> Ghc.Type -> FieldNesting ...
null
https://raw.githubusercontent.com/aaronallen8455/hi-fi/8dece5086a3c5b2bd8bc335dbd7c5d253e78d9e1/src/HiFi/TcPlugin/HkdSetField.hs
haskell
# LANGUAGE RecordWildCards # module HiFi.TcPlugin.HkdSetField ( mkHkdSetFieldExpr ) where import qualified HiFi.GhcFacade as Ghc import HiFi.TcPlugin.PluginInputs import HiFi.TcPlugin.RecordParts mkHkdSetFieldExpr :: PluginInputs -> Ghc.Type -> Ghc.Type -> Ghc.Type -> FieldNesting ...
b21ae0a0975337a2c65151077d2179e3364fb8889eca43e1fa058bc32a20edd7
anchpop/wise_mans_haskell
benchPressJudger.hs
benchPressJudger :: (Ord a, Fractional a) => a -> String benchPressJudger benchPressLbs | benchPressKgs <= weak = "Stop programming and hit the gym!" | benchPressKgs <= decent = "This is decent, you're doing ok." | benchPressLbs <= strong = "Nice, you're getting pretty strong." | otherw...
null
https://raw.githubusercontent.com/anchpop/wise_mans_haskell/021ca3f3d96ebc0ecf2daf1a802fc33d067e24cc/haskelltests/should_compile/benchPressJudger.hs
haskell
benchPressJudger :: (Ord a, Fractional a) => a -> String benchPressJudger benchPressLbs | benchPressKgs <= weak = "Stop programming and hit the gym!" | benchPressKgs <= decent = "This is decent, you're doing ok." | benchPressLbs <= strong = "Nice, you're getting pretty strong." | otherw...
a5f4544f12e298d1c14430eecc2d693deb6e3c9bca1fee7847f93e757e855172
bcc32/projecteuler-ocaml
sol_174.ml
open! Core open! Import A square lamina with outer side length a and inner side length b consists of [ a^2 - b^2 = ( a + b)(a - b ) ] tiles . Thus , for a given number of tiles ( t ) , the number of possible square lamina is given by the number of factorizations , [ t = ( a + b)(a - b ) ] where a an...
null
https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/d67aca3a9017bec6443aa46d6e24cd9e6d83b65b/sol/sol_174.ml
ocaml
209566 489.617085ms
open! Core open! Import A square lamina with outer side length a and inner side length b consists of [ a^2 - b^2 = ( a + b)(a - b ) ] tiles . Thus , for a given number of tiles ( t ) , the number of possible square lamina is given by the number of factorizations , [ t = ( a + b)(a - b ) ] where a an...
cd4e74fa7968c133d3a8ada69aebbd0c6f026fdc02e372db4ef808d078168f07
mfelleisen/7GUI
task-1.rkt
#! /usr/bin/env gracket #lang typed/racket/gui ;; a mouse-click counter (define *counter 0) (: count! (-> Any * Void)) (define (count! . x) (set! *counter (if (empty? x) 0 (+ *counter 1))) (send view set-value (~a *counter))) (define frame (new frame% [label "Counter"])) (define pane (new horizontal-pane% [pa...
null
https://raw.githubusercontent.com/mfelleisen/7GUI/e3631e78ab12306ad81b560443913afa4b156dec/Typed/task-1.rkt
racket
a mouse-click counter
#! /usr/bin/env gracket #lang typed/racket/gui (define *counter 0) (: count! (-> Any * Void)) (define (count! . x) (set! *counter (if (empty? x) 0 (+ *counter 1))) (send view set-value (~a *counter))) (define frame (new frame% [label "Counter"])) (define pane (new horizontal-pane% [parent frame])) (define vie...
d4062f0f24675eefff610a72176f3033adaade2008b118bf4e26d26de4b698a7
nathell/skyscraper
nondistinct_test.clj
(ns skyscraper.nondistinct-test (:require [clojure.test :as test :refer [deftest is]] [net.cgrand.enlive-html :refer [select text]] [skyscraper.cache :as cache] [skyscraper.core :refer [defprocessor scrape scrape!]] [skyscraper.enlive-helpers :refer [href]] [skyscraper.test-utils :refer [make-...
null
https://raw.githubusercontent.com/nathell/skyscraper/33f5aac38378fcaf4e815647f343ef8415a6f545/test/skyscraper/nondistinct_test.clj
clojure
(ns skyscraper.nondistinct-test (:require [clojure.test :as test :refer [deftest is]] [net.cgrand.enlive-html :refer [select text]] [skyscraper.cache :as cache] [skyscraper.core :refer [defprocessor scrape scrape!]] [skyscraper.enlive-helpers :refer [href]] [skyscraper.test-utils :refer [make-...
ca9b3f98489bf5fe67d5dc80a5f6febdf1955f6de7e081f8a7c581ffb7e3c5e8
juliangamble/clojure-ants-simulation
project.clj
(defproject ants "0.1" :dependencies [[org.clojure/clojure "1.6.0"]] :main demo.AntsAppletRunner)
null
https://raw.githubusercontent.com/juliangamble/clojure-ants-simulation/9fa218b55e52e4de1fd294a88fff48791c8279c0/project.clj
clojure
(defproject ants "0.1" :dependencies [[org.clojure/clojure "1.6.0"]] :main demo.AntsAppletRunner)
12773b90f97cd829ece295f7e86f61460f4ee86ea6ec6a2e09eec16e4d887618
ocaml-gospel/gospel
complex_vals.mli
(**************************************************************************) (* *) GOSPEL -- A Specification Language for OCaml (* *) Copyright ( ...
null
https://raw.githubusercontent.com/ocaml-gospel/gospel/bd213d7fdfaf224666acb413efc49f872251bca7/test/positive/complex_vals.mli
ocaml
************************************************************************ (as described in file LICE...
GOSPEL -- A Specification Language for OCaml Copyright ( c ) 2018- The VOCaL Project This software is free software , distributed under the MIT license val f : int -> int -> int @ r = f x y requires x > 0 requires y + 2 < 0 requ...
9508eb821837fcbfbdf2d20d2dfd1287fbd53d4ec03327b3c45bb01d62968032
tommyengstrom/domaindriven
ForgetfulInMemory.hs
module DomainDriven.Persistance.ForgetfulInMemory where import Data.List (foldl') import DomainDriven.Persistance.Class import GHC.Generics (Generic) import qualified Streamly.Prelude as S import UnliftIO import Prelude createForgetful :: MonadIO m => (model -> Stored event -> model) -> model -- ^ ini...
null
https://raw.githubusercontent.com/tommyengstrom/domaindriven/fb56041bb24b24b81aba26d1cf5b1dd91f91c2a2/domaindriven-core/src/DomainDriven/Persistance/ForgetfulInMemory.hs
haskell
^ initial model | STM state without event persistance
module DomainDriven.Persistance.ForgetfulInMemory where import Data.List (foldl') import DomainDriven.Persistance.Class import GHC.Generics (Generic) import qualified Streamly.Prelude as S import UnliftIO import Prelude createForgetful :: MonadIO m => (model -> Stored event -> model) -> model -> m (Fo...
493e6e2e358480893f988a4ba176bdb2cd3a4fee9396caa19b0669863cf490ae
lisp-mirror/cl-tar
package.lisp
(cl:defpackage #:tar-test (:use #:cl) (:local-nicknames (#:para #:parachute)))
null
https://raw.githubusercontent.com/lisp-mirror/cl-tar/b25b03cd47b4b4b308546e346b2c9ec2718f358f/test/package.lisp
lisp
(cl:defpackage #:tar-test (:use #:cl) (:local-nicknames (#:para #:parachute)))
191b6ae416d5db0f7c97cd03d466805321b2ea9463278e162dea546ab83a5efe
ArulselvanMadhavan/haskell-first-principles
MaybeInstance.hs
module MaybeInstance where import Test.QuickCheck import Test.QuickCheck.Checkers data Optional a = Nada | Yep a deriving (Eq, Show) instance Functor Optional where fmap f Nada = Nada fmap f (Yep a) = Yep (f a) instance Applicative Optional where pure a = Yep a (<*>) (Yep f) (Y...
null
https://raw.githubusercontent.com/ArulselvanMadhavan/haskell-first-principles/06e0c71c502848c8e75c8109dd49c0954d815bba/chapter21/src/MaybeInstance.hs
haskell
module MaybeInstance where import Test.QuickCheck import Test.QuickCheck.Checkers data Optional a = Nada | Yep a deriving (Eq, Show) instance Functor Optional where fmap f Nada = Nada fmap f (Yep a) = Yep (f a) instance Applicative Optional where pure a = Yep a (<*>) (Yep f) (Y...
ac12b0cd49d59b6c6d922105d1049b1bf51fb46974a6c9776472a539476b5de8
arrdem/blather
grammars.clj
(ns blather.grammars "The internal representation of a Blather grammar." (:refer-clojure :exclude [str]) (:require [irregular.core :refer [multibyte?]])) ;; A grammar AST node for rule names ;;-------------------------------------------------------------------------------- (defn rule "Constructor. Returns a ru...
null
https://raw.githubusercontent.com/arrdem/blather/76fc860f26ae2fb7f0d2240da42cf85b0cb1169d/src/main/clj/blather/grammars.clj
clojure
A grammar AST node for rule names -------------------------------------------------------------------------------- We can't statically determine this, so assume the negative. A grammar AST node for literal strings --------------------------------------------------------------------------------
(ns blather.grammars "The internal representation of a Blather grammar." (:refer-clojure :exclude [str]) (:require [irregular.core :refer [multibyte?]])) (defn rule "Constructor. Returns a rule node referencing the named rule." [rule-name] {:tag ::rule :name rule-name}) (defn rule? "Predicate. True ...
0944e6c3a58dcca41a7c7d329b24d3c1e3ccc15266b9bcc550b1f716d8c1a4e2
kototama/picobit
test-globals.scm
(define x 2) ;; TODO the vm tries to get the car of this (define y 3) ( define foo ( lambda ( x ) ( + x 8 213 32523 ) ) ) ; ; TODO creating a lambda fails ;; (display (foo x)) ;; (display (+ x y)) ;; actually, gives the same error as if we had a lambda (define (foo x y) (if (and x y) (#%+ x y) ;; TODO if we ...
null
https://raw.githubusercontent.com/kototama/picobit/8bdfc092266803bc6b1151177a7e668c9b050bea/tests/test-globals.scm
scheme
TODO the vm tries to get the car of this ; TODO creating a lambda fails (display (foo x)) (display (+ x y)) ;; actually, gives the same error as if we had a lambda TODO if we use this +, it doesn't show as global, probably because it doesn't use rest params
(define y 3) (define (foo x y) (if (and x y) -1)) (foo x y) duplicates have no effect on the number of constants , and 5 did n't have an effect either , might be too small
320c3c9f1d6047418c4c829e7a80785f7eb410c486cdc97e226056c021ad9b46
rtoy/cmucl
vmdef.lisp
;;; -*- Package: C; Log: C.Log -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; (ext:file-comment "$Header: src/compiler/vmdef.lisp $") ;;; ...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/vmdef.lisp
lisp
-*- Package: C; Log: C.Log -*- ********************************************************************** ********************************************************************** This file contains implementation-independent facilities used for defining the compiler's interface to the VM in a given implementation...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . (ext:file-comment "$Header: src/compiler/vmdef.lisp $") Written by (in-package :c) (intl:textdomain "cmucl") (export '(template-or-lose sc-or-lose sb-or-lose sc-number-or-l...
25b1e2e68fe0a2366d4a4acd17478fee3d8f9f2a6d27cf4445d47e494f4d0196
gafiatulin/codewars
HumanTime.hs
-- Human Readable Time -- / module HumanTime where import Data.List (intercalate) import Text.Printf (printf) humanReadable :: Int -> String humanReadable x = intercalate ":" . map (printf "%02d") $ [x `div` 3600, (x `div` 60) `mod` 60, x `mod` 60]
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/5%20kyu/HumanTime.hs
haskell
Human Readable Time /
module HumanTime where import Data.List (intercalate) import Text.Printf (printf) humanReadable :: Int -> String humanReadable x = intercalate ":" . map (printf "%02d") $ [x `div` 3600, (x `div` 60) `mod` 60, x `mod` 60]
4ee0488aa38130c74d423a35977b20eb3d2e601b62fd66e463619b9cf2c71937
re-ops/re-core
validations.clj
(ns re-core.test.validations (:require [re-core.model :refer (check-validity)] [re-core.fixtures.data :refer (redis-type redis-physical)]) (:use clojure.test) (:import clojure.lang.ExceptionInfo)) (defn errors [f args] (try (f args) (throw (ex-info "expected an exception with info" {})) ...
null
https://raw.githubusercontent.com/re-ops/re-core/71f58183a932ad98190bb13e973d04678e930bcc/test/re_core/test/validations.clj
clojure
(ns re-core.test.validations (:require [re-core.model :refer (check-validity)] [re-core.fixtures.data :refer (redis-type redis-physical)]) (:use clojure.test) (:import clojure.lang.ExceptionInfo)) (defn errors [f args] (try (f args) (throw (ex-info "expected an exception with info" {})) ...
7248aa09397c3a24614ad28c17f8aad155242a07eb88a2eae5194b5377a7af98
thizanne/tiger
symbol.ml
type t = int * string let symbol = let table = Hashtbl.create 128 in let n = ref (-1) in function name -> try Hashtbl.find table name, name with Not_found -> incr n; Hashtbl.add table name !n; !n, name let name = snd module Ord = struct type symbol = t type t = symbol let...
null
https://raw.githubusercontent.com/thizanne/tiger/14e4c9a6005d1455122f366a965e487434219f47/src/symbol.ml
ocaml
type t = int * string let symbol = let table = Hashtbl.create 128 in let n = ref (-1) in function name -> try Hashtbl.find table name, name with Not_found -> incr n; Hashtbl.add table name !n; !n, name let name = snd module Ord = struct type symbol = t type t = symbol let...
c901afa2ad5646722c89101bfc6fda0b464b72a9c66fcbe0638815f76a43c471
ocaml/opam
opamRepository.mli
(**************************************************************************) (* *) Copyright 2012 - 2019 OCamlPro Copyright 2012 INRIA (* ...
null
https://raw.githubusercontent.com/ocaml/opam/063e5d8bf4375d6f8dfa227ac119d5e187684b0c/src/repository/opamRepository.mli
ocaml
************************************************************************ All rights reserved. This file is distributed under the terms of the exception on linking descr...
Copyright 2012 - 2019 OCamlPro Copyright 2012 INRIA GNU Lesser General Public License version 2.1 , with the special open OpamTypes val packages: dirname -> package_set val packages_with_prefixes: dirname -> ...
6212c06e29478f0a6121b260d496cc4a1ef365022f524a4c9ebf565a0b1c5112
fakedata-haskell/fakedata
DaDkTextSpec.hs
# LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} module DaDkTextSpec where import Data.Text (Text) import qualified Data.Text as T import Faker hiding (defaultFakerSettings) import qualified Faker.Address as FA import qualified Faker.Company as CO import qualified Faker.PhoneNumber as PH import qua...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/test/DaDkTextSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables # module DaDkTextSpec where import Data.Text (Text) import qualified Data.Text as T import Faker hiding (defaultFakerSettings) import qualified Faker.Address as FA import qualified Faker.Company as CO import qualified Faker.PhoneNumber as PH import qualified Faker.Color as CL import qua...
597840532e58ceda3801d9baa3ee274bdc2aced3606958e60e25ffc9190cb0fc
plumatic/grab-bag
metadata_test.clj
(ns domain.metadata-test (:require [schema.core :as s] [domain.metadata :refer :all] [plumbing.test :refer :all] [clojure.test :refer :all])) (deftest hiccup-schema-validation-test (is (nil? (s/check HiccupElement [:a {:k "v"} [:b "c"]]))) (is (s/check HiccupElement [:a {:k "v"} {:k2 "v2"}]))) (deft...
null
https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/domain/test/domain/metadata_test.clj
clojure
(ns domain.metadata-test (:require [schema.core :as s] [domain.metadata :refer :all] [plumbing.test :refer :all] [clojure.test :refer :all])) (deftest hiccup-schema-validation-test (is (nil? (s/check HiccupElement [:a {:k "v"} [:b "c"]]))) (is (s/check HiccupElement [:a {:k "v"} {:k2 "v2"}]))) (deft...
734126b13302b738d46dde71e4ffccbe566873f274d879faa229bd7fd82859f7
verement/etamoo
Server.hs
{-# LANGUAGE OverloadedStrings #-} module MOO.Server (startServer, importDatabase, exportDatabase) where import Control.Applicative ((<$>)) import Control.Arrow ((&&&)) import Control.Concurrent (takeMVar, putMVar, getNumCapabilities, threadDelay) import Control.Concurrent.Async (async, withAsync, waitEither, wait) ...
null
https://raw.githubusercontent.com/verement/etamoo/af65e2581ab5d093c9490f43692ef89bafc2efc1/src/MOO/Server.hs
haskell
# LANGUAGE OverloadedStrings # | Maximum database size, in megabytes ensure file exists Emergency Wizard Mode remote shutdown remote checkpoint Normal server operation: wait for a shutdown signal | Create a native EtaMOO database from an existing LambdaMOO-format database. | Write a LambdaMOO-format database c...
module MOO.Server (startServer, importDatabase, exportDatabase) where import Control.Applicative ((<$>)) import Control.Arrow ((&&&)) import Control.Concurrent (takeMVar, putMVar, getNumCapabilities, threadDelay) import Control.Concurrent.Async (async, withAsync, waitEither, wait) import Control.Concurrent.STM (STM,...
5783448d5a9d9671903632ed2561506abcfe62af4a5a24fc03a04039f8952aac
bobzhang/fan
test_revised.ml
open Format; let a = 3;
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/test_revised.ml
ocaml
open Format; let a = 3;
f7dc210d9884393615193717a10a43f8c15feb59d7724902cb11ca5c6f63baea
ekmett/zippers
BrainfuckFinal.hs
# LANGUAGE TypeOperators # # LANGUAGE TemplateHaskell # # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # ----------------------------------------------------------------------------- -- | -- Module : BrainfuckFinal Copyright : ( C ) 2012 , nand ` -- License : BSD-style (see the file LICENSE)...
null
https://raw.githubusercontent.com/ekmett/zippers/06c5a92748a1e1b6fd5c847b1516a61c76e0370e/examples/BrainfuckFinal.hs
haskell
--------------------------------------------------------------------------- | Module : BrainfuckFinal License : BSD-style (see the file LICENSE) Stability : provisional A simple interpreter for the esoteric programming language "Brainfuck" written using lenses and zippers. This version of the int...
# LANGUAGE TypeOperators # # LANGUAGE TemplateHaskell # # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # Copyright : ( C ) 2012 , nand ` Maintainer : < > Portability : TH , Rank2 , NoMonomorphismRestriction an AST . module Main where import Prelude hiding (Either(..)) import Control.Le...
74fa8abd427ffd941349de75cb4e1ccd642dd13e5180661ff83afbf76c639a34
amnh/poy5
simpleIndels.ml
let simple_indelsubstitution max compiler = Compiler.compile_decoder (OCAMLSK let m_true = [SK K] let m_false = [SK (S K)] let m_and y x = if x then y else x let m_or x y = if x then x else y let m_not x = if x then m_false else m_true let first = m_true ...
null
https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/kolmo/simpleIndels.ml
ocaml
We don't use the continuation in this version A function to compute log2 x Now we write the functions for insertions
let simple_indelsubstitution max compiler = Compiler.compile_decoder (OCAMLSK let m_true = [SK K] let m_false = [SK (S K)] let m_and y x = if x then y else x let m_or x y = if x then x else y let m_not x = if x then m_false else m_true let first = m_true ...
beae7e53693c92f4431da55a19f431806922972b57491ada49d4e5989be1f8a3
haskell-works/hw-prim
AsVector8sSpec.hs
# OPTIONS_GHC -fno - warn - incomplete - patterns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # module HaskellWorks.Data.Vector.AsVector8sSpec ( spec ) where import HaskellWorks.Data.Vector.AsVector8 import HaskellWorks.Data.Vector.AsVector8s import HaskellWorks.Hspec.Hedgehog import Hed...
null
https://raw.githubusercontent.com/haskell-works/hw-prim/aff74834cd2d3fb0eb4994b24b2d1cdef1e3e673/test/HaskellWorks/Data/Vector/AsVector8sSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# OPTIONS_GHC -fno - warn - incomplete - patterns # # LANGUAGE ScopedTypeVariables # module HaskellWorks.Data.Vector.AsVector8sSpec ( spec ) where import HaskellWorks.Data.Vector.AsVector8 import HaskellWorks.Data.Vector.AsVector8s import HaskellWorks.Hspec.Hedgehog import Hedgehog import Test.Hspec import quali...
93b340840ebed062f5d87a8c9d6f282598acd56ac1a5fb50a30da2faa251f313
oral-health-and-disease-ontologies/ohd-ontology
project-macros.lisp
(defmacro push-items (place &rest items) "macro used for pushing muliple items onto a list. For example, instead of doing multiple push operations like so: (push `(declaration (class !A)) axioms) (push `(declaration (class !B)) axioms) (push `(declaration (class !C)) axioms) push-items can be called like so: ...
null
https://raw.githubusercontent.com/oral-health-and-disease-ontologies/ohd-ontology/ba3f502b86487c8ba5fa04ff8ba33312a1679570/src/vdw-translation/macros/project-macros.lisp
lisp
the following set of labels provide bfo like language for building the axiom list, the purpose of these so to make building instance data more straightforward in order for the above relations to work, each of the data/object properties have to be declared putting this inside the macro means it will get inserted wh...
(defmacro push-items (place &rest items) "macro used for pushing muliple items onto a list. For example, instead of doing multiple push operations like so: (push `(declaration (class !A)) axioms) (push `(declaration (class !B)) axioms) (push `(declaration (class !C)) axioms) push-items can be called like so: ...
fcd4579f93d03c80c59c1d8b7ea3553875d62775aa69631e51a19b22a4277867
hstreamdb/hstream
Logger.hs
{-# LANGUAGE MagicHash #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE TypeSynonymInstances #-} This is needed to make ghci work . ghc issues : * /-/issues/19733 * /-/issues/15454 This is needed to make ghci work. Relatead ghc issues: * /-/issues/19733 * /-/issues/15454 -} # OPTIONS_GHC ...
null
https://raw.githubusercontent.com/hstreamdb/hstream/3a832a6ace3f9db4beb68e85d7414ef759a3be4e/common/base/HStream/Logger.hs
haskell
# LANGUAGE MagicHash # # LANGUAGE PatternSynonyms # # LANGUAGE TypeSynonymInstances # * Builder * Log Level ----------------------------------------------------------------------------- Example: @ import qualified HStream.Logger as Log main :: IO () main = Log.withDefaultLogger $ do Log.debu...
This is needed to make ghci work . ghc issues : * /-/issues/19733 * /-/issues/15454 This is needed to make ghci work. Relatead ghc issues: * /-/issues/19733 * /-/issues/15454 -} # OPTIONS_GHC -fobject - code # module HStream.Logger ( trace , Log.debug , Log.info , Log.warning , Log.fatal , w...
eefb4d06c086675e395a65b40c35bd0ac176e58a07c67322730e35ffe889e586
yangchenyun/learning-sicp
smsyntax.scm
;;;;SMSYNTAX.SCM Code for Sample Pset Syntax for Substitution Model ( Includes DESUGAR ) IGNORE THESE DECLARATIONS -- THEY'RE FOR THE COMPILER (declare (usual-integrations)) (declare (integrate-operator tagged-pair?)) (declare (integrate-operator make-define)) (declare (integrate-operator define?)) (declare (inte...
null
https://raw.githubusercontent.com/yangchenyun/learning-sicp/99a19a06eddc282e0eb364536e297f27c32a9145/solutions/lib/term-rewrite-evaluator/smsyntax.scm
scheme
SMSYNTAX.SCM Code for Sample Pset (declare (integrate-operator immediate-value?)) DEFINE handles both (define f exp) and (define (f x1 ...) body) handles both (define f exp) and (define (f x1 ...) body) formals EXPRESSION redundant in our representation redundant in our representation BODY SELF-EVALUATING SYMBOL COMB...
Syntax for Substitution Model ( Includes DESUGAR ) IGNORE THESE DECLARATIONS -- THEY'RE FOR THE COMPILER (declare (usual-integrations)) (declare (integrate-operator tagged-pair?)) (declare (integrate-operator make-define)) (declare (integrate-operator define?)) (declare (integrate-operator variable-of-define)) (dec...
ab30d90267485b64b14068e547630a63ffa2e3ec3df4a7de7b7e52f5f24ec872
ermine-language/ermine
HLint.hs
import "hint" HLint.Default ignore "Use fromMaybe" ignore "Parse error"
null
https://raw.githubusercontent.com/ermine-language/ermine/bd58949ab56311be9e0d2506a900f3d77652566b/HLint.hs
haskell
import "hint" HLint.Default ignore "Use fromMaybe" ignore "Parse error"
a94f48958c4dd2707eb08854685e039318d2f263e7b6e98775508686ccfc8588
Holmusk/elm-street
Main.hs
# LANGUAGE TypeApplications # | Generates Elm types from Haskell @types@ internal library . The generated files can be found in the @elm - example / src@ folder . The generated files can be found in the @elm-example/src@ folder. -} module Main (main) where import Data.Text (Text) import Elm (defaultSettings,...
null
https://raw.githubusercontent.com/Holmusk/elm-street/9aa15b26aff53a56147a62adb2179f714f684dc9/generate-elm/Main.hs
haskell
Generate Types, Encoders, Decoders
# LANGUAGE TypeApplications # | Generates Elm types from Haskell @types@ internal library . The generated files can be found in the @elm - example / src@ folder . The generated files can be found in the @elm-example/src@ folder. -} module Main (main) where import Data.Text (Text) import Elm (defaultSettings,...
4efd8d1401bf5e6adf0a5ed59390a8a6ccaf8406bc8ab17fcad2103ae19635d6
baskeboler/cljs-karaoke-client
key_bindings.cljs
(ns cljs-karaoke.key-bindings (:require [re-frame.core :as rf] [keybind.core :as key] [mount.core :as mount :refer [defstate]] [cljs-karaoke.songs :as songs] [cljs-karaoke.playback :as playback :refer [play stop pause]] [cljs-karaoke.views.playback :refer [s...
null
https://raw.githubusercontent.com/baskeboler/cljs-karaoke-client/bb6512435eaa436d35034886be99213625847ee0/src/main/cljs_karaoke/key_bindings.cljs
clojure
(ns cljs-karaoke.key-bindings (:require [re-frame.core :as rf] [keybind.core :as key] [mount.core :as mount :refer [defstate]] [cljs-karaoke.songs :as songs] [cljs-karaoke.playback :as playback :refer [play stop pause]] [cljs-karaoke.views.playback :refer [s...
8a43312585a1f530826bbdf78153fc936ec283a9b1bdfaa5f285618c0c587cb3
jchenche/interpreter
TypedAST.hs
module AST.TypedAST where import AST.CommonAST import qualified Data.Map.Strict as M (Map) type DynamicEnv = [M.Map Ident Val] data Prog = Prog [Expr] deriving (Show, Eq) data Expr = Not Type Expr | Neg Type Expr | Mult Type Expr Expr | Div Type Expr Expr | Plus Type Expr Expr | Minus Type E...
null
https://raw.githubusercontent.com/jchenche/interpreter/3623493d1079b66ba1e596efca4d0ccaacd4f9de/src/AST/TypedAST.hs
haskell
First Type is the signature Expr of Closure is always a Func
module AST.TypedAST where import AST.CommonAST import qualified Data.Map.Strict as M (Map) type DynamicEnv = [M.Map Ident Val] data Prog = Prog [Expr] deriving (Show, Eq) data Expr = Not Type Expr | Neg Type Expr | Mult Type Expr Expr | Div Type Expr Expr | Plus Type Expr Expr | Minus Type E...
11ff1db2ddb9a209717bb5a10564a0965f3f67e79e5db0256c26ad6ecec09825
hpyhacking/openpoker
op_mod_betting.erl
-module(op_mod_betting). -behaviour(op_exch_mod). -export([start/2, dispatch/2, betting/2]). -include("openpoker.hrl"). -define(Z, 0). %%% %%% callback %%% start([?GS_PREFLOP], Ctx = #texas{bb = At}) -> game:broadcast(#notify_stage{game = Ctx#texas.gid, stage = ?GS_PREFLOP}, Ctx), ask(At, Ctx#texas{stage = ?GS...
null
https://raw.githubusercontent.com/hpyhacking/openpoker/643193c94f34096cdcfcd610bdb1f18e7bf1e45e/src/mods/op_mod_betting.erl
erlang
callback cmd_raise not expectation seat player all-in - less call check or call raise to all-in normal raise, perhaps to all-in fold leave skip private ONLY All-in Call or All-in, Don't Raise Call or Raise or All-in
-module(op_mod_betting). -behaviour(op_exch_mod). -export([start/2, dispatch/2, betting/2]). -include("openpoker.hrl"). -define(Z, 0). start([?GS_PREFLOP], Ctx = #texas{bb = At}) -> game:broadcast(#notify_stage{game = Ctx#texas.gid, stage = ?GS_PREFLOP}, Ctx), ask(At, Ctx#texas{stage = ?GS_PREFLOP, max_betting...
e7006ea4553b62c89790c1af4ed22c45c334e76c281848152ce5ba4b3b0d5805
ragkousism/Guix-on-Hurd
substitute.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2014 < > Copyright © 2014 , 2015 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundati...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/tests/substitute.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2014 < > Copyright © 2014 , 2015 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (test-substitute) #:use-module (guix scripts substitute) #:use...
ce1279a947dcb6d3a56892878dd2cd2b8328c3619a93b900bb410c4c18e534a6
camfort/camfort
Annotation.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances #-} # OPTIONS_GHC -Wall # | Fortran AST annotations used for logic checking . Fortran AST a...
null
https://raw.githubusercontent.com/camfort/camfort/3421e85f6fbbcaa6503a266b3fae029a09d2ff24/src/Camfort/Specification/Hoare/Annotation.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE TemplateHaskell # # LANGUAGE TypeSynonymInstances # | Annotations meant to appear on the main annotated program's AST. that have been parsed from inside logical expression annotations.
# LANGUAGE DeriveFunctor # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # OPTIONS_GHC -Wall # | Fortran AST annotations used for logic checking . Fortran AST annotations used for Hoare logic checking. -} module Camfort.Specification.Hoare.Annotation where import D...
e799e18d7717ca98302cacdb3f3f89f0e013da22be6596a59a918ec927d37b4d
icicle-lang/icicle-ambiata
Sea.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE NoImplicitPrelude # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # module Icicle.Compiler.Sea ( seaEval , seaEvalWith , fromInputs , fromOutputs , CompilerSeaError(..) , renderCompilerSeaError ) w...
null
https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/src/Icicle/Compiler/Sea.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # module Icicle.Compiler.Sea ( seaEval , seaEvalWith , fromInputs , fromOutputs , CompilerSeaError(..) , renderCompilerSeaError ) where import qualified Data.List as...
990bfc31c0f570ee36ff615ba22b4933f37bf05d82b1b9e84f59f149302ec53d
s-expressionists/Incless
package.lisp
package.lisp (defpackage #:incless-intrinsic (:use #:common-lisp) (:export #:*client* #:intrinsic-client))
null
https://raw.githubusercontent.com/s-expressionists/Incless/0f4a2b591f621753d691706ae43db5b78bddc9f6/src/intrinsic/package.lisp
lisp
package.lisp (defpackage #:incless-intrinsic (:use #:common-lisp) (:export #:*client* #:intrinsic-client))
f03c6800c3d2432da2ed768d3de0fd0a8985c2afda3a82b377dbde3252f4c752
codedownio/sandwich
Introduce.hs
# LANGUAGE DataKinds # module Introduce where import Control.Concurrent import Control.Concurrent.Async import Control.Concurrent.STM import Control.Exception.Safe import Control.Monad.IO.Class import Control.Monad.Trans.Writer import Data.Foldable import GHC.Stack import Test.Sandwich import Test.Sandwich.Internal ...
null
https://raw.githubusercontent.com/codedownio/sandwich/9c8f56b5aee94ba65c70b3e52bde8959010aecc1/sandwich/test/Introduce.hs
haskell
* Tests Wait until we get into the actual test example, then cancel the top level async Waiting for the tree should not throw an exception
# LANGUAGE DataKinds # module Introduce where import Control.Concurrent import Control.Concurrent.Async import Control.Concurrent.STM import Control.Exception.Safe import Control.Monad.IO.Class import Control.Monad.Trans.Writer import Data.Foldable import GHC.Stack import Test.Sandwich import Test.Sandwich.Internal ...
9673187872a98ecbce3dee7cd79b0b240ec3f44855e8931684246cac33ec2572
haskell/cabal
Utils.hs
module UnitTests.Distribution.Client.Init.Utils ( dummyFlags , emptyFlags , mkLicense , baseVersion , mangleBaseDep , (@?!) , (@!?) ) where import Distribution.Client.Init.Types import qualified Distribution.SPDX as SPDX import Distribution.CabalSpecVersion import Distribution.Simple.Setup import Distribution.Types...
null
https://raw.githubusercontent.com/haskell/cabal/53c5dc9f9b19d01284e2b07d43e010b732ac91a8/cabal-install/tests/UnitTests/Distribution/Client/Init/Utils.hs
haskell
-------------------------------------------------------------------- -- Test flags -------------------------------------------------------------------- -- Test utils
module UnitTests.Distribution.Client.Init.Utils ( dummyFlags , emptyFlags , mkLicense , baseVersion , mangleBaseDep , (@?!) , (@!?) ) where import Distribution.Client.Init.Types import qualified Distribution.SPDX as SPDX import Distribution.CabalSpecVersion import Distribution.Simple.Setup import Distribution.Types...
dfff52ef25fb2feb892ccdb276b4e58476569284513c8a8396547e455454aecd
ghc/packages-base
TypeLits.hs
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE ExistentialQuantification # {-# LANGUAGE RankNTypes #-} # LANGUAGE Undecidable...
null
https://raw.githubusercontent.com/ghc/packages-base/52c0b09036c36f1ed928663abb2f295fd36a88bb/GHC/TypeLits.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE RankNTypes # * Kinds * Linking type and value level * Functions on type literals | (Kind) This is the kind of type-level natural numbers. | (Kind) This is the kind of type-level symbols. ------------------------------------------------------------------------------ | This c...
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE ExistentialQuantification # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -XNoImplicitPrelude # | This module...
aa234dc546d188015cfe725afac567554bea1afe4d1cdc6b5a7d1099bd1d5564
marcoheisig/sb-simd
define-associatives.lisp
(in-package #:sb-simd-internals) (macrolet ((define-associative (associative-record-name) (with-accessors ((name associative-record-name) (binary-operation associative-record-binary-operation) (identity-element associative-record-identity-element)) ...
null
https://raw.githubusercontent.com/marcoheisig/sb-simd/2ec806f74199349bd787db9969ceeb0ee6cfb1e7/code/define-associatives.lisp
lisp
(in-package #:sb-simd-internals) (macrolet ((define-associative (associative-record-name) (with-accessors ((name associative-record-name) (binary-operation associative-record-binary-operation) (identity-element associative-record-identity-element)) ...
c602f4ffcb160f2919e476ca0e7861242b4954df96eae391bba18179e31f2e47
ucsd-progsys/nate
jpf_font.mli
(***********************************************************************) (* *) MLTk , Tcl / Tk interface of Objective Caml (* *) , , and ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/jpf/jpf_font.mli
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...
a7e1bbdb8dc8510f5e9ce915e6057e4b889f1f7248c79c9f052dcd4a763b8783
racket/old-plt
lookup-def.scm
; Look up a value associated with a symbolic key in alist ; ((key value) ...) or ((key . value) ...) ; and return the associated value. ; If the association has the form ; (key . value) where value is not a pair --> return value ; (key value) --> return value ( key value3 ... ) - ...
null
https://raw.githubusercontent.com/racket/old-plt/a580d75deae2a0d2f3d8a93bc3c4f8f1f619b5b7/collects/ssax/lookup-def.scm
scheme
Look up a value associated with a symbolic key in alist ((key value) ...) or ((key . value) ...) and return the associated value. If the association has the form (key . value) where value is not a pair --> return value (key value) --> return value that is, the procedure tries to ...
( key value3 ... ) - > return ( value1 value2 value3 ... ) procedure . Its first two arguments are evaluated exactly once . The if the Scheme system turns out DSSSL - compatible ) (define-syntax lookup-def (syntax-rules (warn:) ((lookup-def key alist) (let ((res (assq nkey nalist))) (if res (...
5f33105b10912d5b9473cdaaef45fd8cbd5a9e613024beefc8d3dc04a4ed39f0
magehash/magehash
stripe.clj
(ns stripe (:require [org.httpkit.client :as http] [coast :refer [env]] [clojure.data.json :as json])) (defn customer-request [m] (let [form-params {:source (:stripe/token m) :description (str "Customer for " (:member/email m))}] {:url "" :method :post :fo...
null
https://raw.githubusercontent.com/magehash/magehash/9545d65a10a570536f8c6d9ebbafc4982e07cedc/src/stripe.clj
clojure
(ns stripe (:require [org.httpkit.client :as http] [coast :refer [env]] [clojure.data.json :as json])) (defn customer-request [m] (let [form-params {:source (:stripe/token m) :description (str "Customer for " (:member/email m))}] {:url "" :method :post :fo...
ef584980fc703da9b81e14eee50c7fe07a3b722a21b5feaaf39f1dbd234a8479
greglook/cljstyle
line_test.clj
(ns cljstyle.format.line-test (:require [cljstyle.format.line :as line] [cljstyle.test-util] [clojure.test :refer [deftest is]])) (deftest consecutive-blank-lines (is (rule-reformatted? line/trim-consecutive {:max-consecutive 2} "(foo)\n\n(bar)" "(foo)\n\n(bar)")) (is (rule-r...
null
https://raw.githubusercontent.com/greglook/cljstyle/1f58e2e7af4c193aa77ad0695f6c2b9ac2c5c5ec/test/cljstyle/format/line_test.clj
clojure
(ns cljstyle.format.line-test (:require [cljstyle.format.line :as line] [cljstyle.test-util] [clojure.test :refer [deftest is]])) (deftest consecutive-blank-lines (is (rule-reformatted? line/trim-consecutive {:max-consecutive 2} "(foo)\n\n(bar)" "(foo)\n\n(bar)")) (is (rule-r...
2fd623712190bdc25a1750f79f89c4dcfac7cad2506c474d89660cbfa90c3512
faylang/fay
newtype.hs
module Newtype where import FFI newtype MyInteger = MyInteger Int x = case MyInteger undefined of MyInteger _ -> 1 y = case undefined of MyInteger _ -> 1 int :: Int int = undefined yInt = case int of _ -> 1 data Foo = Bar { bar :: Double } newtype Baz = Baz { unwrapBaz :: Foo } getBaz :: Fa...
null
https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/newtype.hs
haskell
module Newtype where import FFI newtype MyInteger = MyInteger Int x = case MyInteger undefined of MyInteger _ -> 1 y = case undefined of MyInteger _ -> 1 int :: Int int = undefined yInt = case int of _ -> 1 data Foo = Bar { bar :: Double } newtype Baz = Baz { unwrapBaz :: Foo } getBaz :: Fa...
31b7e158db369b9e754b952c52acb0cd458be14422cd7d24bfbd6e12230e6863
fragnix/fragnix
Network.Wai.Handler.Warp.Timeout.hs
# LANGUAGE Haskell98 # # LINE 1 " Network / Wai / Handler / Warp / Timeout.hs " # # LANGUAGE CPP # {-# LANGUAGE DeriveDataTypeable #-} module Network.Wai.Handler.Warp.Timeout ( -- ** Types Manage...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/application/Network.Wai.Handler.Warp.Timeout.hs
haskell
# LANGUAGE DeriveDataTypeable # ** Types ** Manager ** Registration ** Control ** Exceptions -------------------------------------------------------------- | A timeout manager | An action to be performed on timeout. | A handle used by 'Manager' Manager turns it to Inactive. Manager removes it with timeout act...
# LANGUAGE Haskell98 # # LINE 1 " Network / Wai / Handler / Warp / Timeout.hs " # # LANGUAGE CPP # module Network.Wai.Handler.Warp.Timeout ( Manager , TimeoutAction , Handle , initialize , ...
a139138fcb65e3a5d576a64b192f919c2a62c25ab62cc0876622ee37a69b7a24
RefactoringTools/HaRe
Phugs.hs
module Phugs where ---------------------------------------------------------------------- AST , etc . ---------------------------------------------------------------------- import Syntax hiding (E,P,D) import PrettyPrint(pp) type Name = String data Op = Plus | Mult | IntEq | IntLess data LS = Lazy | ...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/Phugs/Phugs.hs
haskell
-------------------------------------------------------------------- -------------------------------------------------------------------- - Nested Patterns { x } data T1 = C1 t1 t2; {C1 p1 p1} = e newtype T2 = C2 t1; {C2 p1} = e { ~p } { x@p } { _ } { x } { f x } { \ p1 p2 -> e } data T1 = C1 t1...
module Phugs where AST , etc . import Syntax hiding (E,P,D) import PrettyPrint(pp) type Name = String data Op = Plus | Mult | IntEq | IntLess data LS = Lazy | Strict deriving Eq { 5 } { ( p1,p2 ) } data E { 5 } { ( e1,e2 ) } { let x = e1 \nl y = e2 in e3 } type Match = ...
f20a17d91279864f5b2261d869f04d17a0f35609497c2a462b52b03d5bfcba9b
lazy-cat-io/metaverse
subs.cljs
(ns metaverse.renderer.router.subs (:require [re-frame.core :as rf] [reitit.frontend.easy :as rfe])) (rf/reg-sub :navigation/router (fn [db _] (get-in db [:navigation :router]))) (rf/reg-sub :navigation/route (fn [db _] (get-in db [:navigation :route]))) (rf/reg-sub :navigation/route-n...
null
https://raw.githubusercontent.com/lazy-cat-io/metaverse/4c566278d253ce6b85e4644b2fdec93dab58355c/src/main/clojure/metaverse/renderer/router/subs.cljs
clojure
(ns metaverse.renderer.router.subs (:require [re-frame.core :as rf] [reitit.frontend.easy :as rfe])) (rf/reg-sub :navigation/router (fn [db _] (get-in db [:navigation :router]))) (rf/reg-sub :navigation/route (fn [db _] (get-in db [:navigation :route]))) (rf/reg-sub :navigation/route-n...
155ea72c5b59808566c30a43cd2f5fbc888fe912d24d23df818a322d83c14b11
xapi-project/xen-api-libs
config.ml
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/stdext/config.ml
ocaml
* read a filename, parse and validate, and return the errors if any
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
23dff24fd22c1bc56b11bd729f8f9438b4c9249b2fe852efab915bc44ed7f765
zero-one-group/geni
spark_context.clj
(ns zero-one.geni.spark-context (:require [potemkin :refer [import-fn]] [zero-one.geni.defaults :as defaults] [zero-one.geni.docs :as docs] [zero-one.geni.interop :as interop] [zero-one.geni.rdd.unmangle :as unmangle]) (:import (org.apache.spark.api.java JavaSparkContext) (org.apache.spark.sql ...
null
https://raw.githubusercontent.com/zero-one-group/geni/4dbabf8315d85cc1526e04bca7e4cb7b75c21ac1/src/clojure/zero_one/geni/spark_context.clj
clojure
TODO: support min-partitions arg Aliases
(ns zero-one.geni.spark-context (:require [potemkin :refer [import-fn]] [zero-one.geni.defaults :as defaults] [zero-one.geni.docs :as docs] [zero-one.geni.interop :as interop] [zero-one.geni.rdd.unmangle :as unmangle]) (:import (org.apache.spark.api.java JavaSparkContext) (org.apache.spark.sql ...
6e9e59a5fcff20f5872c5ed2042208b139d9c927b3d1a8951c09aef4c7355c2e
PrecursorApp/precursor
email.clj
(ns pc.email (:require [clj-time.core :as time] [clj-time.format] [clojure.java.io :as io] [clojure.pprint] [clojure.string :as str] [clojure.tools.logging :as log] [datomic.api :as d] [me.raynes.fs :as fs] [hiccup.core :a...
null
https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src/pc/email.clj
clojure
only supports files :(
(ns pc.email (:require [clj-time.core :as time] [clj-time.format] [clojure.java.io :as io] [clojure.pprint] [clojure.string :as str] [clojure.tools.logging :as log] [datomic.api :as d] [me.raynes.fs :as fs] [hiccup.core :a...
05b9d4a1bc2e55de03836859a772ba7f0979109f5661cf42b928b0ddc010169b
tek/polysemy-hasql
JsonTest.hs
module Polysemy.Hasql.Test.JsonTest where import qualified Data.Aeson as Aeson import Exon (exon) import qualified Hasql.Decoders as Decoders import Hasql.Decoders (column, jsonBytes) import qualified Hasql.Encoders as Encoders import Hasql.Encoders (int8, param) import Polysemy.Db.Data.DbError (DbError) import Polyse...
null
https://raw.githubusercontent.com/tek/polysemy-hasql/831dfdb47f9246286db2c46e30194300a199ef38/packages/hasql/integration/Polysemy/Hasql/Test/JsonTest.hs
haskell
module Polysemy.Hasql.Test.JsonTest where import qualified Data.Aeson as Aeson import Exon (exon) import qualified Hasql.Decoders as Decoders import Hasql.Decoders (column, jsonBytes) import qualified Hasql.Encoders as Encoders import Hasql.Encoders (int8, param) import Polysemy.Db.Data.DbError (DbError) import Polyse...
52ef50c8638e4df7b37455866a78250d9bcc9be83856454a6bbf40695bca5bc4
jimpil/enclog
normalization.clj
(ns enclog.normalization (:import (org.encog.util.normalize DataNormalization) (org.encog.util.normalize.target NormalizationStorageArray1D NormalizationStorageArray2D NormalizationStorageCSV ...
null
https://raw.githubusercontent.com/jimpil/enclog/3281c0959090e1911ae5ea99feb886e0e8a645c8/src/enclog/normalization.clj
clojure
-------------------------------------------- input-count & ideal-count just rows columns, rows where to write the csv file input-count & ideal-count element must be a Number element must be a string element must be a seq element must be a 2d seq will simply pass the input value to the output (not very useful) z-ax...
(ns enclog.normalization (:import (org.encog.util.normalize DataNormalization) (org.encog.util.normalize.target NormalizationStorageArray1D NormalizationStorageArray2D NormalizationStorageCSV ...
1c4a22ddb2c889e6b350a37fa9828c717ce5677009e69c2656ca0d2a2fb79090
avalor/eJason
operations.erl
-module(operations). -compile(export_all). -include("include/macros.hrl"). -include("include/variables.hrl"). -include("include/parser.hrl"). %%%%%%%%%%%%%%%% OPERATIONS CALLED IN A PLAN BODY %% Used in the arithmetic operations of the body formulas, %% the rules and the conditions in the context. %% Returns ei...
null
https://raw.githubusercontent.com/avalor/eJason/3e5092d42de0a3df5c5e5ec42cb552a2f282bbb1/src/operations.erl
erlang
OPERATIONS CALLED IN A PLAN BODY Used in the arithmetic operations of the body formulas, the rules and the conditions in the context. io:format("Original Bindings: ~p~n",[OriginalBindings]), io:format("~p Arg1: ~p~n",[Operator,Arg1]), io:format("CorrectedBindings1: ~p~n",[CorrectedBindings1]), %% io:format(...
-module(operations). -compile(export_all). -include("include/macros.hrl"). -include("include/variables.hrl"). -include("include/parser.hrl"). Returns either { ? } or { replace_bindings , ItNewBindings } TODO : change ? FAIL by false operation(OriginalBindings,Operator,Arg1,Arg2) -> io : format("~p : ...
6813b7f65faeb3d3ba7f0613223388f80389e6884f9d14e4bd4a5f6bb040229b
ruhler/smten
Yices2.hs
# LANGUAGE NoImplicitPrelude # | This module provides a Yices2 backend for smten . module Smten.Search.Solver.Yices2 (yices2) where import Smten.Plugin.Annotations import Smten.Prelude import Smten.Search.Prim # ANN module PrimitiveModule # -- | The Yices2 Solver -- The backend requires the shared library is...
null
https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-lib/Smten/Search/Solver/Yices2.hs
haskell
| The Yices2 Solver searches for libyices.so.2.1 to be installed in standard library paths. You may need to provide a symlink for libyices.so.2.1, either by running to add the directory containing libyices.so.2.1 to the LD_LIBRARY_PATH environment variable at runtime.
# LANGUAGE NoImplicitPrelude # | This module provides a Yices2 backend for smten . module Smten.Search.Solver.Yices2 (yices2) where import Smten.Plugin.Annotations import Smten.Prelude import Smten.Search.Prim # ANN module PrimitiveModule # The backend requires the shared library is installed at runtime . ...
e8e5558c48e688dec7ab02837a18f3ae24df85f9cc30a564bda8f26f14e6d8d5
aryx/syncweb
refactor.ml
open Common open Web open Code (*****************************************************************************) (* Prelude *) (*****************************************************************************) (* * adhoc scripts to adjust .nw files. *) (******************************************************************...
null
https://raw.githubusercontent.com/aryx/syncweb/8cc3f10599bf65ab57947950f30cb6b18d83db14/main/refactor.ml
ocaml
*************************************************************************** Prelude *************************************************************************** * adhoc scripts to adjust .nw files. *************************************************************************** Helpers *******************************...
open Common open Web open Code let count_dollar s = let cnt = ref 0 in for i = 0 to String.length s - 1 do if String.get s i =$= '$' then incr cnt done; !cnt let trim s = Str.global_replace (Str.regexp " +$") "" s let rename_chunknames xs = let subst_maybe s = let s, suffix = match ...
4e1a5b56fcccb480d1502ab8fb3015dd704615d2262f11ebf1de57a01bb50495
clojupyter/clojupyter
conda_specs.clj
(ns clojupyter.install.conda.conda-specs (:require [clojupyter.install.local-specs :as lsp] [clojure.spec.alpha :as s] [io.simplect.compose :refer [def- p]])) (def DEPEND-DUMMY "Namespaces which depend on keyword-based definitions in this name refer to this value." nil) (def DEPEND "En...
null
https://raw.githubusercontent.com/clojupyter/clojupyter/b54b30b5efa115937b7a85e708a7402bd9efa0ab/src/clojupyter/install/conda/conda_specs.clj
clojure
---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------- ENV --------...
(ns clojupyter.install.conda.conda-specs (:require [clojupyter.install.local-specs :as lsp] [clojure.spec.alpha :as s] [io.simplect.compose :refer [def- p]])) (def DEPEND-DUMMY "Namespaces which depend on keyword-based definitions in this name refer to this value." nil) (def DEPEND "En...
f448400830fb781dc8a725bb1d7b587b7fe3a2002abae152c2b56e85ab363496
lemmaandrew/CodingBatHaskell
notReplace.hs
From Given a string , return a string where every appearance of the lowercase word " has been replaced with \"is not\ " . The word " should not be immediately preceeded or followed by a letter -- so for example the " in \"this\ " does not count . ( Note : Character.isLetter(char ) tests if a char is a let...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/String-3/notReplace.hs
haskell
so for example the " in \"this\ " does not count . ( Note : so for example the \"is\" in \"this\" does not count. (Note:
From Given a string , return a string where every appearance of the lowercase word " has been replaced with \"is not\ " . The word " should not be immediately preceeded Character.isLetter(char ) tests if a char is a letter . ) Given a string, return a string where every appearance of the lowercase word \"i...
172473d4a0bd39b01f57abc71c413e48999a9d6cca6afb539521f37f42ec38fb
mmark-md/mmark
Main.hs
module Main (main) where import qualified Data.Text.IO as T import qualified Text.MMark as MMark import Weigh main :: IO () main = mainWith $ do setColumns [Case, Allocated, GCs, Max] bparser "data/bench-yaml-block.md" bparser "data/bench-thematic-break.md" bparser "data/bench-heading.md" bparser "data/benc...
null
https://raw.githubusercontent.com/mmark-md/mmark/2eae69376535f9d41d9b1a00d6bced522e978799/bench/memory/Main.hs
haskell
-------------------------------------------------------------------------- Helpers | File from which the input has been loaded
module Main (main) where import qualified Data.Text.IO as T import qualified Text.MMark as MMark import Weigh main :: IO () main = mainWith $ do setColumns [Case, Allocated, GCs, Max] bparser "data/bench-yaml-block.md" bparser "data/bench-thematic-break.md" bparser "data/bench-heading.md" bparser "data/benc...
a7b3530bd5a24cf2fc19f39da3dfa475ace223c84dc587d4944ba0f13dacdce2
dharrigan/startrek
routes.clj
(ns startrek.ui.home.routes {:author "David Harrigan"} (:require [startrek.ui.home.handler :as handler])) (set! *warn-on-reflection* true) (defn ^:private public-routes [] ["" {:get {:handler handler/index}}]) (defn routes [] ["/" (public-routes)])
null
https://raw.githubusercontent.com/dharrigan/startrek/a91caa3f504ffea502b79cfd29d0499574aaced6/src/startrek/ui/home/routes.clj
clojure
(ns startrek.ui.home.routes {:author "David Harrigan"} (:require [startrek.ui.home.handler :as handler])) (set! *warn-on-reflection* true) (defn ^:private public-routes [] ["" {:get {:handler handler/index}}]) (defn routes [] ["/" (public-routes)])
4c5c26b82cd384b2c4e5c60c457df082608b66b5be5cff79e2b8f3e44c1ce5b9
esl/MongooseIM
mod_time_SUITE.erl
%%============================================================================== Copyright 2015 Erlang Solutions Ltd. %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% ...
null
https://raw.githubusercontent.com/esl/MongooseIM/efd6bec8d0e5a61ffa97a886dc74c9454ae3fc00/big_tests/tests/mod_time_SUITE.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 ex...
Copyright 2015 Erlang Solutions Ltd. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(mod_time_SUITE). -compile([export_all, nowarn_export_all]). -include_lib("escalus/include/escalus.hrl"). -include_lib("common_tes...
78bff8223e1d45fa18df07ba82bc14f191b03192082247c7ed5723966e31dd3c
b0-system/brzo
brzo_cmd_root.ml
--------------------------------------------------------------------------- Copyright ( c ) 2018 The programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2018...
null
https://raw.githubusercontent.com/b0-system/brzo/e481a39d7881d7aaf800cf3c7a9b6cd836867a90/src/brzo_cmd_root.ml
ocaml
Command line interface
--------------------------------------------------------------------------- Copyright ( c ) 2018 The programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2018...
1115a1171f009f04c78964df133ad1315732b181b617a422641108a20afb1d03
Relph1119/sicp-solutions-manual
p38-sum-cubes.scm
;计算给定范围内的整数的立方之和 (define (cube x) (* x x x)) (define (sum-cubes a b) (if (> a b) 0 (+ (cube a) (sum-cubes (+ a 1) b))))
null
https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/examples/ch01/p38-sum-cubes.scm
scheme
计算给定范围内的整数的立方之和
(define (cube x) (* x x x)) (define (sum-cubes a b) (if (> a b) 0 (+ (cube a) (sum-cubes (+ a 1) b))))
a59d537e1657a2f6eab4a3c5a5531cda010d0cf3ed470f31a37725838628451a
Fresheyeball/Shpadoinkle
Choice.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE CPP # {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTyp...
null
https://raw.githubusercontent.com/Fresheyeball/Shpadoinkle/8e0efbb11857a1af47038dae07b8140291c251ed/widgets/Shpadoinkle/Widgets/Types/Choice.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric # # LANGUAGE UndecidableInstances # # LANGUAGE DerivingStrategies # # LANGUAGE QuantifiedConstraints # | Laws: @ a == b ==> toSet a == toSet b -- toSet is injective toSet (smap f ...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplications ...
f0c2cbd7aa68deb5530944965603df42dbd7aa3764dfbe4aeb8a4e98270e8308
oakes/play-cljc-examples
start_dev.cljs
(ns super-koalio.start-dev (:require [super-koalio.start] [clojure.spec.test.alpha :as st])) (st/instrument)
null
https://raw.githubusercontent.com/oakes/play-cljc-examples/76edebe22bf5d08f5eb78970dba1fd577c8be15a/super-koalio/src/super_koalio/start_dev.cljs
clojure
(ns super-koalio.start-dev (:require [super-koalio.start] [clojure.spec.test.alpha :as st])) (st/instrument)
23fbaf7c09ab8ab993fc4a90bb31f0bfdd7c27ca9abe567465719f3931e8b695
fission-codes/cli
Wait.hs
-- | Wait for an action on the CLI module Fission.CLI.Display.Wait (waitFor) where import Fission.Prelude import RIO.ByteString import qualified System.Console.ANSI as ANSI import Fission.CLI.Display.Loader waitFor :: MonadUnliftIO m => ByteString -> m a -> m a waitFor msg action = do liftIO <| ANSI.cursorForward...
null
https://raw.githubusercontent.com/fission-codes/cli/dc3500babad35a6cb44835fa503d27d672cbcdb3/library/Fission/CLI/Display/Wait.hs
haskell
| Wait for an action on the CLI
module Fission.CLI.Display.Wait (waitFor) where import Fission.Prelude import RIO.ByteString import qualified System.Console.ANSI as ANSI import Fission.CLI.Display.Loader waitFor :: MonadUnliftIO m => ByteString -> m a -> m a waitFor msg action = do liftIO <| ANSI.cursorForward 3 liftIO <| ANSI.setSGR [ANSI.Se...
e76c4c4520928c11bc227367b8c5c7e333053b6a1a9e7ab12e0c59ccb26208fb
haskell/vector
Main.hs
module Main where import Algo.MutableSet (mutableSet) import Algo.ListRank (listRank) import Algo.Rootfix (rootfix) import Algo.Leaffix (leaffix) import Algo.AwShCC (awshcc) import Algo.HybCC (hybcc) import Algo.Quickhull (quickhull) import Algo.Spectral (spectral) import Algo.Tridiag (tridiag) ...
null
https://raw.githubusercontent.com/haskell/vector/4c87e88f07aad166c6ae2ccb94fa539fbdd99a91/vector/benchmarks/Main.hs
haskell
module Main where import Algo.MutableSet (mutableSet) import Algo.ListRank (listRank) import Algo.Rootfix (rootfix) import Algo.Leaffix (leaffix) import Algo.AwShCC (awshcc) import Algo.HybCC (hybcc) import Algo.Quickhull (quickhull) import Algo.Spectral (spectral) import Algo.Tridiag (tridiag) ...
98553eb36254ce5c1d8656c12ef0369f525cec8e759c4aa264d9d55c8457242c
freizl/dive-into-haskell
ch02_myDrop.hs
-- file: chp02/myDrop.hs myDrop :: Int -> [a] -> [a] myDrop n xs = if n <= 0 || null xs then xs else myDrop (n-1) (tail xs)
null
https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/readings/real-world-haskell/ch02_myDrop.hs
haskell
file: chp02/myDrop.hs
myDrop :: Int -> [a] -> [a] myDrop n xs = if n <= 0 || null xs then xs else myDrop (n-1) (tail xs)
23bdf3547568741265c03908b90ed2f04e55a3027511df6b0b89b8c393c52129
meain/evil-textobj-tree-sitter
textobjects.scm
(dict) @class.outer ((dict_core) @class.inner) ((key_value value: _? @function.inner._start (_)* _? @parameter.inner @function.inner._end) ) @function.outer (code (_)* @class.inner) @class.outer ((comment) @comment.outer._start ((comment)+) @comment.outer._end ) (comment) @comment.inner
null
https://raw.githubusercontent.com/meain/evil-textobj-tree-sitter/f3b3e9554e5ecae55200454804e183e268b4a6fc/queries/foam/textobjects.scm
scheme
(dict) @class.outer ((dict_core) @class.inner) ((key_value value: _? @function.inner._start (_)* _? @parameter.inner @function.inner._end) ) @function.outer (code (_)* @class.inner) @class.outer ((comment) @comment.outer._start ((comment)+) @comment.outer._end ) (comment) @comment.inner
f2dce774d6b51babd171660fab7479c5007309d38ba944fd8c3d2a71772b2147
static-analysis-engineering/codehawk
jCHRawClass.ml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Copy...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchlib/jCHRawClass.ml
ocaml
jchlib to be added: | AttributeRuntim eVisibleTypeAnnotations | AttributeRuntimeInvisibleTypeAnnotations place holder for resolved items name of directory or jar/war file from which the class was retrieved MD5 digest of class file
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Copy...
35ae5e5e31ff4bb810b762a251da6d12ce78f69cc1c95686d166a05c3390e901
mhuebert/re-db
read.cljc
(ns re-db.read "Reactive API for re-db (with explicit connection argument)." (:refer-clojure :exclude [get]) (:require [re-db.fast :as fast] [re-db.reactive :as r] [re-db.triplestore :as ts] [re-db.util :as u]) #?(:cljs (:require-macros [re-db.read]))) ;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/mhuebert/re-db/6aa5573f152dbde7a5d8f5e82d18c729e053ae55/src/main/re_db/read.cljc
clojure
Listeners A reactive signal per [e a v] pattern which invalidates listeners for debugging for paths that don't lead to any invalidators. e__ ea_ __v (used for refs) _av _a_ directly create dependency nested lookup ref Entity API [_ a v] [e a _] difference from others: no isComponent Pull API ref...
(ns re-db.read "Reactive API for re-db (with explicit connection argument)." (:refer-clojure :exclude [get]) (:require [re-db.fast :as fast] [re-db.reactive :as r] [re-db.triplestore :as ts] [re-db.util :as u]) #?(:cljs (:require-macros [re-db.read]))) (defonce !listeners (...
20a9ba19921c08d28fcee3447bcb352ae99af2d65113be6931360c7838ef1968
jfeser/L2
config.ml
open Core type t = { verbosity: int [@default 0] [@sexp_drop_default] ; untyped: bool [@default false] [@sexp_drop_default] ; deduction: bool [@default true] [@sexp_drop_default] ; infer_base: bool [@default true] [@sexp_drop_default] ; use_solver: bool [@default false] [@sexp_drop_default] ; max_exhaustiv...
null
https://raw.githubusercontent.com/jfeser/L2/a66659c7d75f75788c48a17b531045fb3d5f8351/lib/config.ml
ocaml
open Core type t = { verbosity: int [@default 0] [@sexp_drop_default] ; untyped: bool [@default false] [@sexp_drop_default] ; deduction: bool [@default true] [@sexp_drop_default] ; infer_base: bool [@default true] [@sexp_drop_default] ; use_solver: bool [@default false] [@sexp_drop_default] ; max_exhaustiv...
54fe9c809d5a8205b7a5e8b20fc3c337ac60739e9d66da5328fafd15698c753a
mstksg/inCode
Render.hs
# LANGUAGE ImplicitParams # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # module Blog.Render where import Blog.Types import Blog.View import Blog.View.Social import Data.Foldable import Data.Maybe import Data.String import Text.Bl...
null
https://raw.githubusercontent.com/mstksg/inCode/e1f80a3dfd83eaa2b817dc922fd7f331cd1ece8a/src/Blog/Render.hs
haskell
# LANGUAGE OverloadedStrings # , "var addthis_config = {'data_track_addressbar':true};" ??
# LANGUAGE ImplicitParams # # LANGUAGE RecordWildCards # module Blog.Render where import Blog.Types import Blog.View import Blog.View.Social import Data.Foldable import Data.Maybe import Data.String import Text.Blaze.Html5 ((!)) import q...
f3e8c9ea71a20607850c4c16a652a97ddc2eda24e0bc345d690376cd93fda521
sellout/yaya
Applied.hs
module Yaya.Applied where import Control.Monad.Trans.Free import Data.Functor.Identity import Yaya.Fold import Yaya.Fold.Common import Yaya.Pattern now :: Steppable (->) t (Either a) => a -> t now = embed . Left -- | This will collapse all the intermediate steps to get to the value that must -- exist at the end. r...
null
https://raw.githubusercontent.com/sellout/yaya/3801a84a4371f016fa9e1483f5a38f828e257c2d/core/src/Yaya/Applied.hs
haskell
| This will collapse all the intermediate steps to get to the value that must exist at the end. | Converts exceptional divergence to non-termination. | Extracts _no more than_ @n@ elements from the possibly-infinite sequence @s@. | Extracts _exactly_ @n@ elements from the infinite stream @s@. | Extracts the e...
module Yaya.Applied where import Control.Monad.Trans.Free import Data.Functor.Identity import Yaya.Fold import Yaya.Fold.Common import Yaya.Pattern now :: Steppable (->) t (Either a) => a -> t now = embed . Left runToEnd :: Recursive (->) t (Either a) => t -> a runToEnd = cata fromEither fromMaybe :: (Steppable (->...