_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
12273ef7c3d4f1fe3c6a501896ab12e75df8a9a5729a7747474be2506ad95eea
ludat/conferer
BoolSpec.hs
# LANGUAGE TypeApplications # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE ScopedTypeVariables # module Conferer.FromConfig.BoolSpec (spec) where import Test.Hspec import Conferer.FromConfig.Extended spec :: Spec spec = do context "Basic fetching" $ do describe "fetching a Bool from config" $ do ensureEmp...
null
https://raw.githubusercontent.com/ludat/conferer/3c2d794a0e109626abb314e802971121dac7d7f9/packages/conferer/test/Conferer/FromConfig/BoolSpec.hs
haskell
# LANGUAGE TypeApplications # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE ScopedTypeVariables # module Conferer.FromConfig.BoolSpec (spec) where import Test.Hspec import Conferer.FromConfig.Extended spec :: Spec spec = do context "Basic fetching" $ do describe "fetching a Bool from config" $ do ensureEmp...
3ed2a99abd01090a0d57f5ec7633241c0e495f778f4b6e6803ad1bf6d7307e52
ivan-m/graphviz
Same.hs
{-# OPTIONS_HADDOCK hide #-} | Module : Data . GraphViz . Attributes . Same Description : Consider Attributes equal on constructors . Copyright : ( c ) License : 3 - Clause BSD - style Maintainer : This module is used when @a1 = = a2@ should return @True@ if they ...
null
https://raw.githubusercontent.com/ivan-m/graphviz/42dbb6312d7edf789d7055079de7b4fa099a4acc/Data/GraphViz/Attributes/Same.hs
haskell
# OPTIONS_HADDOCK hide # ----------------------------------------------------------------------------- | Defined as a wrapper around 'Attribute' where equality is based solely upon the constructor, not the contents.
| Module : Data . GraphViz . Attributes . Same Description : Consider Attributes equal on constructors . Copyright : ( c ) License : 3 - Clause BSD - style Maintainer : This module is used when @a1 = = a2@ should return @True@ if they are the same Attribute , e...
81ef51f54bfe1b1013f9f7e2e6406c9945984eb68f7511e9754c0b4b58873e3b
martinslota/protocell
map_int.ml
module P = Map_int_pc let tests = [ Utils.invariant_suite (module P.Integers) ~protobuf_file_name:"map_int.proto" ~protobuf_type_name:"Integers" [ P.Integers. { int32' = 1; int64' = 2; sint32 = 3; sint64 = 4; ui...
null
https://raw.githubusercontent.com/martinslota/protocell/62545c7fb63ff76c95449ba015e40e0c3e0d94a5/test/map_int.ml
ocaml
module P = Map_int_pc let tests = [ Utils.invariant_suite (module P.Integers) ~protobuf_file_name:"map_int.proto" ~protobuf_type_name:"Integers" [ P.Integers. { int32' = 1; int64' = 2; sint32 = 3; sint64 = 4; ui...
91aeca28396dc11deae7e9b630f29ce8915355eada0c61bd64300cf940d1efcf
phadej/kleene-type
KleeneSH.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} | This module defin...
null
https://raw.githubusercontent.com/phadej/kleene-type/cb7332b98ae229e162c12186fd4d7fccb06ab62f/src/Kleene/Type/Examples/KleeneSH.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # of the UNIX shell tools. /Disclaimer:/ the fact that we __can__ doesn't mean that we __should__. We may define self-proxy types instead of using 'K' for flags. Then the usag...
# LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # | This module defines " bindings to some We demonstrate the use of " . Type " ( and " KleenePlugin " ) to program in Haskell in completely structural way ( i.e. non - ...
02aa1504aa5655a2807da366c7a313f3d68f3ebb3163d967b578dc4a8932013f
spawnfest/eep49ers
cover_inc.erl
-module(cover_inc). -compile(export_all). -include("cover_inc.hrl"). func() -> func1(), ok.
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/tools/test/cover_SUITE_data/included_functions/cover_inc.erl
erlang
-module(cover_inc). -compile(export_all). -include("cover_inc.hrl"). func() -> func1(), ok.
c3adb9c863eed82effe54dc39f6e4bbe4baa06c43117a88bbc20d9187934f501
MaybeJustJames/zephyr
Generators.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE NamedFieldPuns #-} module Test.Generators where import Data.List (foldl') import Data.String (IsString (..)) import Test.QuickCheck import Language.PureScript.Names (Ident (..), ModuleName (..), ProperName (..), Qualified (..), QualifiedBy (..)) import Language.PureScript...
null
https://raw.githubusercontent.com/MaybeJustJames/zephyr/30b6d25813592123dd4dadc34b4df4eb0d150a0b/test/Test/Generators.hs
haskell
# LANGUAGE NamedFieldPuns # TODO: this generator is very frigile with size and at times can generate frequency of generating let expressions. Generate simple curried functions
# LANGUAGE FlexibleContexts # module Test.Generators where import Data.List (foldl') import Data.String (IsString (..)) import Test.QuickCheck import Language.PureScript.Names (Ident (..), ModuleName (..), ProperName (..), Qualified (..), QualifiedBy (..)) import Language.PureScript.PSString (PSString) import Langua...
69181082daa178d7de50412dd304430bd3941de763cce8cc86769dabb55c62c1
ghc/testsuite
tc260.hs
-- Test we don't get a cycle for "phantom" superclasses, -- even if the phantomness is behind a type synonym # LANGUAGE ConstraintKinds , MultiParamTypeClasses , FlexibleContexts # module TcOK where class A ctxt c where meth :: ctxt => c -> c type Bish = B Int class A Bish c => B c where
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/tc260.hs
haskell
Test we don't get a cycle for "phantom" superclasses, even if the phantomness is behind a type synonym
# LANGUAGE ConstraintKinds , MultiParamTypeClasses , FlexibleContexts # module TcOK where class A ctxt c where meth :: ctxt => c -> c type Bish = B Int class A Bish c => B c where
b5c8225affbaf863ca3c3ea8a59998afee527ba9b8eb63edc669cf8d2cb9a180
softwarelanguageslab/maf
R5RS_gabriel_divrec-3.scm
; Changes: * removed : 0 * added : 1 * swaps : 0 ; * negated predicates: 0 ; * swapped branches: 0 ; * calls to id fun: 0 (letrec ((create-n (lambda (n) @sensitivity:FA (letrec ((loop (lambda (n a) @sensitivity:FA ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_gabriel_divrec-3.scm
scheme
Changes: * negated predicates: 0 * swapped branches: 0 * calls to id fun: 0
* removed : 0 * added : 1 * swaps : 0 (letrec ((create-n (lambda (n) @sensitivity:FA (letrec ((loop (lambda (n a) @sensitivity:FA (if (= n 0) a (loop (- n 1) (cons () a)))))) ...
b91889ebe2d0a082d34277307fb9f9d77ee92f82cea7c638296580e94f2d8369
clash-lang/clash-compiler
Driver.hs
| Copyright : ( C ) 2012 - 2016 , University of Twente , 2016 - 2017 , Myrtle Software Ltd , 2017 , QBayLogic , Google Inc. 2020 - 2023 , QBayLogic , 2022 , Google Inc. License : BSD2 ( see the fil...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/4ed79bec0794f259db38a3b8b29065546fb75443/clash-lib/src/Clash/Driver.hs
haskell
# LANGUAGE OverloadedStrings # | Worker function of 'splitTopEntityT' ^ Source location of top entity (for error reporting) ^ Top entity body ^ Port annotations for top entity ^ New top entity with split ports (or the old one if not applicable) Insert dummy PortName for args for which the user shouldn't have to ...
| Copyright : ( C ) 2012 - 2016 , University of Twente , 2016 - 2017 , Myrtle Software Ltd , 2017 , QBayLogic , Google Inc. 2020 - 2023 , QBayLogic , 2022 , Google Inc. License : BSD2 ( see the fil...
9cd330d77e622a41254a92fadad89ba162b2bbec682462160615c8e4908813ce
michaxm/task-distribution
Logging.hs
module Control.Distributed.Task.Util.Logging (logError, logWarn, logInfo, logDebug, logTrace, initLogging) where import System.Directory (createDirectoryIfMissing) import System.IO (stdout) import qualified System.Log.Logger as L import qualified System.Log.Handler as L (setFormatter) import qualified System.Log.Handl...
null
https://raw.githubusercontent.com/michaxm/task-distribution/d0dee6a661390b7d1279389fa8c7b711309dab6a/src/Control/Distributed/Task/Util/Logging.hs
haskell
as hslogger logging does not seem to be that performant when there is nothing is to log, debugLogging is "configured" here to a hard off simpleLog L.debugM simpleLog L.debugM | Sets up hslogger.
module Control.Distributed.Task.Util.Logging (logError, logWarn, logInfo, logDebug, logTrace, initLogging) where import System.Directory (createDirectoryIfMissing) import System.IO (stdout) import qualified System.Log.Logger as L import qualified System.Log.Handler as L (setFormatter) import qualified System.Log.Handl...
183ab0228d195ba0c0af94080551bfaa28a47c77e3a4c873ff56c46a9be49b9e
SahilKang/cl-avro
duration.lisp
Copyright 2021 Google LLC ;;; ;;; This file is part of cl-avro. ;;; ;;; cl-avro is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at your option) any later version. ;...
null
https://raw.githubusercontent.com/SahilKang/cl-avro/70fcaa32514cfb59b75812b2eab45ed24cce9d27/test/logical/duration.lisp
lisp
This file is part of cl-avro. cl-avro is free software: you can redistribute it and/or modify (at your option) any later version. cl-avro is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See t...
Copyright 2021 Google LLC it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (in-package #:cl-user) (defpackage #:cl-avro/test/duration (:use #:cl #:1am) (...
1cad8d305d4686f179ecb41277d866e38e92571ed1542005ac27bfc055730d95
soulomoon/SICP
Exercise4.75.scm
Exercise 4.75 : Implement for the query language a new special form called unique . Unique should succeed if there is precisely one item in the data base satisfying a specified query . For example , ; (unique (job ?x (computer wizard))) should print the one - item stream ( unique ( job ( ) ; (com...
null
https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter4/Exercise4.75.scm
scheme
(unique (job ?x (computer wizard))) (computer wizard))) (unique (job ?x (computer programmer))) (and (job ?x ?j) (unique (job ?anyone ?j))) (put 'unique 'qeval uniquely-asserted) and qeval will dispatch to this procedure for every query whose type (car) is the symbol unique. memory limit : 20...
Exercise 4.75 : Implement for the query language a new special form called unique . Unique should succeed if there is precisely one item in the data base satisfying a specified query . For example , should print the one - item stream ( unique ( job ( ) since is the only computer wizard , and should prin...
78c241a0f0185f3821539d498da8f68b67a4963f172927a35e54fba73dc7f314
argp/bap
ast_slice.ml
(** A module to perform chopping on ASTs *) open Ast open Cfg open Depgraphs open BatListFull module CHOP_AST = struct (* TODO: Create a new file only for chopping *) module Traverse = Graph.Traverse.Dfs(Cfg.AST.G) (* Simple chopping implementation *) module SG = struct type t = Cfg.AST.G.t module V = Cfg.AST...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/ast_slice.ml
ocaml
* A module to perform chopping on ASTs TODO: Create a new file only for chopping Simple chopping implementation Printf.fprintf stderr "Label %s missing\n" (Pp.label_to_string l); Calculating the strongly connected component Adding a temporary back-edge Keeping the strongly connected component Removing the b...
open Ast open Cfg open Depgraphs open BatListFull module CHOP_AST = struct module Traverse = Graph.Traverse.Dfs(Cfg.AST.G) module SG = struct type t = Cfg.AST.G.t module V = Cfg.AST.G.V let iter_vertex = Cfg.AST.G.iter_vertex let iter_succ = Cfg.AST.G.iter_succ end module Comp = Graph.Components.Make(SG);; ...
a936ea23e936e68dc481d87b956513fce6485543243bbcd351b35420bd9dcd70
ml4tp/tcoq
ppstyle.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/lib/ppstyle.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Highlighting of printers. Used for...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * { 5 Style tags } type t =...
9c2f60b0521b1e8c8d09c4c0c8d8c2b17e30c651c0f64b6884da7cd8090e470c
15Galan/asignatura-204
DiGraphDFT.hs
------------------------------------------------------------------------------- Depth First Traversal of a -- Data Structures . en Informática . UMA . , 2012 ------------------------------------------------------------------------------- module DataStructures.Graph.DiGraphDFT ( dft , dftPaths ) where ...
null
https://raw.githubusercontent.com/15Galan/asignatura-204/894f33ff8e0f52a75d8f9ff15155c656f1a8f771/Recursos/data.structures/haskell/DataStructures/Graph/DiGraphDFT.hs
haskell
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- end of traversal v was already visited Returns paths from source to all vertices that are end of traversal v is already visited v has been visited. Return pa...
Depth First Traversal of a Data Structures . en Informática . UMA . , 2012 module DataStructures.Graph.DiGraphDFT ( dft , dftPaths ) where import DataStructures.Graph.DiGraph import DataStructures.Stack.LinearStack import qualified DataStructures.Set.BSTSet as S import qualified DataStructures.Diction...
6a12476a4c32c58e9fd61a4f9d42d166aeca331187a2c69bc48bd5fca2d5dcc9
omnyway-labs/amplitude
subscription.cljs
(ns amplitude.graphql.subscription (:require [clojure.string :as str] ["@aws-amplify/api" :as api :default API] [camel-snake-kebab.core :as csk] [amplitude.log :as log] [amplitude.util :as u])) (defonce subscriptions (atom nil)) (defonce last-updated (atom nil)) (defn- parse-response [res sub...
null
https://raw.githubusercontent.com/omnyway-labs/amplitude/4c8468070b70ed49c9293e4fa87e44ce79f3d2aa/src/amplitude/graphql/subscription.cljs
clojure
(ns amplitude.graphql.subscription (:require [clojure.string :as str] ["@aws-amplify/api" :as api :default API] [camel-snake-kebab.core :as csk] [amplitude.log :as log] [amplitude.util :as u])) (defonce subscriptions (atom nil)) (defonce last-updated (atom nil)) (defn- parse-response [res sub...
f9cf560047f943509e7ccf7566b693839607f8ab6b7b188eb4157d26e675e281
coccinelle/coccinelle
command_line.ml
* This file is part of Coccinelle , licensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, licensed under the terms of the GPL v2. * See copyright.txt in the Cocci...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/parsing_cocci/command_line.ml
ocaml
---------------------------------------------------------------------- useful functions ---------------------------------------------------------------------- make a semantic patch from a string single upper case letter is a metavariable Testing for uppercase and length is not enough as "+" is a single c...
* This file is part of Coccinelle , licensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, licensed under the terms of the GPL v2. * See copyright.txt in the Cocci...
3c49f083fc16a3d5281faf4679f5ff97c7459314893be88a78805bc0b69e836b
gafiatulin/codewars
VampireNumbers.hs
-- Vampire Numbers -- module Codewars.Kata.VampireNumbers where import Data.List (sort) isVampire :: Integer -> Integer -> Bool isVampire a b = sort (show a ++ show b) == sort (show (a*b))
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/VampireNumbers.hs
haskell
Vampire Numbers
module Codewars.Kata.VampireNumbers where import Data.List (sort) isVampire :: Integer -> Integer -> Bool isVampire a b = sort (show a ++ show b) == sort (show (a*b))
ee07dff3999f07c477008d3a4b0130563c732503ce4dc926c91ab1b5b6395959
jordanthayer/ocaml-search
tsp_bounded_depth.ml
* Bounded depth search in a TSP . This is the ( worse ) nearest neighbor representation . @author eaburns @since 2010 - 01 - 05 neighbor representation. @author eaburns @since 2010-01-05 *) open Printf open Tsp open Tsp_instances open Fn type bounded_depth_node = { loc : int; ...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/tsp/tsp_bounded_depth.ml
ocaml
* The current city. This city will be marked as visited in the children. * The visit order of the current partial tour * The remaining edges. * The remaining cities to visit (in sorted order by their f value) * The cost of this partial tour. * The f value of a node is its cost and the cost on the MST ...
* Bounded depth search in a TSP . This is the ( worse ) nearest neighbor representation . @author eaburns @since 2010 - 01 - 05 neighbor representation. @author eaburns @since 2010-01-05 *) open Printf open Tsp open Tsp_instances open Fn type bounded_depth_node = { loc : int; ...
b684d219e58d853094ed4d24d8a4fb4953c78c554213d3b86bac3954bcbe41a3
onedata/op-worker
massive_multi_provider_file_ops_test_SUITE.erl
%%%------------------------------------------------------------------- @author ( C ) 2015 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . %%% @end %%%------------------------------------------------------------------- %%% @doc %%% Tests of db_sync and proxy %%% @en...
null
https://raw.githubusercontent.com/onedata/op-worker/1150f63189cf3a2b116706c3eea133a097e20d2c/test_distributed/massive_multi_provider_file_ops_test_SUITE.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc Tests of db_sync and proxy @end ------------------------------------------------------------------- API Pool callbacks =================================================...
@author ( C ) 2015 ACK CYFRONET AGH This software is released under the MIT license cited in ' LICENSE.txt ' . -module(massive_multi_provider_file_ops_test_SUITE). -author("Michal Wrzeszcz"). -behaviour(traverse_behaviour). -include("global_definitions.hrl"). -include("tree_traverse.hrl"). -include("module...
ee7100416c0bc20ea3517e985591e21b9797efff6a1747b469ddf8d5ee8179cd
sneerteam/sneer
async_test.clj
(ns sneer.async-test (:require [clojure.core.async :refer [chan close!]] [midje.sweet :refer :all] [sneer.async :refer [state-machine sliding-chan go-trace peek-state!]] [sneer.test-util :refer [<!!? >!!? closes]])) ( do ( require ' midje.repl ) ( midje.repl/autotest ) ) (fact ...
null
https://raw.githubusercontent.com/sneerteam/sneer/b093c46321a5a42ae9418df427dbb237489b7bcb/core/src/test/clojure/sneer/async_test.clj
clojure
(ns sneer.async-test (:require [clojure.core.async :refer [chan close!]] [midje.sweet :refer :all] [sneer.async :refer [state-machine sliding-chan go-trace peek-state!]] [sneer.test-util :refer [<!!? >!!? closes]])) ( do ( require ' midje.repl ) ( midje.repl/autotest ) ) (fact ...
c24de2abd3260caf42097210edc6b6c32ce10d84d7a925d8e8717befe19bf60e
brendanhay/gogol
GetConfig.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-sourcerepo/gen/Gogol/SourceRepo/Projects/GetConfig.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Returns the Cloud Source Repositories configuration of the project. * Resource ** Constructing a Request | A resource alias for @sourcerepo.projects.getConfig@ method which the 'SourceRepoProjectsGetConfig' request conforms t...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
98dc2311172a8a5507f62a017e5a451e48d8e5c0c25c7bd9daa383221e9b304b
eeng/shevek
form.cljs
(ns shevek.pages.configuration.users.form (:require [shevek.i18n :refer [t]] [shevek.components.form :refer [input-field]] [shevek.components.shortcuts :refer [shortcuts]] [shevek.lib.validation :as v] [shevek.lib.collections :refer [assoc-nil find-by]] [she...
null
https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/cljs/shevek/pages/configuration/users/form.cljs
clojure
(ns shevek.pages.configuration.users.form (:require [shevek.i18n :refer [t]] [shevek.components.form :refer [input-field]] [shevek.components.shortcuts :refer [shortcuts]] [shevek.lib.validation :as v] [shevek.lib.collections :refer [assoc-nil find-by]] [she...
03f2c96b85a0fda31b5d6ca203c2ef40a2a75e166aee5e2020e1ea642b1c9a5f
raviksharma/bartosz-basics-of-haskell
flop.hs
flop (a, b) = (b, a) main = print $ flop (1, "one")
null
https://raw.githubusercontent.com/raviksharma/bartosz-basics-of-haskell/86d40d831f61415ef0022bff7fe7060ae6a23701/02-my-first-program/flop.hs
haskell
flop (a, b) = (b, a) main = print $ flop (1, "one")
15c503b779222f1ce2ba613e5c6142725cec1971c5807d006a262d5447225475
dhleong/wish
data.cljs
(ns ^{:author "Daniel Leong" :doc "Builder-specific data"} wish.sheets.dnd5e.builder.data) ; ======= Ability score generation ======================== (def point-buy-max 27) (def score-point-cost {8 0 9 1 10 2 11 3 12...
null
https://raw.githubusercontent.com/dhleong/wish/9036f9da3706bfcc1e4b4736558b6f7309f53b7b/src/cljs/wish/sheets/dnd5e/builder/data.cljs
clojure
======= Ability score generation ========================
(ns ^{:author "Daniel Leong" :doc "Builder-specific data"} wish.sheets.dnd5e.builder.data) (def point-buy-max 27) (def score-point-cost {8 0 9 1 10 2 11 3 12 4 13 5 14 7 ...
a8c992e7e305fce2cc53db535f84fe32d345e5f865536e53990768f02bd07442
Ramarren/lisa
retrieve.lisp
This file is part of LISA , the Lisp - based Intelligent Software ;;; Agents platform. Copyright ( C ) 2000 ( ) ;;; This library is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either versi...
null
https://raw.githubusercontent.com/Ramarren/lisa/ac137e9a05850ff6e2532b90f23a139985e04b4b/src/core/retrieve.lisp
lisp
Agents platform. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License either version 2.1 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FI...
This file is part of LISA , the Lisp - based Intelligent Software Copyright ( C ) 2000 ( ) of the License , or ( at your option ) any later version . GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License Foundation , Inc. , 59 T...
07b8c1c679ae8e3dc3f1e352798bf58de18bf7d77f0674933674757e523a19b1
dsorokin/aivika
Pure.hs
-- | -- Module : Simulation.Aivika.PriorityQueue.Pure Copyright : Copyright ( c ) 2015 - 2017 , < > -- License : BSD3 Maintainer : < > -- Stability : experimental Tested with : GHC 7.10.3 -- -- An immutable heap-based priority queue based on book -- Algorithms: A Functional Programming Approach b...
null
https://raw.githubusercontent.com/dsorokin/aivika/7a14f460ab114b0f8cdfcd05d5cc889fdc2db0a4/Simulation/Aivika/PriorityQueue/Pure.hs
haskell
| Module : Simulation.Aivika.PriorityQueue.Pure License : BSD3 Stability : experimental An immutable heap-based priority queue based on book Algorithms: A Functional Programming Approach by | The 'PriorityQueue' type represents an immutable heap-based priority queue. | Test whether the priority queue ...
Copyright : Copyright ( c ) 2015 - 2017 , < > Maintainer : < > Tested with : GHC 7.10.3 and . module Simulation.Aivika.PriorityQueue.Pure (PriorityQueue, queueNull, queueCount, emptyQueue, enqueue, dequeue, queueFront) where import Cont...
f66b4f8e7da137ffc16b9f6b7f633e0dec17e77768f63cb18bd5f5257d594c68
racket/typed-racket
require-typed-struct-info.rkt
#lang racket/base (module u racket/base (struct foo (a)) (provide (struct-out foo))) (module t typed/racket (require/typed/provide (submod ".." u) (#:struct foo ((a : Symbol)))) (define ins : foo (foo 'hello)) (if (foo? ins) (foo-a ins) (error 'test "not going to happen"))) (require 't rack...
null
https://raw.githubusercontent.com/racket/typed-racket/816cd44688e843f76266d71fbd2dd89c68d685b4/typed-racket-test/succeed/require-typed-struct-info.rkt
racket
#lang racket/base (module u racket/base (struct foo (a)) (provide (struct-out foo))) (module t typed/racket (require/typed/provide (submod ".." u) (#:struct foo ((a : Symbol)))) (define ins : foo (foo 'hello)) (if (foo? ins) (foo-a ins) (error 'test "not going to happen"))) (require 't rack...
12ec4660b140c487b45f0345bb3777e7c4691aee3de120bdb88ca3ea41639d28
zeromq/chumak
chumak_cert.erl
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 /. %% @doc Very simple function to read a certificate. -module(chumak_cert). %% @doc Very simple function to read a certificate. %% Certificat...
null
https://raw.githubusercontent.com/zeromq/chumak/02f56f153d0c6988858483c9dd0a1c233e2aa342/src/chumak_cert.erl
erlang
@doc Very simple function to read a certificate. @doc Very simple function to read a certificate. pyzmq (the Python ZMQ implementation).
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(chumak_cert). Certificates are in ZPL format , identical to what is used by Note that this implements the minimum to parse the Py...
36eea1c283ce8329582f418db5dd298f96173c02e98d08cda7a7694fc56bc19f
axelarge/advent-of-code
day20.clj
(ns advent-of-code.y2017.day20 (:require [advent-of-code.support :refer :all] [clojure.string :as str])) (def test-input1 (str "p=< 3,0,0>, v=< 2,0,0>, a=<-1,0,0>\n" "p=< 4,0,0>, v=< 0,0,0>, a=<-2,0,0>")) (def test-input2 (str "p=<-6,0,0>, v=< 3,0,0>, a=< 0,0,0>\n" "p=<-4,0,0>, v=< 2,0,...
null
https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/src/advent_of_code/y2017/day20.clj
clojure
----------
(ns advent-of-code.y2017.day20 (:require [advent-of-code.support :refer :all] [clojure.string :as str])) (def test-input1 (str "p=< 3,0,0>, v=< 2,0,0>, a=<-1,0,0>\n" "p=< 4,0,0>, v=< 0,0,0>, a=<-2,0,0>")) (def test-input2 (str "p=<-6,0,0>, v=< 3,0,0>, a=< 0,0,0>\n" "p=<-4,0,0>, v=< 2,0,...
b91f2ec71ccc79f475143c80b7249c3bc49c1f94f9a87f410c8d45ee2388586a
micmarsh/re-frame-youtube-fx
subs.cljs
(ns basic-player.subs (:require-macros [reagent.ratom :refer [reaction]]) (:require [re-frame.core :as re-frame])) (re-frame/reg-sub :name (fn [db] (:name db)))
null
https://raw.githubusercontent.com/micmarsh/re-frame-youtube-fx/dfbf2790930da2810da2ea8e21a1e72abf82f0d7/examples/basic-player/src/cljs/basic_player/subs.cljs
clojure
(ns basic-player.subs (:require-macros [reagent.ratom :refer [reaction]]) (:require [re-frame.core :as re-frame])) (re-frame/reg-sub :name (fn [db] (:name db)))
4e205962944d3ad8ab877e994a4ae2658ecea9bea03cc62d41606871787c1448
stofel/ecldb
ecldb_valid.erl
%% Vlidate objects %% -module(ecldb_valid). -include("../include/ecldb.hrl"). -export([is_node/1, is_domain/1]). % % Node is atom(). Node should be alive is_node(Node) when is_atom(Node) -> case net_adm:ping(Node) of pong -> ok; pang -> ?e(node_ping_error) end; is_node(Node) -> ?e(wrong_node_name,...
null
https://raw.githubusercontent.com/stofel/ecldb/2d707b3dad0212c417594c2f93cf1beefc5ee342/src/ecldb_valid.erl
erlang
Node is atom(). Node should be alive
Vlidate objects -module(ecldb_valid). -include("../include/ecldb.hrl"). -export([is_node/1, is_domain/1]). is_node(Node) when is_atom(Node) -> case net_adm:ping(Node) of pong -> ok; pang -> ?e(node_ping_error) end; is_node(Node) -> ?e(wrong_node_name, Node). Domain = # { node : = Node , domai...
e4a98d482835b915bbe1b02b650ca41b75f6cb377ca8bfb19ab5ad65293dc078
ruHaskell/ruhaskell
Misc.hs
{-# LANGUAGE OverloadedStrings #-} module Misc ( aHost , prepareAllTemplates , getNameOfAuthor , TagsAndAuthors , TagsReader , getRussianNameOfCategory ) where import Control.Monad.Reader (ReaderT) import Data.Aeson (Value (String)) import qualified Data.HashMap.Lazy as...
null
https://raw.githubusercontent.com/ruHaskell/ruhaskell/1e38eae50011307d11a2026af925a23a6fd8a346/src/Misc.hs
haskell
# LANGUAGE OverloadedStrings # | Извлекает из статьи значение атрибута `author`.
module Misc ( aHost , prepareAllTemplates , getNameOfAuthor , TagsAndAuthors , TagsReader , getRussianNameOfCategory ) where import Control.Monad.Reader (ReaderT) import Data.Aeson (Value (String)) import qualified Data.HashMap.Lazy as HashMap import Data.Map ...
61bb8c1a41b84e3229d162c48ceb03b5b5d96ae6bf80f65eb6f0f42f456ce636
pepeiborra/term
Rules.hs
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies # # LANGUAGE FlexibleContexts , FlexibleInstances , UndecidableInstances , TypeSynonymInstances # # LANGUAGE OverlappingInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # L...
null
https://raw.githubusercontent.com/pepeiborra/term/7644e0f8fbc81754fd5255602dd1f799adcd5938/Data/Term/Rules.hs
haskell
# LANGUAGE ConstraintKinds # | This module works with an abstract notion of rule. A rule is a set of terms (generally a pair) which must be treated as a whole. Concrete examples include term rewriting rules and prolog clauses. To do this the module provides generalizations of the unify, match, equ...
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies # # LANGUAGE FlexibleContexts , FlexibleInstances , UndecidableInstances , TypeSynonymInstances # # LANGUAGE OverlappingInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # L...
75e002346fe7fb173cc3ecc55cc521d1c449c2307ee1a6032d9e2bfda10d822a
patrickt/miller
TI.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ImportQualifiedPost # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedLists # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE RecursiveDo # # LANGUAGE ScopedTypeVa...
null
https://raw.githubusercontent.com/patrickt/miller/b520e960c9131e5e10397a8180c79bf4c64137e8/src/Miller/TI.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE OverloadedStrings # The dump records the state of the spine prior to the evaluation of an argument of a strict primitive. Currently unused. Register an item in the heap Register a supercombinator in the heap. Evaluate the loaded program, returning the set of all seen states....
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ImportQualifiedPost # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedLists # # LANGUAGE RecordWildCards # # LANGUAGE RecursiveDo # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # ...
2ac719c3627f0aa449906f774bb61fa4ec4bde3d43f41827368e8e3fc60eb9c1
qiao/sicp-solutions
2.67.scm
(define (make-leaf symbol weight) (list 'leaf symbol weight)) (define (leaf? object) (eq? (car object) 'leaf)) (define (symbol-leaf x) (cadr x)) (define (weight-leaf x) (caddr x)) (define (make-code-tree left right) (list left right (append (symbols left) (symbols right)) (+ (weight left)...
null
https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter2/2.67.scm
scheme
=> (decode sample-message sample-tree) (a d a b b c a)
(define (make-leaf symbol weight) (list 'leaf symbol weight)) (define (leaf? object) (eq? (car object) 'leaf)) (define (symbol-leaf x) (cadr x)) (define (weight-leaf x) (caddr x)) (define (make-code-tree left right) (list left right (append (symbols left) (symbols right)) (+ (weight left)...
99c53fcc48f6baa88322c233012ce578ea856136c6a22262c7e9f93562cc838a
haskell-hint/hint
Eval.hs
module Hint.Eval ( interpret, as, infer, unsafeInterpret, eval, runStmt, parens ) where import qualified GHC.Exts (unsafeCoerce#) import Control.Exception import Data.Typeable (Typeable) import qualified Data.Typeable as Typeable import Hint.Base import Hint.Context import Hint.Parsers impor...
null
https://raw.githubusercontent.com/haskell-hint/hint/42afe8197e7cc8b68d0ba005b42efdc027c95b57/src/Hint/Eval.hs
haskell
| Convenience functions to be used with @interpret@ to provide witnesses. Example: | Evaluates an expression, given a witness for its monomorphic type. for this is the only way we have to "intercept" this kind of errors add a bogus Maybe, in order to use it with mayFail instance for t. | Evaluate a state...
module Hint.Eval ( interpret, as, infer, unsafeInterpret, eval, runStmt, parens ) where import qualified GHC.Exts (unsafeCoerce#) import Control.Exception import Data.Typeable (Typeable) import qualified Data.Typeable as Typeable import Hint.Base import Hint.Context import Hint.Parsers impor...
c72e0f84679f9503171a8656fe9000b873697a8c41418a642b25e005debb4ce9
quil/quil-templates
quil.clj
(ns leiningen.new.quil (:require [leiningen.new.templates :refer [renderer name-to-path ->files]] [leiningen.core.main :as main])) (def render (renderer "quil")) (defn quil "Clojure template for Quil library." [name] (let [data {:name name :sanitized (name-to-path name)}] (main/i...
null
https://raw.githubusercontent.com/quil/quil-templates/1af1f50ba6b90aac4d60cf256a8be03ff210388c/clj/src/leiningen/new/quil.clj
clojure
(ns leiningen.new.quil (:require [leiningen.new.templates :refer [renderer name-to-path ->files]] [leiningen.core.main :as main])) (def render (renderer "quil")) (defn quil "Clojure template for Quil library." [name] (let [data {:name name :sanitized (name-to-path name)}] (main/i...
765cbdf9af4252e81b70594907067b8081b35cdc3feabd1361757078e21cf3dc
marick/Midje
fim_exceptions.clj
(ns implementation.util.fim-exceptions (:require [midje.util.exceptions :refer :all] [midje [sweet :refer :all] [test-util :refer :all]] [midje.util :refer :all])) (expose-testables midje.util.exceptions) (defrecord R [a]) (fact "captured throwables can be recogniz...
null
https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/implementation/util/fim_exceptions.clj
clojure
(ns implementation.util.fim-exceptions (:require [midje.util.exceptions :refer :all] [midje [sweet :refer :all] [test-util :refer :all]] [midje.util :refer :all])) (expose-testables midje.util.exceptions) (defrecord R [a]) (fact "captured throwables can be recogniz...
96ce1e9bb857cc6b871bb016999e19a14a9fec65f1d420b9ecd95845b7ae2f9c
japerk/elib
erlport_server.erl
-module(erlport_server). -behaviour(gen_server). -export([start_link/2, start_link/3, start_link_port_opts/2, start_link_port_opts/3]). -export([request/2, request/3]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -define(PORT_OPTS(PyPath), [{packet, 4}, binary, {env, [...
null
https://raw.githubusercontent.com/japerk/elib/40fc61f5503db3e823f61aada53d4f38d2405e7f/src/erlport_server.erl
erlang
public api %% %
-module(erlport_server). -behaviour(gen_server). -export([start_link/2, start_link/3, start_link_port_opts/2, start_link_port_opts/3]). -export([request/2, request/3]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -define(PORT_OPTS(PyPath), [{packet, 4}, binary, {env, [...
9ed8cc4a13ea662c90e176dac5bc708c98f9279be18981486b599a5990d32121
2600hz-archive/whistle
ctl_ex.erl
Copyright 2010 , Scatterbit , Inc. & Jayson Vantuyl < > % This file is part of erlctl . % Erlctl is open source . See LICENSE.txt for details . -module(ctl_ex). -behavior(gen_server). -export([start_link/0,add_user/1,del_user/1,list_users/0]). -export([init/1,terminate/2,code_change/3]). -export([handle_call/3...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/erlctl/lib/ctl_ex-0.1/src/ctl_ex.erl
erlang
API
Copyright 2010 , Scatterbit , Inc. & Jayson Vantuyl < > This file is part of erlctl . Erlctl is open source . See LICENSE.txt for details . -module(ctl_ex). -behavior(gen_server). -export([start_link/0,add_user/1,del_user/1,list_users/0]). -export([init/1,terminate/2,code_change/3]). -export([handle_call/3,han...
8a6a37521af62d2ecb3042100536171e408ac81e12996154a506df686bd4925c
jamis/rtc-ocaml
RTCGroup.ml
let get_children (g:RTCShape.t) = match g.shape with | Group cs -> cs | _ -> failwith "is_empty requires a Group argument" let build ?(children=[]) () = let local_intersect shape ?(trail=[]) (r:RTCRay.t) = let rec loop xs = function | [] -> xs | child :: children -> let xs' = RTCShape.i...
null
https://raw.githubusercontent.com/jamis/rtc-ocaml/f5ba04e874ef0b54d100cdabfe9a67c2b80a643f/src/RTCGroup.ml
ocaml
let get_children (g:RTCShape.t) = match g.shape with | Group cs -> cs | _ -> failwith "is_empty requires a Group argument" let build ?(children=[]) () = let local_intersect shape ?(trail=[]) (r:RTCRay.t) = let rec loop xs = function | [] -> xs | child :: children -> let xs' = RTCShape.i...
5708c7f80ea404bb9aebcfbeba44c0a0c1f59f3d9d43c499b57e907bfa6dff24
janegca/htdp2e
Exercise-253-foundAsSpecForFind.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-253-foundAsSpecForFind) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "t...
null
https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/03-Abstractions/Exercise-253-foundAsSpecForFind.rkt
racket
about the language level of this file in a form that our tools can easily process. Use found? to formulate a check-satisfied test for find. X [List-of X] -> [Maybe [List-of X]] X [Maybe [List-of X]] [List-of X] -> Boolean is X in k (result of 'find') is k equal to X and all values after X in l (original list) ...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-253-foundAsSpecForFind) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f (...
84f0406de722b92040942c54b0cd9f5dca2616656539b16e942819fdd0d66bbd
hopv/MoCHi
pred.mli
(** Predicates *) type t = TypEnv.t * Formula.t val pr : Format.formatter -> t -> unit * { 6 Auxiliary constructors } val make : TypEnv.t -> Formula.t -> t val mk_bot : Type.t -> t val mk_top : Type.t -> t * { 6 Inspectors } val type_of : t -> Type.t val fvs : t -> Idnt.t list val coeffs : t -> Idnt.t list * { 6...
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/pred.mli
ocaml
* Predicates
type t = TypEnv.t * Formula.t val pr : Format.formatter -> t -> unit * { 6 Auxiliary constructors } val make : TypEnv.t -> Formula.t -> t val mk_bot : Type.t -> t val mk_top : Type.t -> t * { 6 Inspectors } val type_of : t -> Type.t val fvs : t -> Idnt.t list val coeffs : t -> Idnt.t list * { 6 Operators } val ...
b7933841ef7d1e8d740f02a195a03de77a7836d1f6c6950bd36e21488cecd0b5
cljfx/cljfx
table_column_base.clj
(ns cljfx.fx.table-column-base "Part of a public API" (:require [cljfx.composite :as composite] [cljfx.lifecycle :as lifecycle] [cljfx.jdk.fx.table-column-base :as jdk.fx.table-column-base] [cljfx.coerce :as coerce]) (:import [javafx.scene.control TableColumnBase])) (set! *war...
null
https://raw.githubusercontent.com/cljfx/cljfx/ec3c34e619b2408026b9f2e2ff8665bebf70bf56/src/cljfx/fx/table_column_base.clj
clojure
(ns cljfx.fx.table-column-base "Part of a public API" (:require [cljfx.composite :as composite] [cljfx.lifecycle :as lifecycle] [cljfx.jdk.fx.table-column-base :as jdk.fx.table-column-base] [cljfx.coerce :as coerce]) (:import [javafx.scene.control TableColumnBase])) (set! *war...
74b61d7b97e6ab47aea5c22924f5f25744ad08b6a97f0cd8c02f5b7981ef243d
VincentToups/racket-lib
textish-renderer.rkt
#lang racket (require racket/gui (prefix-in ss: slideshow/pict) (rename-in utilities/proletariat [-> -->]) (rename-in roguelikes/white-whale-data3 [floor dungeon-floor] [exit dungeon-exit]) roguelikes/colorations roguelikes/grid functional/monads roguelikes...
null
https://raw.githubusercontent.com/VincentToups/racket-lib/d8aed0959fd148615b000ceecd7b8a6128cfcfa8/roguelikes/textish-renderer.rkt
racket
#lang racket (require racket/gui (prefix-in ss: slideshow/pict) (rename-in utilities/proletariat [-> -->]) (rename-in roguelikes/white-whale-data3 [floor dungeon-floor] [exit dungeon-exit]) roguelikes/colorations roguelikes/grid functional/monads roguelikes...
1fd25ec1caf1a77535d3fc2e73f2331e2a650c165bfe8f1ddf2124429e8b0ce4
ocaml-batteries-team/batteries-included
batStack.mli
* BatQueue - Extended operations on queues * Copyright ( C ) 1996 2008 , LIFO , Universite d'Orleans * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundati...
null
https://raw.githubusercontent.com/ocaml-batteries-team/batteries-included/f143ef5ec583d87d538b8f06f06d046d64555e90/src/batStack.mli
ocaml
* The type of stacks containing elements of type ['a]. * Raised when {!Stack.pop} or {!Stack.top} is applied to an empty stack. * Return a new stack, initially empty. * [push x s] adds the element [x] at the top of stack [s]. * [pop s] removes and returns the topmost element in stack [s], or @raise Empty if the...
* BatQueue - Extended operations on queues * Copyright ( C ) 1996 2008 , LIFO , Universite d'Orleans * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundati...
44771ce7812a69796c9f223387b6fa92dd35f89cfdf1c183dabb0202da36cb88
evdubs/renegade-way
pricing-risk.rkt
#lang racket/base (require math/distributions) (provide black-scholes black-scholes-delta black-scholes-gamma black-scholes-theta black-scholes-vega black-scholes-rho) (define (black-scholes price years-left strike call-put rate vol divs) (let* ([discounted-price ...
null
https://raw.githubusercontent.com/evdubs/renegade-way/d10acd321939320843e594120a1feb7dec5cdf4f/pricing-risk.rkt
racket
#lang racket/base (require math/distributions) (provide black-scholes black-scholes-delta black-scholes-gamma black-scholes-theta black-scholes-vega black-scholes-rho) (define (black-scholes price years-left strike call-put rate vol divs) (let* ([discounted-price ...
169a1761499885acc706ace84b811d45e326d066418258aebcbdde19c0cad342
jserot/hocl
backend.ml
(**********************************************************************) (* *) This file is part of the HOCL package (* *) Copyright ( c ) 2019 - prese...
null
https://raw.githubusercontent.com/jserot/hocl/3fbe0521d6d6b6aeb1ffa277fbd74abf7e5ebe43/src/backend.ml
ocaml
******************************************************************** All rights reserved. ...
This file is part of the HOCL package Copyright ( c ) 2019 - present , ( ) . Several utility fns common to all backends open Syntax open Interm let get_impl_fns target name attrs = match List.assoc_opt "incl_file" attrs, List.assoc_opt "loop_fn" attrs, List.a...
77d6139bcea668c9de47c5d5c3a89d9d1397e420a46e5b87fc64862036d3384e
tokiwoousaka/reasonable-lens
Setter.hs
# LANGUAGE DeriveFunctor # module Control.Lens.Setter where import Control.Monad.State.Class import Control.Applicative import Unsafe.Coerce infixl 4 .=, %=, +=, -=, *=, //= infixr 4 .~, %~, +~, -~, *~, /~ infixl 1 & type Setter s t a b = (a -> Mutator b) -> s -> Mutator t over :: Setter s t a b -> (a -> b) -> s -> ...
null
https://raw.githubusercontent.com/tokiwoousaka/reasonable-lens/088bf522fe1321cbd4b9202927d736bab93a609e/src/Control/Lens/Setter.hs
haskell
# INLINE set # -- # INLINE (%~) # # INLINE (+~) # # INLINE (-~) # # INLINE (*~) # # INLINE (/~) # -- # INLINE (%=) # # INLINE (.=) # # INLINE (+=) # # INLINE (-=) # # INLINE (*=) # # INLINE (//=) # -- # INLINE (<*>) #
# LANGUAGE DeriveFunctor # module Control.Lens.Setter where import Control.Monad.State.Class import Control.Applicative import Unsafe.Coerce infixl 4 .=, %=, +=, -=, *=, //= infixr 4 .~, %~, +~, -~, *~, /~ infixl 1 & type Setter s t a b = (a -> Mutator b) -> s -> Mutator t over :: Setter s t a b -> (a -> b) -> s -> ...
179da47a0941a462ac754fa55c6ae621a7fb5199078bf139479655c85b20515a
input-output-hk/project-icarus-importer
NodeIPC.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # {-# OPTIONS_GHC -Wall #-} module Cardano.NodeIPC (startNodeJsIPC) where import Control.Arrow ( (>>>) ) import Control.Concurrent ...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/node-ipc/src/Cardano/NodeIPC.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # OPTIONS_GHC -Wall #
# LANGUAGE DeriveGeneric # # LANGUAGE ScopedTypeVariables # module Cardano.NodeIPC (startNodeJsIPC) where import Control.Arrow ( (>>>) ) import Control.Concurrent (forkIO) import Control.Monad.Reader (MonadReader) import Data.Aeson ...
e70a8275fe291e4dbb9ce155ee268b9498375f4cceaa2398bdca74dffafcf886
clj-commons/seesaw
applet.clj
Copyright ( c ) , 2011 . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this ; distribution. ; By using this software in any fashion, you are agreeing to be ...
null
https://raw.githubusercontent.com/clj-commons/seesaw/4ca89d0dcdf0557d99d5fa84202b7cc6e2e92263/src/seesaw/applet.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not rem...
Copyright ( c ) , 2011 . All rights reserved . (ns ^{:doc "Macros and functions that make creating an applet with Seesaw a little less painful." :author "Dave Ray"} seesaw.applet (:use [seesaw core]) (:import [javax.swing JApplet])) (defmacro defapplet "Define an applet. This macro doe...
5384ee05d27eccfe7c6ad33db6d1d4ef2923d9dc802714a0a89e08bb67a0303c
adventuring/tootsville.net
shade.lisp
;;;; -*- lisp -*- ;;; src / characters / named / shade.lisp is part of ;;; Copyright © 2008 - 2017 Bruce - Robert Pocock ; © 2018 - 2021 The Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) . ;;; This program is Free Software : you can redistribute it and/or mod...
null
https://raw.githubusercontent.com/adventuring/tootsville.net/985c11a91dd1a21b77d7378362d86cf1c031b22c/src/characters/named/shade.lisp
lisp
-*- lisp -*- © 2018 - 2021 The either version 3 of This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more det...
src / characters / named / shade.lisp is part of Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) . This program is Free Software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License the License , or ( at your option ) any later ...
8e544e00bb04bbd24b4902cbc06ebc2df1f83cbc69db440c2cd45d44d55b3913
evdubs/nyse-cta-summary
transform-load.rkt
#lang racket/base (require db racket/cmdline racket/list racket/sequence racket/string racket/struct Time Data Types and Procedures (struct con-entry (message-category message-type network sequence-number output-time symbol suffix part-identifier ...
null
https://raw.githubusercontent.com/evdubs/nyse-cta-summary/2816ee73284da19b2802b69f5634e507c44c4d08/transform-load.rkt
racket
If there's a value in the short-sale column, the CSV actually follows it with a comma. This gives us an extra column. So, we just drop it here.
#lang racket/base (require db racket/cmdline racket/list racket/sequence racket/string racket/struct Time Data Types and Procedures (struct con-entry (message-category message-type network sequence-number output-time symbol suffix part-identifier ...
5959fecd5f43f3c9174964cf1b140a141c02c9e8c631be1ca7c5aa4a8b9b943b
facebook/flow
ast_diff_printer.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/52e59c7a9dea8556e7caf0be2b2c5c2e310b5b65/src/parser_utils/output/printers/ast_diff_printer.ml
ocaml
We need to use the parent of parent statement, since the nested statement inside export and label should have the same indentation level as parent. Do not wrap expression in parentheses for cases where we know parentheses are not needed. TODO use expression context for printing to insert parens when actuall...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
a834a32d4e678a6b844df5a82825a2963c3785ed480530b0333afd50d5607433
yesodweb/yesod
StubStrictSameSite.hs
# LANGUAGE TypeFamilies , QuasiQuotes , TemplateHaskell , MultiParamTypeClasses , OverloadedStrings # module YesodCoreTest.StubStrictSameSite ( App ( App ) , Widget , resourcesApp ) where import Yesod.Core import qualified Web.ClientSession as CS data App = App mkYesod "App" [parseRo...
null
https://raw.githubusercontent.com/yesodweb/yesod/c59993ff287b880abbf768f1e3f56ae9b19df51e/yesod-core/test/YesodCoreTest/StubStrictSameSite.hs
haskell
# LANGUAGE TypeFamilies , QuasiQuotes , TemplateHaskell , MultiParamTypeClasses , OverloadedStrings # module YesodCoreTest.StubStrictSameSite ( App ( App ) , Widget , resourcesApp ) where import Yesod.Core import qualified Web.ClientSession as CS data App = App mkYesod "App" [parseRo...
00083efe7c195b59e6e49c56f3a1f4fcea0d1b7e07dde5e26daed2110b0b51d2
jumarko/web-development-with-clojure
project.clj
;--- Excerpted from " Web Development with Clojure , Second Edition " , published by The Pragmatic Bookshelf . Copyrights apply to this code . It may not be used to create training material , ; courses, books, articles, and the like. Contact us if you are in doubt. ; We make no guarantees that this code is fit fo...
null
https://raw.githubusercontent.com/jumarko/web-development-with-clojure/dfff6e40c76b64e9fcd440d80c7aa29809601b6b/code/picture-gallery-war/project.clj
clojure
--- courses, books, articles, and the like. Contact us if you are in doubt. We make no guarantees that this code is fit for any purpose. Visit for more book information. ---
Excerpted from " Web Development with Clojure , Second Edition " , published by The Pragmatic Bookshelf . Copyrights apply to this code . It may not be used to create training material , (defproject picture-gallery "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :dependencies [[org.clojur...
08b8f43f95fc37abd3230bbd34502dbe4c4df2275a01a72d438061bd35135e57
cse-bristol/110-thermos-ui
util.clj
This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021 Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details . (ns thermos-backend.util (:require [org.tobereplaced.nio.file :as nio] [clojure.java.io :as io] [thermos-backend.c...
null
https://raw.githubusercontent.com/cse-bristol/110-thermos-ui/e13b96329f3c95e5a10bae431e8ae9bccdb475f4/src/thermos_backend/util.clj
clojure
This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021 Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details . (ns thermos-backend.util (:require [org.tobereplaced.nio.file :as nio] [clojure.java.io :as io] [thermos-backend.c...
464912b75bd1ba659338802784d893452554f5a130ee4ca542283fc78f359cd6
wilbowma/cic-redex
info.rkt
#lang info (define collection 'multi) (define deps '("base" ("redex-lib" #:version "1.11") "redex-chk")) (define build-deps '()) (define pkg-desc "model of CIC.") (define version "2.0") (define pkg-authors '(wilbowma))
null
https://raw.githubusercontent.com/wilbowma/cic-redex/0d8e3faa01bf78fd7617ded158ee16a43ca66148/info.rkt
racket
#lang info (define collection 'multi) (define deps '("base" ("redex-lib" #:version "1.11") "redex-chk")) (define build-deps '()) (define pkg-desc "model of CIC.") (define version "2.0") (define pkg-authors '(wilbowma))
0a3a5e21e2bed06ebd25baf6af00ebcc68b2b057e73068d9c84e8605a3ba36d5
samirose/sicp-compiler-project
compilation-error.scm
(define-library (compilation-error) (export make-compilation-error compilation-error? compilation-error-message compilation-error-object raise-as-error raise-if-error raise-compilation-error set-compilation-error-handler!) (import (scheme base) (scheme cxr)) (begin (define compila...
null
https://raw.githubusercontent.com/samirose/sicp-compiler-project/2bc8a481044b5a653408f8595b2a2396600b8ad6/compilation-error.scm
scheme
(define-library (compilation-error) (export make-compilation-error compilation-error? compilation-error-message compilation-error-object raise-as-error raise-if-error raise-compilation-error set-compilation-error-handler!) (import (scheme base) (scheme cxr)) (begin (define compila...
a54c7d0656976e2f77b3eb72e6ef5906b74fa799b22c0b18007981096b69b4ad
tnelson/Forge
conn.rkt
#lang racket/base ;; RFC 6455 WebSocket connection management. Copyright ( c ) 2013 ;; ;; This module is distributed under the GNU Lesser General Public ;; License (LGPL). This means that you can link it into proprietary ;; applications, provided you follow the rules stated in the LGPL. You ;; can also modify th...
null
https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/racket-rfc6455/net/rfc6455/rfc6455/conn.rkt
racket
RFC 6455 WebSocket connection management. This module is distributed under the GNU Lesser General Public License (LGPL). This means that you can link it into proprietary applications, provided you follow the rules stated in the LGPL. You can also modify this module; if you distribute a modified version, you must...
#lang racket/base Copyright ( c ) 2013 (require racket/match) (require "frame.rkt") (require "../conn-api.rkt") (provide (struct-out rfc6455-conn) rfc6455-stream-buffer-size) (define rfc6455-stream-buffer-size (make-parameter 65536)) (define (stream-frames ip initial-opcode final-fragment? op mask?) (def...
0fd6e2a106d29a74219524edbf8532ae5555a1b4e28a9149e6407ec18c8c46d9
bobatkey/CS316-2022
Week02Problems.hs
# OPTIONS_GHC -fwarn - incomplete - patterns # module Week02Problems where import Week02 {------------------------------------------------------------------------------} {- TUTORIAL QUESTIONS -} {------------------------------------------------------------------...
null
https://raw.githubusercontent.com/bobatkey/CS316-2022/c3cf7430dc9201fb8346791d51103399bb28b5ab/lecture-notes/Week02Problems.hs
haskell
---------------------------------------------------------------------------- TUTORIAL QUESTIONS ---------------------------------------------------------------------------- In the questions below, replace 'undefined' with your answers. Use GHCi to test them....
# OPTIONS_GHC -fwarn - incomplete - patterns # module Week02Problems where import Week02 1 . Write a function that counts the number of occurrences of an element in list : element in list: -} popCount :: Eq a => a -> [a] -> Int popCount = undefined ( is short for " population count " ) . Exa...
f5be795a3d15a9560f361579843eec14f50c49bf36f0a5a0cde9b7331f79a796
hargettp/hh-web
images.lisp
Copyright ( c ) 2010 ;; 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, merge, publish, distribute, ...
null
https://raw.githubusercontent.com/hargettp/hh-web/d877398493196adffbd5d3e31fc1eaa60f331b36/images.lisp
lisp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above copyright notice an...
Copyright ( c ) 2010 in the Software without restriction , including without limitation the rights 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 WARRANTY OF ANY KIND , EXPRESS OR L...
a7b5e5054a8c0eda3747bcf29af06226b100fe563f4111e36dc6a97e38ae0706
dmjio/miso
Keyboard.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : Miso.Subscription.Keyboard Copyright : ( C ) 2016 - 2018 -- License ...
null
https://raw.githubusercontent.com/dmjio/miso/f38f28d86780b3f2137f16419ff9ec3e39e890af/src/Miso/Subscription/Keyboard.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE RecordWildCards # # LANGUAGE OverloadedStrings # --------------------------------------------------------------------------- | Module : Miso.Subscription.Keyboard License : BSD3-style (see the file LICENSE) Stability : experimental Portability : non-portabl...
# LANGUAGE ScopedTypeVariables # Copyright : ( C ) 2016 - 2018 Maintainer : < > module Miso.Subscription.Keyboard Arrows (..) , arrowsSub , directionSub , keyboardSub , wasdSub ) where import Control.Monad.IO.Class import Data.IORef import Data.Set import...
fd7b2dd95849862104d07425b5b334064f42e96153cda885e94cc0af7b9ced7a
walmartlabs/system-viz
project.clj
(defproject walmartlabs/system-viz "0.4.0" :description "Graphviz visualization of a component system" :url "-viz" :license {:name "Apache Sofware License 2.0" :url "-2.0.html"} :plugins [[lein-codox "0.10.3"]] :dependencies [[org.clojure/clojure "1.8.0"] [dorothy "0.0.6"] ...
null
https://raw.githubusercontent.com/walmartlabs/system-viz/d0011babd92fef343895984eecae081f592bba58/project.clj
clojure
(defproject walmartlabs/system-viz "0.4.0" :description "Graphviz visualization of a component system" :url "-viz" :license {:name "Apache Sofware License 2.0" :url "-2.0.html"} :plugins [[lein-codox "0.10.3"]] :dependencies [[org.clojure/clojure "1.8.0"] [dorothy "0.0.6"] ...
1c0b14707ae8d1388d85f1cd2e3c752356e82ba509da4465a69674a8bb892b8e
pirapira/coq2rust
nativelibrary.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2013 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/kernel/nativelibrary.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * This file implements separate comp...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2013 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Declarations ...
4be07ce80efa975170e4a320ae291e4d43817fe08cd924f90d9f438ca5dc3733
bobzhang/fan
lexing_test.mli
(** test the correctness of lexing *) val suite : OUnit.test
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/unitest/main/lexing_test.mli
ocaml
* test the correctness of lexing
val suite : OUnit.test
4286bf4a46c2f8b144f58adce5e27adb07cab6f9f82ddbb374740b0da1dcb1f3
mdedwards/slippery-chicken
clm-stubs.lisp
(defpackage clm (:use :common-lisp) #+openmcl (:import-from :ccl open-shared-library) ) (in-package :clm) in cmu there can be no error message and stubs must return a " value " to stop cmu 's compiler from making a runtime type check for nil ;;; (defmacro defstub (name ) (let ((f (and (consp name) (eq ...
null
https://raw.githubusercontent.com/mdedwards/slippery-chicken/c1c11fadcdb40cd869d5b29091ba5e53c5270e04/src/cm-2.6.0/src/clm-stubs.lisp
lisp
graph these are also used by cm
(defpackage clm (:use :common-lisp) #+openmcl (:import-from :ccl open-shared-library) ) (in-package :clm) in cmu there can be no error message and stubs must return a " value " to stop cmu 's compiler from making a runtime type check for nil (defmacro defstub (name ) (let ((f (and (consp name) (eq (car...
4e935a7e5eee65638e1ca9d78e705695eda7d5785b1af6609ec94ecdb3db3d5a
Dwlo/clj-sorting-algorithms
quick_sort_test.clj
(ns sorting-algorithms.quick-sort-test (:require [sorting-algorithms.quick-sort :refer [sort] ] [sorting-algorithms.test-utils :as tu ] [clojure.test.check.clojure-test :as chk ])) (chk/defspec testing-quick-sort 1000 (tu/property sort))
null
https://raw.githubusercontent.com/Dwlo/clj-sorting-algorithms/2f040a892d4b6468f6b747d4d2f8bab84491c982/test/sorting_algorithms/quick_sort_test.clj
clojure
(ns sorting-algorithms.quick-sort-test (:require [sorting-algorithms.quick-sort :refer [sort] ] [sorting-algorithms.test-utils :as tu ] [clojure.test.check.clojure-test :as chk ])) (chk/defspec testing-quick-sort 1000 (tu/property sort))
7c61456fe54273cc8490fe04a76a37faa7c0dd270658bd470d34ec979b94dd43
ChrisPenner/proton
Algebraic.hs
module Examples.Algebraic where import Proton pad :: AlgebraicLens String [String] String Int pad = listLens id padder where padder :: [String] -> Int -> [String] padder xs n = fmap (\s -> take n $ s <> repeat ' ') xs padLength :: AlgebraicLens String [String] Int Int padLength = listLens length padder w...
null
https://raw.githubusercontent.com/ChrisPenner/proton/4ce22d473ce5bece8322c841bd2cf7f18673d57d/src/Examples/Algebraic.hs
haskell
>>> ["a", "hello", "yo"] & padLength >- maximum ["a ","hello","yo "] >>> ["a", "hello", "yo"] & padLength >- minimum ["a","h","y"] ["a ","hello ","yo "] ["a ","he","yo"] >>> ["a", "hello", "yo"] & pad >- maximum . fmap length ["a ","hello","yo "] >>> ["a", "hello", "yo"] & pad >- minimum . fma...
module Examples.Algebraic where import Proton pad :: AlgebraicLens String [String] String Int pad = listLens id padder where padder :: [String] -> Int -> [String] padder xs n = fmap (\s -> take n $ s <> repeat ' ') xs padLength :: AlgebraicLens String [String] Int Int padLength = listLens length padder w...
5013c7eb81e006abb6aa86f9fb78c5545b78b6ebcd16f029dd10605a4135d1d0
tonsky/datascript
issues.cljc
(ns datascript.test.issues (:require [datascript.core :as ds] #?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]] :clj [clojure.test :as t :refer [is are deftest testing]]))) (deftest ^{:doc "CLJS `apply` + `vector` will hold onto mutable array of arguments directly"} issue-26...
null
https://raw.githubusercontent.com/tonsky/datascript/4f1af628d5650e0ca0ffd0b6b384941eef2c37fb/test/datascript/test/issues.cljc
clojure
(ns datascript.test.issues (:require [datascript.core :as ds] #?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]] :clj [clojure.test :as t :refer [is are deftest testing]]))) (deftest ^{:doc "CLJS `apply` + `vector` will hold onto mutable array of arguments directly"} issue-26...
5ddac8a9ef0bfdc9fb17ca14925f7973259f2c08c80646b96f844a23ff9edd34
evolutics/haskell-formatter
Input.hs
predecessor = predecessor -- ^comment 0 ^comment 1 successor :: a successor = successor
null
https://raw.githubusercontent.com/evolutics/haskell-formatter/3919428e312db62b305de4dd1c84887e6cfa9478/testsuite/resources/source/comments/depends_on_displacement/single_annotation/line_pair/after_after/Input.hs
haskell
^comment 0
predecessor = predecessor ^comment 1 successor :: a successor = successor
7721da42054a969bdeda5e820c7ad5672e57a96466ddfc2bd421e5d08bf7009a
okuoku/nausicaa
test-times-and-dates-seconds.sps
-*- coding : utf-8 -*- ;;; Part of : / Scheme Contents : tests for seconds utilities Date : We d Jul 7 , 2010 ;;; ;;;Abstract ;;; ;;; ;;; Copyright ( c ) 2010 < > ;;; ;;;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...
null
https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/tests/test-times-and-dates-seconds.sps
scheme
Abstract 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 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 warra...
-*- coding : utf-8 -*- Part of : / Scheme Contents : tests for seconds utilities Date : We d Jul 7 , 2010 Copyright ( c ) 2010 < > the Free Software Foundation , either version 3 of the License , or ( at General Public License for more details . You should have received a copy of the GNU General Public ...
d2b645937375fd510870126b9d848605b00ebce230173d186b90056eee659e2a
rumuki/rumuki-server
RemoteTransferType.hs
{-# LANGUAGE LambdaCase #-} # LANGUAGE TemplateHaskell # module Model.RemoteTransferType where import Data.Aeson import Database.Persist.TH import Prelude data RemoteTransferType = Video | Album deriving (Show, Read, Eq) derivePersistField "RemoteTransferType" instance FromJSON ...
null
https://raw.githubusercontent.com/rumuki/rumuki-server/59798656e9eb440a2344223850dbd1f9f77060ca/src/Model/RemoteTransferType.hs
haskell
# LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell # module Model.RemoteTransferType where import Data.Aeson import Database.Persist.TH import Prelude data RemoteTransferType = Video | Album deriving (Show, Read, Eq) derivePersistField "RemoteTransferType" instance FromJSON RemoteTransferType where parseJ...
be16546f1eeb34385ef974c92b74526f5dd3ef78b60243c6c06f11771a0b4d49
janestreet/universe
stable_bigints.mli
val all : string array
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/zarith_stubs_js/test/stable_bigints.mli
ocaml
val all : string array
2fae91397a3f29eeca72b32f5eb1dabacb540ef033d8457b0c4cfc705fe2c966
huangz1990/real-world-haskell-cn
PNM.hs
file : ch10 / PNM.hs import qualified Data.ByteString.Lazy.Char8 as L8 import qualified Data.ByteString.Lazy as L import Data.Char (isSpace) file : ch10 / PNM.hs data Greymap = Greymap { greyWidth :: Int , greyHeight :: Int , greyMax :: Int , greyData :: L.ByteString } deriving (Eq) file :...
null
https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch10/PNM.hs
haskell
L.ByteString -> L.ByteString -> Maybe L.ByteString L.ByteString -> Maybe (Int, L.ByteString) Int -> L.ByteString -> Maybe (L.ByteString, L.ByteString)
file : ch10 / PNM.hs import qualified Data.ByteString.Lazy.Char8 as L8 import qualified Data.ByteString.Lazy as L import Data.Char (isSpace) file : ch10 / PNM.hs data Greymap = Greymap { greyWidth :: Int , greyHeight :: Int , greyMax :: Int , greyData :: L.ByteString } deriving (Eq) file :...
ec0181690b16b858e2649890c166b46594a480b486479c6669461c889c871d2d
MercuryTechnologies/slack-web
Types.hs
# LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # module Web.Slack.Experimental.Blocks.Types where import Control.Monad (MonadFail (..)) import Data.Aeson (Object, Value (..), withArray) import Data.Aeson.Types ((.!=)) import Data.StringVariants import Data.Vector qualified as V import Refined import Refined.Un...
null
https://raw.githubusercontent.com/MercuryTechnologies/slack-web/41e06a4155237e8328b6a1685e2a352c7da012ee/src/Web/Slack/Experimental/Blocks/Types.hs
haskell
| Class of types that can be turned into part of a Slack Message. 'message' is the primary way of converting primitive and domain-level types into things that can be shown in a slack message. | Render a link with optional link text | Create a 'SlackPlainTextOnly'. Some API points can can take either markdown or pl...
# LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # module Web.Slack.Experimental.Blocks.Types where import Control.Monad (MonadFail (..)) import Data.Aeson (Object, Value (..), withArray) import Data.Aeson.Types ((.!=)) import Data.StringVariants import Data.Vector qualified as V import Refined import Refined.Un...
7204b921e0a802b97dc9d4c08849f6e3ee0c523053ab1935a1c84e3afec7fa10
ConsenSysMesh/Fae
Loop.hs
import Control.Monad body :: FaeTX () body = forever $ return ()
null
https://raw.githubusercontent.com/ConsenSysMesh/Fae/3ff023f70fa403e9cef80045907e415ccd88d7e8/txs/Loop.hs
haskell
import Control.Monad body :: FaeTX () body = forever $ return ()
6331a8a618596c900a9764b341aa42dedeb6a97ac1b67341d354133c78fa59dc
GaloisInc/daedalus
SearchTree.hs
# LANGUAGE DeriveFunctor # -- We could also use the zipper package, but it is simpler to roll our -- own (and requires less understanding of lens etc.) module Talos.Strategy.SearchTree ( -- Types, constructors exported mainly to ease debugging SearchTree(..) , Ctx(..) , Location(..) -- Views , locTag ...
null
https://raw.githubusercontent.com/GaloisInc/daedalus/6859e24fe820b174487a62ac13ac63130319ffe5/talos/src/Talos/Strategy/SearchTree.hs
haskell
We could also use the zipper package, but it is simpler to roll our own (and requires less understanding of lens etc.) Types, constructors exported mainly to ease debugging Views Movement Helpers ^ Invariant: the list is non-empty. ------------------------------------------------------------------------------ --...
# LANGUAGE DeriveFunctor # module Talos.Strategy.SearchTree SearchTree(..) , Ctx(..) , Location(..) , locTag , locBranches , upward , downward , leftward , rightward , rightUnexplored , leftmostUnexplored Construct / destruct / general manipulation , empty , fromTree , rezip , replac...
b8a4c347b6e707aa8cdef02a3fb3e2ae65557dc5d0ecf9cbc8074e7fc853e756
samply/blaze
profiling.clj
(ns blaze.profiling "Profiling namespace without test dependencies." (:require [blaze.system :as system] [blaze.db.cache-collector :as cc] [blaze.db.kv.rocksdb :as rocksdb] [blaze.db.resource-cache :as resource-cache] [clojure.tools.namespace.repl :refer [refresh]] [taoensso.timbre :as log])...
null
https://raw.githubusercontent.com/samply/blaze/c479410a9198526453a0df769ab7db2e6d5dd654/profiling/blaze/profiling.clj
clojure
Reset after making changes Resource Handle Cache Transaction Cache Resource Cache DB
(ns blaze.profiling "Profiling namespace without test dependencies." (:require [blaze.system :as system] [blaze.db.cache-collector :as cc] [blaze.db.kv.rocksdb :as rocksdb] [blaze.db.resource-cache :as resource-cache] [clojure.tools.namespace.repl :refer [refresh]] [taoensso.timbre :as log])...
e9e1f2a8ca73034b8d89257e1dca95df444683379d454e4743ec57a15d3aedad
discus-lang/salt
Create.hs
-- | Creation of test jobs. -- We decide what to do based on what files are in a directory. module War.Task.Create ( Way (..) , create) where import War.Task.Create.Way import War.Driver.Base import qualified War.Task.Create.CreateMainSH as CreateMainSH import qualified War.Task.Create.CreateMain...
null
https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/war/War/Task/Create.hs
haskell
| Creation of test jobs. We decide what to do based on what files are in a directory. | Create job chains based on this file. ^ Create tests for this way. ^ All files in the test directory. ^ Create test chains based on this file.
module War.Task.Create ( Way (..) , create) where import War.Task.Create.Way import War.Driver.Base import qualified War.Task.Create.CreateMainSH as CreateMainSH import qualified War.Task.Create.CreateMainHS as CreateMainHS import qualified War.Task.Create.CreateSalt as CreateSalt -...
9402d7c8fb1970636a9a6715d8d9c133d6a2148c2a05bf19eeaec97eaf3fe063
v-kolesnikov/sicp
2_04_test.clj
(ns sicp.chapter02.2-04-test (:require [clojure.test :refer :all] [sicp.test-helper :refer :all] [sicp.chapter02.2-04 :as sicp-2-04])) (deftest car-test (assert-equal 3 (sicp-2-04/car (sicp-2-04/cons 3 8))) (assert-equal 5 (sicp-2-04/car (sicp-2-04/cons 5 0)))) (deftest cdr-test (asser...
null
https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter02/2_04_test.clj
clojure
(ns sicp.chapter02.2-04-test (:require [clojure.test :refer :all] [sicp.test-helper :refer :all] [sicp.chapter02.2-04 :as sicp-2-04])) (deftest car-test (assert-equal 3 (sicp-2-04/car (sicp-2-04/cons 3 8))) (assert-equal 5 (sicp-2-04/car (sicp-2-04/cons 5 0)))) (deftest cdr-test (asser...
116306dc8514b0b1d59500334b041c4cfbaca8a9688aee73d166afa3c0b04671
DavidAlphaFox/RabbitMQ
rabbit_mgmt_wm_parameters.erl
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in %% compliance with the License. You may obtain a copy of the License at %% / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITH...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_parameters.erl
erlang
compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -------------------------------------------------------------------- ---...
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ Management Plugin . The Initial Developer of the Original Code...
67f79b1bc3927640a015b427327ef70be75a4413bcd8da212331675cadbc014a
GaloisInc/macaw
DemandSet.hs
| Provides a monad that allows one to record a list of values and statements , and then resolve all their dependencies to see what additional computations must be run to provide inputs to the statements and compute the final value . statements, and then resolve all their dependencies to see what additional comp...
null
https://raw.githubusercontent.com/GaloisInc/macaw/ff894f9286f976d0ab131325bea902ef6275aad2/base/src/Data/Macaw/CFG/DemandSet.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # * Filtering after demand set is computed. ---------------------------------------------------------------------- Functions for computing demanded values | A set of assignments | This provides the architecture specific functions needed to resolve demand sets. ^ This retur...
| Provides a monad that allows one to record a list of values and statements , and then resolve all their dependencies to see what additional computations must be run to provide inputs to the statements and compute the final value . statements, and then resolve all their dependencies to see what additional comp...
eb02e3d56d30cf3effb6ffb635830e09750661b979ba82145610c0c6518953f9
airbus-seclab/bincat
vector.ml
This file is part of BinCAT . Copyright 2014 - 2021 - Airbus BinCAT is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your opti...
null
https://raw.githubusercontent.com/airbus-seclab/bincat/ab4787e7fa70c3fc4bd2399e0e695fef446a5e81/ocaml/src/domains/vector.ml
ocaml
* vector lifting of a value_domain. Binary operations are supposed to apply on operands of the same length * signature of value domain * abstract data type * top * comparison to top * forget the content while preserving the taint * conversion from Z.t value * taint the given value from Z.t value * abstract join...
This file is part of BinCAT . Copyright 2014 - 2021 - Airbus BinCAT is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your opti...
c8f7e40579b828a30c44fd6a136c583940471942911687dd29ebcb47cad45b85
racket/typed-racket
top-level-make-predicate.rkt
#lang racket/load Test for PR 14030 (require typed/racket/shallow) (make-predicate Integer)
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/top-level-make-predicate.rkt
racket
#lang racket/load Test for PR 14030 (require typed/racket/shallow) (make-predicate Integer)
d22e9926055b571a904868025cca57e56dc9d1bf0a798272a03eebe39375883d
mdedwards/slippery-chicken
sbcl.lisp
;;; ********************************************************************** Copyright ( C ) 2002 ( ) ;;; 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...
null
https://raw.githubusercontent.com/mdedwards/slippery-chicken/c1c11fadcdb40cd869d5b29091ba5e53c5270e04/src/cm-2.6.0/src/sbcl.lisp
lisp
********************************************************************** This program is free software; you can redistribute it and/or either version 2 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 PART...
Copyright ( C ) 2002 ( ) modify it under the terms of the GNU General Public License of the License , or ( at your option ) any later version . $ Revision : 1.5 $ $ Date : 2005/03/19 18:30:27 $ (in-package :cm) (import '(sb-ext::load-foreign sb-pcl:slot-definition-initargs sb-pcl:slo...
b2ce6b06678f50579a3417706e75f13c3f8217f84f0afdeb7151abbb9065cf79
cj1128/sicp-review
3.78.scm
Exercise 3.78 ;; write a procedure solve-2nd that takes as arguments the constants ;; a, b and dt and the initial values y0 and dy0 for y and dy/dt and ;; generates the stream of successive values of y (define (integral delayed-integrand initial-value dt) (define int (cons-stream initial-value (let...
null
https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-3/3.5/3.78.scm
scheme
write a procedure solve-2nd that takes as arguments the constants a, b and dt and the initial values y0 and dy0 for y and dy/dt and generates the stream of successive values of y
Exercise 3.78 (define (integral delayed-integrand initial-value dt) (define int (cons-stream initial-value (let ((integrand (force delayed-integrand))) (stream-add (stream-scale integrand dt) int)))) int) (define (solve-2nd a b dt y0 dy0) (define y (integral (delay dy) y0 dt)) (d...
f7dbd7b0f0e209b83b82940650e79968ff6411dcc9bbe11a34902786c8cf545c
hercules-ci/hercules-ci-agent
Env.hs
module Hercules.Agent.Netrc.Env where import Protolude data Env = Env { netrcFile :: Maybe FilePath }
null
https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/8a476e9328d197d0d41872b1674638827e18bae0/hercules-ci-agent/hercules-ci-agent/Hercules/Agent/Netrc/Env.hs
haskell
module Hercules.Agent.Netrc.Env where import Protolude data Env = Env { netrcFile :: Maybe FilePath }
359ed117f5d5a877b93414707ce168dc051259aeb5cd3fdd633c4d4d1ea3b537
gilesc/factor-graph
factor_graph.clj
(ns es.corygil.test.factor-graph (:use es.corygil.factor-graph es.corygil.factor-graph.bayes) (:use [clojure.test])) (def disaster (bayes-net {:burglary [0.001 0.999] :earthquake [0.002 0.998] :alarm 2 :john-calls 2 :mary-calls 2} {[:alarm :burglary :earthquake] [0.95 0.05 0.94 0.06...
null
https://raw.githubusercontent.com/gilesc/factor-graph/3129fd578f0e3cf4d84003ce7014dbc97530c80c/test/es/corygil/test/factor_graph.clj
clojure
(ns es.corygil.test.factor-graph (:use es.corygil.factor-graph es.corygil.factor-graph.bayes) (:use [clojure.test])) (def disaster (bayes-net {:burglary [0.001 0.999] :earthquake [0.002 0.998] :alarm 2 :john-calls 2 :mary-calls 2} {[:alarm :burglary :earthquake] [0.95 0.05 0.94 0.06...
e1a31b3601834fd2d0f9067c719a1dbe4ddf0efc725b30858ee448253a0cac7b
acieroid/scala-am
ack.scm
(letrec ((ack (lambda (m n) (if (= m 0) (+ n 1) (if (= n 0) (ack (- m 1) 1) (ack (- m 1) (ack m (- n 1)))))))) (ack 1 2))
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/kernighanvanwyk/ack.scm
scheme
(letrec ((ack (lambda (m n) (if (= m 0) (+ n 1) (if (= n 0) (ack (- m 1) 1) (ack (- m 1) (ack m (- n 1)))))))) (ack 1 2))
674fb9ba119930e53d27671e4ec34293b52e7e5c391d7885ae49544287d052fd
metabase/metabase
serialize_test.clj
(ns metabase-enterprise.serialization.api.serialize-test (:require [clojure.test :refer :all] [metabase.models :refer [Card Collection Dashboard DashboardCard]] [metabase.public-settings.premium-features-test :as premium-features-test] [metabase.test :as mt] [metabase.util.files :as u.files] [to...
null
https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/enterprise/backend/test/metabase_enterprise/serialization/api/serialize_test.clj
clojure
(ns metabase-enterprise.serialization.api.serialize-test (:require [clojure.test :refer :all] [metabase.models :refer [Card Collection Dashboard DashboardCard]] [metabase.public-settings.premium-features-test :as premium-features-test] [metabase.test :as mt] [metabase.util.files :as u.files] [to...
e4e8a9c8f114885946d4d666ae498e16a69bf7c56056582077a3d19aadb2b5af
hopv/r_type
conf.ml
(** Settings of the run. *) open Core (** Effect analysis flag. *) let effect_analysis = ref true (** Whether or not to run the solver. *) let run_solver = ref true (** Command and options running the solver. *) let clause_solver = ref [ "hoice" ] (** String version of `clause_solver`. *) let clause_solver_str () =...
null
https://raw.githubusercontent.com/hopv/r_type/7120b74912118a8eced8e63d1792907702e090dc/src/common/conf.ml
ocaml
* Settings of the run. * Effect analysis flag. * Whether or not to run the solver. * Command and options running the solver. * String version of `clause_solver`. * Verbose flag. * CLAP stuff. Format.printf "%s@." s ; This case is actually necessarily an error **for now**. The error will be caught afte...
open Core let effect_analysis = ref true let run_solver = ref true let clause_solver = ref [ "hoice" ] let clause_solver_str () = String.concat ~sep:" " ! clause_solver * file we 're analyzing . let ml_file = ref None let verb = ref false module Clap = struct open Core open Lib type 'a parse_res = ('...
9183f5b9b514d313f25b16a04172577631caea23a62e27b067f6ade2e9a3531a
CSCfi/rems
blacklist.clj
(ns rems.api.blacklist (:require [clojure.tools.logging :as log] [compojure.api.sweet :refer :all] [rems.api.schema :as schema] [rems.service.command :as command] [rems.service.blacklist :as blacklist] [rems.api.util :refer [unprocessable-entity-json-respons...
null
https://raw.githubusercontent.com/CSCfi/rems/490087c4d58339c908da792111029fbaf817a26f/src/clj/rems/api/blacklist.clj
clojure
required for route :roles
(ns rems.api.blacklist (:require [clojure.tools.logging :as log] [compojure.api.sweet :refer :all] [rems.api.schema :as schema] [rems.service.command :as command] [rems.service.blacklist :as blacklist] [rems.application.rejecter-bot :as rejecter-bot] ...
066262c968ec61d2b52d09083a12991977de7fc66b3bc5cd7fb5903a876638c6
gahag/FSQL
Query.hs
FSQL : Query.hs -- Query data types , instances and functions - - Copyright ( C ) 2015 gahag - All rights reserved . - - This software may be modified and distributed under the terms - of the BSD license . See the LICENSE file for details . - - Copyright (C) 2015 gahag - All rights reserved. ...
null
https://raw.githubusercontent.com/gahag/FSQL/5c68cb8af68e7e66876bc2b937b91ddb363b2db7/src/Query.hs
haskell
Query data types , instances and functions by getDirectoryContents. Selection : Represents the information to be extracted from a file. Source : Source directory for the query. Wether to recursively fetch. Single path Wether to recursively fetch. Inner, outer, etc. Join by name, date, etc. fetch_query ------...
- - Copyright ( C ) 2015 gahag - All rights reserved . - - This software may be modified and distributed under the terms - of the BSD license . See the LICENSE file for details . - - Copyright (C) 2015 gahag - All rights reserved. - - This software may be modified and distributed under the term...
818f24297ee31071bfdc69885f40e815d67e8352208b72b11c0564f775ceeec3
bboston7/racpete
auth-commands.rkt
#lang racket (require (planet gh/sha:1:1) "../util/connection.rkt" ) (provide verify die update ) #| This module provides commands that require the user to authenticate via a supplied password argument. The commands provided are only accessible via private message to the bot, and the password is stored as...
null
https://raw.githubusercontent.com/bboston7/racpete/6bc173261a81aa3dfbfe7b734c12a8d04a001a7e/src/commands/auth-commands.rkt
racket
This module provides commands that require the user to authenticate via a supplied password argument. The commands provided are only accessible via private message to the bot, and the password is stored as a sha-512 hash on disk. Verify determines if the supplied password, pass, is correct, and if it is, it runs th...
#lang racket (require (planet gh/sha:1:1) "../util/connection.rkt" ) (provide verify die update ) (define (verify pass cb . args) (let* ([passfile ".racpete.pass"] [cur-hash (if (file-exists? passfile) (read-line (open-input-file passfile #:mode 'text)) ...
552c30966e5a600607f31291b8af89df6e13f0825b9a87252091a6ccf8e7eacb
dakk/yallo-lang
env.ml
open Ast open Ast_ttype open Ast_expr open Helpers.Errors type st = | Type | Interface | Const | Contract [@@deriving show {with_path = false}] type t = { types: (iden * ttype) list; consts: (iden * texpr) list; contracts: (iden * contract) list; ifaces: (iden * entry_sig list) list; sym...
null
https://raw.githubusercontent.com/dakk/yallo-lang/55a1b379306c9f113bd707e78b6e0c1be81bb7be/lib/passes/3_parse_tree_to_ast/env.ml
ocaml
Fail if the symbol is already defined
open Ast open Ast_ttype open Ast_expr open Helpers.Errors type st = | Type | Interface | Const | Contract [@@deriving show {with_path = false}] type t = { types: (iden * ttype) list; consts: (iden * texpr) list; contracts: (iden * contract) list; ifaces: (iden * entry_sig list) list; sym...
960c85fb8671937e13a55137b174068121a6adfc2352ba861abb0cbd3c15d20e
winks/multiplex
user.clj
(ns multiplex.models.user (:require [korma.core :refer :all] [clojure.java.jdbc :as sql] [multiplex.config :as config] [multiplex.models.db :as db] [multiplex.util :as util])) ; prepare (defn prepare-map [] {:uid nil :username nil :hostname nil :email nil ...
null
https://raw.githubusercontent.com/winks/multiplex/79e6e64f4cf8d6c9eaeceb5119b73ecaaa60e47f/src/multiplex/models/user.clj
clojure
prepare abstraction
(ns multiplex.models.user (:require [korma.core :refer :all] [clojure.java.jdbc :as sql] [multiplex.config :as config] [multiplex.models.db :as db] [multiplex.util :as util])) (defn prepare-map [] {:uid nil :username nil :hostname nil :email nil :password...
6b60a204980abf2d77b116652b3b4f2328ae554861f72d67835ef331c9adc5c6
RefactoringTools/HaRe
ExportedTypeClient.expected.hs
import Renaming.ExportedType -- renaming must distinguish between type name and constructor name foo :: NewType -> Bool foo (MyType 0) = True foo (MyType _) = False main = putStrLn "hello"
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/Renaming/ExportedTypeClient.expected.hs
haskell
renaming must distinguish between type name and constructor name
import Renaming.ExportedType foo :: NewType -> Bool foo (MyType 0) = True foo (MyType _) = False main = putStrLn "hello"
37e7747926261f3a843c74ad4fa189f817318d72b586157a1dbc6c142e15ede5
jwiegley/notes
Capability.hs
# LANGUAGE BlockArguments # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE QuantifiedConstraints # {-# LANGUAGE RankNTypes #-} # ...
null
https://raw.githubusercontent.com/jwiegley/notes/cbdda5ba5a2741a99e43fbe4c7dd2a07f47cf8f0/haskell/Capability.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE GADTs # # LANGUAGE RankNTypes # This defines the type of the capability This is the defcap "function", which may only be executed in the context of a specific module "s". x <- k (f s)
# LANGUAGE BlockArguments # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE QuantifiedConstraints # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeOperator...