_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
4a31310e8ea4c33f2ff6380bf35d35782fcc3f0b5b5ac4bfc213bc0e1f750144
fourmolu/fourmolu
type-arguments-four-out.hs
type PickType :: forall k. Nat -> k type family PickType n where PickType @Type 1 = Bool PickType @(Type -> Type) 2 = Maybe
null
https://raw.githubusercontent.com/fourmolu/fourmolu/1f8903a92c8d5001dc1ec8ecfd4a04a3b61c3283/data/examples/declaration/type-families/closed-type-family/type-arguments-four-out.hs
haskell
type PickType :: forall k. Nat -> k type family PickType n where PickType @Type 1 = Bool PickType @(Type -> Type) 2 = Maybe
1feb917334d2989abb21f7cfc467d48909e75d7b866af5565d85cfe1d7d0f329
programaker-project/Programaker-Core
automate_rest_api_connection_by_id.erl
%%% @doc %%% REST endpoint to manage a specific connection. %%% @end -module(automate_rest_api_connection_by_id). -export([init/2]). -export([ allowed_methods/2 , options/2 , is_authorized/2 , content_types_accepted/2 ]). -export([ accept_json/2 ]). -define(UTILS, automate_res...
null
https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_rest_api/src/automate_rest_api_connection_by_id.erl
erlang
@doc REST endpoint to manage a specific connection. @end CORS Authentication Don't do authentication if it's just asking for options Route by Method PATCH handler
-module(automate_rest_api_connection_by_id). -export([init/2]). -export([ allowed_methods/2 , options/2 , is_authorized/2 , content_types_accepted/2 ]). -export([ accept_json/2 ]). -define(UTILS, automate_rest_api_utils). -include("./records.hrl"). -include("../../automate_ser...
36731ef6c221709c63c0f2e2613d0f3ba17fa084b425894521bf640453c35649
gedge-platform/gedge-platform
ranch_proxy_header.erl
Copyright ( c ) 2018 - 2021 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/ranch/src/ranch_proxy_header.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2018 - 2021 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(ranch_proxy_header). -export([parse/1]). -ex...
26c038008c455f6618f726b1fe224c6f76e8cd0b71c148aedfa7db003965aa8f
Mbodin/murder-generator
history.ml
open Libutils type character = Id.t let all_players_length l = assert (l >= 0) ; List.map Id.from_array (Utils.seq l) type event = { event_begin : Date.t ; event_end : Date.t ; event : character Events.t } type status = | Normal | Duplicable | Unique let generate_event beg e = let en = ...
null
https://raw.githubusercontent.com/Mbodin/murder-generator/2024a924ffb4ee12d1b7119b699346b21e098892/src/history.ml
ocaml
* The number of characters in the state. * Events are not stored directly in the timeline, but through identifiers. * For each kind and character, returns a set of event identifiers satisfying them. * A given event can’t be reused twice for the same character. As a consequence, we store th...
open Libutils type character = Id.t let all_players_length l = assert (l >= 0) ; List.map Id.from_array (Utils.seq l) type event = { event_begin : Date.t ; event_end : Date.t ; event : character Events.t } type status = | Normal | Duplicable | Unique let generate_event beg e = let en = ...
1de65132a20ca8c934811243d0e9d7650fd92deb4b179f962f900660ce612f3e
ReedOei/CMips
Optimizer.hs
module Optimizer where import Control.Lens (view, set) import Control.Monad import Control.Monad.State import Data.List ((\\), isPrefixOf, findIndices, find, findIndex, nub) import Data.Maybe (isNothing, mapMaybe, isJust, fromMaybe) import Data.Map (Map) import qualified Data.Map as Map import Compiler.Types import...
null
https://raw.githubusercontent.com/ReedOei/CMips/daae33aeba31d0f4b0a97fab206b2726566d5ee4/src/Optimizer.hs
haskell
-- Repeatedly apply optimizations until there are no changes in the code. -- Repeatedly apply optimizations until there are no changes in the code. -- Repeatedly apply optimizations until there are no changes in the code. | Tries to inline functions. Currently, this can only be done if the compiled assembly of t...
module Optimizer where import Control.Lens (view, set) import Control.Monad import Control.Monad.State import Data.List ((\\), isPrefixOf, findIndices, find, findIndex, nub) import Data.Maybe (isNothing, mapMaybe, isJust, fromMaybe) import Data.Map (Map) import qualified Data.Map as Map import Compiler.Types import...
40d54ac323c3c7d7677a7fd195abbeaa2a585b2b7c767202e651e14cdb184498
CRogers/obc
data.ml
* data.ml * * This file is part of the Oxford Oberon-2 compiler * Copyright ( c ) 2006 * All rights reserved * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * * 1 . Redistributions of...
null
https://raw.githubusercontent.com/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/debugger/data.ml
ocaml
Type of dynamic values A simple value, integer or float The address of something var_addr -- compute address of variable Assume local to current procedure fix_flex -- convert flex array to fixed array type dynamic_record -- find dynamic type of record from descriptor def_value -- compute value from defin...
* data.ml * * This file is part of the Oxford Oberon-2 compiler * Copyright ( c ) 2006 * All rights reserved * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * * 1 . Redistributions of...
b8455c04edfb6b1c788215afa981ca8ff70d92979dcad42c2cf4ef8c6047706d
haskell/cabal
cabal.test.hs
import Test.Cabal.Prelude -- Test that `cabal haddock --disable-documention` works as expected and leads -- to a warning if a local package makes an outer reference. main = cabalTest . withRepo "repo" $ do r <- cabal' "haddock" ["--disable-documentation", "B"] assertOutputContains "Warning: B: could not find li...
null
https://raw.githubusercontent.com/haskell/cabal/a47b0ad39131b1da41e7860b62d0a27a44cd585e/cabal-testsuite/PackageTests/NewHaddock/DisableDoc/cabal.test.hs
haskell
Test that `cabal haddock --disable-documention` works as expected and leads to a warning if a local package makes an outer reference.
import Test.Cabal.Prelude main = cabalTest . withRepo "repo" $ do r <- cabal' "haddock" ["--disable-documentation", "B"] assertOutputContains "Warning: B: could not find link destinations for" r
8195023144de47cfc8ef4c16b31fd22b6ab2940bfad066c1a933c459ae6a8333
lorenzo/wrecker
Runner.hs
# LANGUAGE RecordWildCards , ScopedTypeVariables , LambdaCase , BangPatterns # BangPatterns #-} # LANGUAGE TupleSections # # LANGUAGE TypeApplications # module Wrecker.Runner where import Control.Concurrent import Control.Concurrent.NextRef import Control.Concurrent.STM import qualified Control.Concurrent.Threa...
null
https://raw.githubusercontent.com/lorenzo/wrecker/595ce8df42a706f3e49ec6782c9a87a86162c519/src/Wrecker/Runner.hs
haskell
| The 'Environment' holds state necessary to make and record HTTP calls. ^ The 'Recorder' can be used with the 'record' function to ... record times. better performance. | Typically 'wrecker' will control benchmarking actions. However in some situations a benchmark might require more control. To facili...
# LANGUAGE RecordWildCards , ScopedTypeVariables , LambdaCase , BangPatterns # BangPatterns #-} # LANGUAGE TupleSections # # LANGUAGE TypeApplications # module Wrecker.Runner where import Control.Concurrent import Control.Concurrent.NextRef import Control.Concurrent.STM import qualified Control.Concurrent.Threa...
47608226c9dd2b7127665f76c4d262d666bdc6d1c0591a1641df945488f9755f
ygrek/mldonkey
slskGlobals.ml
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey 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/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/networks/soulseek/slskGlobals.ml
ocaml
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey 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 ...
c45738b4aeadcba576ca8d762eee2da5a2b7e0bfc97a6e1ba12ea4e9ab5a009e
nuvla/ui
accordion.cljs
(ns sixsq.nuvla.ui.utils.accordion (:require [re-frame.core :refer [dispatch]] [sixsq.nuvla.ui.main.events :as main-events] [sixsq.nuvla.ui.utils.form-fields :as form-fields] [sixsq.nuvla.ui.utils.semantic-ui :as ui])) (defn toggle [v] (swap! v not)) (defn show-count [coll] ...
null
https://raw.githubusercontent.com/nuvla/ui/239eee3b7661b5f0b84117334d40c645de817c1c/code/src/cljs/sixsq/nuvla/ui/utils/accordion.cljs
clojure
(ns sixsq.nuvla.ui.utils.accordion (:require [re-frame.core :refer [dispatch]] [sixsq.nuvla.ui.main.events :as main-events] [sixsq.nuvla.ui.utils.form-fields :as form-fields] [sixsq.nuvla.ui.utils.semantic-ui :as ui])) (defn toggle [v] (swap! v not)) (defn show-count [coll] ...
1e503a81d627be31a13f2e8da26949751ac08e5604399b944b8f8dafcd8584fd
fractalide/fractalide
default.rkt
#lang racket (provide build-edge) (require "../generic/paths.rkt") (require "../generic/file-handling.rkt") (: build - edge ( String String String - > Void ) ) (define (build-edge fractal-name language edge-name) (define node-path (make-edge-path fractal-name language edge-name)) (define default-nix (component-l...
null
https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/pkgs/hyperflow/fractal-management/edge/default.rkt
racket
(: write-edge-files (Path -> Void)) (: write-file (Path String -> Void)) [ ];
#lang racket (provide build-edge) (require "../generic/paths.rkt") (require "../generic/file-handling.rkt") (: build - edge ( String String String - > Void ) ) (define (build-edge fractal-name language edge-name) (define node-path (make-edge-path fractal-name language edge-name)) (define default-nix (component-l...
6f1ee636522a167f23c2cb1b04ebb15af241f389b1f74bfc9acefb907398dba1
shirok/Gauche
c64.scm
(define-module scheme.vector.c64 (extend gauche.uvector.c64))
null
https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/lib/scheme/vector/c64.scm
scheme
(define-module scheme.vector.c64 (extend gauche.uvector.c64))
da31adffbf2383e735b3175b930fad881923399230cfcac1137fff8f0762ca78
ekmett/lens
folds.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE FlexibleContexts # # LANGUAGE DeriveFunctor # {-# LANGUAGE BangPatterns #-} module Main (main) where import qualified Data.ByteString as BS import qualified Data.Foldable as F import qualified Data.HashMap.Lazy as HM import qualified Data.Map as M import qualified Data.Sequence a...
null
https://raw.githubusercontent.com/ekmett/lens/a26281a49e85af46821964d8f7455b82cfd4251d/benchmarks/folds.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE BangPatterns #
# LANGUAGE FlexibleContexts # # LANGUAGE DeriveFunctor # module Main (main) where import qualified Data.ByteString as BS import qualified Data.Foldable as F import qualified Data.HashMap.Lazy as HM import qualified Data.Map as M import qualified Data.Sequence as S import qualified Data.Vector as V import qualified Dat...
0f0157ea6087d2eaf652eac149260eb750d3b5d239aed6eef53d8fc549d73955
tensorknower69/nhentai
Gallery.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE TypeApplications # # LANGUAGE TemplateHaskell # module Data.NHentai.API.Gallery ( mkGalleryApiUri , mkPageThumbnailUri , mkPageImageUri , toTagType , APITag(..) , tagId , tagType , tagName , tagUri , tagCount , APIGallery...
null
https://raw.githubusercontent.com/tensorknower69/nhentai/02b0e0c89043366ce1efd64e614ae7e2ed0fe222/src/Data/NHentai/API/Gallery.hs
haskell
# LANGUAGE OverloadedStrings # e.g. , , /
# LANGUAGE LambdaCase # # LANGUAGE QuasiQuotes # # LANGUAGE TypeApplications # # LANGUAGE TemplateHaskell # module Data.NHentai.API.Gallery ( mkGalleryApiUri , mkPageThumbnailUri , mkPageImageUri , toTagType , APITag(..) , tagId , tagType , tagName , tagUri , tagCount , APIGallery(..) , apiGalleryId , apiMediaId , ...
7c983fdf9e25b27ba01c6744cfd8c65f324ee4f80ad1bb8a2d44855abfc368a9
AndrasKovacs/ELTE-func-lang
Notes07.hs
# options_ghc -Wincomplete - patterns # # LANGUAGE InstanceSigs , ScopedTypeVariables , TypeApplications # # LANGUAGE DeriveFunctor # module Notes07 where import Control.Monad State monad ( We could also import Control . Monad . State ) newtype State s a = State { runState :: s -> (a, s) } de...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/0a1b62ad49310b3790cbecbb1bf874961d6e8f5a/2020-21-2/gyak_4/Notes07.hs
haskell
------------------------------------------------------------------------------ The function labelTree should label the leaves of a tree with increasing integers: labelTree (Leaf ()) == Leaf 0 labelTree (Node (Leaf ()) (Leaf ())) == Node (Leaf 0) (Leaf 1) labelTree (Node (Leaf ()) (Node (Leaf ()) (Leaf ()))...
# options_ghc -Wincomplete - patterns # # LANGUAGE InstanceSigs , ScopedTypeVariables , TypeApplications # # LANGUAGE DeriveFunctor # module Notes07 where import Control.Monad State monad ( We could also import Control . Monad . State ) newtype State s a = State { runState :: s -> (a, s) } de...
2cad69997d8b13083ead88ce56919d568ed2d61c6c580b426ed341f3d1a56203
tezos/tezos-mirror
baking_actions.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/1f21d1fdc2e4330f701f93c41b1676da0b80fc75/src/proto_alpha/lib_delegate/baking_actions.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...
c19180ede05368f71da17b1a84e2d366833121d6e8523938a459e2fb00134179
kowainik/validation-selective
Properties.hs
module Test.Properties ( propertiesSpec ) where import Hedgehog (forAll, (===)) import Test.Hspec (Spec, describe, it) import Test.Hspec.Hedgehog (hedgehog) import Validation (failures, partitionValidations, successes) import Test.Gen (Property, genSmallText, genValidationList) propertiesSpec :: Spec proper...
null
https://raw.githubusercontent.com/kowainik/validation-selective/2a079347568664a88b73329eb3dca5433aa7b36f/test/Test/Properties.hs
haskell
module Test.Properties ( propertiesSpec ) where import Hedgehog (forAll, (===)) import Test.Hspec (Spec, describe, it) import Test.Hspec.Hedgehog (hedgehog) import Validation (failures, partitionValidations, successes) import Test.Gen (Property, genSmallText, genValidationList) propertiesSpec :: Spec proper...
1114f04307f8a765f12ab88063c6c73a37d5cdc8890903057de73fe2e4b9b0bf
manuel-serrano/hop
letclass.scm
;*=====================================================================*/ * serrano / prgm / project / hop / hop / js2scheme / letclass.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/manuel-serrano/hop/6510926d28b54ee4e3f72950838a1bb3724eca39/js2scheme/letclass.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * Let class optimization. This optimization implements a single */ * transformation: immutab...
* serrano / prgm / project / hop / hop / js2scheme / letclass.scm * / * Author : * / * Creation : Sun Jun 28 06:35:14 2015 * / * Last change : Sat Nov 13 10:14:02 2021 ( serrano ) * / * Copy...
4c7a201744931ba51d6fb8235d05805286c0044029b7cbb876b7b398a5292291
ocaml/opam
opamCompat.ml
(**************************************************************************) (* *) Copyright 2018 - 2020 OCamlPro (* *) (* All right...
null
https://raw.githubusercontent.com/ocaml/opam/652474c528916d6bd9543a1119e56f19e3bda010/src/core/opamCompat.ml
ocaml
************************************************************************ All rights reserved. This file is distributed under the terms of the exception on linking descr...
Copyright 2018 - 2020 OCamlPro GNU Lesser General Public License version 2.1 , with the special module String = #if OCAML_VERSION >= (4, 13, 0) String #else struct include String let exists p s = let n = length s in let rec loop i = if i = n t...
c9377a2857cc3832be78f36e119a23aa4b7f8ebc9c3d75b1565205e33bc13a85
jserot/fsml
test.ml
open Fsml let f1 = [%fsm {| name: altbit; states: Init, E0, E1; inputs: e: bool; outputs: s: bool ; trans: Init -> E0 when e='0'; Init -> E1 when e='1'; E0 -> E1 when e='1' with s:='0'; E0 -> E0 when e='0' with s:='1'; E1 -> E0 when e='0' with s:='0'; ...
null
https://raw.githubusercontent.com/jserot/fsml/9e3e04acbbb1cb1700fa9d4a0497f35ad4f70796/examples/ex1/test.ml
ocaml
open Fsml let f1 = [%fsm {| name: altbit; states: Init, E0, E1; inputs: e: bool; outputs: s: bool ; trans: Init -> E0 when e='0'; Init -> E1 when e='1'; E0 -> E1 when e='1' with s:='0'; E0 -> E0 when e='0' with s:='1'; E1 -> E0 when e='0' with s:='0'; ...
236249a63db2d1d123417704c3fe80040c41db6c433f5af5095cf25305551841
mbudde/jana
Types.hs
# LANGUAGE GeneralizedNewtypeDeriving # module Jana.Types ( Array, Stack, Value(..), nil, performOperation, performModOperation, showValueType, typesMatch, truthy, Store, printVdecl, showStore, emptyStore, storeFromList, getRef, getVar, getRefValue, bindVar, unbindVar, setVar, EvalEnv(..), ...
null
https://raw.githubusercontent.com/mbudde/jana/5b51b57e0b6f13ec1e1c61d719a18bf58696f84b/src/Jana/Types.hs
haskell
Types of values an expression can evaluate to. handled by evalExpr handled by evalExpr Environment Bind a variable name to a new reference Set the value of a variable (modifying the reference) Evaluation
# LANGUAGE GeneralizedNewtypeDeriving # module Jana.Types ( Array, Stack, Value(..), nil, performOperation, performModOperation, showValueType, typesMatch, truthy, Store, printVdecl, showStore, emptyStore, storeFromList, getRef, getVar, getRefValue, bindVar, unbindVar, setVar, EvalEnv(..), ...
377680bfa8a09d84a75f996fc8ad2981d6e86590c82933d592131f19e8f8f466
melange-re/melange
hello.foo.ml
Js.log __MODULE__
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/hello.foo.ml
ocaml
Js.log __MODULE__
b2d742e6872c014d1f648d4f2ac215c2d5dfd36b680ae7475f4b30bd9265529e
OlivierSohn/hamazed
DiscreteDistance.hs
{-# OPTIONS_HADDOCK hide #-} # LANGUAGE NoImplicitPrelude # # LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE FlexibleInstances # module Imj.Graphics.Class.DiscreteDistance ( DiscreteDistance(..) , Successive(..) , concatSuccessive ) where import ...
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-base/src/Imj/Graphics/Class/DiscreteDistance.hs
haskell
# OPTIONS_HADDOCK hide # | Wrapper on a list, to represents successive waypoints. should we have a Maybe to handle this? ^ last value | Naïve interpolation. Prerequisite : lists have the same lengths. For an interpolation that occurs sequentially between same-index elements, use SequentiallyInterpolatedLis...
# LANGUAGE NoImplicitPrelude # # LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE FlexibleInstances # module Imj.Graphics.Class.DiscreteDistance ( DiscreteDistance(..) , Successive(..) , concatSuccessive ) where import Imj.Prelude import qualified ...
4db06675e478a091cadddae43b20f22eda6c3ffd7310e8a170ae89254113f6c9
rkday/overload-middleware
middleware.clj
(ns overload-middleware.middleware (:require [overload-middleware.bucket :refer :all] [overload-middleware.latency :refer :all] [overload-middleware.utils :refer :all] [overload-middleware.schemas :refer :all])) (declare register-new-latency) (defn create-overload-wrapper [create...
null
https://raw.githubusercontent.com/rkday/overload-middleware/f243e891525324cf5dca4ba8208a4add7bd685e1/src/overload_middleware/middleware.clj
clojure
(ns overload-middleware.middleware (:require [overload-middleware.bucket :refer :all] [overload-middleware.latency :refer :all] [overload-middleware.utils :refer :all] [overload-middleware.schemas :refer :all])) (declare register-new-latency) (defn create-overload-wrapper [create...
2f7cdc61c45442e22de51c03c93b557fdeb6043aa9c4cfe5fe57643a51f318aa
sunng87/hbs
core.cljs
(ns hbs.core (:require [cljs.nodejs :as node])) (def handlebars-js (node/require "handlebars")) (defn compile [template-string] (.compile handlebars-js template-string)) (defn render [template-fn context] (template-fn (clj->js context)))
null
https://raw.githubusercontent.com/sunng87/hbs/3d2641b2fd9515d37cff0ad45613478a421960f5/src/hbs/core.cljs
clojure
(ns hbs.core (:require [cljs.nodejs :as node])) (def handlebars-js (node/require "handlebars")) (defn compile [template-string] (.compile handlebars-js template-string)) (defn render [template-fn context] (template-fn (clj->js context)))
1452ac819392d9f0fcef5cb1dac14cfeefdc4d1d536069119560fa3dce6c50b4
tfausak/monadoc-5
BinarySpec.hs
module Monadoc.Type.BinarySpec where import qualified Data.ByteString as ByteString import qualified Database.SQLite.Simple as Sql import qualified Database.SQLite.Simple.FromField as Sql import qualified Database.SQLite.Simple.Internal as Sql import qualified Database.SQLite.Simple.ToField as Sql import Monadoc.Prelu...
null
https://raw.githubusercontent.com/tfausak/monadoc-5/5361dd1870072cf2771857adbe92658118ddaa27/src/test/Monadoc/Type/BinarySpec.hs
haskell
module Monadoc.Type.BinarySpec where import qualified Data.ByteString as ByteString import qualified Database.SQLite.Simple as Sql import qualified Database.SQLite.Simple.FromField as Sql import qualified Database.SQLite.Simple.Internal as Sql import qualified Database.SQLite.Simple.ToField as Sql import Monadoc.Prelu...
72d86979459f985366e3f20134dcb7b74a9be4808f54df6e6e60ab7aa4d3704c
Liqwid-Labs/plutus-extra
Natural.hs
# LANGUAGE Trustworthy # | Module : PlutusTx . Natural Copyright : ( C ) MLabs 2021 License : Apache 2.0 Maintainer : < > Portability : GHC only Stability : Experimental An on - chain numeric type representing non - negative integers . Module: PlutusTx.Natural Copyright: (C) MLabs 2021 ...
null
https://raw.githubusercontent.com/Liqwid-Labs/plutus-extra/bae6052dddeb7b0664544fe7aec16fbf43d8d2a5/plutus-numeric/src/PlutusTx/Natural.hs
haskell
* Types, * Quasi-quoter * Functions
# LANGUAGE Trustworthy # | Module : PlutusTx . Natural Copyright : ( C ) MLabs 2021 License : Apache 2.0 Maintainer : < > Portability : GHC only Stability : Experimental An on - chain numeric type representing non - negative integers . Module: PlutusTx.Natural Copyright: (C) MLabs 2021 ...
a01726b0d724a7e640a6cf5d2de35ba3d9c9a04ab76c3b6433ad0318363485ae
erlang/corba
lname_component.erl
%%-------------------------------------------------------------------- %% %% %CopyrightBegin% %% Copyright Ericsson AB 1997 - 2016 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain ...
null
https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/orber/COSS/CosNaming/lname_component.erl
erlang
-------------------------------------------------------------------- %CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY...
Copyright Ericsson AB 1997 - 2016 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(lname_component). -include_lib("orber/include/corba.hrl"). -include("lname.hrl"). -include("CosNaming.hrl")....
345d46592718024f41ed7fe166caab5d61f1c5c66cc6521cd9de63f4ced25762
plexus/tracer-gui
gui.clj
(ns tracer-gui.gui (:gen-class :extends javafx.application.Application :name tracer-gui.FXApp) (:import java.lang.Throwable javafx.application.Platform javafx.beans.property.SimpleStringProperty javafx.beans.value.ChangeListener javafx.collections.FXCollections ...
null
https://raw.githubusercontent.com/plexus/tracer-gui/2c839c8ff92956266a66a091a4eb4aa745c24c89/src/tracer_gui/gui.clj
clojure
in hindsight maybe a SplitPane would be nicer
(ns tracer-gui.gui (:gen-class :extends javafx.application.Application :name tracer-gui.FXApp) (:import java.lang.Throwable javafx.application.Platform javafx.beans.property.SimpleStringProperty javafx.beans.value.ChangeListener javafx.collections.FXCollections ...
8d692004f8320949ba1f3b5f11819c6bd54cfab2f2e0fa559c344913d98f0c45
LeventErkok/sbvPlugin
T43.hs
{-# OPTIONS_GHC -fplugin=Data.SBV.Plugin #-} module T43 where import Data.SBV.Plugin s :: [Int] -> Int s [] = 0 s (x:xs) = x + s xs {-# ANN t theorem #-} t :: Int -> Bool t x = 3 * x == s lst where lst | x == 0 = [x, x, x] | True = [x, x, x] # ANN r theorem { options = [ IgnoreFailure ] } # r :: ...
null
https://raw.githubusercontent.com/LeventErkok/sbvPlugin/b6a6e94cd237a4f64f985783931bd7656e7a6a69/tests/T43.hs
haskell
# OPTIONS_GHC -fplugin=Data.SBV.Plugin # # ANN t theorem #
module T43 where import Data.SBV.Plugin s :: [Int] -> Int s [] = 0 s (x:xs) = x + s xs t :: Int -> Bool t x = 3 * x == s lst where lst | x == 0 = [x, x, x] | True = [x, x, x] # ANN r theorem { options = [ IgnoreFailure ] } # r :: Int -> Bool r x = 3 * x == s lst where lst | x == 0 = [x, x, x] ...
52b13329c9b7a93d56ac520b705622cffff5e7ba8aabf14124b4d0c5fba810cf
objecthub/swift-lispkit
SRFI-175.scm
SRFI 175 REGRESSION TEST SUITE ;;; This is the test suite for SRFI 175 . ;;; Copyright © 2019 . 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 with...
null
https://raw.githubusercontent.com/objecthub/swift-lispkit/a952f80bb85e6fd084770033141ed8edd2f46500/Sources/LispKit/Resources/Tests/SRFI-175.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation including without limitation the rights to use, copy, modify, merge, subject to the following conditions: The above copyright notice and this permission notice shall be EXPRESS OR IMPLIE...
SRFI 175 REGRESSION TEST SUITE This is the test suite for SRFI 175 . Copyright © 2019 . All rights reserved . files ( the " Software " ) , to deal in the Software without restriction , publish , distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is fu...
5bb6cc12fb7160fd9695f9bc6df58a5dedcb888d8d023e475ffaea3cf59327d0
lispnik/cl-http
types.lisp
;;; -*- mode: LISP; package: "XML-PARSER"; -*- ;;; " <DOCUMENTATION> <DESCRIPTION> </DESCRIPTION> <COPYRIGHT HREF='defsystem.lisp|root().descendant(1,COPYRIGHT)'/> <CHRONOLOGY> <DELTA><DATE>19971205</DATE> replaced keyword type tags with singletons (see tokens.html) they are instances, and thus unique, wh...
null
https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/contrib/janderson/xml-1999-05-03/types.lisp
lisp
-*- mode: LISP; package: "XML-PARSER"; -*-
" <DOCUMENTATION> <DESCRIPTION> </DESCRIPTION> <COPYRIGHT HREF='defsystem.lisp|root().descendant(1,COPYRIGHT)'/> <CHRONOLOGY> <DELTA><DATE>19971205</DATE> replaced keyword type tags with singletons (see tokens.html) they are instances, and thus unique, which the reader and parser uses as special tags.<...
51b18e98a63ad15b3b7731ba54ad632930e8f6a4bd3719ca956772b8d39927e2
mwm/xyzify
Test.hs
{-# LANGUAGE OverloadedStrings #-} module Test where import Prelude hiding (putStrLn, readFile) import Data.ByteString.Lazy.Char8 (readFile, pack, putStrLn, ByteString) import Data.ByteString.Base64.Lazy (decode) import System.IO (hPutStrLn, stderr) import GCode main :: IO () main = readFile "test.gcode" >>= either...
null
https://raw.githubusercontent.com/mwm/xyzify/932d3222939df6a9f9309fd4252df804725a1d14/Test.hs
haskell
# LANGUAGE OverloadedStrings #
module Test where import Prelude hiding (putStrLn, readFile) import Data.ByteString.Lazy.Char8 (readFile, pack, putStrLn, ByteString) import Data.ByteString.Base64.Lazy (decode) import System.IO (hPutStrLn, stderr) import GCode main :: IO () main = readFile "test.gcode" >>= either (hPutStrLn stderr) (either print p...
94d8aeb63dbf388023e927fa836bae63366cb6aae679583062261fbd7c6b4b84
aziem/binaryninja-ocaml
binaryninja.ml
open Ctypes open Foreign module B = Ffi_bindings.Bindings(Ffi_generated_types)(Ffi_generated) open Ffi_bindings open B module Log = Log module Symbol = Symbol module Platform = Platform module BinaryView = Binaryview module Architecture = Architecture module Function = Function module BasicBlock = Basicblock mod...
null
https://raw.githubusercontent.com/aziem/binaryninja-ocaml/5773d791ebb717816b8c47863bce8122f39764b4/lib/binaryninja.ml
ocaml
open Ctypes open Foreign module B = Ffi_bindings.Bindings(Ffi_generated_types)(Ffi_generated) open Ffi_bindings open B module Log = Log module Symbol = Symbol module Platform = Platform module BinaryView = Binaryview module Architecture = Architecture module Function = Function module BasicBlock = Basicblock mod...
4da2ea7d082493bab8309b8a57d2430d3b33771860d25b3550d301547d247f32
RedPRL/cooltt
CofBuilder.ml
open Basis module Make (Symbol : Symbol.S) = struct module CofVar = CofVar.Make(Symbol) module Dim = Dim.Make(Symbol) include Kado.Builder.Free.Make (struct type dim = Dim.t type var = CofVar.t let dim0 = Dim.dim0 let dim1 = Dim.dim1 let equal_dim = Dim.equal ...
null
https://raw.githubusercontent.com/RedPRL/cooltt/c4110a0f835056739dd2e15f57867d14efd14cd7/src/core/CofBuilder.ml
ocaml
open Basis module Make (Symbol : Symbol.S) = struct module CofVar = CofVar.Make(Symbol) module Dim = Dim.Make(Symbol) include Kado.Builder.Free.Make (struct type dim = Dim.t type var = CofVar.t let dim0 = Dim.dim0 let dim1 = Dim.dim1 let equal_dim = Dim.equal ...
18ad4af4174536d3a180310fc150ef8ba8a73e82c807abc963f9c7d9dba3cb0b
altenwald/eimap
eimap_uidset.erl
Copyright 2014 Kolab Systems AG ( ) %% ( Kolab Systems ) < seigo a kolabsys.com > %% %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation , either version 3 of the License , or %% (at ...
null
https://raw.githubusercontent.com/altenwald/eimap/cfa94c2e1303b240d8582b30546fd666a7ad128b/src/eimap_uidset.erl
erlang
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library Gener...
Copyright 2014 Kolab Systems AG ( ) ( Kolab Systems ) < seigo a kolabsys.com > it under the terms of the GNU Library 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 Library General Public License -module(...
fa88a9095895a031c736ce7efc902aa5e0a6e1a7668ac2ea4ffb605eaa620f9f
alesaccoia/festival_flinger
cmu_us_clb_phoneset.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Carnegie Mellon University ; ; ; and and ; ; ; Copyright ( c ) 1998 - 2000 ...
null
https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_clb_cg/festvox/cmu_us_clb_phoneset.scm
scheme
;;; ; ; ; ; ; ; ; ; ;;; Permission is hereby granted, free of charge, to use and distribute ;;; this software and its documentation without restriction, including ;;; withou...
Phonset for US English (require 'radio_phones) (define (cmu_us_clb::select_phoneset) "(cmu_us_clb::select_phoneset) Set up phone set for US English." (Parameter.set 'PhoneSet 'radio) (PhoneSet.select 'radio) ) (define (cmu_us_clb::reset_phoneset) "(cmu_us_clb::reset_phoneset) Reset phone set for US English...
f89415d941c3b6258cf9715479df12adef88144726f0d93fc568625a9dc7c93d
realworldocaml/book
rules.ml
open Import module Action_builder = Action_builder0 module Id = Id.Make () module Dir_rules = struct module Alias_spec = struct type item = | Deps of unit Action_builder.t | Action of Rule.Anonymous_action.t Action_builder.t type t = { expansions : (Loc.t * item) Appendable_list.t } [@@unboxed]...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_engine/rules.ml
ocaml
open Import module Action_builder = Action_builder0 module Id = Id.Make () module Dir_rules = struct module Alias_spec = struct type item = | Deps of unit Action_builder.t | Action of Rule.Anonymous_action.t Action_builder.t type t = { expansions : (Loc.t * item) Appendable_list.t } [@@unboxed]...
c25a528ce12f508e0b0c0c79fe1141de556ebd2293924a81147bf60ce3392c61
NorfairKing/intray
Store.hs
# LANGUAGE RecordWildCards # module Intray.Cli.Store ( prettyShowItemAndWait, ) where import qualified Data.ByteString as SB import qualified Data.Text as T import Data.Time import Database.Persist import Database.Persist.Sql import Import import Intray.API import Intray.Cli.DB import Intray.Cli.OptParse import N...
null
https://raw.githubusercontent.com/NorfairKing/intray/3335692a5445e86bf308420d4ab025d6ab11b10d/intray-cli/src/Intray/Cli/Store.hs
haskell
# LANGUAGE RecordWildCards # module Intray.Cli.Store ( prettyShowItemAndWait, ) where import qualified Data.ByteString as SB import qualified Data.Text as T import Data.Time import Database.Persist import Database.Persist.Sql import Import import Intray.API import Intray.Cli.DB import Intray.Cli.OptParse import N...
bb33036527df31e8a82b80b23a590e1bb1941fe7086920ea569fcc8328c71478
Gbury/dolmen
namespace.mli
(* This file is free software, part of dolmen. See file "LICENSE" for more information *) * { 2 Type and std functions } (* ************************************************************************* *) type value = | Integer * Integers ( in base 10 notation ) , e.g. [ " 123456789 " ] | Rational * Rational ( usi...
null
https://raw.githubusercontent.com/Gbury/dolmen/21bfd8d221b39dfd72a7938a09a6b2ae85b3c391/src/standard/namespace.mli
ocaml
This file is free software, part of dolmen. See file "LICENSE" for more information ************************************************************************* * Real (using decimal floating point notation with exponent), e.g. ["123.456e789"] * Bitvector in hexadecimal notation, e.g. ["0x9a23e5f"] * Bitvecto...
* { 2 Type and std functions } type value = | Integer * Integers ( in base 10 notation ) , e.g. [ " 123456789 " ] | Rational * Rational ( using quotient notation with ' / ' ) , e.g. [ " 123/456 " ] | Real | Binary * Bitvector in binary notation , e.g. [ " 0b011010111010 " ] | Hexadecimal | Bitvector |...
feaf26f12f71d773e70cc2197d36895e142ccc2436bf78628a482dcc591b2abd
LauraVoinea/protocol-reengineering-implementation
login_expected.erl
-module(login_expected). -behaviour(gen_statem). -define(SERVER, ?MODULE). -export([act_fail/1, act_ok/1, callback_mode/0, init/1, receive_pwd/1, start_link/0, state1/3, state2/3, stop/0, terminate/3]). start_link() -> gen_statem:start...
null
https://raw.githubusercontent.com/LauraVoinea/protocol-reengineering-implementation/23a8d99fe1663b249c4c46fdf03fd24cc01c060c/src/examples/service/login_expected.erl
erlang
assert n
-module(login_expected). -behaviour(gen_statem). -define(SERVER, ?MODULE). -export([act_fail/1, act_ok/1, callback_mode/0, init/1, receive_pwd/1, start_link/0, state1/3, state2/3, stop/0, terminate/3]). start_link() -> gen_statem:start...
6c36a26debadd6c9f83e15e70ac7cb98fbc81c90ac96b3b17e97776114740522
scrive/hpqtypes
Settings.hs
module Database.PostgreSQL.PQTypes.Transaction.Settings ( RestartPredicate(..) , TransactionSettings(..) , IsolationLevel(..) , Permissions(..) , defaultTransactionSettings ) where import qualified Control.Exception as E -- | Predicate that determines whether the transaction has to be restarted. data Re...
null
https://raw.githubusercontent.com/scrive/hpqtypes/5b652645d5fdebbec8dbd1a68583fbcb8dfe5d93/src/Database/PostgreSQL/PQTypes/Transaction/Settings.hs
haskell
| Predicate that determines whether the transaction has to be restarted. | If set to True, transaction will be automatically started at the beginning of database action and after each 'commit' / 'rollback'. If set to False, no transaction will automatically start in either of above cases. | Isolation level of al...
module Database.PostgreSQL.PQTypes.Transaction.Settings ( RestartPredicate(..) , TransactionSettings(..) , IsolationLevel(..) , Permissions(..) , defaultTransactionSettings ) where import qualified Control.Exception as E data RestartPredicate = forall e. E.Exception e => RestartPred...
3973db3de3bf02bc712539df2c9dfde6dbc77827673f76be808b069e81f9b061
softlab-ntua/bencherl
scheduling_multiple_coupled_erratic_actors_longer_test.erl
Copyright ( C ) 2008 - 2014 EDF R&D This file is part of Sim - Diasca . Sim - Diasca 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 ) a...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/sim-diasca/src/core/src/scheduling/tests/scheduling_multiple_coupled_erratic_actors_longer_test.erl
erlang
it under the terms of the GNU Lesser General Public License as but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the If not, see </>. Overall unit test of the Sim-Diasca deployment and scheduling framework. overall behaviour they are expected ...
Copyright ( C ) 2008 - 2014 EDF R&D This file is part of Sim - Diasca . Sim - Diasca is free software : you can redistribute it and/or modify published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . Sim - Diasca is distributed in the hope tha...
297f1cac556a37acd7cfd68fc55c80c8d4c0a96552c1f80915a228349beb1eb1
myaosato/clcm
list-item.lisp
(defpackage :clcm/nodes/list-item (:use :cl :clcm/utils :clcm/line :clcm/node) (:import-from :cl-ppcre :scan) (:export :list-item-node :offset :parent-is-tight :attach-list-item!)) (in-package :clcm/nodes/list-item) (defclass list-item-node...
null
https://raw.githubusercontent.com/myaosato/clcm/fd0390bedf00c5be3f5c2eb8176ff73bede797b0/src/nodes/list-item.lisp
lisp
(defpackage :clcm/nodes/list-item (:use :cl :clcm/utils :clcm/line :clcm/node) (:import-from :cl-ppcre :scan) (:export :list-item-node :offset :parent-is-tight :attach-list-item!)) (in-package :clcm/nodes/list-item) (defclass list-item-node...
4a1d25706e876abf4f3dfe117b93ed681ac2764d47818b6f140b8eae6e0eb014
haskell/aeson
JsonBench.hs
# LANGUAGE CPP # {-# LANGUAGE BangPatterns #-} # LANGUAGE MagicHash # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # -- Adapted from a buffer-builder benchmark: -- -builder/blob/master/test.json module Compare.JsonBench (benchmarks) wh...
null
https://raw.githubusercontent.com/haskell/aeson/78c2338c20d31ba5dd46036d10d6c4815c12185d/benchmarks/bench/Compare/JsonBench.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # Adapted from a buffer-builder benchmark: UTCTime? - Aeson instances --- - BufferBuilder instances --- -- json-builder instances ----
# LANGUAGE CPP # # LANGUAGE MagicHash # # LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # -builder/blob/master/test.json module Compare.JsonBench (benchmarks) where import Prelude.Compat hiding ((<>)) import Bench import Control.DeepSeq (NFData(..)) import Data.Aeson ((....
01088f38ecf410727a6bbe8e1f4ad7010e0323e8677fb05c6c0cf36f75020bd0
ocaml-flambda/ocaml-jst
iarrayLabels.mli
(* CR aspectorzabusky: This needs a copyright header; should I copy [arrayLabels.mli]? *) open! Stdlib (* NOTE: If this file is iarrayLabels.mli, run tools/sync_stdlib_docs after editing it to generate iarray.mli. If this file is iarray.mli, do not edit it directly -- edit iarrayLabels.mli instead. *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/b0a649516b33b83b7290c6fa5d7cb4c8c343df8c/stdlib/iarrayLabels.mli
ocaml
CR aspectorzabusky: This needs a copyright header; should I copy [arrayLabels.mli]? NOTE: If this file is iarrayLabels.mli, run tools/sync_stdlib_docs after editing it to generate iarray.mli. If this file is iarray.mli, do not edit it directly -- edit iarrayLabels.mli instead. If you update any types...
open! Stdlib type +'a t = 'a iarray external length : 'a iarray -> int = "%array_length" external get : 'a iarray -> int -> 'a = "%array_safe_get" * [ get a n ] returns the element number [ n ] of immutable array [ a ] . The first element has number 0 . The last element has number [ length a - 1 ] . ...
ca257992fb03512bc36617d0dc5038feb501e7d3e286b606a197b8b4102a093d
Decentralized-Pictures/T4L3NT
time_ppx.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs , < > (* ...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/lib_time_measurement/ppx/time_ppx.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs , < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...
8adf198418c223a5f8ebec23edb00836e1174d7e080a2377682d2baeb5cd81fa
cushon/project-euler
73.rkt
#lang racket Find the number of fractions between 1/3 and 1/2 in the set of reduced proper fractions n / d where n < d , d < = 12000 . (define (solve) (define (h den num seen) (if (> num (add1 (quotient den 2))) seen (h den (add1 num) (if (and (= (gcd den num) 1) ...
null
https://raw.githubusercontent.com/cushon/project-euler/d7fcbfff0cd59b2c3691293ff35bb2043b409f68/73.rkt
racket
#lang racket Find the number of fractions between 1/3 and 1/2 in the set of reduced proper fractions n / d where n < d , d < = 12000 . (define (solve) (define (h den num seen) (if (> num (add1 (quotient den 2))) seen (h den (add1 num) (if (and (= (gcd den num) 1) ...
5af68c14f3c5d0431d5c98b9f117ba9b63c9d33461925b8c2cfd4361984ad79e
typeclasses/dsv
FileFoldCsv.hs
# OPTIONS_GHC -fno - warn - unused - imports # # LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # module DSV.FileFoldCsv ( foldCsvFileWithoutHeader, foldCsvFileWithoutHeaderM , foldCsvFileIgnoringHeader, foldCsvFileIgnoringHeaderM , foldCsvFileWithZippedHeader, foldCsvFileWithZippedHeaderM ) wher...
null
https://raw.githubusercontent.com/typeclasses/dsv/ae4eb823e27e4c569c4f9b097441985cf865fbab/dsv/library/DSV/FileFoldCsv.hs
haskell
base bytestring foldl ^ The path of a CSV file to read ^ What to do with each row ^ The path of a CSV file to read ^ What to do with each row ^ The path of a CSV file to read ^ What to do with each row ^ The path of a CSV file to read ^ What to do with each row ^ The path of a CSV file to read ^ What to do...
# OPTIONS_GHC -fno - warn - unused - imports # # LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # module DSV.FileFoldCsv ( foldCsvFileWithoutHeader, foldCsvFileWithoutHeaderM , foldCsvFileIgnoringHeader, foldCsvFileIgnoringHeaderM , foldCsvFileWithZippedHeader, foldCsvFileWithZippedHeaderM ) wher...
8bafd6ed4d6f28a6ef3176f850162f14abdd652807dcc41d2f5b48ea7381621c
erlang/corba
orber_interceptors.erl
%%-------------------------------------------------------------------- %% %% %CopyrightBegin% %% Copyright Ericsson AB 1999 - 2016 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain ...
null
https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/orber/src/orber_interceptors.erl
erlang
-------------------------------------------------------------------- %CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY...
Copyright Ericsson AB 1999 - 2016 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(orber_interceptors). -include_lib("orber/include/corba.hrl"). -export([call_send_message_interceptors/2, ca...
4b493c3a779adb523066e6288a12a93554cad886122e64199f5b61be87cd2726
f-o-a-m/kepler
Messages.hs
module Nameservice.Modules.Nameservice.Messages ( SetNameMsg(..) , BuyNameMsg(..) , DeleteNameMsg(..) , FaucetAccountMsg(..) , BuyNameMessage(..) ) where import Data.Bifunctor (bimap, first) import Data.Foldable (sequenceA_) import Data.String.Conv...
null
https://raw.githubusercontent.com/f-o-a-m/kepler/6c1ad7f37683f509c2f1660e3561062307d3056b/hs-abci-docs/nameservice/src/Nameservice/Modules/Nameservice/Messages.hs
haskell
@NOTE: .proto genration will use these type names as is only field names stripped of prefixes during generation ------------------------------------------------------------------------------ TL;DR. ValidateBasic: -name.html#msg ------------------------------------------------------------------------------ ----------...
module Nameservice.Modules.Nameservice.Messages ( SetNameMsg(..) , BuyNameMsg(..) , DeleteNameMsg(..) , FaucetAccountMsg(..) , BuyNameMessage(..) ) where import Data.Bifunctor (bimap, first) import Data.Foldable (sequenceA_) import Data.String.Conv...
7b86173bfe67238da4a66955a26a3db681b04a9bd8f0d2540e85fa97382de074
Hexstream/definitions-systems
expansion.lisp
(in-package #:definitions-systems) (defun %maybe-find-class (class-designator) (when class-designator (find-class class-designator))) (defclass defsys:default-definition-class-mixin (defsys:system) ((%default-definition-class :initarg :default-definition-class :type (or null clas...
null
https://raw.githubusercontent.com/Hexstream/definitions-systems/03ef8090479f65f96017319a65fb2d7afe031de5/expansion.lisp
lisp
(in-package #:definitions-systems) (defun %maybe-find-class (class-designator) (when class-designator (find-class class-designator))) (defclass defsys:default-definition-class-mixin (defsys:system) ((%default-definition-class :initarg :default-definition-class :type (or null clas...
75f6afb201bf5b43aa2c2196dc747c68f44b6175845397c87272eb16df9924a9
fetburner/compelib
pUnionFind.ml
module F (Elt : sig type t val compare : t -> t -> int end) (Map : sig type key = Elt.t type size type 'a t val make : size -> 'a t val find : key -> 'a t -> 'a val add : key -> 'a -> 'a t -> 'a t end) = struct type node = Leaf of int | Link of Elt.t type elt = Elt.t type ...
null
https://raw.githubusercontent.com/fetburner/compelib/d8fc5d9acd04e676c4d4d2ca9c6a7140f1b85670/lib/container/pUnionFind.ml
ocaml
module F (Elt : sig type t val compare : t -> t -> int end) (Map : sig type key = Elt.t type size type 'a t val make : size -> 'a t val find : key -> 'a t -> 'a val add : key -> 'a -> 'a t -> 'a t end) = struct type node = Leaf of int | Link of Elt.t type elt = Elt.t type ...
d39d98705d5a86ee97a4329ef72978b87db1b9cc60d4cb64ef3cae1cfdd2cb88
Lucccyo/chabyrinthe
_maze.mli
type cell = {we: bool; ws: bool} type wall = {x:int; y: int; e_or_s: bool} val display : cell array -> unit val maze : unit -> unit
null
https://raw.githubusercontent.com/Lucccyo/chabyrinthe/f19cf8dffef43463baf4005b513eccf062047346/randomized_prim/_maze.mli
ocaml
type cell = {we: bool; ws: bool} type wall = {x:int; y: int; e_or_s: bool} val display : cell array -> unit val maze : unit -> unit
9b409a06d3aa38dfe1b3a7dca2aa70311a8c6f8737564054357bc29da17b450d
mjambon/mikmatch
test.ml
open Printf (* Definition of regular expressions for further use *) RE space = [' ' '\t' '\n' '\r'] RE not_space = _ # space RE digit = ['0'-'9'] RE letter = ['A'-'Z' '_' 'a'-'z'] RE word = letter+ (* (* Inclusion of file in the same syntax, e.g. a library of user-defined regular expressions. (known problem with e...
null
https://raw.githubusercontent.com/mjambon/mikmatch/4ee0d1158370be247763027018bbf54b865014dd/pcre/test.ml
ocaml
Definition of regular expressions for further use (* Inclusion of file in the same syntax, e.g. a library of user-defined regular expressions. (known problem with error location) defines `word' and `digit' Extended pattern-matching in the following constructs: match ... with ... try ... with ... func...
open Printf RE space = [' ' '\t' '\n' '\r'] RE not_space = _ # space RE digit = ['0'-'9'] RE letter = ['A'-'Z' '_' 'a'-'z'] RE word = letter+ *) let _ = match Stream.of_list [] with parser [< >] -> () let test expected a b c = printf "[case %i] " expected; flush stdout; (match a, b, c with None, (Non...
027cb2eb0a0b9c0814d97e705ea808bc3da87e29b3f6a21c0209cbf64e71386a
imteekay/functional-programming-learning-path
update_list.clj
;; -update-list/problem (defn to-absolute [n] (if (neg? n) (+ (* n -2) n) n)) (defn add-element-from-list-to-list [lst1 lst2] (conj lst2 (to-absolute (first lst1)))) (defn update-list [lst] (loop [original-list lst absolute-list []] (if (empty? original-list) absolute-list (recur ...
null
https://raw.githubusercontent.com/imteekay/functional-programming-learning-path/07dac09c9fabfa54f8b4d80b62f43b092cb87b0d/programming_challenges/hacker_rank/update_list/update_list.clj
clojure
-update-list/problem
(defn to-absolute [n] (if (neg? n) (+ (* n -2) n) n)) (defn add-element-from-list-to-list [lst1 lst2] (conj lst2 (to-absolute (first lst1)))) (defn update-list [lst] (loop [original-list lst absolute-list []] (if (empty? original-list) absolute-list (recur (rest original-li...
7e1d6a25ce3cd184150f3a76f3c0d1c554f898623855ac0597457083376e049b
zinid/delimcc
paper_example.ml
(* Example in the paper *) open Delimcc;; (* A finite map: a search tree *) type ('k, 'v) tree = | Empty | Node of ('k, 'v) tree * 'k * 'v * ('k, 'v) tree ;; exception NotFound ;; (* Update the value associated with the key k by applying the update function f. Return the new tree. If the key is not found,...
null
https://raw.githubusercontent.com/zinid/delimcc/93ffd621051858e9fefdbeffd86a6112063a436a/paper_example.ml
ocaml
Example in the paper A finite map: a search tree Update the value associated with the key k by applying the update function f. Return the new tree. If the key is not found, throw an exception. Add to the tree the association of the key k to the value v, overriding any existing association with the key k...
open Delimcc;; type ('k, 'v) tree = | Empty | Node of ('k, 'v) tree * 'k * 'v * ('k, 'v) tree ;; exception NotFound ;; let rec update1 : 'k -> ('v->'v) -> ('k,'v) tree -> ('k,'v) tree = fun k f -> let rec loop = function | Empty -> raise NotFound | Node (l,k1,v1,r) -> begin match compare k k...
aa73ece63b7c2e8d96f0d42dc115e0a6554880c128481705d0e79a8809f8a994
sulami/spielwiese
011-largest-product-in-a-grid.hs
-- Largest product in a grid Problem 11 -- In the 20×20 grid below , four numbers along a diagonal line have been marked -- in red. -- The product of these numbers is 26 × 63 × 78 × 14 = 1788696 . -- What is the greatest product of four adjacent numbers in the same direction ( up , down , left , right , or di...
null
https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/hEuler/011-largest-product-in-a-grid.hs
haskell
Largest product in a grid in red. # OPTIONS_GHC -O2 #
Problem 11 In the 20×20 grid below , four numbers along a diagonal line have been marked The product of these numbers is 26 × 63 × 78 × 14 = 1788696 . What is the greatest product of four adjacent numbers in the same direction ( up , down , left , right , or diagonally ) in the 20×20 grid ? input = [ [08,...
63b245ca3f82e112adbc08f43869e328b6c5ad594dade3a215c5cf506c134cdf
codinuum/cca
v_label.ml
Copyright 2012 - 2022 Codinuum Software Lab < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in wri...
null
https://raw.githubusercontent.com/codinuum/cca/3d97b64a5c23ff97c08455ac604ccb9fed471d91/src/ast/analyzing/langs/verilog/v_label.ml
ocaml
verilog/label.ml let ident_attr_name = "ident" let label_attr_name = "label" let value_attr_name = "value" let path_attr_name = "path" let spec_attr_name = "spec" let strlit_to_encoded_path s = XML.encode_string (Astml.str_lit_to_path s) of module IncOrDecOperator of module TimingCheck of module Statement ...
Copyright 2012 - 2022 Codinuum Software Lab < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in wri...
e95de0783a750f8a96f1cf29c68b91ac1c5a9574f521cd638e5159e41134f035
sulami/spielwiese
testSim.hs
module Main where import Sim main = do let conf = Config 20000 0.2 0.1 let base = [("Height", return 100), ("Weight", return 80)] let test = (\_ -> 1) let gen0 = evolution conf base printGen $ take 5 $ run conf gen0 test
null
https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/sim/testSim.hs
haskell
module Main where import Sim main = do let conf = Config 20000 0.2 0.1 let base = [("Height", return 100), ("Weight", return 80)] let test = (\_ -> 1) let gen0 = evolution conf base printGen $ take 5 $ run conf gen0 test
4b3e9710ebd8c730fb43dbe38264f0503fc75dbbb6dca546f301ac26fa99f01c
stchang/mlish
issue004.rkt
#lang mlish (require rackunit/turnstile) ;; example from jsmaniac (define (f [x : X] [g : (→ X Y)] -> Y) (g x)) ;; make sure errs prints instantiated types (typecheck-fail (ann (λ ([a : Int]) (f a number->string)) : Int) #:with-msg "type mismatch: expected Int, given \\(→ Int String\\)") ;; make sure errs prin...
null
https://raw.githubusercontent.com/stchang/mlish/1c79d71b686fc734b7994eb9d412f84d518a64b1/mlish-test/tests/mlish/issues/issue004.rkt
racket
example from jsmaniac make sure errs prints instantiated types make sure errs prints instantiated types
#lang mlish (require rackunit/turnstile) (define (f [x : X] [g : (→ X Y)] -> Y) (g x)) (typecheck-fail (ann (λ ([a : Int]) (f a number->string)) : Int) #:with-msg "type mismatch: expected Int, given \\(→ Int String\\)") (typecheck-fail (add1 (λ ([a : Int]) (f a number->string))) #:with-msg "couldn't unify ...
ba0fa4198222225e72308137b4aaaba8d1be79af8218a9993361a570d70feee6
AndrasKovacs/setoidtt
FlatParseIOIndent.hs
module Old.FlatParseIOIndent where import qualified Control.Exception import qualified Data.ByteString as B import qualified Data.ByteString.Unsafe as B import Data.Bits import Data.Char (ord) import Data.Foldable import Data.Word import GHC.Exts import GHC.Types import GHC.Word import GHC.Stack import Language.Hask...
null
https://raw.githubusercontent.com/AndrasKovacs/setoidtt/621aef2c4ae5a6acb418fa1153575b21e2dc48d2/setoidtt/flatparse/Old/FlatParseIOIndent.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ # complete OK#, Fail# # # inline (<$) # # inline empty # # inline pure # # inline (<*>) # # inline (<*) # # inline (*>) # # inline return # # inline (>>=) # # inl...
module Old.FlatParseIOIndent where import qualified Control.Exception import qualified Data.ByteString as B import qualified Data.ByteString.Unsafe as B import Data.Bits import Data.Char (ord) import Data.Foldable import Data.Word import GHC.Exts import GHC.Types import GHC.Word import GHC.Stack import Language.Hask...
1ee3c7fae43d3f40ace112472c993efa91a21e2c5680286087354bdca3fbe2ed
webyrd/probKanren
rewrite.scm
WELCOME TO RISEUP'S ETHERPAD! WARNING: this pad is accessible by anyone who has the address to this pad, if you used an obvious name for the pad, it could be guessed. WARNING: This pad will be DELETED if 30 days go by with no edits. There is NO WAY to recover the pad after this happens, so be careful! Riseup ...
null
https://raw.githubusercontent.com/webyrd/probKanren/00cd62c8211a8a210099c36be961b8927b298ce8/attic/rewrite.scm
scheme
Mixture model Traditional style Geometric model turn this into this or the equivalent program body more program body query variable conditioning empty constraint store empty constraint store empty constraint store Here's what Will is supposed to implement: (() () ()) ; empty (() () ((flip x b . (lambda (...
WELCOME TO RISEUP'S ETHERPAD! WARNING: this pad is accessible by anyone who has the address to this pad, if you used an obvious name for the pad, it could be guessed. WARNING: This pad will be DELETED if 30 days go by with no edits. There is NO WAY to recover the pad after this happens, so be careful! Riseup ...
692a87e0baab09eefef7c800a291fe8664435bda05a8f9aa55c907610d961005
danr/hipspec
IWC.hs
-- Examples from -- /~lad/research/challenges module IWC where import Hip.Prelude hiding (choose) import Prelude(Bool(..)) data Nat = S Nat | Z otherwise = True len [] = Z len (x:xs) = S (len xs) even Z = True even (S Z) = False even (S (S x)) = even x [] `app` ys = ys (x:xs) `app` ys = x : (xs `app` ys) pr...
null
https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/examples/old-examples/hip/IWC.hs
haskell
Examples from /~lad/research/challenges
module IWC where import Hip.Prelude hiding (choose) import Prelude(Bool(..)) data Nat = S Nat | Z otherwise = True len [] = Z len (x:xs) = S (len xs) even Z = True even (S Z) = False even (S (S x)) = even x [] `app` ys = ys (x:xs) `app` ys = x : (xs `app` ys) prop_evenLengthAppend :: [a] -> [a] -> Prop Bool...
c808684d41230908c3f87ff46f58b200f0617d7f63d3278f6ac4d467a98b38cb
fourmolu/fourmolu
output-HaddockMultiLine-module=HaddockMultiLineCompact.hs
{-| This is a test multiline module haddock -} module Foo where -- | This is a singleline function haddock single1 :: Int -- | This is a singleline function haddock single2 :: Int {- | This is a multiline function haddock -} multi1 :: Int {- | This is a multiline function haddock -} multi2 :: Int {- | This is a mu...
null
https://raw.githubusercontent.com/fourmolu/fourmolu/97eb9e20ca4267803b32d63d43177e2749253022/data/fourmolu/haddock-style/output-HaddockMultiLine-module%3DHaddockMultiLineCompact.hs
haskell
| This is a test multiline module haddock | This is a singleline function haddock | This is a singleline function haddock | This is a multiline function haddock | This is a multiline function haddock | This is a multiline haddock with indentation
module Foo where single1 :: Int single2 :: Int multi1 :: Int multi2 :: Int multi_indentation :: Int | This is a haddock with two consecutive newlines with two consecutive newlines -} foo :: Int foo = 42 | This is a haddock containing another haddock > { \- # LANGUAGE ScopedTypeVariables # -\...
69a5ea8de41f39ad2c456fb393eb6f395230d2ffa3ecf55fad06ba3ab1cd5d6d
charlieg/Sparser
asdf.lisp
This is asdf : Another System Definition Facility . $ Revision : 1.107 $ ;;; ;;; Feedback, bug reports, and patches are all welcome: please mail to < > . But note first that the canonical ;;; source for asdf is presently the cCLan CVS repository at ;;; <URL:-bin/viewcvs.cgi/cclan/asdf/> ;;; ;;; If you obtained...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/util/asdf.lisp
lisp
Feedback, bug reports, and patches are all welcome: please mail to source for asdf is presently the cCLan CVS repository at <URL:-bin/viewcvs.cgi/cclan/asdf/> If you obtained this copy from anywhere else, and you experience trouble using it, or find bugs, you may want to check at the location above for a more r...
This is asdf : Another System Definition Facility . $ Revision : 1.107 $ < > . But note first that the canonical bugs . There are usually two " supported " revisions - the CVS HEAD Copyright ( c ) 2001 - 2007 and contributors " Software " ) , to deal in the Software without restriction , including ...
b4d30c31595c5b7e3c87335dfd32f54ca57da7a62d49bbaa73bd56c7374d0e52
w3ntao/programming-in-haskell
Exercise_8_9_5.hs
# OPTIONS_GHC -Wall # module Exercise_8_9_5 where data Expr = Val Int | Add Expr Expr folde :: (Int -> a) -> (a -> a -> a) -> Expr -> a folde f _ (Val x) = f x folde f g (Add x y) = g (folde f g x) (folde f g y)
null
https://raw.githubusercontent.com/w3ntao/programming-in-haskell/c2769fa19d8507aad209818c83f67e82c3698f07/Chapter-8/Exercise_8_9_5.hs
haskell
# OPTIONS_GHC -Wall # module Exercise_8_9_5 where data Expr = Val Int | Add Expr Expr folde :: (Int -> a) -> (a -> a -> a) -> Expr -> a folde f _ (Val x) = f x folde f g (Add x y) = g (folde f g x) (folde f g y)
5ef9711f2329130ac94e83cf49c21a97920b2b09cba2be997e86359dabc73ced
dlebrero/kafka-consecutive-values
main.clj
(ns our-service.main (:require [clojure.tools.nrepl.server :as nrepl] [our-service.util :as k] [our-service.device-tracker :as kafka-streams] [our-service.fake-producer :as fake-producer] [ring.adapter.jetty :as jetty] [clojure.tools.logging :as log]) (:use ring.middleware.params) (:gen-cl...
null
https://raw.githubusercontent.com/dlebrero/kafka-consecutive-values/524c17b9bb01ef82af17f7a594ff6d26fd295ddc/our-service/src/our_service/main.clj
clojure
(ns our-service.main (:require [clojure.tools.nrepl.server :as nrepl] [our-service.util :as k] [our-service.device-tracker :as kafka-streams] [our-service.fake-producer :as fake-producer] [ring.adapter.jetty :as jetty] [clojure.tools.logging :as log]) (:use ring.middleware.params) (:gen-cl...
a12127ecde942cef667e8cf3aa4de390597fe40acf48d5f608483952cff8fde2
TheLortex/mirage-monorepo
ctypes_static.mli
* Copyright ( c ) 2013 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) C type construction . Int...
null
https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/ocaml-ctypes/src/ctypes/ctypes_static.mli
ocaml
* Copyright ( c ) 2013 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) C type construction . Int...
86d36b79dabd95ddb3ae782729d88cafa6c1b50d186b8019d2e44bd6f3bf2fed
mewhhaha/apecs-unity-tutorial-haskell
Game.hs
module Game where import Apecs qualified import Game.System.Draw qualified as Draw import Game.System.Input qualified as Input import Game.System.Logic qualified as Logic import Game.System.Overlay qualified as Overlay import Game.System.Setup qualified as Setup import Relude import SDL qualified import Types (Step, T...
null
https://raw.githubusercontent.com/mewhhaha/apecs-unity-tutorial-haskell/d995e5311210b4c186ededbd38c64f6861f5eae1/src/Game.hs
haskell
module Game where import Apecs qualified import Game.System.Draw qualified as Draw import Game.System.Input qualified as Input import Game.System.Logic qualified as Logic import Game.System.Overlay qualified as Overlay import Game.System.Setup qualified as Setup import Relude import SDL qualified import Types (Step, T...
7d2bc7061cccca59eb00046a5194fe758f26875b06ec41a7832f0d3f4610c576
willowtreeapps/wombats-api
python.clj
(ns wombats.game.dev-mode.python (:require [wombats.game.dev-mode.interpreter :as interpreter])) (defn handler "This evalutes the py bot code against the state given." [code state timeout] (let [script (str "import json, sys, time\n\n\n" "def timeout():\n" " return " ...
null
https://raw.githubusercontent.com/willowtreeapps/wombats-api/738e4cc8d7011998695ec85e663f650be71f60ae/src/wombats/game/dev_mode/python.clj
clojure
(ns wombats.game.dev-mode.python (:require [wombats.game.dev-mode.interpreter :as interpreter])) (defn handler "This evalutes the py bot code against the state given." [code state timeout] (let [script (str "import json, sys, time\n\n\n" "def timeout():\n" " return " ...
c760a8e4147f7379e5154869bf22f536da01091eea4d40814b63abe38a02d951
abyala/advent-2022-clojure
day07_eager.clj
(ns advent-2022-clojure.day07-eager (:require [clojure.string :as str])) (def root-path (list "/")) (def empty-directory {:size 0, :dirs ()}) (defn move-up [current-dir] (rest current-dir)) (defn move-down [current-dir sub-dir] (conj current-dir sub-dir)) (defn create-directory [state current-dir dir-name] ...
null
https://raw.githubusercontent.com/abyala/advent-2022-clojure/b563a601c78c69deebc12c0183463623900496ad/src/advent_2022_clojure/day07_eager.clj
clojure
(ns advent-2022-clojure.day07-eager (:require [clojure.string :as str])) (def root-path (list "/")) (def empty-directory {:size 0, :dirs ()}) (defn move-up [current-dir] (rest current-dir)) (defn move-down [current-dir sub-dir] (conj current-dir sub-dir)) (defn create-directory [state current-dir dir-name] ...
e11d03fa5b600f2e4f7cbe8e287d9389c13ad79b5150181cb079f92b1c0c3c69
saleyn/util
listx.erl
%%%----------------------------------------------------------------------------- %%% @doc Miscelaneous list functions @author < > %%% @end %%%----------------------------------------------------------------------------- Copyright ( c ) 2015 %%% %%% Permission is hereby granted, free of charge, to any person %%...
null
https://raw.githubusercontent.com/saleyn/util/ce57a21a6aebe19e663aafa0f67f17933435c470/src/listx.erl
erlang
----------------------------------------------------------------------------- @doc Miscelaneous list functions @end ----------------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentatio...
@author < > Copyright ( c ) 2015 files ( the " Software " ) , to deal in the Software without restriction , publish , distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do in all copies or substantial portions of the Software . TH...
39f5e15bb665b6f57911671e8726f466d226b77b86aabce68ec4c735a77cc184
andreas/ocaml-graphql-server
introspection_test.ml
open Graphql let test_query schema query = Test_common.test_query schema () query let suite = [ ( "__schema: not deprecated", `Quick, fun () -> let schema = Schema.( schema [ field "not-deprecated" ~deprecated:NotDeprecated ~typ:string ...
null
https://raw.githubusercontent.com/andreas/ocaml-graphql-server/d615cbb164d4ddfdc2efeb246a198dfe114adf24/graphql/test/introspection_test.ml
ocaml
open Graphql let test_query schema query = Test_common.test_query schema () query let suite = [ ( "__schema: not deprecated", `Quick, fun () -> let schema = Schema.( schema [ field "not-deprecated" ~deprecated:NotDeprecated ~typ:string ...
b20408ab9a29442d2a7726019f18a46e84d6d681910810b1faad36e82d3ebc15
facebookarchive/duckling_old
finance.clj
( "intersect" ; [(dim :amount-of-money) (dim :number)] (compose-money %1 %2) ; #(not (:number-prefixed %) "$" #"\$|dolar?" {:dim :unit :unit "$"} ; ambiguous "€" #"(?i)€|([e€]uro?s?)" {:dim :unit :unit "EUR"} ; not ambiguous "£" #"(?i)£|pound(sterling)?" {:dim :unit :unit "£"} "USD" #"(?i)US[D\$]" {:dim :uni...
null
https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/id/rules/finance.clj
clojure
#(not (:number-prefixed %) ambiguous not ambiguous
( [(dim :amount-of-money) (dim :number)] (compose-money %1 %2) "$" #"\$|dolar?" {:dim :unit "€" #"(?i)€|([e€]uro?s?)" {:dim :unit "£" #"(?i)£|pound(sterling)?" {:dim :unit :unit "£"} "USD" #"(?i)US[D\$]" {:dim :unit :unit "USD"} "SGD" #"(?i)SG[D\$]" {:dim :unit :unit "SGD"} "GBP" #"(?i)GBP" {:dim :unit :u...
fbd66d4ffc1f8eeddc51fe7126f88cfa699138cc9aa9e94df3c5c9ea026ac57c
SmallImprovements/spring-clean
Imports.hs
module Java.Imports ( getImports, getImportsNonQualified ) where import Language.Java.Syntax import Data.List (isPrefixOf) import Java.Helper (concatIdent) getImports :: CompilationUnit -> [String] getImports (CompilationUnit _ imports _) = getImportsFromAst imports where getImportsFromAst = map getImportDeclNa...
null
https://raw.githubusercontent.com/SmallImprovements/spring-clean/000b10dcb570847d60fed3eb4539781ab20ae5b5/src/Java/Imports.hs
haskell
module Java.Imports ( getImports, getImportsNonQualified ) where import Language.Java.Syntax import Data.List (isPrefixOf) import Java.Helper (concatIdent) getImports :: CompilationUnit -> [String] getImports (CompilationUnit _ imports _) = getImportsFromAst imports where getImportsFromAst = map getImportDeclNa...
958dd6324abb09b9f56acd336dfd44d9c4392d95b24681b149fcf0cceb503a02
ocsigen/js_of_ocaml
jsooTopError.ml
Js_of_ocaml library * / * Copyright ( C ) 2017 Hugo Heuzard * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the...
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/e451f5b70125f72a20597898a086ce45626a837d/toplevel/lib/jsooTopError.ml
ocaml
Js_of_ocaml library * / * Copyright ( C ) 2017 Hugo Heuzard * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the...
88aa4b207f2720892789f5849c4bcd21cda8146b6174b68cc341b8b2ddc5aa3f
BradWBeer/clinch
mesh.lisp
;; This is working file as I test features...please don't use. Use tutorial05 instead. (ql:quickload :clinch) (ql:quickload :clinch-freeimage) (ql:quickload :clinch-classimp) (use-package :clinch) (trace classimp::make-classimp-entity) ( defparameter scene - path " /home / warweasle / work / tools / assimp...
null
https://raw.githubusercontent.com/BradWBeer/clinch/421de1e4844a5142e37cb06805bc2d9d13ba048f/examples/animation/mesh.lisp
lisp
This is working file as I test features...please don't use. Use tutorial05 instead. Enable a few opengl features. Set the blending mode. run init once render (clinch:render entity :projection *projection*) (format t "win: ~A mouse: ~A x: ~A y: ~A button: ~A state: ~A clicks: ~A ts: ~A~%" win mouse x y button st...
(ql:quickload :clinch) (ql:quickload :clinch-freeimage) (ql:quickload :clinch-classimp) (use-package :clinch) (trace classimp::make-classimp-entity) ( defparameter scene - path " /home / warweasle / work / tools / assimp / test / models / X / test_cube_compressed.x " ) (defparameter scene-path (asdf:syst...
a9de499114f3c6ee8f33d4b061da8b36b7e100f45a61bdd9e5228d2d2a744f1f
kazu-yamamoto/http2
Integer.hs
{-# LANGUAGE OverloadedStrings #-} module Network.HPACK.HeaderBlock.Integer ( encodeI , encodeInteger , decodeI , decodeInteger ) where import Data.Array (Array, listArray) import Data.Array.Base (unsafeAt) import Network.ByteOrder import Imports -- $setup > > > import qualified Data . ByteString as B...
null
https://raw.githubusercontent.com/kazu-yamamoto/http2/3c29763be147a3d482eff28f427ad80f1d4df706/Network/HPACK/HeaderBlock/Integer.hs
haskell
# LANGUAGE OverloadedStrings # $setup -------------------------------------------------------------- No prefix is set. >>> BS.unpack <$> encodeInteger 5 10 ^ N+ ^ Target | Integer encoding with a write buffer. ^ Setting prefix ^ N+ ^ Target -------------------------------------------------------------- ^...
module Network.HPACK.HeaderBlock.Integer ( encodeI , encodeInteger , decodeI , decodeInteger ) where import Data.Array (Array, listArray) import Data.Array.Base (unsafeAt) import Network.ByteOrder import Imports > > > import qualified Data . ByteString as BS powerArray :: Array Int Int powerArray = l...
dd8cf344d8c0439e0fdd08e4ef7ccfad8142d6202b43bae75eb12762b023ee67
Holmusk/elm-street
Main.hs
module Main (main) where import Network.Wai.Handler.Warp (run) import Api (app) main :: IO () main = run 8080 app
null
https://raw.githubusercontent.com/Holmusk/elm-street/9aa15b26aff53a56147a62adb2179f714f684dc9/backend/Main.hs
haskell
module Main (main) where import Network.Wai.Handler.Warp (run) import Api (app) main :: IO () main = run 8080 app
e9e3ffdb23372fc4b1c38e04bb55e60757bccca9d0e52e2f7fe88cdf419cb8f6
GrammaTech/sel
004-evolve.lisp
(defpackage :example (:use :gt/full :software-evolution-library :software-evolution-library/software/asm)) (in-package :example) (defparameter *orig* (from-file (make-instance 'asm) (make-pathname :name "gcd" :type "s" :directory ...
null
https://raw.githubusercontent.com/GrammaTech/sel/a59174c02a454e8d588614e221cf281260cf12f8/doc/examples/004-evolve.lisp
lisp
Build executable Collect list of T/NIL indicating if the exit code was 0. Tests whose exit code is 0 are considered successful. Set the fitness of `*orig*' before creating the *population*. `evolve' assumes that all variants have an initialized, non-NIL fitness When *target-fitness-p* evaluates to T, evolution wi...
(defpackage :example (:use :gt/full :software-evolution-library :software-evolution-library/software/asm)) (in-package :example) (defparameter *orig* (from-file (make-instance 'asm) (make-pathname :name "gcd" :type "s" :directory ...
293c26ad0016d5d4ca9fe73a843c3c90903ca76fd943672c7a1555ab4572922b
clojure/clojurescript
dom.cljs
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;; ...
null
https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/main/cljs/clojure/browser/dom.cljs
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software....
Copyright ( c ) . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns clojure.browser.dom (:require [goog.dom :as gdom] [goog.object :as gobject])) (defn append [parent & children] (apply gdom/append parent children) parent) (defprotocol DOMBuilder (-element [this] [this att...
a85c1ad93472e81f58ca30c88b9d339e0ad09e578020677592a1e952e0153581
fhur/eaml
style.clj
(ns eaml.transpile.style (:require [eaml.util :refer :all] [eaml.error :refer :all] [eaml.scope :refer [resolve-expr]])) (defn- mk-item [scope {name :name value :value}] [:item {:name name} (resolve-expr :any value scope)]) (defn- mk-style-res [scope id parent? attrs] (let [style-att...
null
https://raw.githubusercontent.com/fhur/eaml/ee398417d4ec76966f3b88b61ffc9332741eeb28/src/eaml/transpile/style.clj
clojure
if there are no attrs, return an empty style obtain a list of all configurations iterate over all configs and construct for the attrs that should be rendered in that config
(ns eaml.transpile.style (:require [eaml.util :refer :all] [eaml.error :refer :all] [eaml.scope :refer [resolve-expr]])) (defn- mk-item [scope {name :name value :value}] [:item {:name name} (resolve-expr :any value scope)]) (defn- mk-style-res [scope id parent? attrs] (let [style-att...
59db4274204f5404c4d81759edac11638e167ef83d2d2aec3c6e3f04560f6993
LexiFi/dead_code_analyzer
foo.mli
val x: int val y: int
null
https://raw.githubusercontent.com/LexiFi/dead_code_analyzer/c44dc2ea5ccb13df2145e9316e21c39f09dad506/examples/foo.mli
ocaml
val x: int val y: int
fa1515fcc052298d51644e6b20bbb2e69f4d3986938efbc7cfb139c8e40a369b
bertschi/ProbClojureNice
test_deps.clj
Copyright ( C ) 2011 ;;; This file is part of Probabilistic-Clojure ;;; Probabilistic-Clojure 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 o...
null
https://raw.githubusercontent.com/bertschi/ProbClojureNice/3b4aa80f2d66d274e4f06c1e46fc62e0dac07606/src/probabilistic_clojure/embedded/test_deps.clj
clojure
This file is part of Probabilistic-Clojure Probabilistic-Clojure is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by (at your option) any later version. Probabilistic-Clojure is distributed in the hope that it will be useful, but WITH...
Copyright ( C ) 2011 the Free Software Foundation , either version 3 of the License , or GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License (ns ^{:author "Nils Bertschinger" :doc "Tests for probabilistic-clojure.embedded...
29014235f8d2ec99c649a66a0f1b0c0e8eda5e975f60cf5f9b044595c38e5de3
vlstill/hsExprTest
anno-1.q.hs
import Test.Expr import Test.QuickCheck.Modifiers expr = "f" f :: Integral a => (a `TestAs` Positive a) -> Bool f _ = True
null
https://raw.githubusercontent.com/vlstill/hsExprTest/391fc823c1684ec248ac8f76412fefeffb791865/examples/anno-1.q.hs
haskell
import Test.Expr import Test.QuickCheck.Modifiers expr = "f" f :: Integral a => (a `TestAs` Positive a) -> Bool f _ = True
67f1367ef682548668664e3394d151ba48bc6f271456e2c702467cbb8689a7b5
incoherentsoftware/defect-process
Types.hs
module World.Types ( WorldStatus(..) , World(..) ) where import AppEnv.Types import Enemy.Manager.Types import Level.Types import Msg.Phase import Particle.Manager.Types import Player.Types import Projectile.Manager.Types import Stats.Manager import Util import World.Audio.Types import World.Camera.Types i...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/World/Types.hs
haskell
module World.Types ( WorldStatus(..) , World(..) ) where import AppEnv.Types import Enemy.Manager.Types import Level.Types import Msg.Phase import Particle.Manager.Types import Player.Types import Projectile.Manager.Types import Stats.Manager import Util import World.Audio.Types import World.Camera.Types i...
c7e997cef2061bf9e37eaee7e86347f38eb766f98e087ac9816f3d9b6af33238
chenyukang/eopl
environments.scm
(module environments (lib "eopl.ss" "eopl") (require "data-structures.scm") (provide init-env empty-env extend-env apply-env) ;;;;;;;;;;;;;;;; initial environment ;;;;;;;;;;;;;;;; ;; init-env : () -> environment ;; (init-env) builds an environment in which i is bound to the expressed value ...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter7/inferred/environments.scm
scheme
initial environment ;;;;;;;;;;;;;;;; init-env : () -> environment (init-env) builds an environment in which i is bound to the environment constructors and observers ;;;;;;;;;;;;;;;;
(module environments (lib "eopl.ss" "eopl") (require "data-structures.scm") (provide init-env empty-env extend-env apply-env) expressed value 1 , v is bound to the expressed value 5 , and x is bound to the expressed value 10 . (define init-env (lambda () (extend-env ...
8d55165df6b2aa54e1ffe3b78cea77c769ce85ec9402994ba843dbc4a851ef32
carl-eastlund/dracula
dracula-language-level.rkt
#lang racket/gui (require drscheme/tool drscheme/tool-lib framework rackunit/gui racket/require (path-up "self/require.rkt") (path-up "self/module-path.rkt") (cce-in drscheme) (dracula-in lang/printer) "dracula-interfaces.rkt" (prefix-in acl2- (dracula-in lang/acl2-reader))) (provide dracu...
null
https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/drscheme/dracula-language-level.rkt
racket
language-level-no-executable-mixin language-level-macro-stepper-mixin
#lang racket/gui (require drscheme/tool drscheme/tool-lib framework rackunit/gui racket/require (path-up "self/require.rkt") (path-up "self/module-path.rkt") (cce-in drscheme) (dracula-in lang/printer) "dracula-interfaces.rkt" (prefix-in acl2- (dracula-in lang/acl2-reader))) (provide dracu...
992f42993f939ddb205979caac4fba38d5c78404dde2addc3416cab52df4b992
Oblosys/proxima
Layers.hs
{-# OPTIONS_GHC -fglasgow-exts -fallow-overlapping-instances -fallow-undecidable-instances -fno-monomorphism-restriction #-} module Layers where type LayerFn horArgs vertArg horRess vertRes = horArgs -> vertArg -> (vertRes, horRess) data Simple' state map doc pres gest upd = Simple' { present' :...
null
https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/papers/Haskell%202008/Haskell/src/Layers.hs
haskell
# OPTIONS_GHC -fglasgow-exts -fallow-overlapping-instances -fallow-undecidable-instances -fno-monomorphism-restriction #
module Layers where type LayerFn horArgs vertArg horRess vertRes = horArgs -> vertArg -> (vertRes, horRess) data Simple' state map doc pres gest upd = Simple' { present' :: LayerFn state doc map pres , interpret' :: LayerFn (map, state) gest state upd } data Si...
e991ad1fadfee9b53effa08237c48455543f54970c66d7cf11f71aae873d9984
clojurians-org/haskell-example
Lib.hs
{-# LANGUAGE OverloadedStrings #-} module Lib ( someFunc ) where import Data.ByteString.Lazy (fromStrict) import Data.ByteString.Base64 (decodeLenient) import Codec.Compression.GZip (decompress) import FFI.CKafka someFunc :: IO () someFunc = putStrLn rdKafkaVersionStr - decompress . fromStrict . " H...
null
https://raw.githubusercontent.com/clojurians-org/haskell-example/c96b021bdef52a121e04ea203c8c3e458770a25a/kafka-transformers/src/Lib.hs
haskell
# LANGUAGE OverloadedStrings # }
module Lib ( someFunc ) where import Data.ByteString.Lazy (fromStrict) import Data.ByteString.Base64 (decodeLenient) import Codec.Compression.GZip (decompress) import FFI.CKafka someFunc :: IO () someFunc = putStrLn rdKafkaVersionStr - decompress . fromStrict . " H4sIAAAAAAAAALVWXU / jMBB8Pn6FVV4PZL...
bf5ffd6e9fe89f7a6278d40adb31dc6e5b49887de47f511b2df9f79f7d0ffa97
bmeurer/ocaml-experimental
selection_handle_set.ml
##ifdef CAMLTK The function * must * use let handle_set opts w cmd = tkCommand [| TkToken"selection"; TkToken"handle"; TkTokenList (List.map (function x -> cCAMLtoTKicccm w icccm_selection_handle_table x) opts); cCAMLtoTKwidget widget_any_table w; let id = register_call...
null
https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/otherlibs/labltk/builtin/selection_handle_set.ml
ocaml
##ifdef CAMLTK The function * must * use let handle_set opts w cmd = tkCommand [| TkToken"selection"; TkToken"handle"; TkTokenList (List.map (function x -> cCAMLtoTKicccm w icccm_selection_handle_table x) opts); cCAMLtoTKwidget widget_any_table w; let id = register_call...
f18b66535c5955216b67aa54e672cf1342e469cc2aafe2ba6035ea8b71b2ffba
incoherentsoftware/defect-process
JSON.hs
module Level.Room.SpringLauncher.JSON ( SpringLauncherJSON(..) ) where import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON) import GHC.Generics (Generic) import Util data SpringLauncherJSON = SpringLauncherJSON { _pos :: Pos2 } deriving Generic instance FromJSON SpringLauncherJSON...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Level/Room/SpringLauncher/JSON.hs
haskell
module Level.Room.SpringLauncher.JSON ( SpringLauncherJSON(..) ) where import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON) import GHC.Generics (Generic) import Util data SpringLauncherJSON = SpringLauncherJSON { _pos :: Pos2 } deriving Generic instance FromJSON SpringLauncherJSON...
67c3811f342dde4b79fc64eeaeae9e45c35adfd23c2a7c7b4ec1a9acc63e52aa
dparis/lein-essthree
library.clj
(ns lein-essthree.library "Deploy project as a library JAR to S3 using the Spring framework AWS maven library." (:require [cuerdas.core :as c] [leiningen.deploy :as ld] [lein-essthree.schemas :refer [LibraryDeployConfig]] [leiningen.pom :as pom] [schema...
null
https://raw.githubusercontent.com/dparis/lein-essthree/a351693b850ba4bd478c9e922969d057b61b7b45/src/lein_essthree/library.clj
clojure
(ns lein-essthree.library "Deploy project as a library JAR to S3 using the Spring framework AWS maven library." (:require [cuerdas.core :as c] [leiningen.deploy :as ld] [lein-essthree.schemas :refer [LibraryDeployConfig]] [leiningen.pom :as pom] [schema...
1476fa682362fb4024e9e34a883854f285d9b2545376d258b326e33e09bc71a6
finnishtransportagency/harja
paikkaukset_toteumalomake.cljs
(ns harja.tiedot.urakka.yllapitokohteet.paikkaukset.paikkaukset-toteumalomake (:require [reagent.core :refer [atom] :as r] [clojure.data :refer [diff]] [tuck.core :as tuck] [harja.tyokalut.tuck :as tuck-apurit] [harja.loki :refer [log]] [harja.pvm :as pvm] ...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/590fc9e04495d396c61982613c111db8780eb1e9/src/cljs/harja/tiedot/urakka/yllapitokohteet/paikkaukset/paikkaukset_toteumalomake.cljs
clojure
:onnistui-parametrit parametrit :epaonnistui-parametrit parametrit
(ns harja.tiedot.urakka.yllapitokohteet.paikkaukset.paikkaukset-toteumalomake (:require [reagent.core :refer [atom] :as r] [clojure.data :refer [diff]] [tuck.core :as tuck] [harja.tyokalut.tuck :as tuck-apurit] [harja.loki :refer [log]] [harja.pvm :as pvm] ...
a8b0a2108417aea77d374621f94061fe11e54f0d4aae9d95138b7f56e0033f43
joaotavora/sly
slynk-indentation.lisp
(in-package :slynk) (defvar *application-hints-tables* '() "A list of hash tables mapping symbols to indentation hints (lists of symbols and numbers as per cl-indent.el). Applications can add hash tables to the list to change the auto indentation sly sends to emacs.") (defun has-application-indentation-hint-p (s...
null
https://raw.githubusercontent.com/joaotavora/sly/5966d68727898fa6130fb6bb02208f70aa8d5ce3/contrib/slynk-indentation.lisp
lisp
override slynk version of this function More complex version. If there was nothing interesting, don't return anything. &BODY is &BODY, this is clear. &KEY is tricksy. If it's at the base level, we want to indent them normally: (with-foo (var arg :foo t ...) &REST is tricksy. If it's at the...
(in-package :slynk) (defvar *application-hints-tables* '() "A list of hash tables mapping symbols to indentation hints (lists of symbols and numbers as per cl-indent.el). Applications can add hash tables to the list to change the auto indentation sly sends to emacs.") (defun has-application-indentation-hint-p (s...
67986d35eaf8ad7ab373108c5d9ee4d4e55f7e512d7f64804fa669ecab35124c
expipiplus1/vulkan
Command.hs
module Marshal.Command ( marshalCommand , MarshaledCommand(..) , MarshaledParam(..) , marshaledCommandShouldIncludeReturnValue , marshaledCommandInputTypes , marshaledCommandReturnTypes , marshaledParamType , marshaledParamTypeWithName , marshaledParamTypeNegative , marshaledParamTypePositive ) wh...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/generate-new/src/Marshal/Command.hs
haskell
Pointers to Void have some special handling Optional and non optional arrays Optional things: Everything left over is treated as a boring scalar parameter -------------------------------------------------------------- Getting type information for high level function ------------------------------------------------...
module Marshal.Command ( marshalCommand , MarshaledCommand(..) , MarshaledParam(..) , marshaledCommandShouldIncludeReturnValue , marshaledCommandInputTypes , marshaledCommandReturnTypes , marshaledParamType , marshaledParamTypeWithName , marshaledParamTypeNegative , marshaledParamTypePositive ) wh...
3c4c40d02fb7ed548535c58969714eaa823b15da08cb065cf295455605f9231b
dakk/bitcoinml
base58.ml
open Big_int;; let bitcoin_alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";; let big_base = big_int_of_int 58;; let encode_check data = let string_to_bigint data = let rec btb data acc = match String.length data with | 0 -> acc | n -> let c' = String.get data 0 |> Char.code in let...
null
https://raw.githubusercontent.com/dakk/bitcoinml/16a09393f4b10961db91f30200e2926f03a8716c/src/base58.ml
ocaml
open Big_int;; let bitcoin_alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";; let big_base = big_int_of_int 58;; let encode_check data = let string_to_bigint data = let rec btb data acc = match String.length data with | 0 -> acc | n -> let c' = String.get data 0 |> Char.code in let...
cb6af614e891f8eae2e0ed81290ca94f2220f5f0925ecb04d29cb4ec517555fb
input-output-hk/project-icarus-importer
Notifier.hs
# LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} {-# LANGUAGE Rank2Types #-} # LANGUAGE TypeOperators # -- | Notifier logic module Pos.Wallet.Web.Sockets.Notifier ( launchNotifier ) where import Universum import Control.Concurrent.Async (mapConcurrently) import ...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet/src/Pos/Wallet/Web/Sockets/Notifier.hs
haskell
# LANGUAGE GADTs # # LANGUAGE Rank2Types # | Notifier logic FIXME: this is really inefficient. Temporary solution in delay periods cooldown TODO: use Servant.enter here FIXME: don't ignore errors, send error msg to the socket cAddresses <- myCIds -- TODO: is reading from acid RAM only (no...
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # module Pos.Wallet.Web.Sockets.Notifier ( launchNotifier ) where import Universum import Control.Concurrent.Async (mapConcurrently) import Control.Lens ((.=)) import Data.Default (Default (def)) import ...
45aca0f42d081c4f70a9a5a1c4170b64c94bb6fba85c37c33423a01141c27bb6
khibino/haskell-relational-record
Class.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # -- | Module : Database . Relational . . Class Copyright : 2013 - 2019 -- License : BSD3 -- -- Maintainer : -- Stability : experimental -- Portability : unknown -- -- This module defines query buildin...
null
https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-query/src/Database/Relational/Monad/Class.hs
haskell
| License : BSD3 Maintainer : Stability : experimental Portability : unknown This module defines query building interface classes. * Query interface classes | Restrict context interface | Add restriction to this context. ^ 'Record' which represent restriction ^ Restricted query context | Query bui...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # Module : Database . Relational . . Class Copyright : 2013 - 2019 module Database.Relational.Monad.Class MonadQualify (..), MonadRestrict (..), MonadQuery (..), MonadAggregate (..), MonadPar...