_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 |
|---|---|---|---|---|---|---|---|---|
e469d1390798797b7333bf4e77311f64777819435a12ef227f4b6b8dbf57ed7c | walmartlabs/cond-let | cond_let.clj | ;
Copyright ( c ) 2018 - present , Walmart Inc
;
Licensed under the Apache License , Version 2.0 ( the " License " )
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; -2.0
;
; Unless required by applicable law or agreed to in writing, software
dis... | null | https://raw.githubusercontent.com/walmartlabs/cond-let/bbb24ebae72a4cbc4a2710a209b53c3533c2d784/src/com/walmartlabs/cond_let.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright ( c ) 2018 - present , Walmart Inc
Licensed under the Apache License , Version 2.0 ( the " License " )
distributed under the License is distributed on an " AS IS " BASIS ,
(ns com.walmartlabs.cond-let
"Home for the cond-let macro.")
(defmacro cond-let
"An alternative to `clojure.core/cond` where i... |
1b310076fb0b7c743084d13bc712b393b8cc5db250a0fd4047ee908f91a98500 | wavewave/hoodle | Enum.hs | {-# LANGUAGE OverloadedStrings #-}
module Hoodle.Type.Enum where
import Control.Lens (Lens', lens)
import qualified Data.ByteString.Char8 as B
import Data.Hoodle.Predefined
( predefinedPencolor,
rgbaToHEX,
)
import qualified Data.Map as M
import Hoodle.Util (fromJustError)
-- | drawing efficiency
data DrawFl... | null | https://raw.githubusercontent.com/wavewave/hoodle/fa7481d14a53733b2f6ae9debc95357d904a943c/core/src/Hoodle/Type/Enum.hs | haskell | # LANGUAGE OverloadedStrings #
| drawing efficiency
| page add direction
| relative zoom mode
| pen tool type
| predefined pen colors
| predefined background styles
| mode for vertical space adding
| select tool type
|
|
lenses
|
| |
module Hoodle.Type.Enum where
import Control.Lens (Lens', lens)
import qualified Data.ByteString.Char8 as B
import Data.Hoodle.Predefined
( predefinedPencolor,
rgbaToHEX,
)
import qualified Data.Map as M
import Hoodle.Util (fromJustError)
data DrawFlag = Clear | BkgEfficient | Efficient
deriving (Eq, Ord, ... |
f768cf243c5d34340113e99860114ae9e2e909c1a761386b23c8af91bb2b9ecb | thoughtbot/carnival | Application.hs | # OPTIONS_GHC -fno - warn - orphans #
module Application
( getApplicationDev
, appMain
, develMain
, taskMain
, makeFoundation
, withEnv
-- * for DevelMain
, getApplicationRepl
, shutdownApp
-- * for GHCI
, handler
, db
) where
import Control.Monad.Logger ... | null | https://raw.githubusercontent.com/thoughtbot/carnival/1cd4bd02ea6884b86020029257ab69ec3892a168/Application.hs | haskell | * for DevelMain
* for GHCI
Import all relevant handler modules here.
Don't forget to add new modules to your cabal file!
comments there for more details.
| This function allocates resources (such as a database connection pool),
performs initialization and return a foundation datatype value. This is also
the pla... | # OPTIONS_GHC -fno - warn - orphans #
module Application
( getApplicationDev
, appMain
, develMain
, taskMain
, makeFoundation
, withEnv
, getApplicationRepl
, shutdownApp
, handler
, db
) where
import Control.Monad.Logger (liftLoc, runLoggingT)
import Databa... |
5fef6d8b93e550ccef7340c73cf6bc189ef96fb3d30df1450422c8d7a3ffdbe4 | DKurilo/hackerrank | solution.hs | # LANGUAGE FlexibleInstances , UndecidableInstances #
# LANGUAGE DuplicateRecordFields , UnicodeSyntax #
module Main where
import Prelude.Unicode
import Control.Monad
import Data.Array
import Data.Bits
import qualified Data.List as DL
import Data.List.Split
import qualified Data.Set as DS
import Debug.Trace
import Sy... | null | https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/castle-on-the-grid/solution.hs | haskell | Complete the minimumMoves function below.
error
hPutStrLn fptr $ show result | # LANGUAGE FlexibleInstances , UndecidableInstances #
# LANGUAGE DuplicateRecordFields , UnicodeSyntax #
module Main where
import Prelude.Unicode
import Control.Monad
import Data.Array
import Data.Bits
import qualified Data.List as DL
import Data.List.Split
import qualified Data.Set as DS
import Debug.Trace
import Sy... |
eb645bdbaea50bd3bc3c465bd97cb8f8fb616c7ccfdc4765811b35237d62137b | korya/efuns | dynlink.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/ocamlsrc/compat/2.99/dynlink.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License .
$ I d : dynlink.mli , v 1.1 2000/04/2... |
0c9721b79af0d98dfa75cba0f17cd940526cd351319af989ba09fcecbc7eeb47 | igorhvr/bedlam | srfi-45.scm | (define-nongenerative-struct promise
sisc.srfi.srfi-45.promise-type
(expr eager?))
(define-simple-syntax (lazy exp)
(box (box (make-promise (lambda () exp) #f))))
(define (eager x)
(box (box (make-promise x #t))))
(define-simple-syntax (delay exp)
(lazy (eager exp)))
(define (force promise)
(let* ((cont... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-1.16.6/full-src/sisc/src/sisc/modules/srfi/srfi-45.scm | scheme | (define-nongenerative-struct promise
sisc.srfi.srfi-45.promise-type
(expr eager?))
(define-simple-syntax (lazy exp)
(box (box (make-promise (lambda () exp) #f))))
(define (eager x)
(box (box (make-promise x #t))))
(define-simple-syntax (delay exp)
(lazy (eager exp)))
(define (force promise)
(let* ((cont... | |
cd545d42a51e7aae9e383e489706ebcbb885a22c188ea9371e25863504c49e75 | mikera/core.matrix | test_sequence.clj | (ns clojure.core.matrix.test-sequence
(:require [clojure.core.matrix.compliance-tester :as compliance]
[clojure.core.matrix :refer :all]
[clojure.test :refer :all]))
;; Tests for core.matrix implementation for arbitrary sequences (ISeq)
(deftest regressions
(is (== 3 (ereduce (fn [acc _] (... | null | https://raw.githubusercontent.com/mikera/core.matrix/0a35f6e3d6d2335cb56f6f3e5744bfa1dd0390aa/src/test/clojure/clojure/core/matrix/test_sequence.clj | clojure | Tests for core.matrix implementation for arbitrary sequences (ISeq)
sequences should get converted to a better implementation
FIXME throws exception
FIXME throws exception | (ns clojure.core.matrix.test-sequence
(:require [clojure.core.matrix.compliance-tester :as compliance]
[clojure.core.matrix :refer :all]
[clojure.test :refer :all]))
(deftest regressions
(is (== 3 (ereduce (fn [acc _] (inc acc)) 0 '(nil nil nil))))
(is (e== [-1 -2] (negate '(1 2))))
(i... |
29fd01a01bd7987c3d136ba77968c96133b9cb8e78e2bf6f31182c64ac24d98d | wireapp/wire-server | External.hs | {-# LANGUAGE StrictData #-}
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , ei... | null | https://raw.githubusercontent.com/wireapp/wire-server/9f46f4435479ebb1248e137887ee0ffb6630930e/libs/wire-api/src/Wire/API/Team/LegalHold/External.hs | haskell | # LANGUAGE StrictData #
This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY... |
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
| Types used by the Wire serv... |
d4a6e22fb40d41cd91b319fbc8ccb02a3d88638d006f9a81582a0a5e1e2582f3 | bitblaze-fuzzball/fuzzball | query_engine.mli |
Copyright ( C ) BitBlaze , 2009 - 2013 . All rights reserved .
Copyright (C) BitBlaze, 2009-2013. All rights reserved.
*)
(* An extra numeric counter for debugging purposes like query
filenames. *)
val query_extra_counter : int ref
(* Satisfying assignment, AKA counterexample: a mapping from variable
na... | null | https://raw.githubusercontent.com/bitblaze-fuzzball/fuzzball/b9a617b45e68fa732f1357fedc08a2a10f87a62c/execution/query_engine.mli | ocaml | An extra numeric counter for debugging purposes like query
filenames.
Satisfying assignment, AKA counterexample: a mapping from variable
names to bit-vector values. For historical and brevity reasons, the
code mostly abbreviates this as "ce" for "counterexample".
variable with no particular known value
... |
Copyright ( C ) BitBlaze , 2009 - 2013 . All rights reserved .
Copyright (C) BitBlaze, 2009-2013. All rights reserved.
*)
val query_extra_counter : int ref
type sat_assign
val ce_from_list : (string * int64) list -> sat_assign
val ce_lookup_nf : sat_assign -> string -> int64
val ce_iter : sat_assign -> (stri... |
660a6806fc315cf1f105bc625c03ff12f67fd17992702adf76e89428840b72a3 | philnguyen/soft-contract | mc91.rkt | #lang racket
(require soft-contract/fake-contract)
(define (mc91 x)
(if (> x 100) (- x 10)
(mc91 (mc91 (+ x 11)))))
(provide/contract
[mc91 (->i ([n integer?]) (res (n) (and/c integer? (λ (a) (implies (<= n 101) (= a 91))))))])
| null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/mochi/mc91.rkt | racket | #lang racket
(require soft-contract/fake-contract)
(define (mc91 x)
(if (> x 100) (- x 10)
(mc91 (mc91 (+ x 11)))))
(provide/contract
[mc91 (->i ([n integer?]) (res (n) (and/c integer? (λ (a) (implies (<= n 101) (= a 91))))))])
| |
5cbc0c59122d68b3d150cfe47f281321bdfd2bd388b818966dc6a7d33a9372a5 | ocaml-multicore/tezos | liquidity_baking_repr.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Tocqueville Group , Inc. < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_protocol/liquidity_baking_repr.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Tocqueville Group , Inc. < >
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 , WHETH... |
34017e8c2b1ffd0a23f0df0ff30179c58b41a1281fc231e285968025efd63291 | alphaHeavy/consul-haskell | Snapshots.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
| The functions in this module correspond to
the [ Consul / api / snapshot ) .
Feel free to contribute via the [ repo on GitHub]( / AlphaHeavy / consul - haskell ) .
_ _ Missing Fu... | null | https://raw.githubusercontent.com/alphaHeavy/consul-haskell/c159b923e257cc5139cb7ae450a5a6c02906c79d/src/Network/Consul/Client/Snapshots.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
| The functions in this module correspond to
the [ Consul / api / snapshot ) .
Feel free to contribute via the [ repo on GitHub]( / AlphaHeavy / consul - haskell ) .
_ _ Missing Functions _ _
* ` createSnapshot `... |
dd4a113812a86eb341ef76313aadcd0a266edb56ce2b9d540984c559b66e6db1 | fission-codes/fission | Types.hs | -- | App configuration for Fission apps
module Fission.Web.Server.Environment.WebApp.Types (Environment (..)) where
import Network.IPFS.CID.Types
import Fission.Prelude
import Fission.URL.Types as URL
import qualified Fission.Web.Server.AWS.Types as AWS
data Environment = E... | null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-web-server/library/Fission/Web/Server/Environment/WebApp/Types.hs | haskell | | App configuration for Fission apps
^ Default domain name
^ Initial CID | module Fission.Web.Server.Environment.WebApp.Types (Environment (..)) where
import Network.IPFS.CID.Types
import Fission.Prelude
import Fission.URL.Types as URL
import qualified Fission.Web.Server.AWS.Types as AWS
data Environment = Environment
, baseAppZoneID :: AWS.Zon... |
7fdb758b4dbd9dfa3a15532a650f307ad5d184646209d6b8d8a3d3c783c7c3d4 | bazurbat/chicken-scheme | chicken.import.scm | chicken.import.scm - import library for " chicken " module
;
Copyright ( c ) 2008 - 2016 , The CHICKEN Team
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
; conditions are met:
;
; Redistributions of source code... | null | https://raw.githubusercontent.com/bazurbat/chicken-scheme/f0c9d1fd8b68eb322e320e65ec40b0bf7d1b41dc/chicken.import.scm | scheme |
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.
Redistribution... | chicken.import.scm - import library for " chicken " module
Copyright ( c ) 2008 - 2016 , The CHICKEN Team
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CONSEQUENTIAL DAMAGES... |
f4e0351e1ca5aec93ca24ffd3bcfef4f325e624153b50ce5b476441bb7ee0ddd | Clozure/ccl-tests | export.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Apr 25 07:59:45 1998
;;;; Contains: Tests of EXPORT
(in-package :cl-test)
#-clozure
(eval-when (:compile-toplevel)
(declaim (optimize (safety 3))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; export
(deftest export.1
(let ((return-value nil))
(safely... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/export.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of EXPORT
export
When a symbol not in a package is exported, export
should signal a correctable package-error asking the
user whether the symbol should be imported.
Test that it catches an attempt to export a symbol
from a package that is used by another package that
i... | Author :
Created : Sat Apr 25 07:59:45 1998
(in-package :cl-test)
#-clozure
(eval-when (:compile-toplevel)
(declaim (optimize (safety 3))))
(deftest export.1
(let ((return-value nil))
(safely-delete-package "TEST1")
(let ((p (make-package "TEST1")))
(let ((sym (intern "FOO" p))
(i 0... |
ff14955570693615af6d32cf0e6867b5b4b6ebeac7f077b4d068aae2a6a6b8a7 | leviroth/ocaml-reddit-api | reddit_api_async.ml | include Reddit_api_kernel
module Connection = Connection
module Iter_comments = Iter_comments
module Rate_limiter = Rate_limiter
module Retry_manager = Retry_manager
module Stream = Stream
| null | https://raw.githubusercontent.com/leviroth/ocaml-reddit-api/a04b03faec22c436f561cfcc481e9500049bf7f8/reddit_api_async/reddit_api_async.ml | ocaml | include Reddit_api_kernel
module Connection = Connection
module Iter_comments = Iter_comments
module Rate_limiter = Rate_limiter
module Retry_manager = Retry_manager
module Stream = Stream
| |
40f5962d72ae0536dbc1fb42434c9e1cc16c5433bc62ae6b7536bd519fc1575b | htm-community/clortex | date_encoder_test.clj | (ns clortex.date-encoder-test
(:use midje.sweet)
(:require [clortex.domain.encoders.date-time :as d]
[clortex.domain.encoders.scalar :as s]
[clortex.domain.encoders.rdse :as r]
[clortex.utils.math :refer :all]
[clojure.set :refer [difference intersection]]
... | null | https://raw.githubusercontent.com/htm-community/clortex/69003a352140510f47c6b8e18ad6a98a7b5a3bba/test/clortex/date_encoder_test.clj | clojure | units = day):
units = day)
units = hour) | (ns clortex.date-encoder-test
(:use midje.sweet)
(:require [clortex.domain.encoders.date-time :as d]
[clortex.domain.encoders.scalar :as s]
[clortex.domain.encoders.rdse :as r]
[clortex.utils.math :refer :all]
[clojure.set :refer [difference intersection]]
... |
e22aa0000bc2f9bb95b81640916026360110c395c78d39f12b0f24eaec10a843 | ghc/nofib | Main.hs |
Time - stamp : < 2010 - 11 - 03 09:26:39 simonmar >
$ I d : testLinSolv.hs , v 1.6.2.5 2002/06/21 02:39:07 hwloidl Exp $
Main module for testing linSolv.hs , the solution of a system of
linear equations by using the modular method .
Time-stamp: <2010-11-03 09:26:39 simonmar>
$Id: t... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/parallel/linsolv/Main.hs | haskell | @top A Linear System Solver
Other modules:
@menu
* Modular Arithmetic::
* LinSolv top level function::
@end menu
----------------------------------------------------------------------------
@section Imports
Using modular method for linear system solving
------------------------------------------------------... |
Time - stamp : < 2010 - 11 - 03 09:26:39 simonmar >
$ I d : testLinSolv.hs , v 1.6.2.5 2002/06/21 02:39:07 hwloidl Exp $
Main module for testing linSolv.hs , the solution of a system of
linear equations by using the modular method .
Time-stamp: <2010-11-03 09:26:39 simonmar>
$Id: t... |
f8e7f9e7edef53fae543db15866e9bf02ecfae76e8dbd7940cb5dfb4a4de8c36 | objmagic/LR | t.ml | type e = Eid of string | Nest of e * e
type exp = Add of exp * exp | Mul of exp * exp | Id of string
type s = S1 of c * c and c = C1 of c | C2
| null | https://raw.githubusercontent.com/objmagic/LR/4bfc2ea57a4092f75c627ad6b58067e9822a43f0/menhir/t.ml | ocaml | type e = Eid of string | Nest of e * e
type exp = Add of exp * exp | Mul of exp * exp | Id of string
type s = S1 of c * c and c = C1 of c | C2
| |
a9d444ced8de5d3ef82c3d02f9dfdd553ddde29b8165fe088e95bf48278169e3 | AshleyYakeley/Truth | FullName.hs | module Pinafore.Language.Name.FullName where
import Pinafore.Language.Name.Name
import Pinafore.Language.Name.Namespace
import Pinafore.Language.Name.ToText
import Shapes
data FullName =
MkFullName Name
Namespace
deriving (Eq, Ord)
pattern RootFullName :: Name -> FullName
pattern RootFullName... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/f567d19253bb471cbd8c39095fb414229b27706a/Pinafore/pinafore-language/lib/Pinafore/Language/Name/FullName.hs | haskell | module Pinafore.Language.Name.FullName where
import Pinafore.Language.Name.Name
import Pinafore.Language.Name.Namespace
import Pinafore.Language.Name.ToText
import Shapes
data FullName =
MkFullName Name
Namespace
deriving (Eq, Ord)
pattern RootFullName :: Name -> FullName
pattern RootFullName... | |
32d7492258e3afd9a36df5c11ee7f3bf8c2d19e6f2e0d32eb22492227921fc61 | ghcjs/ghcjs | t2529.hs | Trac # 2529
-- The example below successfully performed the {{{show}}}, but {{{reads}}}
returns an empty list . It fails in both GHCi and GHC . It succeeds if you
-- replaces the infix symbol with a name.
module Main where
data A = (:<>:) { x :: Int, y :: Int } deriving (Read, Show)
t :: A
t = 1 :<>: 2
s :: Str... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/deriving/t2529.hs | haskell | The example below successfully performed the {{{show}}}, but {{{reads}}}
replaces the infix symbol with a name. | Trac # 2529
returns an empty list . It fails in both GHCi and GHC . It succeeds if you
module Main where
data A = (:<>:) { x :: Int, y :: Int } deriving (Read, Show)
t :: A
t = 1 :<>: 2
s :: String
s = show t
r :: [(A,String)]
r = reads s
main :: IO ()
main = do putStrLn s
putStrLn (show r)
|
3c136d6401cb3b348a976e620b708c1140cb76acfe3b76a543d045312600b0c2 | DataHaskell/dh-core | Datasets.hs | |
The @datasets@ package defines three different kinds of datasets :
* Tiny datasets ( up to a few tens of rows ) are embedded as part of the library source code , as lists of values .
* Small data sets are embedded indirectly ( via @file - embed@ )
in the package as pure values and do not require IO
... | null | https://raw.githubusercontent.com/DataHaskell/dh-core/2beb8740f27fa9683db70eb8d8424ee6c75d3e91/datasets/src/Numeric/Datasets.hs | haskell | * Parsing datasets
* Defining datasets
** Dataset options
** Preprocessing functions
** Helper functions
* Dataset source URLs
* Using datasets
| Load a dataset into memory
| Load a dataset into memory as a vector
| Get a ByteString from the specified Source
^ Cache directory
"gif", "tga"]
^ How to parse ... | |
The @datasets@ package defines three different kinds of datasets :
* Tiny datasets ( up to a few tens of rows ) are embedded as part of the library source code , as lists of values .
* Small data sets are embedded indirectly ( via @file - embed@ )
in the package as pure values and do not require IO
... |
ec162631866bdea6f8ec3d8ea32f1a4f083a25ced371bb59d48ac395b4519798 | Enecuum/Node | RLens.hs | # LANGUAGE FunctionalDependencies #
{-# LANGUAGE TemplateHaskell #-}
module Enecuum.Testing.RLens where
import Enecuum.Prelude (makeFieldsNoPrefix)
import Enecuum.Testing.Types
makeFieldsNoPrefix ''LoggerRuntime
makeFieldsNoPrefix ''Control
makeFieldsNoPrefix ''RpcServerHandle
makeFieldsN... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/test/test-framework/Enecuum/Testing/RLens.hs | haskell | # LANGUAGE TemplateHaskell # | # LANGUAGE FunctionalDependencies #
module Enecuum.Testing.RLens where
import Enecuum.Prelude (makeFieldsNoPrefix)
import Enecuum.Testing.Types
makeFieldsNoPrefix ''LoggerRuntime
makeFieldsNoPrefix ''Control
makeFieldsNoPrefix ''RpcServerHandle
makeFieldsNoPrefix ''ServerHandle
makeFieldsNoPrefi... |
c530bec3df6a47d5d9f60ad24535f8b41e9f87c7c7e7e947739037f53f8efc28 | vadimbakaev/flatmap.io | Settings.hs |
flatmap.io IT job search based on geo and technology .
Copyright ( C ) 2019
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
Lice... | null | https://raw.githubusercontent.com/vadimbakaev/flatmap.io/766069a8b1317a1e5a4546f3358d04c3c901f693/src/Settings.hs | haskell | # LANGUAGE OverloadedStrings #
| Settings are centralized, as much as possible, into this file. This
includes database connection settings, static file locations, etc.
| Runtime settings to configure this application. These settings can be
loaded from various sources: defaults, environment variables, config files,
... |
flatmap.io IT job search based on geo and technology .
Copyright ( C ) 2019
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
Lice... |
c31e5d5261092062c3ed9135b052e3ebb76a7c49c0541a7135356b10d0c26808 | clj-commons/citrus | core.cljs | (ns citrus.core
(:require-macros [citrus.macros :as m])
(:require [citrus.reconciler :as r]
[citrus.cursor :as c]))
(defn- -get-default-batched-updates
[]
{:schedule-fn js/requestAnimationFrame
:release-fn js/cancelAnimationFrame})
(defn reconciler
"Creates an instance of Reconciler
(ci... | null | https://raw.githubusercontent.com/clj-commons/citrus/9c0b1441ab466237415fc8ec2b03307d3541694e/src/citrus/core.cljs | clojure | (ns citrus.core
(:require-macros [citrus.macros :as m])
(:require [citrus.reconciler :as r]
[citrus.cursor :as c]))
(defn- -get-default-batched-updates
[]
{:schedule-fn js/requestAnimationFrame
:release-fn js/cancelAnimationFrame})
(defn reconciler
"Creates an instance of Reconciler
(ci... | |
b0293be8a0a19ff404ebce3d08a032eda094a63188062bff52aead66abaddc71 | GrammaTech/sel | compilation-database-project.lisp | (defpackage :software-evolution-library/software/compilation-database-project
(:nicknames
:sel/software/compilation-database-project
:sel/sw/compilation-database-project
:sel/sw/compdb-project)
(:use :gt/full
:software-evolution-library
:software-evolution-library/components/compilation-dat... | null | https://raw.githubusercontent.com/GrammaTech/sel/d34afa86778e848ee361ef76e3f1d2e283d4ce45/software/compilation-database-project.lisp | lisp | (defpackage :software-evolution-library/software/compilation-database-project
(:nicknames
:sel/software/compilation-database-project
:sel/sw/compilation-database-project
:sel/sw/compdb-project)
(:use :gt/full
:software-evolution-library
:software-evolution-library/components/compilation-dat... | |
891aee0935e7332ca6bf70a7001b1c7e62449fbbb1cef75d690d861d93845d5f | HaskellForCats/HaskellForCats | ladiesWhoCodeHaskell001.hs | module Lwch001 where
-- : retab
: set expandtab ts=4 ruler number spell
why should I bother ?
Pain or Curiosity or Both
Haskell -- not hard
just radically different .
C the is language of Unix and everything that follows
C is to Engineering
as
Java & C # are to business
as
... | null | https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/ladiesWhoCodeHaskell/ladiesWhoCodeHaskell001.hs | haskell | : retab
not hard
----------------------------------------------
------the - great -- divide---------------------------------
AlGOl and SmallTalk are the primary touchstones for commercial use
for the last 40 years , note Google 's GO
--------------------------------------------------------
processor speeds ... | module Lwch001 where
: set expandtab ts=4 ruler number spell
why should I bother ?
Pain or Curiosity or Both
just radically different .
C the is language of Unix and everything that follows
C is to Engineering
as
Java & C # are to business
as
is to Mathmatics
it was ... |
621109aa64979bfdddc281e5d59b669b1b152b32c05c5e55fe0a718859796314 | gedge-platform/gedge-platform | rabbit_queue_consumers.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_queue_consumers).
-export([new/0,... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit_queue_consumers.erl | erlang |
----------------------------------------------------------------------------
Utilisation average calculations are all in μs.
These are held in our process dictionary
Queue of {ChPid, #consumer{}} for consumers which have
been blocked (rate/prefetch limited) for any reason
The limiter itself
Internal flow contro... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_queue_consumers).
-export([new/0, max_a... |
3ce9001d377ff5c274ae015b10a9c342f62b4ff98f97e5339e603c5439ccb46f | cj1128/sicp-review | 2.75.scm | Exercise 2.75
;; Implement make-from-mag-ang in message passing style
(define (make-from-mag-ang mag ang)
(define (dispatch op)
(cond
((eq? op 'real-part) (* mag (cos ang)))
((eq? op 'imag-part) (* mag (sin ang)))
((eq? op 'magnitue) mag)
((eq? op 'angle) ang)
(else (error "Unknown op:... | null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-2/2.4/2.75.scm | scheme | Implement make-from-mag-ang in message passing style | Exercise 2.75
(define (make-from-mag-ang mag ang)
(define (dispatch op)
(cond
((eq? op 'real-part) (* mag (cos ang)))
((eq? op 'imag-part) (* mag (sin ang)))
((eq? op 'magnitue) mag)
((eq? op 'angle) ang)
(else (error "Unknown op: MAKE-FROM-MAG-ANG" op))))
dispatch)
|
28f9d8d1dd44282410aae421632d9533ece5a22bb50450b2baac96c0e5d21c46 | dyzsr/ocaml-selectml | stdlib.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/4b5777d28ad5d26ec091898c90a997821258ddb5/stdlib/stdlib.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* The OCaml Standard library .
This module is automatically opened at the beginning of each
... |
71a2d846e12e12dfcfa18781a1f87666c0fdbf01f49e0c4bcbbcf05a0a4a02a6 | anuragsoni/shuttle | io_util.ml | open! Core
open! Async
let keep_alive headers =
match Headers.find headers "connection" with
| Some x when String.Caseless.equal x "close" -> false
| _ -> true
;;
let get_transfer_encoding headers =
match List.rev @@ Headers.find_multi headers "Transfer-Encoding" with
| x :: _ when String.Caseless.equal x "... | null | https://raw.githubusercontent.com/anuragsoni/shuttle/4b6b477cc9cc811ad717e9ac663b4c4e7346f4b6/http11/src/io_util.ml | ocaml | TODO: check for exceptions when converting to int | open! Core
open! Async
let keep_alive headers =
match Headers.find headers "connection" with
| Some x when String.Caseless.equal x "close" -> false
| _ -> true
;;
let get_transfer_encoding headers =
match List.rev @@ Headers.find_multi headers "Transfer-Encoding" with
| x :: _ when String.Caseless.equal x "... |
d03993843bf21bca131c082952db87137d3e859f2962b7768fc1ecb3c9a9058c | Apress/practical-webdev-haskell | Common.hs | module Adapter.HTTP.API.Server.Common where
import ClassyPrelude
import Web.Scotty.Trans
import Domain.Auth
import qualified Text.Digestive.Form as DF
import qualified Text.Digestive.Aeson as DF
import Data.Aeson hiding (json)
import Network.HTTP.Types.Status
import Adapter.HTTP.Common
-- * Forms
parseAndValidateJSO... | null | https://raw.githubusercontent.com/Apress/practical-webdev-haskell/17b90c06030def254bb0497b9e357f5d3b96d0cf/10/src/Adapter/HTTP/API/Server/Common.hs | haskell | * Forms
* Sessions | module Adapter.HTTP.API.Server.Common where
import ClassyPrelude
import Web.Scotty.Trans
import Domain.Auth
import qualified Text.Digestive.Form as DF
import qualified Text.Digestive.Aeson as DF
import Data.Aeson hiding (json)
import Network.HTTP.Types.Status
import Adapter.HTTP.Common
parseAndValidateJSON :: (Scott... |
ec567d0cc1f61f5729c84b5e8b627487994978ffbf294d576736cc8f357bfc28 | reflex-frp/reflex-dom-semui | Main.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecursiveDo #
module Main (main) where
import Control.Lens
import Control.Monad (void)
import Data.Map (Map, fromList)
import Data.Monoid ((<>))
import Data.Text (... | null | https://raw.githubusercontent.com/reflex-frp/reflex-dom-semui/1dcc3bb4f7a6243a4569d03675debd470288c4d2/example/Main.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| Throughput
| Frequency
| Contacts
| Cards
rec el "label" $ do
text "Country old"
country <- semUiDropdownWithItems "country-dropdown"
return ()
entry :: Maybe Int -> (Maybe Int,DropdownI... | # LANGUAGE FlexibleContexts #
# LANGUAGE RecursiveDo #
module Main (main) where
import Control.Lens
import Control.Monad (void)
import Data.Map (Map, fromList)
import Data.Monoid ((<>))
import Data.Text (Text)
import qualified Data.Text as T
import Reflex.Dom.Core
import Reflex.Dom.SemanticUI
import StateEn... |
82c3ad90fbd45e5e9c9817fcadc7581673f95e746b0cc93c70f8dcda73b35de6 | synduce/Synduce | max_logn.ml | (** @synduce -lkNB -n 20 *)
(* A data type representing lists in a tree format, where the list elements
are kept where the list is "split" as opposed to concat-lists where
all the elements are in the leaves.
*)
type ulist =
| UNil
| UElt of int
| USplit of ulist * int * int * ulist
(* The usual type of co... | null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/constraints/unimodal_list/max_logn.ml | ocaml | * @synduce -lkNB -n 20
A data type representing lists in a tree format, where the list elements
are kept where the list is "split" as opposed to concat-lists where
all the elements are in the leaves.
The usual type of cons-lists
Representation function from ulist -> list
Invariant: unimodal list
This is... |
type ulist =
| UNil
| UElt of int
| USplit of ulist * int * int * ulist
type list =
| Nil
| Cons of int * list
let rec repr = function
| UNil -> Nil
| UElt a -> Cons (a, Nil)
| USplit (x, a, b, y) -> aux (Cons (a, Cons (b, repr y))) x
and aux l = function
| UNil -> l
| UElt a -> Cons (a, l)
| ... |
e1a4bcb5253f15778f3614be4935e1e859e3264dab8e615bbed3837e10369cea | aksh-at/rss-to-email | auth.clj | (ns datomic.ion.rsstoemail.auth
(:require
[datomic.ion :as ion]
[clj-jwt.core :refer :all]
[clj-jwt.intdate :refer [intdate->joda-time]]
[clj-jwt.key :refer [private-key public-key]]
[clj-time.core :refer [now plus days before?]]))
(. java.security.Security addProvider (org.bouncycastle.jce.provide... | null | https://raw.githubusercontent.com/aksh-at/rss-to-email/8303440aabfeecfdae00e5e3720950c5113450b1/src/datomic/ion/rsstoemail/auth.clj | clojure | (ns datomic.ion.rsstoemail.auth
(:require
[datomic.ion :as ion]
[clj-jwt.core :refer :all]
[clj-jwt.intdate :refer [intdate->joda-time]]
[clj-jwt.key :refer [private-key public-key]]
[clj-time.core :refer [now plus days before?]]))
(. java.security.Security addProvider (org.bouncycastle.jce.provide... | |
3baa7a8d53b98f384f9b998834aa2b2c5e629126d58da67522219769fb93e9e5 | coleslaw-org/coleslaw | content.lisp | (in-package :coleslaw)
;; Tagging
(defclass tag ()
((name :initarg :name :reader tag-name)
(slug :initarg :slug :reader tag-slug)
(url :initarg :url)))
(defmethod initialize-instance :after ((tag tag) &key)
(with-slots (url slug) tag
(setf url (compute-url nil slug 'tag-index))))
(defun make-tag (str... | null | https://raw.githubusercontent.com/coleslaw-org/coleslaw/0b9f027a36ea00ca2e4b6f8d9fd7a135127cc2da/src/content.lisp | lisp | Tagging
Slugs
hyper general category
Content Types
Helper Functions | (in-package :coleslaw)
(defclass tag ()
((name :initarg :name :reader tag-name)
(slug :initarg :slug :reader tag-slug)
(url :initarg :url)))
(defmethod initialize-instance :after ((tag tag) &key)
(with-slots (url slug) tag
(setf url (compute-url nil slug 'tag-index))))
(defun make-tag (str)
"Takes ... |
e3518170bb57e9b79c611a5ffc0f06be775c22fbca62f7f290fa7ee19e919e94 | hakaru-dev/hakaru | DatumABT.hs | # LANGUAGE CPP
, , PolyKinds
, GADTs
, TypeOperators
, TypeFamilies
, ExistentialQuantification
#
, DataKinds
, PolyKinds
, GADTs
, TypeOperators
, TypeFamilies
, Existential... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Language/Hakaru/Syntax/DatumABT.hs | haskell | # OPTIONS_GHC -Wall -fwarn-tabs #
--------------------------------------------------------------
2016.05.24
|
Module : Language.Hakaru.Syntax.DatumABT
License : BSD3
Maintainer :
Stability : experimental
dependency issues.
---------------------... | # LANGUAGE CPP
, , PolyKinds
, GADTs
, TypeOperators
, TypeFamilies
, ExistentialQuantification
#
, DataKinds
, PolyKinds
, GADTs
, TypeOperators
, TypeFamilies
, Existential... |
517d0c63b72569976a3806607d8ce28f2c81110bfdb37685abda29929c2047bd | xclerc/ocamljava | semaphore.mli |
* This file is part of library .
* Copyright ( C ) 2007 - 2015 .
*
* library is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... | null | https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/library/concurrent/src/sync/semaphore.mli | ocaml | * Semaphores.
* The type of semaphores, each maintaining a set of available
permits.
* Tests whether there are threads waiting on the semaphore to acquire
permits; see
{java java.util.concurrent.Semaphore#hasQueuedThreads()}.
* The [null] value.
* [is_null obj] returns [true] iff [obj] is equal to [null... |
* This file is part of library .
* Copyright ( C ) 2007 - 2015 .
*
* library is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... |
feee5c0f242dd9279879cac3395f2e653b1d5378143b2dd81e545e4d8e2ae501 | stumpwm/stumpwm-contrib | package.lisp | package.lisp
(defpackage #:globalwindows
(:use #:cl :stumpwm))
(in-package #:globalwindows)
(import '(
stumpwm::*window-format*
stumpwm::completing-read
stumpwm::current-group
stumpwm::current-screen
stumpwm::current-window
stumpwm::focus-all
stumpwm::frame-raise-window
stumpwm::group-windows
s... | null | https://raw.githubusercontent.com/stumpwm/stumpwm-contrib/a7dc1c663d04e6c73a4772c8a6ad56a34381096a/util/globalwindows/package.lisp | lisp | package.lisp
(defpackage #:globalwindows
(:use #:cl :stumpwm))
(in-package #:globalwindows)
(import '(
stumpwm::*window-format*
stumpwm::completing-read
stumpwm::current-group
stumpwm::current-screen
stumpwm::current-window
stumpwm::focus-all
stumpwm::frame-raise-window
stumpwm::group-windows
s... | |
226bcccdac218207fcb27d4463e4251627f99ba244bb1c99f8a7f661f863c044 | c-cube/ezcurl | argiope.ml | open Lwt.Infix
module Str_set = CCSet.Make(String)
module Uri_tbl = CCHashtbl.Make(struct
include Uri
let hash u = Hashtbl.hash (to_string u)
end)
let verbose_ = ref 0
module Run = struct
type t = {
domains: Str_set.t; (* domains to recursively crawl *)
tasks: Uri.t Queue.t;
default_host: st... | null | https://raw.githubusercontent.com/c-cube/ezcurl/0733fc8b1e149473e5b59fbbb89c47b9acd4997a/examples/argiope/argiope.ml | ocaml | domains to recursively crawl
already explored
number of pages crawled
include the domains of [start] in [domains]
fetch URL (only 500kb)
bad URL!
follow this link
relative URL, make it absolute
bad URL!
recurse
wait for all workers to be done
crawl | open Lwt.Infix
module Str_set = CCSet.Make(String)
module Uri_tbl = CCHashtbl.Make(struct
include Uri
let hash u = Hashtbl.hash (to_string u)
end)
let verbose_ = ref 0
module Run = struct
type t = {
tasks: Uri.t Queue.t;
default_host: string;
max: int;
mutable bad: Uri.t list;
j: int... |
ab2ac1ba31134db5d535a54403a574c6c030950c6db4fca5c89463826a3fc638 | programaker-project/Programaker-Core | automate_rest_api_users_root.erl | %%% @doc
%%% REST endpoint to manage knowledge collections.
%%% @end
-module(automate_rest_api_users_root).
-export([init/2]).
-export([ allowed_methods/2
, is_authorized/2
, content_types_provided/2
, options/2
]).
-export([ to_json/2
]).
-define(UTILS, automate_rest_api_utils... | null | https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_rest_api/src/automate_rest_api_users_root.erl | erlang | @doc
REST endpoint to manage knowledge collections.
@end
Don't do authentication if it's just asking for options
CORS
GET
Users |
-module(automate_rest_api_users_root).
-export([init/2]).
-export([ allowed_methods/2
, is_authorized/2
, content_types_provided/2
, options/2
]).
-export([ to_json/2
]).
-define(UTILS, automate_rest_api_utils).
-include("./records.hrl").
-include("../../automate_storage/src/re... |
6aba7efe869886c52a8312de88a6cd4574989a7b5887ed07d1761e2e71240dae | JHU-PL-Lab/jaylang | stair.ml | open Core
open Z3
open Utils
let up_stair i =
Boolean.mk_implies ctx (vb i) @@ Boolean.mk_and ctx [ vb (i + 1); vb (i + 2) ]
let experiment k =
Printf.printf "\n[%d] " k ;
Solver.reset solver ;
List.range 0 k |> List.iter ~f:(fun i -> Solver.add solver [ up_stair i ]) ;
let result = Utils.time_work (fun ... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/914b4e13e8c8e411a1d55916101875311894b826/src-test/bin/stair.ml | ocaml | List.range ~stride:1000 60000 65000 |> List.iter ~f:experiment; | open Core
open Z3
open Utils
let up_stair i =
Boolean.mk_implies ctx (vb i) @@ Boolean.mk_and ctx [ vb (i + 1); vb (i + 2) ]
let experiment k =
Printf.printf "\n[%d] " k ;
Solver.reset solver ;
List.range 0 k |> List.iter ~f:(fun i -> Solver.add solver [ up_stair i ]) ;
let result = Utils.time_work (fun ... |
7cfa265835d4841988bc106d1b143f447c5c29df387b83c5572597e319535175 | nuvla/api-server | nuvlabox_peripheral.cljc | (ns sixsq.nuvla.server.resources.spec.nuvlabox-peripheral
(:require
[clojure.spec.alpha :as s]
[sixsq.nuvla.server.resources.spec.common :as common]
[sixsq.nuvla.server.util.spec :as su]
[spec-tools.core :as st]))
;;
;; general information
;;
(s/def ::version
(-> (st/spec nat-int?)
(assoc :... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/src/sixsq/nuvla/server/resources/spec/nuvlabox_peripheral.cljc | clojure |
general information
reference to nuvlabox | (ns sixsq.nuvla.server.resources.spec.nuvlabox-peripheral
(:require
[clojure.spec.alpha :as s]
[sixsq.nuvla.server.resources.spec.common :as common]
[sixsq.nuvla.server.util.spec :as su]
[spec-tools.core :as st]))
(s/def ::version
(-> (st/spec nat-int?)
(assoc :name "version"
:... |
fed9518c9befd1deae64884037f2ac6417acfc05cffaa2bd37cb31bbc50f05d6 | uhc/uhc | Heuristic.hs | {-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
-- | License : GPL
--
-- Maintainer :
-- Stability : provisional
-- Portability : non-portable (requires extensions)
-----------------------------------------------------------------------... | null | https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/top/Implementation/TypeGraph/Heuristic.hs | haskell | # OPTIONS -fglasgow-exts #
---------------------------------------------------------------------------
| License : GPL
Maintainer :
Stability : provisional
Portability : non-portable (requires extensions)
---------------------------------------------------------------------------
-----------... |
module Top.Implementation.TypeGraph.Heuristic where
import Top.Implementation.TypeGraph.ClassMonadic
import Top.Implementation.TypeGraph.Basics
import Top.Implementation.TypeGraph.Path
import Top.Types
import Top.Solver
import Top.Util.IntErr (internalError)
type PathHeuristics info = Path (EdgeId, info) -> [Heuris... |
9bfd8e7b90bd92bf4ab47bf540749364c8bf273c13a0e34e442d5e8ba51a496b | wellposed/numerical | Backwards.hs |
module Control.NumericalApplicative.Backwards where
import Prelude hiding (foldr, foldr1, foldl, foldl1)
import qualified Control.Applicative as A
import Data.Foldable as F
import Data.Traversable as T
-- | The same functor, but with an 'Applicative' instance that performs
-- actions in the reverse order.
newtype B... | null | https://raw.githubusercontent.com/wellposed/numerical/6b458232760b20674487bd9f8442b0991ce59423/src/Control/NumericalApplicative/Backwards.hs | haskell | | The same functor, but with an 'Applicative' instance that performs
actions in the reverse order.
| Derived instance.
| Apply @f@-actions in the reverse order.
# INLINE (<*>) #
| Derived instance.
| Derived instance.
#INLINE traverse #
# INLINE (<**>) # |
module Control.NumericalApplicative.Backwards where
import Prelude hiding (foldr, foldr1, foldl, foldl1)
import qualified Control.Applicative as A
import Data.Foldable as F
import Data.Traversable as T
newtype Backwards f a = Backwards { forwards :: f a }
instance (Functor f) => Functor (Backwards f) where
fma... |
52ff76cbf5866d606b2463353e9efaf01d468ccc64578fa1b0051475317a47e5 | sthilaid/space-invaders | thread-simulation-macro.scm | ;; (requires match.scm)
;; Critical section used with the semaphores. action and actions will
;; be executed inside the given semaphore (that should be a mutex for
;; a critical-section) and the semaphore will be released after the
;; execution of the actions is finished. The last returned value of
;; action/actions w... | null | https://raw.githubusercontent.com/sthilaid/space-invaders/42baab45e3f477c630f782cd93d2d1f0b3f00bf6/thread-simulation-macro.scm | scheme | (requires match.scm)
Critical section used with the semaphores. action and actions will
be executed inside the given semaphore (that should be a mutex for
a critical-section) and the semaphore will be released after the
execution of the actions is finished. The last returned value of
action/actions will be return... |
(define-macro (critical-section! sem action . actions)
(let ((result (gensym 'crit-section-result)))
`(begin
(sem-lock! ,sem)
(let ((,result (begin ,action ,@actions)))
(sem-unlock! ,sem)
,result))))
(define-macro (prioritized-continuation continuation-corout)
(define arg (gen... |
9d43862069be70b8d16569dcd843857f01f78dfa0779f4af974f44a1ed64a85e | TrustInSoft/tis-interpreter | cabsvisit.ml | Modified by TrustInSoft
(****************************************************************************)
(* *)
Copyright ( C ) 2001 - 2003
< >
(* Scott M... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/kernel_services/visitors/cabsvisit.ml | ocaml | **************************************************************************
Scott McPeak <>
All rights reserved.
... | Modified by TrustInSoft
Copyright ( C ) 2001 - 2003
< >
< >
< >
1 . Redistributions of source code must retain the above copyright ... |
eeb63ea93ca002d1df49a4596486925d985e75a9b349c5f81a6d6008768f87d2 | SamB/coq | closure.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/kernel/closure.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i $Id$ i
i
i
Flags for profiling re... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Names
open Te... |
06befb9ac6b84ba055590d3debb6dda9a325e033865e2ef9f85b39c52bb7b048 | isovector/dynahaskell | Main.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Main where
import Config (cProjectVersion)
import Control.Exception (Exception, Handler(..), ErrorCall(..))
import qualified Control.Exception as E
import Data.Typeable (Typeable)
import Data.Version (showVersion)
import System.Directory (getCurrentDirectory)
import System.... | null | https://raw.githubusercontent.com/isovector/dynahaskell/50819888fa118e123f45d98d3d135e611f4b0c35/lib/hie-bios/exe/Main.hs | haskell | # LANGUAGE DeriveDataTypeable #
--------------------------------------------------------------
--------------------------------------------------------------
--------------------------------------------------------------
find cradle does a takeDirectory on the argument, so make it into a file
for debug |
module Main where
import Config (cProjectVersion)
import Control.Exception (Exception, Handler(..), ErrorCall(..))
import qualified Control.Exception as E
import Data.Typeable (Typeable)
import Data.Version (showVersion)
import System.Directory (getCurrentDirectory)
import System.Environment (getArgs)
import System.... |
f28ac7f494aee427a851d72b0c347c2d176afdaf45726871acaab4a501cbb601 | leksah/ltk | Rectangle.hs | # LANGUAGE DataKinds #
# OPTIONS_GHC -Wall #
-----------------------------------------------------------------------------
--
-- Module : IDE.Core.ViewFrame
Copyright : ( c ) ,
-- License : GNU-GPL
--
-- Maintainer : <maintainer at leksah.org>
-- Stability : provisional
-- Portability : po... | null | https://raw.githubusercontent.com/leksah/ltk/9a85b521025b3ab8d54eb20e943d59adb7eda5d4/src/Graphics/UI/Frame/Rectangle.hs | haskell | ---------------------------------------------------------------------------
Module : IDE.Core.ViewFrame
License : GNU-GPL
Maintainer : <maintainer at leksah.org>
Stability : provisional
Portability : portable
------------------------------------------------------------------------------- | # LANGUAGE DataKinds #
# OPTIONS_GHC -Wall #
Copyright : ( c ) ,
| Portable Rectangle type that works with older versions
module Graphics.UI.Frame.Rectangle (
Rectangle(..)
, newRectangle
, setRectangleWidth
, setRectangleHeight
, setRectangleX
, setRectangleY
, getRectangleWidth
, ge... |
b8c8db4dabcfd27c280a951016ab8ad7d3677175d10cf372d420f8f6b9a62817 | runeksvendsen/restful-payment-channel-server | DB.hs | {-# LANGUAGE ScopedTypeVariables #-}
module PayChanServer.DB where
import Common.Util
import PayChanServer.Types
import PayChanServer.Util
import qualified PayChanServer.Config.Types as Conf
import qualified ChanStore.Interface as DBConn
import qualified AppPrelude.Man as DB
import q... | null | https://raw.githubusercontent.com/runeksvendsen/restful-payment-channel-server/0fe65eadccad5ef2b840714623ec407e509ad00b/src/PayChanServer/DB.hs | haskell | # LANGUAGE ScopedTypeVariables #
|Keep trying to connect (only used during startup).
If we fail to get a result because host is offline:
log about it, then keep trying every 'delaySecs'
seconds until we get a result.
Keep trying to connect
<- First try to connect
If there's no connection: log; make it prin... |
module PayChanServer.DB where
import Common.Util
import PayChanServer.Types
import PayChanServer.Util
import qualified PayChanServer.Config.Types as Conf
import qualified ChanStore.Interface as DBConn
import qualified AppPrelude.Man as DB
import qualified Network.Haskoin.Transaction a... |
819204d9ca16d4dc0cb06ddc4d2ea3cd2a2f7bd7d3b36ee22b774b59570acf12 | caradoc-org/caradoc | view.ml | (*****************************************************************************)
(* Caradoc: a PDF parser and validator *)
Copyright ( C ) 2017
(* *)
(* This program is... | null | https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/ui/view.ml | ocaml | ***************************************************************************
Caradoc: a PDF parser and validator
This program is free software; you can redistribute it and/or modify
... | Copyright ( C ) 2017
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation .
You should have received a copy of the GNU General Public License along
with this program ; if n... |
53577aec197bfcf06935d7c81f08f193598a7dc2abdd7bafd10b92a81914f90d | kadena-io/kadenamint | Coin.hs | # LANGUAGE LambdaCase #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module Kadenamint.Coin where
import Control.Lens ((&))
import Control.Monad.Except (ExceptT(..), runExceptT)
import Control.Monad.IO.Class ... | null | https://raw.githubusercontent.com/kadena-io/kadenamint/00c99eca71c4107d1ed31754e26d9e552237e3bd/src/Kadenamint/Coin.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE LambdaCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE QuasiQuotes #
module Kadenamint.Coin where
import Control.Lens ((&))
import Control.Monad.Except (ExceptT(..), runExceptT)
import Control.Monad.IO.Class (MonadIO(..... |
52c7bf95a7567a97fababcc5263ebd6ef69cec8f7829d64993f38e86ef82e1d8 | aeolus-project/zephyrus | output_helper.ml | (****************************************************************************)
(* *)
This file is part of Zephyrus .
(* *)
Z... | null | https://raw.githubusercontent.com/aeolus-project/zephyrus/0b52de4038bbab724e6a9628430165a7f09f77ae/src/output/output_helper.ml | ocaml | **************************************************************************
(at your option) any later version.
... | This file is part of Zephyrus .
Zephyrus is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
Zephyru... |
fb3e51d9817fd37440ada82f4c8c83e67c381e965392aedf05869142ac2d9795 | janestreet/ecaml | test_minibuffer.ml | open! Core
open! Async_kernel
open! Import
open! Minibuffer
let%expect_test "[y_or_n]" =
let test input =
with_input input (fun () ->
let%bind bool = y_or_n ~prompt:"" in
print_s [%sexp (bool : bool)];
return ())
in
let%bind () = test "y" in
[%expect {| (y or n) true |}];
let%bind () = ... | null | https://raw.githubusercontent.com/janestreet/ecaml/25a5a2972b3a94f5529a46363b37670a6c1de195/test/test_minibuffer.ml | ocaml | open! Core
open! Async_kernel
open! Import
open! Minibuffer
let%expect_test "[y_or_n]" =
let test input =
with_input input (fun () ->
let%bind bool = y_or_n ~prompt:"" in
print_s [%sexp (bool : bool)];
return ())
in
let%bind () = test "y" in
[%expect {| (y or n) true |}];
let%bind () = ... | |
059fecbd1276b372d0fbbe3ca6631472f95788f6deebac52c4433aad6a0e028f | lambdaisland/witchcraft-workshop | s02_locations_blocks_entities.clj | (ns s02-locations-blocks-entities
"Let's look at the core concepts of Minecraft. This section is a bit more
theoretical, but it'll give you a much better foundation for what comes next,
and hopefully give you a feeling for how the Witchcraft API is designed. It's
quite intuitive once you see the patterns."
(:... | null | https://raw.githubusercontent.com/lambdaisland/witchcraft-workshop/24d2db10513a748cdf624e27e1a99593364117c5/repl_sessions/s02_locations_blocks_entities.clj | clojure | and the objects used to represent them. Witchcraft goes to great lengths to
sense of what is there.
servers implement, so that you are isolated from the implemenentation details
org.bukkit.Location
This returns an instance of `org.bukkit.Location`. Note that witchraft
installs a print-handler, which is why it sti... | (ns s02-locations-blocks-entities
"Let's look at the core concepts of Minecraft. This section is a bit more
theoretical, but it'll give you a much better foundation for what comes next,
and hopefully give you a feeling for how the Witchcraft API is designed. It's
quite intuitive once you see the patterns."
(:... |
b9ce5a09aba623dbd64aff6681227efe7d7e352e651d4a1448dccd00c8e56cb9 | geophf/1HaskellADay | Boolean.hs | module Data.Numeral.Boolean where
import Prelude hiding (and, or, not)
import Control.Monad (join)
import Control.Boolean
-
A solution to the boolean arithmetic problem posted at
The meta language :
Given the operators from yesterday ( and , or , not , etc ) , and only one data type ,
, okay : two data t... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Data/Numeral/Boolean.hs | haskell | }
we use the least-significant-bit-first implementation of binary numbers:
The approach for add:
tt: tt = f, tf = t, ft = t, ff = f -- xor
tt for the carry bit: tt = t, otherwise f -- and
splitter = t = t,t, f = f,f
}
yep: testBool myxor == testBool xor ~> True
Wow.
we take the simple shift-add app... | module Data.Numeral.Boolean where
import Prelude hiding (and, or, not)
import Control.Monad (join)
import Control.Boolean
-
A solution to the boolean arithmetic problem posted at
The meta language :
Given the operators from yesterday ( and , or , not , etc ) , and only one data type ,
, okay : two data t... |
98352168fd58ddb9b7638b2b161ca81500ac9363342e33006a18c3e7a32a396b | ygmpkk/house | Trans.hs | module Unstable.Control.Monad.Trans
( -- * General transformer classes
MonadTrans(..),
HasBaseMonad(..),
MapTrans(..),
-- * Plumbing transformers
-- $PlumbingDoc
-- ** Reader
MonadReader(..),
$ MonadReaderDoc
asks,
localSet,
-- ** Writer
MonadWriter(..),
-- $Mona... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/monads/Unstable/Control/Monad/Trans.hs | haskell | * General transformer classes
* Plumbing transformers
$PlumbingDoc
** Reader
** Writer
$MonadWriterDoc
** State
$MonadStateDoc
* Control transformers
$ControlDoc
** Exceptions
** Non-determinism
$MonadNondetDoc
$MonadGenResumeDoc
** Continuations
$MonadContDoc
-------------------------------------------... | module Unstable.Control.Monad.Trans
MonadTrans(..),
HasBaseMonad(..),
MapTrans(..),
MonadReader(..),
$ MonadReaderDoc
asks,
localSet,
MonadWriter(..),
listens,
censor,
pass,
listenTell,
MonadState(..),
gets,
modify,
MonadError(..),
$ MonadErrorD... |
20974c1689f4eb2b8b31d9ec81ea7cc69c5fea25ab82e3a0aa9e9d2f21d95284 | c089/haskell-craft3e | RandomGen.hs | -------------------------------------------------------------------------
--
Haskell : The Craft of Functional Programming , 3e
( c ) Addison - Wesley , 1996 - 2011 .
--
-- Random number generation.
--
-------------------------------------------------------------------------
-- Lazy programming
-- ^^^^^^^... | null | https://raw.githubusercontent.com/c089/haskell-craft3e/869e382601cab50559c4473dfa9c7480f1acba58/Simulation/RandomGen.hs | haskell | -----------------------------------------------------------------------
Random number generation.
-----------------------------------------------------------------------
Lazy programming
^^^^^^^^^^^^^^^^
Find the next (pseudo-)random number in the sequence.
A (pseudo-)random sequence is given by iterating thi... | Haskell : The Craft of Functional Programming , 3e
( c ) Addison - Wesley , 1996 - 2011 .
module RandomGen where
nextRand :: Int -> Int
nextRand n = (multiplier*n + increment) `mod` modulus
randomSequence :: Int -> [Int]
randomSequence = iterate nextRand
seed, multiplier, increment, modulus :: Int
s... |
1621336dcb86db4515ebfe457cca56746feeb059de47e10c66c07e80daaf3010 | kit-clj/kit | injections.clj | (ns kit-generator.injections
(:require
[clojure.java.io :as jio]
[clojure.test :refer :all]
[rewrite-clj.zip :as z]
[kit-generator.io :refer [delete-folder]]
[kit.generator.io :as io]
[kit.generator.modules.injections :refer :all]))
(def config-template "test/resources/sample-system.edn")
(de... | null | https://raw.githubusercontent.com/kit-clj/kit/320b920dcf25c33130f33b0e1cd55ff13f3157f6/libs/kit-generator/test/kit_generator/injections.clj | clojure | (ns kit-generator.injections
(:require
[clojure.java.io :as jio]
[clojure.test :refer :all]
[rewrite-clj.zip :as z]
[kit-generator.io :refer [delete-folder]]
[kit.generator.io :as io]
[kit.generator.modules.injections :refer :all]))
(def config-template "test/resources/sample-system.edn")
(de... | |
8e5b77ff02ff5d954216eff57fd73213a4f68e550e7137ac34759145831d9ae1 | dfordivam/tenjinreader | LoginWidget.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PartialTypeSignatures #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecursiveDo #
{-# LANGUAGE RankNTypes #-}
module LoginWidget
... | null | https://raw.githubusercontent.com/dfordivam/tenjinreader/894a6f6b23d52c9c048740c0ea62f4c0f47d9561/android/src/LoginWidget.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
let url s = ":3000/websocket/app/" <> s | # LANGUAGE PartialTypeSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecursiveDo #
module LoginWidget
(loginWidget, logout)
where
import FrontendCommon
import qualified GHCJS.DOM.Types as DOM
i... |
8e8f28455326bcef351d74fcf7f4aad86537090a7f0c07d6cf49b48ecaa6c4d2 | draperlaboratory/cbat_tools | cbat_word_ops.ml | (***************************************************************************)
(* *)
Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc.
(* *)
(* This... | null | https://raw.githubusercontent.com/draperlaboratory/cbat_tools/334523cb4415f187e33f190a691e34b73733ef24/vsa/value_set/lib/src/cbat_word_ops.ml | ocaml | *************************************************************************
This file is provided under the license found in the LICENSE file in
the top-level director... | Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc.
This work is funded in part by ONR / NAWC Contract N6833518C0107 . Its
content does not necessarily reflect the position or policy of the US
include Bap.Std
module W = Word
module Option = Core_kernel.Option
open Cbat_vsa_utils
... |
de486fb22aac82ec4769ff84cdad38942dd35f6ac070bcc933912a9ff5557c21 | pangloss/pure-conditioning | handlers.clj | (ns pure-conditioning.handlers
(:require [pure-conditioning.core :refer [condition* restarts**]])
(:import pure_conditioning.core.Restarts))
(defn custom
"Mark a function as a custom handler.
A custom handler is a function `(f handlers depth condition normally)` that returns a function `(f' value)`."
[f]
... | null | https://raw.githubusercontent.com/pangloss/pure-conditioning/f605800bcbdf80a408c60d8e60bb6cd8222f17c6/src/pure_conditioning/handlers.clj | clojure | Special case to support fall-through which trims the handler stack.
Using alone will cause a stack overflow. | (ns pure-conditioning.handlers
(:require [pure-conditioning.core :refer [condition* restarts**]])
(:import pure_conditioning.core.Restarts))
(defn custom
"Mark a function as a custom handler.
A custom handler is a function `(f handlers depth condition normally)` that returns a function `(f' value)`."
[f]
... |
563bd73ee5df32918fa90fc7715162080f0b4efe0c19b63481135816dfdda069 | OpenC2-org/ocas | act_svr_map.erl | @author
( C ) 2017 , sFractal Consulting LLC
%%%
-module(act_svr_map).
-author("Duncan Sparrell").
-license("Apache 2.0").
%%%-------------------------------------------------------------------
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, ... | null | https://raw.githubusercontent.com/OpenC2-org/ocas/c15132d9f37b1e0e29884456a520557c25b22f38/apps/ocas/src/act_svr_map.erl | erlang |
-------------------------------------------------------------------
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this... | @author
( C ) 2017 , sFractal Consulting LLC
-module(act_svr_map).
-author("Duncan Sparrell").
-license("Apache 2.0").
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NO... |
fc08bb8030975e89abd869ca9b0066b685dfafaac93eb24d8cefb040bd1ef7f2 | jacobhilton/backgammon | game.mli | open Core
open Async
type t
val of_equity : Equity.t -> t
val human : ?history_position:int -> stdin:Reader.t -> unit -> t
val gnubg
: command:string
-> import_file:string
-> export_file:string
-> display:bool
-> timeout:Time.Span.t
-> t Deferred.t
val vs : t Per_player.t -> t
val play
: ?abandon_... | null | https://raw.githubusercontent.com/jacobhilton/backgammon/9b5330efa4c8314b8fb7cb6b9b2a428a23d29719/game.mli | ocaml | open Core
open Async
type t
val of_equity : Equity.t -> t
val human : ?history_position:int -> stdin:Reader.t -> unit -> t
val gnubg
: command:string
-> import_file:string
-> export_file:string
-> display:bool
-> timeout:Time.Span.t
-> t Deferred.t
val vs : t Per_player.t -> t
val play
: ?abandon_... | |
59291177a76e9765875839ee995d6e6e61ab71b93e14d2044db38bdf54b91cb7 | asr/apia | ATPs.hs |
| Call the automatic theorem provers for first - order logic ( ) .
# LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UnicodeSyntax #
module Apia.ATPs
Required by .
, callATPs
) where
------------------------------------------------------------------------------
import A... | null | https://raw.githubusercontent.com/asr/apia/a66c5ddca2ab470539fd68c42c4fbd45f720d682/src/Apia/ATPs.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
E 2.1
SPASS V 3.9.
version ` option in Equinox .
version ` option in ileanCoP.
No `--version` option in SPASS.
By running `SPASS` we can read the version but the ... |
| Call the automatic theorem provers for first - order logic ( ) .
# LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UnicodeSyntax #
module Apia.ATPs
Required by .
, callATPs
) where
import Apia.Prelude
import Agda.Utils.Impossible ( Impossible(Impossible) , throwImpos... |
94d97c0d586f1b311f017e253955b6bf1ae089759b4955d9b05e25a065c9b993 | boot-clj/boot-cljs | util_test.clj | (ns adzerk.boot-cljs.util-test
(:require [clojure.test :refer :all]
[adzerk.boot-cljs.util :refer :all]
[clojure.java.io :as io]
[clojure.stacktrace :as st]
[clojure.string :as string]))
(deftest find-relative-path-test
(is (= "src/foo/bar.clj" (find-relative-path ["... | null | https://raw.githubusercontent.com/boot-clj/boot-cljs/9ee43c278cfd3d56699242912e3e95195f549277/test/adzerk/boot_cljs/util_test.clj | clojure | (ns adzerk.boot-cljs.util-test
(:require [clojure.test :refer :all]
[adzerk.boot-cljs.util :refer :all]
[clojure.java.io :as io]
[clojure.stacktrace :as st]
[clojure.string :as string]))
(deftest find-relative-path-test
(is (= "src/foo/bar.clj" (find-relative-path ["... | |
4c15e1f6617255fda80ded20fb6421eaa2622d7bb38069b80053b21eb306e9c2 | zenspider/schemers | exercise.2.40.scm | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
;; Exercise 2.40
;; Define a procedure `unique-pairs' that, given an integer n,
generates the sequence of pairs ( i , j ) with 1 < = j < i < = n. Use
;; `unique-pairs' to simplify the definition of `prime-sum-pairs'
;; given above.
(defi... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.40.scm | scheme | Exercise 2.40
Define a procedure `unique-pairs' that, given an integer n,
`unique-pairs' to simplify the definition of `prime-sum-pairs'
given above.
(assert-equal x y) | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
generates the sequence of pairs ( i , j ) with 1 < = j < i < = n. Use
(define (unique-pairs n)
(flatmap (lambda (i)
(map (lambda (j) (list i j))
(enumerate-interval 1 (- i 1))))
(enumerate-inte... |
986b468ae319366bb949b7c684e74fcf01d3d742f848be5a75897259ad3297aa | sgbj/MaximaSharp | spring_embedding.lisp | ;;;
GRAPHS - graph theory package for Maxima
;;;
Copyright ( C ) 2007 - 2011 < >
;;;
;;; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
;;; (... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/graphs/spring_embedding.lisp | lisp |
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A... | GRAPHS - graph theory package for Maxima
Copyright ( C ) 2007 - 2011 < >
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
T.M.J. ... |
127a193b2c699617fd924ae534095d8911643bbf792110b995cfedba2eaeeeb8 | goldfirere/video-resources | GenericLoopy.hs | # LANGUAGE FlexibleContexts , DerivingVia , UndecidableInstances , TypeFamilies ,
InstanceSigs , ScopedTypeVariables #
InstanceSigs, ScopedTypeVariables #-}
module GenericLoopy where
import GHC.Generics
import Data.Functor.Const
import qualified Data.Monoid as M
import Data.Coerce
This ... | null | https://raw.githubusercontent.com/goldfirere/video-resources/8bb9e385263c926cf7e0b57426423c403d204ade/2022-01-14-loopy-instances/GenericLoopy.hs | haskell | Then set the trap:
And spring it: | # LANGUAGE FlexibleContexts , DerivingVia , UndecidableInstances , TypeFamilies ,
InstanceSigs , ScopedTypeVariables #
InstanceSigs, ScopedTypeVariables #-}
module GenericLoopy where
import GHC.Generics
import Data.Functor.Const
import qualified Data.Monoid as M
import Data.Coerce
This ... |
f57af0d2623f8d19a163bbd45087176bf1f97a1e3b7673dbfbd2db4993465e23 | codedownio/aeson-typescript | Util.hs | # LANGUAGE CPP #
module Util where
import Control.Monad
import Data.Aeson as A
import Data.Aeson.TypeScript.TH
import qualified Data.ByteString.Lazy as B
import Data.Proxy
import Data.String.Interpolate
import qualified Data.Text as T
import System.Directory
import System.Environment
import System.Exit
import System.... | null | https://raw.githubusercontent.com/codedownio/aeson-typescript/d6a3addf220d51dcc1199744869beda2b8bb2aa1/test/Util.hs | haskell | Assume it's set up on the path
"--diagnostics", "--listFiles" | # LANGUAGE CPP #
module Util where
import Control.Monad
import Data.Aeson as A
import Data.Aeson.TypeScript.TH
import qualified Data.ByteString.Lazy as B
import Data.Proxy
import Data.String.Interpolate
import qualified Data.Text as T
import System.Directory
import System.Environment
import System.Exit
import System.... |
5c587542ab964aabd975f028d600b00008bad842af5a34a9403d7e24ed553a52 | nikodemus/sb-vector-io | package.lisp | By Nikodemus Siivola < > , 2008 , 2011
;;;;
;;;; Permission is hereby granted, free of charge, to any person
;;;; obtaining a copy of this software and associated documentation files
( the " Software " ) , to deal in the Software without restriction ,
;;;; including without limitation the rights to use, copy, modi... | null | https://raw.githubusercontent.com/nikodemus/sb-vector-io/b55e8bf32932ff28ba09722af8aed90d7a03ce54/package.lisp | lisp |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
IN NO EVEN... | By Nikodemus Siivola < > , 2008 , 2011
( 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 so ,
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY ... |
0377c51ef124143333e14a6007e07bde2ddafdf5635c0dc070c14d68960c0240 | uwplse/Cassius | dom.rkt | #lang racket
(require "common.rkt" "tree.rkt")
(provide (struct-out dom) dom-context in-elements in-boxes parse-dom unparse-dom
dom-box->elt dom-elt->box dom-first-box? dom-last-box?
dom-strip-positions dom-set-range dom-rematch!)
(struct dom (name properties elements boxes match) #:prefab #:mutable... | null | https://raw.githubusercontent.com/uwplse/Cassius/edcb8302c43b7b149280504c00672d8133219b44/src/dom.rkt | racket | #lang racket
(require "common.rkt" "tree.rkt")
(provide (struct-out dom) dom-context in-elements in-boxes parse-dom unparse-dom
dom-box->elt dom-elt->box dom-first-box? dom-last-box?
dom-strip-positions dom-set-range dom-rematch!)
(struct dom (name properties elements boxes match) #:prefab #:mutable... | |
e8b9e2d75e9369f0d483a850bcf53b409168b3d5659e026d31e960d93a1db657 | active-group/active-clojure | record_data_test.cljc | (ns active.clojure.record-data-test
(:require #?(:clj [active.clojure.record :refer [define-record-type]]
:cljs [active.clojure.cljs.record :refer-macros [define-record-type]])))
(define-record-type IntInt
{:spec ::IntInt}
(make-int-int fst snd)
int-int?
[^{:spec int?} fst int-int-fst
^{:sp... | null | https://raw.githubusercontent.com/active-group/active-clojure/44050a1292fa610dde732d5fbfc42c37ad976d3a/test/active/clojure/record_data_test.cljc | clojure | (ns active.clojure.record-data-test
(:require #?(:clj [active.clojure.record :refer [define-record-type]]
:cljs [active.clojure.cljs.record :refer-macros [define-record-type]])))
(define-record-type IntInt
{:spec ::IntInt}
(make-int-int fst snd)
int-int?
[^{:spec int?} fst int-int-fst
^{:sp... | |
9fc483b5fd30711dd7fdf87a3b5462b06ab7dcdcb80039605d8facb141991367 | WorksHub/client | company.cljc | (ns wh.components.navbar.company
(:require #?(:cljs [reagent.core :as r])
[wh.components.icons :as icons]
[wh.components.navbar.components :as components]
[wh.components.navbar.shared :as navbar-shared]
[wh.components.navbar.styles :as styles]
[wh.components... | null | https://raw.githubusercontent.com/WorksHub/client/beda7a8637772bd3edaf534b17c1c09fef38c1ec/common/src/wh/components/navbar/company.cljc | clojure | :path takes precedence over :route in setting :href value,
but :route is used to decide whether link is active.
All is well here
:path takes precedence over :route in setting :href value,
but :route is used to decide whether link is active.
All is well here | (ns wh.components.navbar.company
(:require #?(:cljs [reagent.core :as r])
[wh.components.icons :as icons]
[wh.components.navbar.components :as components]
[wh.components.navbar.shared :as navbar-shared]
[wh.components.navbar.styles :as styles]
[wh.components... |
ca4603627fe07a98aad85e9c963bb0f811fc2a8ad98bd53fbc63bacd04ce0dde | iharland/pdf-to-images | core_test.clj | (ns pdf-to-images.core-test
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[pdf-to-images.core :refer :all])
(:import [org.apache.pdfbox.tools.imageio ImageIOUtil]
[javax.imageio ImageIO]
(java.io ByteArrayOutputStream)))
(def dpi 72)
(deftest image-to-... | null | https://raw.githubusercontent.com/iharland/pdf-to-images/c6649d6448ad7a9d32f335f5656cb10c5b349eb6/test/pdf_to_images/core_test.clj | clojure | (ns pdf-to-images.core-test
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[pdf-to-images.core :refer :all])
(:import [org.apache.pdfbox.tools.imageio ImageIOUtil]
[javax.imageio ImageIO]
(java.io ByteArrayOutputStream)))
(def dpi 72)
(deftest image-to-... | |
0ed5311e061c7756994c157b7624e1ef19242a3322e87603d590e8f25d0eadc6 | rjray/advent-2020-clojure | day06.clj | (ns advent-of-code.day06
(:require [clojure.set :as set]
[clojure.string :as str]))
(defn- count-group [group]
(count (set (re-seq #"[a-z]" group))))
(defn- count-by-group [groups]
(map count-group groups))
(defn part-1
"Day 06 Part 1"
[input]
(as-> input $
(str/split $ #"\n\n")
(coun... | null | https://raw.githubusercontent.com/rjray/advent-2020-clojure/631b36545ae1efdebd11ca3dd4dca032346e8601/src/advent_of_code/day06.clj | clojure | (ns advent-of-code.day06
(:require [clojure.set :as set]
[clojure.string :as str]))
(defn- count-group [group]
(count (set (re-seq #"[a-z]" group))))
(defn- count-by-group [groups]
(map count-group groups))
(defn part-1
"Day 06 Part 1"
[input]
(as-> input $
(str/split $ #"\n\n")
(coun... | |
fa232048b610ad508c1bbe48c010b613caf99150ed28b300f6b994fc5a626806 | RolfRolles/PandemicML | PLcomplete.ml | (* Exceptions that may be thrown *)
exception Unimplemented of string
exception Unvaluated of string
(* Type declarations *)
type tval =
| False
| True
type prop =
| Constant of tval
| Variable of string
| And of prop * prop
| Or of prop * prop
| Not of prop
| Implies of prop * prop
| Iff of prop * prop
(* Pretty ... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/SMT/Propositional%20Logic/Attic/PLcomplete.ml | ocaml | Exceptions that may be thrown
Type declarations
Pretty printers
Implementations of logical functions
False
True
False
True
False
True
False
True
False
True
False
True
False
True
False
True
Used to implement the logical functions in terms of the tables above
Wrappers for implementations of logical functions
... | exception Unimplemented of string
exception Unvaluated of string
type tval =
| False
| True
type prop =
| Constant of tval
| Variable of string
| And of prop * prop
| Or of prop * prop
| Not of prop
| Implies of prop * prop
| Iff of prop * prop
let string_of_tval = function
| False -> "false"
| True -> "true"
le... |
bf2b6c1f8d2060aad42b63a44cd1c3b52835ba0d205448841d48b664d97743a1 | VERIMAG-Polyhedra/VPL | Ring_polynom_AddOn.mli | open BinNums
open Ring_polynom
type coq_PExpr = coq_Z Ring_polynom.coq_PExpr
| null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/extracted/Ring_polynom_AddOn.mli | ocaml | open BinNums
open Ring_polynom
type coq_PExpr = coq_Z Ring_polynom.coq_PExpr
| |
1a91d5fef857aa756f5f608f471629c35c052f33d0c0d60de3e52912756483e7 | dmvianna/haskellbook | Ch21-Traversable.hs | # LANGUAGE FlexibleContexts #
import Prelude hiding (Either, Left, Right)
import Control.Monad (join)
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
-- Either
data Either a b = Left a
| Right b
deriving (Eq, Ord, Show)
instance Functor (Either... | null | https://raw.githubusercontent.com/dmvianna/haskellbook/b1fdce66283ccf3e740db0bb1ad9730a7669d1fc/src/Ch21-Traversable.hs | haskell | Either
Tuple
fmap f (x, y) = (x, f y)
instance Monoid a => Applicative ((,) a) where
(u, f) <*> (v, x) = (u `mappend` v, f x)
traverse f (x, y) = (,) x <$> f y
Identity
Constant
Maybe
List
Big
Shorter alternative: sequenceA = traverse id
Bigger
S
Tree
| # LANGUAGE FlexibleContexts #
import Prelude hiding (Either, Left, Right)
import Control.Monad (join)
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
data Either a b = Left a
| Right b
deriving (Eq, Ord, Show)
instance Functor (Either a) where
... |
a9a9cac0b2515a73a765582ea9e4e4ea792b697f3f579d41e073807f5020765d | cl-fui/subtext | echostream.lisp | (in-package :subtext)
;;------------------------------------------------------------------------------
;; echostream - unbuffered gtk stream that erases itself on terpri.
;;
(defclass echostream (conbuf)
()
(:metaclass gobject-class))
;;==============================================================================... | null | https://raw.githubusercontent.com/cl-fui/subtext/28cfc31007664552257bd4d04370f7365030ab2e/src/gtk/echostream.lisp | lisp | ------------------------------------------------------------------------------
echostream - unbuffered gtk stream that erases itself on terpri.
==============================================================================
| (in-package :subtext)
(defclass echostream (conbuf)
()
(:metaclass gobject-class))
(defmethod trivial-gray-streams:stream-write-char :around ((stream echostream) char)
(if (eq char #\newline)
(-reset stream)
(progn
(call-next-method stream char)
(stream-flush stream))))
|
c8ba6027bda906fba9968ad72fa46b852167520f35d2773c8e68764c80fa15e8 | ArtixLabs/ArkOLD | Main.hs | module Main where
import Ark.Database.Network (downloadFiles)
import Ark.Themes
( Themes(..)
, alacrittyThemeFile
, fzfSetTheme
, kittyThemeFile
)
import Options.Applicative
data Args =
Args
{ system :: Maybe Bool
, program :: Maybe String
, theme :: Maybe String
, update :: Maybe Bool
... | null | https://raw.githubusercontent.com/ArtixLabs/ArkOLD/90925d43ddbe30d155c4bc3de693c55da9ac49af/app/Main.hs | haskell | module Main where
import Ark.Database.Network (downloadFiles)
import Ark.Themes
( Themes(..)
, alacrittyThemeFile
, fzfSetTheme
, kittyThemeFile
)
import Options.Applicative
data Args =
Args
{ system :: Maybe Bool
, program :: Maybe String
, theme :: Maybe String
, update :: Maybe Bool
... | |
13f594a5e0adc9cbe37e7d92a0958ec4ebbe3dc6e32f9340815834dde1a62b25 | wdebeaum/step | interchangeable.lisp | ;;;;
;;;; W::interchangeable
;;;;
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(W::interchangeable
(wordfeats (W::morph (:FORMS (-LY))))
(SENSES
((meta-data :origin plow :entry-date 20060615 :change-date 20090818 :wn ("interchangeable%5:00:00:symmetrical:00" "interchangeable%5:00:00:replace... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/interchangeable.lisp | lisp |
W::interchangeable
replaceability-val) |
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(W::interchangeable
(wordfeats (W::morph (:FORMS (-LY))))
(SENSES
((meta-data :origin plow :entry-date 20060615 :change-date 20090818 :wn ("interchangeable%5:00:00:symmetrical:00" "interchangeable%5:00:00:replaceable:00") :comments pqx)
)
... |
047143f26771bba0e1f08c384f6b8059a46de5c3c8373b1766f285f71d841326 | danieljharvey/mimsa | Helpers.hs | {-# LANGUAGE OverloadedStrings #-}
module Test.Utils.Helpers (joinLines, fromRight, fromLeft, fromJust, mkStoreExpression, unsafeParseExpr', int, bool, unknown, str', textErrorContains, str, evaluateText, unsafeParseExpr, mtBool, mtString, mtVar, mtInt, unsafeParseDataType, tvNamed, tvNum, typeName, unsafeParseModuleI... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/7931b803a9f7e71ff47dc9afa7dc6bceaeb238ee/compiler/test/Test/Utils/Helpers.hs | haskell | # LANGUAGE OverloadedStrings #
-
--
-- |
module Test.Utils.Helpers (joinLines, fromRight, fromLeft, fromJust, mkStoreExpression, unsafeParseExpr', int, bool, unknown, str', textErrorContains, str, evaluateText, unsafeParseExpr, mtBool, mtString, mtVar, mtInt, unsafeParseDataType, tvNamed, tvNum, typeName, unsafeParseModuleItem, mtFun, unsafeParseMonoType) wh... |
0a2f51c010bc6f75f9bb3d2f2b2e6a1f6f882c5d0bd1cf009936c49d3be6b67b | noprompt/garden | compiler.cljc | (ns garden.compiler
"Functions for compiling Clojure data structures to CSS."
(:require
[clojure.string :as string]
#?(:clj [garden.color :as color]
:cljs [garden.color :as color :refer [CSSColor]])
[garden.compression :as compression]
[garden.selectors :as selectors]
[garden.units :as units]
... | null | https://raw.githubusercontent.com/noprompt/garden/90bf058c30f9d163b4a8421f1c3abc6721935fe5/src/garden/compiler.cljc | clojure | ---------------------------------------------------------------------
Compiler flags
When set to `true` the compiled stylesheet will be "pretty
printed." This would be equivalent to setting
compressor.
A sequence of files to prepend to the output file.
Location to save a stylesheet after compiling.
A list of ve... | (ns garden.compiler
"Functions for compiling Clojure data structures to CSS."
(:require
[clojure.string :as string]
#?(:clj [garden.color :as color]
:cljs [garden.color :as color :refer [CSSColor]])
[garden.compression :as compression]
[garden.selectors :as selectors]
[garden.units :as units]
... |
b907b343a3530b9895bd714bac7f102fa26b22f2f7c33bb5af195cdf0806e657 | Decentralized-Pictures/T4L3NT | test_timelock.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_012_Psithaca/lib_protocol/test/test_timelock.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... |
9fb139b053d632203bac440b7a04f8179d14afa6ad1912daa02374737796da1b | haskell-lisp/yale-haskell | misc.scm | misc.scm -- random other transformations done during CFN processing
;;;
author :
date : 27 Feb 1992
;;;
This file contains specialized CFN walkers that implement rewrite rules
;;; for list-exp, sequence-xxx, list-comp, section-l, and section-r.
;;; Turn list-exps into cons chains.
(define-walker-met... | null | https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/cfn/misc.scm | scheme |
for list-exp, sequence-xxx, list-comp, section-l, and section-r.
Turn list-exps into cons chains.
Make a con-ref for []
Otherwise make an app of :
Sections get turned into lambda expressions.
Do list comprehensions.
rewrite in terms of build and foldr so that we can apply
deforestation techniques later. | misc.scm -- random other transformations done during CFN processing
author :
date : 27 Feb 1992
This file contains specialized CFN walkers that implement rewrite rules
(define-walker-method cfn list-exp (object)
(do-cfn-list-exp (list-exp-exps object)))
(define (do-cfn-list-exp exps)
(if (null?... |
35e14fe659aa16f60b61f5d2a9b9d9f0b41dbec0a726f99dccfb5086f63f5f0a | let-def/ttx | cmi_printer.ml | open Cmon
open Ttx_printer
open Print_utils
let pers_flags = function
| Cmi_format.Rectypes -> constant "Rectypes"
| Cmi_format.Alerts alerts ->
construct "Alerts" [list_map (pair string string)
(Misc.Stdlib.String.Map.bindings alerts)]
| Cmi_format.Opaque -> constant "Opaque... | null | https://raw.githubusercontent.com/let-def/ttx/0a50ba7253056d1202f108b67faf4d9cc78e020d/bin/printer/cmi_printer.ml | ocaml | open Cmon
open Ttx_printer
open Print_utils
let pers_flags = function
| Cmi_format.Rectypes -> constant "Rectypes"
| Cmi_format.Alerts alerts ->
construct "Alerts" [list_map (pair string string)
(Misc.Stdlib.String.Map.bindings alerts)]
| Cmi_format.Opaque -> constant "Opaque... | |
492002cf30ffc1d24fb5d8007eaab46931c389881bf75941dd6693f22a6b2eea | LesBoloss-es/sorting | PeekSort.ml | * { 1 PeekSort }
This module contains the implementation of Peeksort described in ( Munro &
Wild 2018 ) and implemented by the authors at the address :
-optimal-mergesort-code/blob/master/src/wildinter/net/mergesort/PeekSort.java
This module contains the implementation of Peeksort described in ... | null | https://raw.githubusercontent.com/LesBoloss-es/sorting/7c6cafcb16a43d3cfa917ea735ad7fcddd98e855/src/array/nearly-optimal-mergesort/PeekSort.ml | ocaml | |XXXXXXXX|XX X|
find middle run
|XX xxx|x X| | * { 1 PeekSort }
This module contains the implementation of Peeksort described in ( Munro &
Wild 2018 ) and implemented by the authors at the address :
-optimal-mergesort-code/blob/master/src/wildinter/net/mergesort/PeekSort.java
This module contains the implementation of Peeksort described in ... |
82f0e9a8c4161afbf10748862de7164943518bbf4be507f7ade25ae1d7d911b5 | mauny/the-functional-approach-to-programming | xSymb.ml | (*************************************************************************)
(* *)
(* Projet Formel *)
(* *)
CAML - light :... | null | https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/MLGRAPH.DIR/xSymb.ml | ocaml | ***********************************************************************
Projet Formel
... | CAML - light :
45 rue d'Ulm
75005 PARIS
France
#open "MLgraph";;
let fn =
Symbol,{font_descr_filename="preloaded"; font_desc... |
ce4e7a7ffedd2e1c0e22feb71f088e1b841b12db804423bd9f96b11d80e5d929 | thelema/ocaml-community | parse.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/parsing/parse.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
val implementation : Lexing.lexbuf -> ... |
e0054f68101c063d204e181ab1b79f2b3ca1aea236717beceb4e1fe9e9928d87 | ghcjs/ghcjs-dom | SVGLinearGradientElement.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.SVGLinearGradientElement
(js_getX1, getX1, js_getY1, getY1, js_getX2, getX2, js_getY2,
... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGLinearGradientElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.SVGLinearGradientElement
(js_getX1, getX1, js_getY1, getY1, js_getX2, getX2, js_getY2,
getY2, SVGLinearGradientElement(..), gTypeSVGLinearGradientElement)
where
import Pre... |
b1c4e5978b2a3ece2af45d3fddbee65374b26f0110e0fd1d6578dcacce32d516 | kubernetes-client/haskell | Discovery.hs |
Kubernetes
No description provided ( generated by Openapi Generator -generator )
OpenAPI Version : 3.0.1
Kubernetes API version : release-1.20
Generated by OpenAPI Generator ( -generator.tech )
Kubernetes
No description provided (generated by Openapi Generator -generator)
OpenAPI... | null | https://raw.githubusercontent.com/kubernetes-client/haskell/edfb4744a40be1d6a4b9d4a7d060069f2367884a/kubernetes/lib/Kubernetes/OpenAPI/API/Discovery.hs | haskell | |
Module : Kubernetes.OpenAPI.API.Discovery
# LANGUAGE OverloadedStrings #
* Operations
*** getAPIGroup
| @GET \/apis\/discovery.k8s.io\/@
get information of a group
| @application/json@
| @application/vnd.kubernetes.protobuf@
| @application/yaml@ |
Kubernetes
No description provided ( generated by Openapi Generator -generator )
OpenAPI Version : 3.0.1
Kubernetes API version : release-1.20
Generated by OpenAPI Generator ( -generator.tech )
Kubernetes
No description provided (generated by Openapi Generator -generator)
OpenAPI... |
855adbc8391876a9db595af3664c68aa73595caf3ac85984c9af4706e6c15c12 | rpav/cl-freetype2 | toy.lisp | (in-package :freetype2-tests)
(in-suite freetype2-tests)
(defvar *toy-string-lr*
"
████ ... | null | https://raw.githubusercontent.com/rpav/cl-freetype2/96058da730b4812df916c1f4ee18c99b3b15a3de/t/toy.lisp | lisp | (in-package :freetype2-tests)
(in-suite freetype2-tests)
(defvar *toy-string-lr*
"
████ ... | |
f2c2bd7fcc23e53acb8e0ca853dfa7af5a9eb53f7d583a7219393b922c1deb05 | rescript-association/genType | ResolvedName.mli | type t
type eq = (t * t)
val applyEquations : eqs:eq list -> t -> eq list
val dot : string -> t -> t
val fromString : string -> t
val toList : t -> string list
val toString : t -> string | null | https://raw.githubusercontent.com/rescript-association/genType/22b666a1004b5079c2a5f76d20e79a3b11c9e2dd/src/ResolvedName.mli | ocaml | type t
type eq = (t * t)
val applyEquations : eqs:eq list -> t -> eq list
val dot : string -> t -> t
val fromString : string -> t
val toList : t -> string list
val toString : t -> string | |
075d08de6c937516a0adab12c0747dff8d38fc087ef65dd7735e07179f227da2 | ekmett/coda | Located.hs | {-# language CPP #-}
# language DeriveGeneric #
{-# language DeriveTraversable #-}
{-# language DeriveDataTypeable #-}
{-# language UndecidableInstances #-}
# language MultiParamTypeClasses #
---------------------------------------------------------------------------------
--- |
- Copyright : ( c ) 2017 - 2018
- L... | null | https://raw.githubusercontent.com/ekmett/coda/bca7e36ab00036f92d94eb86298712ab1dbf9b8d/src/relative/Located.hs | haskell | # language CPP #
# language DeriveTraversable #
# language DeriveDataTypeable #
# language UndecidableInstances #
-------------------------------------------------------------------------------
- |
- Stability : experimental
- Portability: non-portable
-
----------------------------------------------------------------... | # language DeriveGeneric #
# language MultiParamTypeClasses #
- Copyright : ( c ) 2017 - 2018
- License : BSD-2 - Clause OR Apache-2.0
- Maintainer : < >
module Located
( Located(..)
) where
import Control.Applicative
import Control.Comonad
import Control.Monad (ap)
import Control.Monad.Writer.Clas... |
bc31a717827efebf3fac0d949392696b598bbd48a4a862928400f7ab6cd2b406 | williamleferrand/accretio | ys_dom.ml |
* Accretio is an API , a sandbox and a runtime for social playbooks
*
* Copyright ( C ) 2015
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 o... | null | https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/library/client/ys_dom.ml | ocaml | dom input that can be highlighted and reset when the user types sth in **** |
* Accretio is an API , a sandbox and a runtime for social playbooks
*
* Copyright ( C ) 2015
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 o... |
7f9c1f7188709e39f8ebdc9967525e6ff90d97724633ea4e0fe960ac93d82d65 | elaforge/karya | Sig.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
| Functions to help define call signatures .
This module , along with the ' . ' class , define a little
DSL to express function signatures . Check existing calls for ex... | null | https://raw.githubusercontent.com/elaforge/karya/a262a253663c9ebc6c811fc4aedd5fec04e27fde/Derive/Sig.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
* parsers
** defaults
* call
| Keep track of state when parsing arguments.
in state_vals doesn't work because when I run out I don't know where
I am.
| Annotate a parser with a check on its value.
^ retu... | Copyright 2013
| Functions to help define call signatures .
This module , along with the ' . ' class , define a little
DSL to express function signatures . Check existing calls for examples .
Argument passing , in an effort to be flexible , got a bit complicated . Each
' Arg ' has... |
52928cfa243c9a9eea8104bf152bdbb5c64977ab327af475a7a565089f130cc1 | untangled-web/untangled-client | data_fetch.cljc | (ns untangled.client.impl.data-fetch
(:require [om.next.impl.parser :as op]
[om.next :as om]
[om.next.protocols :as omp]
[om.util :as util]
[clojure.walk :refer [prewalk]]
[clojure.set :as set]
[untangled.client.mutations :as m]
[unta... | null | https://raw.githubusercontent.com/untangled-web/untangled-client/d9b350db3a5e19910692ee70281d8c156fd3a3f9/src/untangled/client/impl/data_fetch.cljc | clojure | TODO: Some of this API is public, and should be in the non-impl ns.
Implementation for public api
transducer fn
if no keys seen, include input in the reduction
Testing API, used to write tests against specific data states
not-present represented by nil
ok represented by data
Helpers -- not intended for pub... | (ns untangled.client.impl.data-fetch
(:require [om.next.impl.parser :as op]
[om.next :as om]
[om.next.protocols :as omp]
[om.util :as util]
[clojure.walk :refer [prewalk]]
[clojure.set :as set]
[untangled.client.mutations :as m]
[unta... |
5b3679792ffb60d6b9b1cb16730ea1198eb8e3a89d25e1542e42560d91b8c72f | ott-lang/ott | embed_pp.mli | (**************************************************************************)
(* Ott *)
(* *)
, Computer Laboratory , University of Cambridge
, project , I... | null | https://raw.githubusercontent.com/ott-lang/ott/29ac9ef84967686da35b9b42608b3aec3539a689/src/embed_pp.mli | ocaml | ************************************************************************
Ott
... | , Computer Laboratory , University of Cambridge
, project , INRIA Rocquencourt
Copyright 2005 - 2010
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.