_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 |
|---|---|---|---|---|---|---|---|---|
fdfb8fe4ac488d81e5b291e39ff391da8924d8694edc901ed26131d552e511fb | janestreet/ecaml | abbrev.mli | * are words which expand into other text when typed in .
- [ ( Info - goto - node " ( emacs)Abbrevs " ) ]
- [(Info-goto-node "(emacs)Abbrevs")] *)
open! Core
open! Async_kernel
open! Import
(** [(describe-variable 'save-abbrevs)] *)
val save_abbrevs : bool Customization.t
| null | https://raw.githubusercontent.com/janestreet/ecaml/7c16e5720ee1da04e0757cf185a074debf9088df/src/abbrev.mli | ocaml | * [(describe-variable 'save-abbrevs)] | * are words which expand into other text when typed in .
- [ ( Info - goto - node " ( emacs)Abbrevs " ) ]
- [(Info-goto-node "(emacs)Abbrevs")] *)
open! Core
open! Async_kernel
open! Import
val save_abbrevs : bool Customization.t
|
58be10e5828f522c36b1ed4abda3bfa00dd6904dd6e2aabf53870112193696d7 | cdepillabout/servant-static-th | Util.hs | |
Module : Servant . Static . TH.Internal . Util
Copyright : 2017
License : BSD3
Maintainer : ( )
Stability : experimental
Portability : unknown
Utilities functions for use in this package .
Module : Servant.Static.TH.Internal.Util
Copyright : Dennis Go... | null | https://raw.githubusercontent.com/cdepillabout/servant-static-th/5ec0027ed2faa6f8c42a2259a963f52e6b30edad/src/Servant/Static/TH/Internal/Util.hs | haskell | | Remove a leading period from a 'String'.
>>> removeLeadingPeriod ".jpg"
"jpg"
Just return the 'String' if it doesn't start with a period:
>>> removeLeadingPeriod "hello"
"hello"
Return an empty string if the only character in the string is a period:
>>> removeLeadingPeriod "."
""
Remove at most one pe... | |
Module : Servant . Static . TH.Internal . Util
Copyright : 2017
License : BSD3
Maintainer : ( )
Stability : experimental
Portability : unknown
Utilities functions for use in this package .
Module : Servant.Static.TH.Internal.Util
Copyright : Dennis Go... |
886452a8799f89e50dbeaae775111a14d33470f342663e12814ee79ece05f3a2 | haskell/hackage-server | CreateUserTest.hs |
This a separate part of the high - level test of the hackage server
( see HighLevelTest.hs ) . This set of tests check that the user self
registration wors . This test needs local outgoing email , which is n't
available on all hosts , so we keep it as a separate test .
System requirements :
1 ... | null | https://raw.githubusercontent.com/haskell/hackage-server/5e3389e8c44decb45d2b9ffca83cfdf7ab6b9a46/tests/CreateUserTest.hs | haskell | currently we use mailinator.com accounts
currently we use mailinator.com accounts
Create random test email addresses so that we don't confuse
confirmation emails from other sessions |
This a separate part of the high - level test of the hackage server
( see HighLevelTest.hs ) . This set of tests check that the user self
registration wors . This test needs local outgoing email , which is n't
available on all hosts , so we keep it as a separate test .
System requirements :
1 ... |
100a8f22145185e810d3843ab39688f5ba85aa61550b23a0ae760312d96528ed | atlas-engineer/nyxt | editor.lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :nyxt/tests)
(define-test toggle-editor-mode ()
(let ((editor-buffer (make-instance 'nyxt/editor-mode:editor-buffer)))
(with-current-buffer editor-buffer
(assert-true (enable-modes* 'nyxt/editor-mode... | null | https://raw.githubusercontent.com/atlas-engineer/nyxt/65a9aa568b16c109281fa403a7c045b3b6d87025/tests/offline/mode/editor.lisp | lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :nyxt/tests)
(define-test toggle-editor-mode ()
(let ((editor-buffer (make-instance 'nyxt/editor-mode:editor-buffer)))
(with-current-buffer editor-buffer
(assert-true (enable-modes* 'nyxt/editor-mode... | |
e89cc192138a8e273e4c9977f2105d8a050b146313cb9391be02e69b40502c88 | rabbitmq/rabbitmq-stomp | amqqueue_SUITE.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 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(amqqueue_SUITE).
-compile(export_all).
... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-stomp/925d78e2c7152723a68452b38fbc2713d2797b8b/test/amqqueue_SUITE.erl | erlang |
SUBSCRIBE to missing queue
subscribe and wait for receipt
subscribe and wait for receipt
subscribe and wait for receipt
subscribe and wait for receipt
send from stomp
subscribe and wait for receipt
delete queue while subscribed
server closes connection | 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 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(amqqueue_SUITE).
-compile(export_all).
-inclu... |
7e99687a9ac4cee6b5952285490a34405988a3f95965c55aa8fb18a183f85b8c | evdubs/renegade-way | save-condor-analysis.rkt | #lang racket/base
; This (module) is a hack to get this code to load before the (requires) call below.
We want to first set up the command line args before initializing stuff in db-queries.rkt .
(module cmd racket/base
(require gregor
racket/cmdline
"params.rkt")
(command-line
#:program... | null | https://raw.githubusercontent.com/evdubs/renegade-way/995e61a7871365fa92133ed054cd889826fb34e0/save-condor-analysis.rkt | racket | This (module) is a hack to get this code to load before the (requires) call below. | #lang racket/base
We want to first set up the command line args before initializing stuff in db-queries.rkt .
(module cmd racket/base
(require gregor
racket/cmdline
"params.rkt")
(command-line
#:program "racket save-condor-analysis.rkt"
#:once-each
[("-d" "--end-date") end-date
... |
4295834d4aaf8ff9b8b7f9f2532a50975c69ee70ff1b6901e3b12e98d6194292 | sdanzan/erlang-systools | plimiter_tests.erl | -module(plimiter_tests).
-export([a_process/1]).
-include_lib("eunit/include/eunit.hrl").
start_stop_test() ->
Limiter = plimiter:start(10),
?assert(is_pid(Limiter)),
?assert(is_process_alive(Limiter)),
Monitor = monitor(process, Limiter),
plimiter:stop(Limiter),
Dead =
receive
... | null | https://raw.githubusercontent.com/sdanzan/erlang-systools/ced3faf1c807d36c528e53cbb366d69f464ff4e5/test/plimiter_tests.erl | erlang | -module(plimiter_tests).
-export([a_process/1]).
-include_lib("eunit/include/eunit.hrl").
start_stop_test() ->
Limiter = plimiter:start(10),
?assert(is_pid(Limiter)),
?assert(is_process_alive(Limiter)),
Monitor = monitor(process, Limiter),
plimiter:stop(Limiter),
Dead =
receive
... | |
959b5b3a5468faedf3678c338139dda14a5c01cbe8c00ab2e17971460663a8cd | haskell/hackage-server | Types.hs | # LANGUAGE DeriveDataTypeable , , TemplateHaskell #
# LANGUAGE TypeFamilies #
module Distribution.Server.Users.Types (
module Distribution.Server.Users.Types,
module Distribution.Server.Users.AuthToken,
module Distribution.Server.Framework.AuthTypes
) where
import Distribution.Server.Framework.AuthTypes... | null | https://raw.githubusercontent.com/haskell/hackage-server/1543b15b6f4b96d732b5b352f9991b421f6a7316/src/Distribution/Server/Users/Types.hs | haskell | tokens and descriptions
(this is effectively a relabeled versionDigitParser)
TODO: Add sanity check this doesn't overflow | # LANGUAGE DeriveDataTypeable , , TemplateHaskell #
# LANGUAGE TypeFamilies #
module Distribution.Server.Users.Types (
module Distribution.Server.Users.Types,
module Distribution.Server.Users.AuthToken,
module Distribution.Server.Framework.AuthTypes
) where
import Distribution.Server.Framework.AuthTypes... |
024e072f8e9928ec2d74765c0b0c8621cf0b4e4954d33fa109b4d34a8a349110 | agentm/project-m36 | InformationOperator.hs | # LANGUAGE CPP #
module TutorialD.Interpreter.InformationOperator where
import Data.Text
import Text.Megaparsec
import TutorialD.Interpreter.Base
-- older versions of stack fail to
#if !defined(VERSION_project_m36)
# warning Failed to discover proper version from cabal_macros.h
# define VERSION_project_m36 "<unknown>"... | null | https://raw.githubusercontent.com/agentm/project-m36/57a75b35e84bebf0945db6dae53350fda83f24b6/src/bin/TutorialD/Interpreter/InformationOperator.hs | haskell | older versions of stack fail to
this module provides information about the current interpreter
display generic help | # LANGUAGE CPP #
module TutorialD.Interpreter.InformationOperator where
import Data.Text
import Text.Megaparsec
import TutorialD.Interpreter.Base
#if !defined(VERSION_project_m36)
# warning Failed to discover proper version from cabal_macros.h
# define VERSION_project_m36 "<unknown>"
#endif
data InformationOperator ... |
eacf7a943bf4c734f51ee243865dcbcfe03e81eb6027ced0a32118cd795a844e | ucsd-progsys/nate | depend.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/tools/depend.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1999 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 .
$ I d : depend.mli , v 1.2 2002/04/18... |
a55c273288d52b1f363e09780dd5fd57b437cab4cdba43fe6e6b9bacae219f85 | racketscript/racketscript | keyword-args.rkt | #lang racket
(define (foo #:a a #:b b)
(displayln a)
(displayln b))
(foo #:a 'hello #:b 'world)
(foo #:b 'world #:a 'hello)
(define (bar a b #:c c #:d d)
(displayln (list a b c d)))
(bar 1 2 #:c 3 #:d 4)
(bar 1 2 #:d 3 #:c 4)
| null | https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/tests/experimental/keyword-args.rkt | racket | #lang racket
(define (foo #:a a #:b b)
(displayln a)
(displayln b))
(foo #:a 'hello #:b 'world)
(foo #:b 'world #:a 'hello)
(define (bar a b #:c c #:d d)
(displayln (list a b c d)))
(bar 1 2 #:c 3 #:d 4)
(bar 1 2 #:d 3 #:c 4)
| |
fc3238bf9dfc771bdb6c1f265a9c11fa83092dff7b7004698f26a7cfb53af527 | earl-ducaine/cl-garnet | framed-text-list-pix.lisp | (when (boundp 'win) (opal:destroy win))
(create-instance 'win inter:interactor-window
(:left 800) (:top 300)
(:height 170) (:width 180)
(:aggregate (create-instance 'agg opal:aggregate)))
(create-instance 'FRAMED-TEXT-LIST opal:aggrelist
(:left 20) (:top 20)
(:items '("An aggrelist" "using an" "aggregate"... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/doc/previous-version/src/aggregadgets/garnet-code/framed-text-list-pix.lisp | lisp | (when (boundp 'win) (opal:destroy win))
(create-instance 'win inter:interactor-window
(:left 800) (:top 300)
(:height 170) (:width 180)
(:aggregate (create-instance 'agg opal:aggregate)))
(create-instance 'FRAMED-TEXT-LIST opal:aggrelist
(:left 20) (:top 20)
(:items '("An aggrelist" "using an" "aggregate"... | |
4c18b03aea25e002b4e8b1115a7f2a45cb129e552ec16dd75f4ba0a6bf033251 | turtl/core-cl | config.lisp | (in-package :turtl-core)
;; client self-awareness
(defparameter *client* "core")
(defparameter *version* (asdf/component:component-version (asdf/system:find-system :turtl-core)))
(defparameter *root* (asdf:system-relative-pathname :turtl-core #P"")
"Defines the directory we're loading from.")
;; data directory
(def... | null | https://raw.githubusercontent.com/turtl/core-cl/8fdfaaf918f731318e734eaa7adcd083494f44b8/app/config.lisp | lisp | client self-awareness
data directory
api stuff
kinda lame to jam the queue into the document-store, but it sort of fits
due to the fact that jobs will be document data and we can still run
custom queries on it (plus it can benefit from lossless schema upgrades). | (in-package :turtl-core)
(defparameter *client* "core")
(defparameter *version* (asdf/component:component-version (asdf/system:find-system :turtl-core)))
(defparameter *root* (asdf:system-relative-pathname :turtl-core #P"")
"Defines the directory we're loading from.")
(defvar *data-directory* "~/.turtl"
"Holds ou... |
badf7721899ccb0424449a2f2882df60eb5ee66d905b24b6327a2cbad59a1772 | shirok/Gauche | 125.scm | ;; SRFI-125 became scheme.hash-table
(define-module srfi.125 (extend scheme.hash-table))
| null | https://raw.githubusercontent.com/shirok/Gauche/e606bfe5a94b100d5807bca9c2bb95df94f60aa6/lib/srfi/125.scm | scheme | SRFI-125 became scheme.hash-table | (define-module srfi.125 (extend scheme.hash-table))
|
ab5e364b6479a0bd0a51808261d0bdfafc14f73b8456b7073fce8463c403726d | tweag/ormolu | type-applications.hs | # LANGUAGE TypeApplications #
foo = f @String a b c
bar = f @(Maybe Int) a b
baz = f @Int @String
a b
goo = hash
@(HASH TPraosStandardCrypto)
@ByteString
"And the lamb lies down on Broadway"
test x = case x of
Foo @t -> show @t 0
Bar
@t @u v
-> ""
| null | https://raw.githubusercontent.com/tweag/ormolu/570b3175a2328f9cd5f6e6e648c200b89f23af2f/data/examples/declaration/value/function/type-applications.hs | haskell | # LANGUAGE TypeApplications #
foo = f @String a b c
bar = f @(Maybe Int) a b
baz = f @Int @String
a b
goo = hash
@(HASH TPraosStandardCrypto)
@ByteString
"And the lamb lies down on Broadway"
test x = case x of
Foo @t -> show @t 0
Bar
@t @u v
-> ""
| |
cd0c2bcf2b2c27ae90c8c138d2c5511f8ac6ee13729ef913f820ae78135fd387 | facebookarchive/JSCaml | file_util.ml |
* Copyright ( c ) 2013 - present , Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD - style license found in the
* LICENSE file in the root directory of this source tree . An additional grant
* of patent rights can be found in the PATENTS file in the same director... | null | https://raw.githubusercontent.com/facebookarchive/JSCaml/adf48cc4aa87e02b6a70765dc1e0904c4739804f/compiler/file_util.ml | ocaml |
* Copyright ( c ) 2013 - present , Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD - style license found in the
* LICENSE file in the root directory of this source tree . An additional grant
* of patent rights can be found in the PATENTS file in the same director... | |
285640e58b0efb0bcc4567889d0254ec9c8a60ba6a8f4fd40eeaa55d60d6af59 | dandoh/web-haskell-graphql-postgres-boilerplate | JWT.hs | {-# LANGUAGE OverloadedStrings #-}
module Authentication.JWT where
import Control.Monad (guard)
import Data.Aeson.Types (Value (Bool, Number))
import qualified Data.Map as Map
import Data.Scientific (base10Exponent, coefficient)
import Data.Text (Text)
import qualified Data.Text as T
import Data.Time.Clock (UTCTime)
... | null | https://raw.githubusercontent.com/dandoh/web-haskell-graphql-postgres-boilerplate/e673e9ee07ce7a4dd9b023328038664e8fdfdd78/src/Authentication/JWT.hs | haskell | # LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
----------------------------------------------------------------------------- |
module Authentication.JWT where
import Control.Monad (guard)
import Data.Aeson.Types (Value (Bool, Number))
import qualified Data.Map as Map
import Data.Scientific (base10Exponent, coefficient)
import Data.Text (Text)
import qualified Data.Text as T
import Data.Time.Clock (UTCTime)
import Data.Time.Clock.POSIX
import... |
4cfd4bf6d9329f63a65a9c47273a171fd3e41baa433a8e1cb71a437951ab27f2 | esb-lwb/lwb | prop_rules.clj | lwb Logic WorkBench -- Natural deduction
Copyright ( c ) 2016 , THM . All rights reserved .
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php ) .
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
(ns ... | null | https://raw.githubusercontent.com/esb-lwb/lwb/bba51ada7f7316341733d37b0dc4848c4891ef3a/src/lwb/nd/examples/prop_rules.clj | clojure | The use and distribution terms for this software are covered by the
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
interactive checking in the repl for nd
-----------------------------------------------------------------------------------------
and-introduction
... | lwb Logic WorkBench -- Natural deduction
Copyright ( c ) 2016 , THM . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php ) .
(ns lwb.nd.examples.prop-rules
(:require [lwb.nd.repl :refer :all]))
(load-logic :prop)
(proof '[P1 P2] '(and P1 P2))
(step-f :and-i 1 2)
(proof '[P1 P2] '(and P1 P2))
(... |
630409af316aea0fd088693620dc0664de06b9f826320c7d5a718b2561c543c3 | johnlawrenceaspden/hobby-code | clojure-is-fast-part-one.clj | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Clojure is Fast !
said that Common Lisp was two languages , one for writing programs
;; fast, and one for writing fast programs.
I 've never tried to find Clojure 's fast bits before , but I thought I 'd give
it a try , using... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/clojure-is-fast-part-one.clj | clojure |
fast, and one for writing fast programs.
would be very good for.
Let's try to integrate a differential equation.
Don't be scared! That means that we've got a number that needs to change over
time, and a function that tells us how much it needs to change by.
that lets us work out roughly what f is now.
And repe... |
Clojure is Fast !
said that Common Lisp was two languages , one for writing programs
I 've never tried to find Clojure 's fast bits before , but I thought I 'd give
it a try , using a simple example of a numerical algorithm that C and FORTRAN
You 've got a variable y , say it 's 0 ( feet ) . We start... |
90216a75ee48e451f2233472495496c285d986046769184f9420c9a383e88781 | z3z1ma/pipette | core_test.clj | (ns pipette.core-test
(:require [clojure.test :refer :all]
[pipette.core :refer :all]))
(deftest a-test
(testing "TODO: Build out test suite."
(is (= 1 1))))
| null | https://raw.githubusercontent.com/z3z1ma/pipette/bf01b61c563a2f54e3688bf8579ef62ac22fbf9d/test/pipewise/core_test.clj | clojure | (ns pipette.core-test
(:require [clojure.test :refer :all]
[pipette.core :refer :all]))
(deftest a-test
(testing "TODO: Build out test suite."
(is (= 1 1))))
| |
fb719c6de474e3503226d9fd92448b9dbce45e21d76e0d6670f4037c727ceb88 | 23Skidoo/ghc-parmake | Parse.hs | # LANGUAGE TupleSections #
-- Parsing.
module GHC.ParMake.Parse (getModuleDeps, depsListToDeps)
where
import Control.Concurrent
import Control.Monad
import Data.Char (isAlphaNum, isSpace)
import Data.Functor ((<$>))
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe (catMaybes)
import qu... | null | https://raw.githubusercontent.com/23Skidoo/ghc-parmake/c4d7fb042f5138588fa54d0153be1aee93db3835/src/GHC/ParMake/Parse.hs | haskell | Parsing.
some unexpected character is in the filename.
Worse even, `parseLine` will just return Nothing, silencing the
This filename parsing and "careful" parsing (returning Nothing by
default instead of erroring) must be changed!
Interaction with the outside world.
Get all internal dependen... | # LANGUAGE TupleSections #
module GHC.ParMake.Parse (getModuleDeps, depsListToDeps)
where
import Control.Concurrent
import Control.Monad
import Data.Char (isAlphaNum, isSpace)
import Data.Functor ((<$>))
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe (catMaybes)
import qualified Data... |
5e2c20d8b3dd7eb2ff8d612638c8c4e05c6ed95d748460c5bf5a493c9c4f1d90 | fission-codes/fission | Public.hs | module Crypto.Key.Asymmetric.Public
( genRSA2048
, decodeASN1DERRSAPublicKey
, encodeASN1DERRSAPublicKey
) where
import qualified Crypto.PubKey.RSA as RSA
import qualified Data.ASN1.BitArray as ASN1
import qualified Data.ASN1.Types ... | null | https://raw.githubusercontent.com/fission-codes/fission/c7f5907867e94b76bdcbed3a499a4128263d7bfd/hs-ucan/library/Crypto/Key/Asymmetric/Public.hs | haskell | module Crypto.Key.Asymmetric.Public
( genRSA2048
, decodeASN1DERRSAPublicKey
, encodeASN1DERRSAPublicKey
) where
import qualified Crypto.PubKey.RSA as RSA
import qualified Data.ASN1.BitArray as ASN1
import qualified Data.ASN1.Types ... | |
2be164782576d3ea01b742a59c3adb61e14cba2f00b35be4e3d0466167ab1eec | discus-lang/ddc | Bind.hs |
module DDC.Type.Bind
(getBindType)
where
import DDC.Type.Exp
-- | Lookup the type of a bound thing from the binder stack.
The binder stack contains the binders of all the ` TForall`s we 've
-- entered under so far.
getBindType :: Eq n => [Bind n] -> Bound n -> Maybe (Int, Type n)
getBindType bs' u'
= ... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Type/Bind.hs | haskell | | Lookup the type of a bound thing from the binder stack.
entered under so far. |
module DDC.Type.Bind
(getBindType)
where
import DDC.Type.Exp
The binder stack contains the binders of all the ` TForall`s we 've
getBindType :: Eq n => [Bind n] -> Bound n -> Maybe (Int, Type n)
getBindType bs' u'
= go 0 u' bs'
where go n u (BName n1 t : bs)
| UName n2 <- u
, n1 ... |
f462439bd5a67763e3b9dfaba00d0f0afa9cfca54585aab113d72f4593a62edb | iskandr/parakeet-retired | Value_to_GenericValue.mli | open Base
open Llvm_executionengine
val parnum_to_generic : ParNum.t -> GenericValue.t
val to_llvm : Ptr.t Value.t -> GenericValue.t
val to_llvm_pointer : Ptr.t Value.t -> GenericValue.t
val delete_llvm_gv : GenericValue.t -> ImpType.t -> unit
| null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/LLVM/Value_to_GenericValue.mli | ocaml | open Base
open Llvm_executionengine
val parnum_to_generic : ParNum.t -> GenericValue.t
val to_llvm : Ptr.t Value.t -> GenericValue.t
val to_llvm_pointer : Ptr.t Value.t -> GenericValue.t
val delete_llvm_gv : GenericValue.t -> ImpType.t -> unit
| |
81eeafdf23909b93c121c85a8ce2b1945f121785662aeb53bd0ad6021164a7d1 | fpco/haskell-multi-docker-example | TestImport.hs | # LANGUAGE QuasiQuotes #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module TestImport
( module TestImport
, module X
) where
import Application (makeFoundation, makeLogWare)
import ClassyPrelude as X hiding (delete, deleteBy, Handler)
import Database.Persist as... | null | https://raw.githubusercontent.com/fpco/haskell-multi-docker-example/0b3c08813a20e20ec60d3a00ecef6d15c125ad8d/test/TestImport.hs | haskell | # LANGUAGE OverloadedStrings #
Wiping the database
This function will truncate all of the tables in your database.
'withApp' calls it before each test, creating a clean environment for each
spec to run in.
In order to wipe the database, we need to use a connection which has
foreign key checks disabled. Foreign k... | # LANGUAGE QuasiQuotes #
# LANGUAGE NoImplicitPrelude #
module TestImport
( module TestImport
, module X
) where
import Application (makeFoundation, makeLogWare)
import ClassyPrelude as X hiding (delete, deleteBy, Handler)
import Database.Persist as X hiding (get)
import Database.Per... |
8dfbce898076f2bc0110adce7904ae81fa67bc8b2391f423b3214641736329e3 | tweag/network-transport-zeromq | n-t-zmq.hs | # LANGUAGE CPP , BangPatterns , OverloadedStrings #
module Main where
import Control.Monad
import Data.Int
import System.Environment (getArgs, withArgs)
import Data.Time (getCurrentTime, diffUTCTime, NominalDiffTime)
import System.IO (withFile, IOMode(..), hPutStrLn, Handle, stderr)
import Control.Concurrent (forkIO... | null | https://raw.githubusercontent.com/tweag/network-transport-zeromq/491b0cc1321b6e17b89b4a7287c325df2502f527/benchmarks/subparts/n-t-zmq.hs | haskell | Start the server
establish transport and endpoint
reply to pings with pongs
Start the client
establish transport and endpoint
Send pings, waiting for a reply after every ping
Wait for the client to finish
putStrLn $ "client received " ++ show _payload | # LANGUAGE CPP , BangPatterns , OverloadedStrings #
module Main where
import Control.Monad
import Data.Int
import System.Environment (getArgs, withArgs)
import Data.Time (getCurrentTime, diffUTCTime, NominalDiffTime)
import System.IO (withFile, IOMode(..), hPutStrLn, Handle, stderr)
import Control.Concurrent (forkIO... |
abfef9a7fa7f163bd129248766ed7a6788b6aedbb06280f56b697b82e8277531 | gvolpe/split-morphism | SplitMonoSpec.hs | module SplitMonoSpec (
checkProps
) where
import Control.Lens.SplitMono
import Data.Maybe (fromMaybe)
import Test.QuickCheck
import Text.Read (readMaybe)
mono1 :: SplitMono Int Integer
mono1 = SplitMono toInteger fromInteger
mono2 :: SplitMono Integer String
mono2 = SplitMono show (fromMaybe 0 . readMaybe)
mo... | null | https://raw.githubusercontent.com/gvolpe/split-morphism/15d37ffefacb26d9986cf351e8b8f942830685f0/test/SplitMonoSpec.hs | haskell | module SplitMonoSpec (
checkProps
) where
import Control.Lens.SplitMono
import Data.Maybe (fromMaybe)
import Test.QuickCheck
import Text.Read (readMaybe)
mono1 :: SplitMono Int Integer
mono1 = SplitMono toInteger fromInteger
mono2 :: SplitMono Integer String
mono2 = SplitMono show (fromMaybe 0 . readMaybe)
mo... | |
f3bd197a9ff4f6a9aeef7f6176156b5a845d2130d4a80242a4354f73776d7959 | hasktorch/hasktorch | Constraints.hs | # LANGUAGE DataKinds #
module Torch.Distributions.Constraints
( Constraint,
dependent,
boolean,
integerInterval,
integerLessThan,
integerGreaterThan,
integerLessThanEq,
integerGreaterThanEq,
real,
greaterThan,
greaterThanEq,
lessThan,
lessThanEq,
interval,
half... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/c34996b0a401a5b1b98b5774e892fde88adaa079/hasktorch/src/Torch/Distributions/Constraints.hs | haskell | TODO: lowerTriangular
TODO: positiveDefinite
TODO: realVector
TODO: cat
TODO: stack | # LANGUAGE DataKinds #
module Torch.Distributions.Constraints
( Constraint,
dependent,
boolean,
integerInterval,
integerLessThan,
integerGreaterThan,
integerLessThanEq,
integerGreaterThanEq,
real,
greaterThan,
greaterThanEq,
lessThan,
lessThanEq,
interval,
half... |
f63e63f09d8f79dde1dec19f15551aef6ae58cc49cd519250c48f80ef930274c | acieroid/scala-am | indexer5.scm | Example taken from Dynamic Partial Order Reduction , Figure 1
;; Expected result: #t
(let* ((size 128)
(max 4)
(table (make-vector size 0))
(thread (lambda (tid)
(letrec ((hash (lambda (w) (modulo (* w 7) size)))
(process (lambda (m)
... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/threads/variations/indexer5.scm | scheme | Expected result: #t | Example taken from Dynamic Partial Order Reduction , Figure 1
(let* ((size 128)
(max 4)
(table (make-vector size 0))
(thread (lambda (tid)
(letrec ((hash (lambda (w) (modulo (* w 7) size)))
(process (lambda (m)
(if (<... |
9f3a19d5c34c0d78ddc540526d056b939590c4091cbfe414b0b56ef95bf1e467 | janestreet/shexp | signal.ml | type t = int
(* this function is a copy&paste from stdune *)
let name =
let table =
let open Sys in
[ sigabrt, "ABRT"
; sigalrm, "ALRM"
; sigfpe, "FPE"
; sighup, "HUP"
; sigill, "ILL"
; sigint, "INT"
; sigkill, "KILL"
; sigpipe, "PIPE"
; sigquit, "QUIT"
; sigsegv, "SEGV"
... | null | https://raw.githubusercontent.com/janestreet/shexp/635989a9065f94e309707f113d6647dc62d6932f/process-lib/src/signal.ml | ocaml | this function is a copy&paste from stdune | type t = int
let name =
let table =
let open Sys in
[ sigabrt, "ABRT"
; sigalrm, "ALRM"
; sigfpe, "FPE"
; sighup, "HUP"
; sigill, "ILL"
; sigint, "INT"
; sigkill, "KILL"
; sigpipe, "PIPE"
; sigquit, "QUIT"
; sigsegv, "SEGV"
; sigterm, "TERM"
; sigusr1, "USR1"
;... |
630c4730256066e5de8e3f3ad716ac75f59925bba501a41d959d28a2fe5832d7 | arichiardi/replumb | runner.cljs | (ns launcher.runner
(:require [doo.runner :as doo :refer-macros [doo-tests]]
replumb.core-test
replumb.repl-test
replumb.common-test
replumb.load-test
replumb.options-test
replumb.macro-test
replumb.require-test
replumb.so... | null | https://raw.githubusercontent.com/arichiardi/replumb/dde2228f2e364c3bafdf6585bb1bc1c27a3e336c/test/node/launcher/runner.cljs | clojure | (ns launcher.runner
(:require [doo.runner :as doo :refer-macros [doo-tests]]
replumb.core-test
replumb.repl-test
replumb.common-test
replumb.load-test
replumb.options-test
replumb.macro-test
replumb.require-test
replumb.so... | |
e14d990da4a418e855d8f42eccaafdf3a3203a4fcf44ed6c164e06044ae405a5 | MinaProtocol/mina | mina_state_registers.ml | module V1 = struct
type ('ledger, 'pending_coinbase_stack, 'local_state) t =
{ first_pass_ledger : 'ledger
; second_pass_ledger : 'ledger
; pending_coinbase_stack : 'pending_coinbase_stack
; local_state : 'local_state
}
end
| null | https://raw.githubusercontent.com/MinaProtocol/mina/57e2ea1b87fe1a24517e1c62f51cc59fe9bc87cd/src/lib/mina_wire_types/mina_state/mina_state_registers.ml | ocaml | module V1 = struct
type ('ledger, 'pending_coinbase_stack, 'local_state) t =
{ first_pass_ledger : 'ledger
; second_pass_ledger : 'ledger
; pending_coinbase_stack : 'pending_coinbase_stack
; local_state : 'local_state
}
end
| |
85bb6480a7ff6b44288091ee846528fad346e62415199909a01b3f13499e8435 | gbour/wave | mqtt_topic_registry.erl | %%
Wave - MQTT Broker
Copyright ( C ) 2014 - 2016 -
%%
%% 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 , version 3 of the License .
%%
%% This program is distribut... | null | https://raw.githubusercontent.com/gbour/wave/fe5b78408a7c6e723b19cd454068958058e5e072/apps/wave/src/mqtt_topic_registry.erl | erlang |
This program is free software: you can redistribute it and/or modify
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
along with this program. If not, see ... | Wave - MQTT Broker
Copyright ( C ) 2014 - 2016 -
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , version 3 of the License .
GNU Affero General Public License for more details .
You should have received a copy of the GNU Affero Ge... |
906af07fefd3894a68abc324a4fc1ec9cdea12102c98c58a54eac34aee7e1327 | flavioc/cl-hurd | proxy-translator.lisp |
(defpackage :proxy-translator
(:use :cl :hurd-common :mach
:hurd :hurd-translator
:hurd-tree-translator))
(in-package :proxy-translator)
(defclass proxy-translator (tree-translator)
())
(defclass underlying-entry ()
((port :initarg :port
:initform nil
:accessor port)))
(defc... | null | https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/examples/proxy-translator.lisp | lisp |
(defpackage :proxy-translator
(:use :cl :hurd-common :mach
:hurd :hurd-translator
:hurd-tree-translator))
(in-package :proxy-translator)
(defclass proxy-translator (tree-translator)
())
(defclass underlying-entry ()
((port :initarg :port
:initform nil
:accessor port)))
(defc... | |
26240d10e01d4cf8143d47e56c75956d1f38bd3d250788cdb30cf825641544a2 | cabol/erlbus | ebus.erl | %%%-------------------------------------------------------------------
%%% @doc
%%% Main `ebus` interface. This module also works as a wrapper on top
%%% of `ebus_ps' module.
@see
%%% @end
%%%-------------------------------------------------------------------
-module(ebus).
-behaviour(application).
PubSub API
-e... | null | https://raw.githubusercontent.com/cabol/erlbus/050cb728ef09a0ad51c9297281602e362b5e233d/src/ebus.erl | erlang | -------------------------------------------------------------------
@doc
Main `ebus` interface. This module also works as a wrapper on top
of `ebus_ps' module.
@end
-------------------------------------------------------------------
Application callbacks and functions
==============================================... | @see
-module(ebus).
-behaviour(application).
PubSub API
-export([sub/2, sub/3, sub/4]).
-export([unsub/2, unsub/3]).
-export([pub/2, pub/3, pub_from/3, pub_from/4]).
-export([subscribers/1, subscribers/2]).
-export([local_subscribers/1, local_subscribers/2]).
-export([topics/0, topics/1, local_topics/0, local_to... |
cfff7a2e0cd9d88bc953f605459ca9f7a1f86862300755d9ffe250677a1dddc8 | dwayne/haskell-programming | more-structure.hs | 16.13 More structure , more functors
data Wrap f a
= Wrap (f a)
deriving (Eq, Show)
-- This looks so strange to me
--
-- But let's try to break it down
-- f and a are types
-- (f a) has to mean that f :: * -> * and a :: *
--
-- So, Wrap Maybe Int is a possible type
--
let a = 1 : : Int
-- let x = Wrap (Just a)... | null | https://raw.githubusercontent.com/dwayne/haskell-programming/d08679e76cfd39985fa2ee3cd89d55c9aedfb531/ch16/more-structure.hs | haskell | This looks so strange to me
But let's try to break it down
f and a are types
(f a) has to mean that f :: * -> * and a :: *
So, Wrap Maybe Int is a possible type
let x = Wrap (Just a) :: Wrap Maybe Int
f :: a -> b
fa :: f a
we need f to be a Functor.
Thus, | 16.13 More structure , more functors
data Wrap f a
= Wrap (f a)
deriving (Eq, Show)
let a = 1 : : Int
instance Functor f => Functor (Wrap f) where
Hence , we need to fmap f over . But , that would mean
fmap f (Wrap fa) = Wrap (fmap f fa)
|
849840f50bd6dd968560321fddc38cf2884c4a2e2a2ac0dc9d0ee6425d37d724 | dparis/gen-phzr | point_proxy.cljs | (ns phzr.physics.p2.point-proxy
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->PointProxy
"A PointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays.
Parame... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/physics/p2/point_proxy.cljs | clojure | (ns phzr.physics.p2.point-proxy
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->PointProxy
"A PointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays.
Parame... | |
8407f71efdd3ee6ed746292f026960d76c5d52834f011dd8d95ebb10fab52e11 | jonatack/cl-kraken | asset-pairs.lisp | ;;;; cl-kraken/tests/asset-pairs.lisp
(defpackage #:cl-kraken/tests/asset-pairs
(:use #:cl #:cl-kraken #:rove)
(:import-from #:cl-kraken/tests/kraken-public-data
#:*all-pairs*
#:*xbteur-pair*
#:*xbtusd-and-xmreur-pairs*
#:*raw-pairs*))
(in-package #:c... | null | https://raw.githubusercontent.com/jonatack/cl-kraken/e5b438eb821bf7dc3514a44ff84f15f393b4e393/tests/asset-pairs.lisp | lisp | cl-kraken/tests/asset-pairs.lisp
Test PAIR parameter.
Test RAW parameter.
Test invalid RAW values. |
(defpackage #:cl-kraken/tests/asset-pairs
(:use #:cl #:cl-kraken #:rove)
(:import-from #:cl-kraken/tests/kraken-public-data
#:*all-pairs*
#:*xbteur-pair*
#:*xbtusd-and-xmreur-pairs*
#:*raw-pairs*))
(in-package #:cl-kraken/tests/asset-pairs)
(deftest ... |
58ef5ff4f9040783cdbf22e4f57bb783125cf41a5502eebc686e562b8a91b793 | tdammers/ginger | Spec.hs | module Main where
import Test.Tasty
import Text.Ginger.SimulationTests (simulationTests)
import Text.Ginger.PropertyTests (propertyTests)
main = defaultMain allTests
allTests :: TestTree
allTests =
testGroup "All Tests"
[ simulationTests
, propertyTests
]
| null | https://raw.githubusercontent.com/tdammers/ginger/bd8cb39c1853d4fb4f663c4c201884575906acea/test/Spec.hs | haskell | module Main where
import Test.Tasty
import Text.Ginger.SimulationTests (simulationTests)
import Text.Ginger.PropertyTests (propertyTests)
main = defaultMain allTests
allTests :: TestTree
allTests =
testGroup "All Tests"
[ simulationTests
, propertyTests
]
| |
2b74bed5295a349021fa3a0e3ee035adb83b06244e93fe9e284eccda7776f0b4 | cartazio/language-c | Node.hs | {-# LANGUAGE DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.C.Syntax.Attributes
Copyright : ( c ) [ 1995 .. 1999 ]
( c ) 2008 ( stripped radically )
-- License : BSD-style
-- Maintainer :
-- Stabi... | null | https://raw.githubusercontent.com/cartazio/language-c/d003206a45baec4e2a2a85026d88bd225162d951/src/Language/C/Data/Node.hs | haskell | # LANGUAGE DeriveDataTypeable #
---------------------------------------------------------------------------
|
Module : Language.C.Syntax.Attributes
License : BSD-style
Maintainer :
Stability : experimental
---------------------------------------------------------------------------
deprecated, us... | Copyright : ( c ) [ 1995 .. 1999 ]
( c ) 2008 ( stripped radically )
Portability : ghc
source position and unqiue name
module Language.C.Data.Node (
NodeInfo(..), undefNode, isUndefNode,
mkNodeInfoOnlyPos,mkNodeInfoPosLen, mkNodeInfo,mkNodeInfo',
CNode(nodeInfo), fileOfNode,... |
f26ebd0b59242c235ce4a6be1090f70789cbaac6fbb79b4036afe1303db4f90e | VERIMAG-Polyhedra/VPL | EqSet.ml | module Cs = Cstr.Rat
type 'c t = (Var.t * 'c Cons.t) list
let to_string: (Var.t -> string) -> 'c t -> string
= fun varPr e ->
List.fold_right
(fun (_, c) s -> s ^ (Cons.to_string varPr c) ^ "\n") e ""
let to_string_ext: 'c Factory.t -> (Var.t -> string) -> 'c t -> string
= fun factory varPr e->
List.fold_rig... | null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/core/EqSet.ml | ocaml | XXX: doit on comparer les certificats?
rewritting of the rest of the equality set with the new one. | module Cs = Cstr.Rat
type 'c t = (Var.t * 'c Cons.t) list
let to_string: (Var.t -> string) -> 'c t -> string
= fun varPr e ->
List.fold_right
(fun (_, c) s -> s ^ (Cons.to_string varPr c) ^ "\n") e ""
let to_string_ext: 'c Factory.t -> (Var.t -> string) -> 'c t -> string
= fun factory varPr e->
List.fold_rig... |
e82f6719be31f3b703478be7dd4ec11d1fb567a6b3053756ed3b502023d79214 | naoto-ogawa/h-xproto-mysql | Parameter.hs | # LANGUAGE BangPatterns , DeriveDataTypeable , DeriveGeneric , FlexibleInstances , MultiParamTypeClasses #
# OPTIONS_GHC -fno - warn - unused - imports #
module Com.Mysql.Cj.Mysqlx.Protobuf.SessionStateChanged.Parameter (Parameter(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import q... | null | https://raw.githubusercontent.com/naoto-ogawa/h-xproto-mysql/1eacd6486c99b849016bf088788cb8d8b166f964/src/Com/Mysql/Cj/Mysqlx/Protobuf/SessionStateChanged/Parameter.hs | haskell | # LANGUAGE BangPatterns , DeriveDataTypeable , DeriveGeneric , FlexibleInstances , MultiParamTypeClasses #
# OPTIONS_GHC -fno - warn - unused - imports #
module Com.Mysql.Cj.Mysqlx.Protobuf.SessionStateChanged.Parameter (Parameter(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import q... | |
91f1df85804d90b437083bf17f0684b2806b5fdecd6e251dc8ff512bead4bd0c | fpco/say | Say.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
module Say
( -- * Stdout
say
, sayString
, sayShow
-- * Stderr
, sayErr
, sayErrString
, sayErrShow
-- * Handle
, hSay
, hSayString
, hSayShow
) where
import Control.Monad ... | null | https://raw.githubusercontent.com/fpco/say/e667d40e7e09bf94385892c3fe101fb290d25ed5/src/Say.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
* Stdout
* Stderr
* Handle
| Send a 'Text' to standard output, appending a newline, and chunking the
it is possible for interleaving with other threads to occur.
| Same as 'say', but operates on a 'String'. Note that this will
force the entire @String@ in... | module Say
say
, sayString
, sayShow
, sayErr
, sayErrString
, sayErrShow
, hSay
, hSayString
, hSayShow
) where
import Control.Monad (join, void)
import Control.Monad.IO.Class (MonadIO, liftIO)
import qualified Data.ByteString ... |
456f28e645c2e3d030469ef68cfdc67e992106caebebae228d15bfa8a58e3645 | bkirwi/ethereum-haskell | Item.hs | module Ethereum.RLP.Item(Item(String, List), encode, decode) where
import Control.Error
import qualified Data.ByteString as BS
import Data.Attoparsec.ByteString as A
import Data.Bits
import Ethereum.Prelude
data Item = String ByteString
| List [Item]
deriving (Eq)
instance Show Item where
show... | null | https://raw.githubusercontent.com/bkirwi/ethereum-haskell/ee995281bad4eed488c174bd8982ed174cfe26af/src/Ethereum/RLP/Item.hs | haskell | module Ethereum.RLP.Item(Item(String, List), encode, decode) where
import Control.Error
import qualified Data.ByteString as BS
import Data.Attoparsec.ByteString as A
import Data.Bits
import Ethereum.Prelude
data Item = String ByteString
| List [Item]
deriving (Eq)
instance Show Item where
show... | |
84e612c7ac268553e6dbf0996fde1208d5875007412dfd2a97a0724eff46c262 | hyraxbio/hyraxAbif | Fasta.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
|
Module : . Abif . Fasta
Description : Read a FASTA file
Copyright : ( c ) HyraxBio , 2018
License : : ,
Stability : beta
Functionality for reading FASTA files
Module : Hyax.Abif.Fasta
Description : Read a F... | null | https://raw.githubusercontent.com/hyraxbio/hyraxAbif/01b188956330057aeba1b62b61ebcc32ce3744d9/src/Hyrax/Abif/Fasta.hs | haskell | # LANGUAGE OverloadedStrings #
| FASTA data
^ Name
^ Data
Used by "Hyrax.Abif.Generate" to read weighted-FASTAs | # LANGUAGE NoImplicitPrelude #
|
Module : . Abif . Fasta
Description : Read a FASTA file
Copyright : ( c ) HyraxBio , 2018
License : : ,
Stability : beta
Functionality for reading FASTA files
Module : Hyax.Abif.Fasta
Description : Read a FASTA file
Copyright : (c) HyraxBi... |
9def17e696f37ff8addf621b68067d225d7f4200c89ae3a73a82d863f9e2f8bd | karlhof26/gimp-scheme | elsamuko-antique-border.scm | ; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
; 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 3 of the License , or
; (at your option) any later v... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/791bcbb719d89ba3751d0555c61ee889b337384c/elsamuko-antique-border.scm | scheme | The GIMP -- an image manipulation program
This program is free software; you can redistribute it and/or modify
either version 3 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... | Copyright ( C ) 1995 and
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. , 675 Mass Ave , Cambridge , , USA .
Copyright ( C ) 2008 elsamuko < >
Version 0.1 - Adding Film Grain after :
(define (e... |
4fabdcdf75488679dfb7dc938d641b72ec7d1854019ca12d6f202e91b6a04fb3 | jellelicht/guix | docbook.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; ei... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/docbook.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 < >
Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages docbook)
#:use-module (gnu packages)
#:use-module (gnu ... |
399bf7a04d21e95d8346bfc468f7363a02ca098027032a8ebbb2ce5153c81925 | mcgizzle/haxchange | Types.hs | {-# LANGUAGE OverloadedStrings #-}
module <newmodule>.Types where
import Debug.Trace
import Types ( Api
, Ticker(..)
, Currency(..)
, Currency'(..)
, MarketName(..)
, Balance(..) )
import qualified Types as T
import Data.Text (Text)
import q... | null | https://raw.githubusercontent.com/mcgizzle/haxchange/620a4c93ae28abdd637b7c1fd8b018628b3bd0e9/templates/Types.hs | haskell | # LANGUAGE OverloadedStrings # | module <newmodule>.Types where
import Debug.Trace
import Types ( Api
, Ticker(..)
, Currency(..)
, Currency'(..)
, MarketName(..)
, Balance(..) )
import qualified Types as T
import Data.Text (Text)
import qualified Data.Text as Text
import ... |
3e644c97e2685cc8d7bf77bf9bc30695e66397b5905885e7c0cf5d859bdca348 | tweag/asterius | T16208.hs | # LANGUAGE GADTs , ExplicitForAll #
module Main (main) where
import GHC.Exts
newtype Age a b where
Age :: forall b a. Int -> Age a b
data T a = MkT a
# NOINLINE foo #
foo :: (Int -> Age Bool Char) -> String
foo _ = "bad (RULE should have fired)"
# RULES " foo / coerce " [ 1 ] foo coerce = " good " #
main = putS... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/simplCore/T16208.hs | haskell | # LANGUAGE GADTs , ExplicitForAll #
module Main (main) where
import GHC.Exts
newtype Age a b where
Age :: forall b a. Int -> Age a b
data T a = MkT a
# NOINLINE foo #
foo :: (Int -> Age Bool Char) -> String
foo _ = "bad (RULE should have fired)"
# RULES " foo / coerce " [ 1 ] foo coerce = " good " #
main = putS... | |
5fcdb8eeb95e89ff90484260b697fce75d02bd2ebdca530dc09f66dd0cca3444 | heroku/ranch_proxy_protocol | ranch_proxy_encoder.erl | %% Based off -protocol.txt
note : Erlang 's bit syntax is big - endian by default . So is this protocol
-module(ranch_proxy_encoder).
-export([v1_encode/4, v2_encode/2, v2_encode/5]).
-include("ranch_proxy.hrl").
-type opts() :: [{negotiated_protocol, binary()}
|{protocol, sslv3 | tlsv1 | 'tlsv1.1' |... | null | https://raw.githubusercontent.com/heroku/ranch_proxy_protocol/59046e5e40f8c573c5b15ae0358e78bd8b211ab6/src/ranch_proxy_encoder.erl | erlang | Based off -protocol.txt
PUBLIC API %%%
Proxy v1
Proxy v2
supports connection-oriented IP stuff only, no DGRAM nor unix sockets yet.
Header
Header
Body
PRIVATE %%%
otherwise the conn would have failed
otherwise the conn would have failed
PP2_CLIENT_CERT_SESS
PP2_CLIENT_CERT_CONN
PP2_CLIENT_SSL | note : Erlang 's bit syntax is big - endian by default . So is this protocol
-module(ranch_proxy_encoder).
-export([v1_encode/4, v2_encode/2, v2_encode/5]).
-include("ranch_proxy.hrl").
-type opts() :: [{negotiated_protocol, binary()}
|{protocol, sslv3 | tlsv1 | 'tlsv1.1' | 'tlsv1.2'}
... |
9f996736666a6334cc29c73f5e43517af24aa3d18d377c7d99e196c8049222f9 | gfredericks/test.chuck | generators.cljc | (ns com.gfredericks.test.chuck.generators
"Yes this namespace's name has five components."
(:refer-clojure :exclude [double for partition])
(:require [clojure.test.check.generators :as gen]
[#?(:clj clojure.core :cljs cljs.core) :as core]
[#?(:clj clj-time.core :cljs cljs-time.core) :as ct... | null | https://raw.githubusercontent.com/gfredericks/test.chuck/9f6f33db6cc1ac8b172f20a45e8f13e34ac3c6f2/src/com/gfredericks/test/chuck/generators.cljc | clojure | -15
A basic single-clause form expands to fmap:
(for [x g] (f x))
becomes
(fmap (fn [x] (f x)) g)
Multiple clauses expand one at a time to a call to bind with
a nested for expression:
becomes
(bind g1 (fn [x1] (for [x2 g2] (f x1 x2))))
A :let clause gets absorbed into the preceding clause via
... | (ns com.gfredericks.test.chuck.generators
"Yes this namespace's name has five components."
(:refer-clojure :exclude [double for partition])
(:require [clojure.test.check.generators :as gen]
[#?(:clj clojure.core :cljs cljs.core) :as core]
[#?(:clj clj-time.core :cljs cljs-time.core) :as ct... |
aa1e077c6bf9271756757d70175e9251e89ece56fabae88701123fe2aab7d008 | ahf/peculium_core | peculium_core_inv.erl | %%%
Copyright ( c ) 2013 .
%%% 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 condition... | null | https://raw.githubusercontent.com/ahf/peculium_core/50259b7ee11ad31316e97c7e88b33cae3f89e5a1/src/peculium_core_inv.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
list of conditions and the following disclaimer.
* Redistributions... | Copyright ( c ) 2013 .
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND
DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR LIABLE
FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF S... |
e99dd3219bad1be08ab81a01efc311034920f11a6717de25c5c5bed021604877 | PrincetonUniversity/lucid | normalizeInts.ml | (* Balance the subexpressions of commutative
operation expression trees, then atomize integer expressions. *)
open CoreSyntax
open InterpHelpers
module DBG = BackendLogging
let silent = ref false;;
let outc = ref None
let dprint_endline = ref DBG.no_printf
exception Error of string
let error s = raise (Error s)
l... | null | https://raw.githubusercontent.com/PrincetonUniversity/lucid/3a94505efa50e988b4c9ef28048be47cc65b4355/src/lib/midend/transformations/normalizeInts.ml | ocaml | Balance the subexpressions of commutative
operation expression trees, then atomize integer expressions.
*** transform operation expressions into balanced expression trees ***
extract the expression
update the exp
plus is commutative
rebuild the statement
Question:
is it safe to balance every sin... | open CoreSyntax
open InterpHelpers
module DBG = BackendLogging
let silent = ref false;;
let outc = ref None
let dprint_endline = ref DBG.no_printf
exception Error of string
let error s = raise (Error s)
let err msg ex = error (msg ^ " " ^ Printing.exp_to_string ex)
let info str =
if (not !silent)
then (Co... |
4230ba5f43a689f314e2be850324f2a942a2b3f097930c44e652af15bab5b502 | racket/plot | gui.rkt | #lang racket/base
;; GUI helpers
(require racket/gui/base racket/class mrlib/snip-canvas)
(provide (all-defined-out))
(define snip-frame%
(class frame%
(define/override (on-traverse-char event)
(define key-code (send event get-key-code))
(case key-code
[(escape) (send this show #f)]
... | null | https://raw.githubusercontent.com/racket/plot/c4126001f2c609e36c3aa12f300e9c673ab1a806/plot-gui-lib/plot/private/gui/gui.rkt | racket | GUI helpers | #lang racket/base
(require racket/gui/base racket/class mrlib/snip-canvas)
(provide (all-defined-out))
(define snip-frame%
(class frame%
(define/override (on-traverse-char event)
(define key-code (send event get-key-code))
(case key-code
[(escape) (send this show #f)]
[else (supe... |
027ae30a9d8bdc125ca8232b083bcd728fb4e2ac0351f388dceb41b5b3603b93 | shayan-najd/NativeMetaprogramming | T2683.hs | # OPTIONS_GHC -fno - warn - redundant - constraints #
# LANGUAGE ExistentialQuantification , MultiParamTypeClasses ,
FunctionalDependencies , RankNTypes #
FunctionalDependencies, RankNTypes #-}
module Q where
class Transformer t a | t -> a where
transform :: t -> l a -> (forall l'. l' ... | null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_compile/T2683.hs | haskell | # OPTIONS_GHC -fno - warn - redundant - constraints #
# LANGUAGE ExistentialQuantification , MultiParamTypeClasses ,
FunctionalDependencies , RankNTypes #
FunctionalDependencies, RankNTypes #-}
module Q where
class Transformer t a | t -> a where
transform :: t -> l a -> (forall l'. l' ... | |
6469bc24a278251c073231f23da6bb8695480f01e6953c66bf00f0efc2ad93f3 | hakaru-dev/hakaru | Lazy.hs | # LANGUAGE CPP
, GADTs
, MultiParamTypeClasses
, FunctionalDependencies
, ScopedTypeVariables
, FlexibleContexts
, Rank2Types
, TypeSynonymInstances
, FlexibleInstances
#
, GADTs
... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Language/Hakaru/Evaluation/Lazy.hs | haskell | # OPTIONS_GHC -Wall -fwarn-tabs #
--------------------------------------------------------------
2016.04.28
|
Module : Language.Hakaru.Evaluation.Lazy
License : BSD3
Maintainer :
Stability : experimental
Lazy partial evaluation.
BUG: complete... | # LANGUAGE CPP
, GADTs
, MultiParamTypeClasses
, FunctionalDependencies
, ScopedTypeVariables
, FlexibleContexts
, Rank2Types
, TypeSynonymInstances
, FlexibleInstances
#
, GADTs
... |
f0b59dbb331f01bcfa66a47353717adebd7708839fb02112c8eef515231a93bb | EarnestResearch/honeycomb-haskell | Core.hs | # LANGUAGE ScopedTypeVariables #
module Honeycomb.Core
( honeyOptionsFromEnv,
withHoney,
withHoney',
newHoney,
newHoney',
withHoneyOptions,
-- * Forcing event sending
flush,
)
where
import Control.Monad.Reader (MonadReader, local, void)
import Data.Maybe (isJust)
import qualified Data... | null | https://raw.githubusercontent.com/EarnestResearch/honeycomb-haskell/0cb643a637e1b23eecded845970e6a973f8385cf/honeycomb/src/Honeycomb/Core.hs | haskell | * Forcing event sending
| Waits until all currently sent events have been dequeued and processed.
This may be useful in a system which suspends processing when idle; the user
may want to guarantee that all queued events have been sent.
This only guarantees that events queued before this call will be sent. A
use... | # LANGUAGE ScopedTypeVariables #
module Honeycomb.Core
( honeyOptionsFromEnv,
withHoney,
withHoney',
newHoney,
newHoney',
withHoneyOptions,
flush,
)
where
import Control.Monad.Reader (MonadReader, local, void)
import Data.Maybe (isJust)
import qualified Data.Text as T
import Honeycomb.Cor... |
a30956a6a9ef6aba2bdac418e9f2cc7de73ec05d994a3345075e1b7883b79f35 | onedata/op-worker | provider_rest_translator.erl | %%%-------------------------------------------------------------------
@author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This module handles translation of... | null | https://raw.githubusercontent.com/onedata/op-worker/57579e74cfb93981c55e620af9bf9772ee0a991f/src/http/rest/translators/provider_rest_translator.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This module handles translation of middleware results concerning
provider entities into REST responses.
@end
------------------------------------------------------------... | @author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(provider_rest_translator).
-author("Bartosz Walkowicz").
-include("http/rest.hrl").
-include("middleware/middleware.hrl").
-export([get_response/2]).
-spec get_response(gri:gri(), Resou... |
18206a3bcfc97b1bec09fd3943ebffc1cbca1e16b378b1e9c11173969ffb28cf | eval/deps-try | core.clj | (ns rebel-readline.core
(:refer-clojure :exclude [read-line])
(:require
[clojure.string :as string]
[rebel-readline.commands :as commands]
[rebel-readline.io.callback-reader]
[rebel-readline.jline-api :as api]
[rebel-readline.tools :as tools]
[rebel-readline.utils :as utils])
(:import
[org.jl... | null | https://raw.githubusercontent.com/eval/deps-try/da691c68b527ad5f9e770dbad82cce6cbbe16fb4/vendor/rebel-readline/rebel-readline/src/rebel_readline/core.clj | clojure | optionally bind the output directly to the jline terminal
in such a way so that output won't corrupt the terminal
this is optional
this will create a fn that reads from the *line-reader*
this is intensely disatisfying
but we are blocking concurrent redisplays while the
readline prompt is initially drawn
much of... | (ns rebel-readline.core
(:refer-clojure :exclude [read-line])
(:require
[clojure.string :as string]
[rebel-readline.commands :as commands]
[rebel-readline.io.callback-reader]
[rebel-readline.jline-api :as api]
[rebel-readline.tools :as tools]
[rebel-readline.utils :as utils])
(:import
[org.jl... |
ff76f591f1c87f49c6274a547b4704eeadcc94a16f9be64d8d3f98dfc0aec96e | spawnfest/eep49ers | ex_canvas_paint.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/examples/demo/ex_canvas_paint.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2009 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ex_canvas_paint).
-behaviour(wx_object).
-export([start/1]).
-export([init/1, terminate/2, code_change/3... |
c8fd7c99cec83833bbb5af99bbebcad8ac0a416e712e524a09f723e29f8b8068 | abdulapopoola/SICPBook | Ex2.23.scm | #lang planet neil/sicp
(define (for-each proc items)
(cond ((null? items) true)
(else (proc (car items))
(for-each proc (cdr items)))))
(for-each (lambda (x) (newline) (display x))
(list 57 321 88))
| null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%202/2.2/Ex2.23.scm | scheme | #lang planet neil/sicp
(define (for-each proc items)
(cond ((null? items) true)
(else (proc (car items))
(for-each proc (cdr items)))))
(for-each (lambda (x) (newline) (display x))
(list 57 321 88))
| |
b25ef2aa7a66a58b139fe3bc60c3faf064c3271d04be385b8f835f1781155686 | janestreet/bonsai | data.mli | open! Core
type t =
| Option_A
| Option_B
| Option_C
[@@deriving variants, enumerate, sexp, equal, compare]
val to_string : t -> string
include Comparable.S with type t := t
| null | https://raw.githubusercontent.com/janestreet/bonsai/c202b961f41e20e0b735c4e33c2bbac57a590941/web_ui/typeahead/test/data.mli | ocaml | open! Core
type t =
| Option_A
| Option_B
| Option_C
[@@deriving variants, enumerate, sexp, equal, compare]
val to_string : t -> string
include Comparable.S with type t := t
| |
221a665b1334ec6a670ef76b6ec6ba577fd1ceaadc649dcb51557602676b59ce | DeepSec-prover/deepsec | types_ui.mli | (**************************************************************************)
(* *)
DeepSec
(* *)
... | null | https://raw.githubusercontent.com/DeepSec-prover/deepsec/8ddc45ec79de5ec49810302ea7da32d3dc9f46e4/Source/interface/types_ui.mli | ocaml | ************************************************************************
... | DeepSec
, project PESTO ,
, project PESTO ,
, project PESTO ,
Copyright ( C ) INRIA 2017 - 2020
the GNU General Publ... |
7fe4d85d8c73c12b15af592797696ab42dde0ca0571355969d044129283d8bea | graninas/Functional-Design-and-Architecture | ScenarioDSL5-Listing.hs | module ScenarioDSL4 where
import Data.Time
type Name = String
type Duration = DiffTime
-- service function:
seconds s = secondsToDiffTime s
data Value = FloatValue Float
| IntValue Int
| StringValue String
deriving (Show, Read)
data Controller = Controller Name
deriving (Show, Read)
... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/1736abc16d3e4917fc466010dcc182746af2fd0e/First-Edition/BookSamples/CH02/ScenarioDSL5-Listing.hs | haskell | service function: | module ScenarioDSL4 where
import Data.Time
type Name = String
type Duration = DiffTime
seconds s = secondsToDiffTime s
data Value = FloatValue Float
| IntValue Int
| StringValue String
deriving (Show, Read)
data Controller = Controller Name
deriving (Show, Read)
type Temperature = Fl... |
19877dd62ea2f0f8927789875f595f80bb0c576271421788af36fd95b069b8cc | scrintal/heroicons-reagent | ellipsis_vertical.cljs | (ns com.scrintal.heroicons.outline.ellipsis-vertical)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "roun... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/ellipsis_vertical.cljs | clojure | (ns com.scrintal.heroicons.outline.ellipsis-vertical)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "roun... | |
690cd0b0aa53b4d3fa9af4ffd36a9f4153a44761fddc3c7bc08e33dc4c25bd7d | erlang/otp | mnesia_test_lib.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/mnesia/test/mnesia_test_lib.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1996 - 2023 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author :
This test suite may be run as a part of the Grand Test Suite
of Erlang . The test suite is str... |
50f31ebb28a137948a837531e03fce0fe22e11e969951bf2c1cc9132ac09cb64 | dQuadrant/kuber | Text.hs | # LANGUAGE FlexibleContexts #
module Cardano.Kuber.Utility.Text where
import Data.Text.Conversions (FromText (fromText), ToText (toText), Base16 (Base16, unBase16), convertText)
import Data.ByteString ( ByteString )
import Data.Functor ((<&>))
import qualified Data.ByteString.Lazy as LBS
toHexString :: (FromText a1, ... | null | https://raw.githubusercontent.com/dQuadrant/kuber/c3381d7c966997f8e3fb2c9b2716ff3102b4c271/src/Cardano/Kuber/Utility/Text.hs | haskell | # LANGUAGE FlexibleContexts #
module Cardano.Kuber.Utility.Text where
import Data.Text.Conversions (FromText (fromText), ToText (toText), Base16 (Base16, unBase16), convertText)
import Data.ByteString ( ByteString )
import Data.Functor ((<&>))
import qualified Data.ByteString.Lazy as LBS
toHexString :: (FromText a1, ... | |
db4a02f9bbcaaf8950de709157ea585199fe2ec9af7756dd00fcf8dd0c6edadb | jeromesimeon/Galax | print_type.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/ast_printer/print_type.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : print_type.ml , v 1.5 2007/02/01 22:08:45 simeon Exp $
open Format
open Occurrence
open Xquery_type_ast
open Print_common
let rec print_stype_spec ff spec =
match spec.pstype_specifier_desc with
| STypeRef tname -> fpri... |
ba875b8f0294dfe741ce51349d47ece7b49077fea83d188dd5594a6e877a0d18 | fission-codes/fission | Types.hs | -- | JOSE @"cty"@ (Content Type) Header Parameter
module Web.UCAN.Header.Cty.Types (Cty (..)) where
import Data.Aeson
import RIO
import Test.QuickCheck
|
RFC 7519
5.2 . " cty " ( Content Type ) Header Parameter
The " cty " ( content type ) Header Parameter defined by ... | null | https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/hs-ucan/library/Web/UCAN/Header/Cty/Types.hs | haskell | | JOSE @"cty"@ (Content Type) Header Parameter |
module Web.UCAN.Header.Cty.Types (Cty (..)) where
import Data.Aeson
import RIO
import Test.QuickCheck
|
RFC 7519
5.2 . " cty " ( Content Type ) Header Parameter
The " cty " ( content type ) Header Parameter defined by [ ] and [ JWE ]
is used by this specificatio... |
b9575017050770ddaab330a0135a916f96300c32bc49df505a21d7324041249b | nuvla/api-server | binding.clj | (ns sixsq.nuvla.db.es.binding
"Binding protocol implemented for an Elasticsearch database that makes use
of the Elasticsearch REST API."
(:require
[clojure.tools.logging :as log]
[qbits.spandex :as spandex]
[sixsq.nuvla.auth.utils.acl :as acl-utils]
[sixsq.nuvla.db.binding :refer [Binding]]
[... | null | https://raw.githubusercontent.com/nuvla/api-server/595f7dab27c165b9377dd9849f524c09ddc9d84b/code/src/sixsq/nuvla/db/es/binding.clj | clojure | FIXME: Need to understand why the refresh parameter must be used to make unit test pass. | (ns sixsq.nuvla.db.es.binding
"Binding protocol implemented for an Elasticsearch database that makes use
of the Elasticsearch REST API."
(:require
[clojure.tools.logging :as log]
[qbits.spandex :as spandex]
[sixsq.nuvla.auth.utils.acl :as acl-utils]
[sixsq.nuvla.db.binding :refer [Binding]]
[... |
ba04272f0a2023b391957997c6dd096c4e841a58ec3a0edab749407fac05b75e | denisshevchenko/breadu.info | CLI.hs | # LANGUAGE ApplicativeDo #
# LANGUAGE RecordWildCards #
{-|
Module : CLI
Description : CLI options
Stability : experimental
Portability : POSIX
Work with CLI options.
-}
module CLI
( optionsParser
, makeSureOptionsAreValid
) where
import Options.Applicative.Simple
import Da... | null | https://raw.githubusercontent.com/denisshevchenko/breadu.info/b613fa28a4b527f1459876348a72e7748f16cd88/src/app/CLI.hs | haskell | |
Module : CLI
Description : CLI options
Stability : experimental
Portability : POSIX
Work with CLI options.
^ Path to directory with .csv-files with common localized lists of food.
^ Port that server will listen.
| Parser parses actual CLI-arguments into a value of 'Option' type.
Option's default value.
... | # LANGUAGE ApplicativeDo #
# LANGUAGE RecordWildCards #
module CLI
( optionsParser
, makeSureOptionsAreValid
) where
import Options.Applicative.Simple
import Data.Monoid ( (<>) )
import Control.Monad ( when )
import Control.Mo... |
a6840f1a6f4c74953536d6ef94f4138ab5bd8e68b0b0e3a98d513b5ce1b49cc1 | mmottl/pomap | po_examples.ml |
po_examples.ml - implementations of partial order examples
Copyright ( C ) 2001 - 2002 ( OEFAI )
email :
WWW :
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Softwa... | null | https://raw.githubusercontent.com/mmottl/pomap/9a1647ea2cf1ed8cf3ab8eedb4547c3b86a5efc6/examples/hasse/po_examples.ml | ocaml | x1 = y1 |
po_examples.ml - implementations of partial order examples
Copyright ( C ) 2001 - 2002 ( OEFAI )
email :
WWW :
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Softwa... |
29be39e2961e21d3883ae4ddaf141d71822268390157eb4f57489ae52b909e4a | rudymatela/conjure | u-conjure.hs | -- u-conjure.hs -- u-Conjure
--
This is a prototype for Conjure , a library for conjuring code
-- out of partially implemented functions.
--
--
Copyright ( C ) 2021
-- Distributed under the 3-Clause BSD licence (see the file LICENSE).
--
--
To run this you need to have both LeanCheck and Express installed :
--
... | null | https://raw.githubusercontent.com/rudymatela/conjure/e2f6a9ebe397babc527be5b040640315c9dbe7d5/proto/u-conjure.hs | haskell | u-conjure.hs -- u-Conjure
out of partially implemented functions.
Distributed under the 3-Clause BSD licence (see the file LICENSE).
$ cabal install express
If installation fails, use v1-install:
$ cabal v1-install express
reverse
++
even by using fold and some cheating,
this function is out of reach
... | This is a prototype for Conjure , a library for conjuring code
Copyright ( C ) 2021
To run this you need to have both LeanCheck and Express installed :
$ cabal install
$ cabal v1 - install
import Data.List
import Data.Maybe
import Data.Express
import Data.Typeable
import Test.LeanCheck.Error
square :: I... |
093ba3a700a299546225692426be479fa3ed01ae70371e489d409ca488826734 | kompendium-ano/factom-haskell-client | Api.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TemplateH... | null | https://raw.githubusercontent.com/kompendium-ano/factom-haskell-client/87a73bb9079859f6223f8259da0dc9da568d1233/src/Factom/RPC/Api.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
------------------------------------------------------------------------------
... | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Factom.RPC.Api
( runTCPClient
, reqHeights
, reqCurrentMinute
, reqDBlockByHeight
) where
import Control.Concurrent
import ... |
ccb2fa8bfe1f195ceec1426ea3ff1bc6aa9b311946688452ecffaa98618ff91b | yuriy-chumak/ol | glx.scm | ; based on
Mesa 3 - D graphics library
(define-library (lib glx)
(export
GLX_VERSION_1_1
GLX_VERSION_1_2
GLX_VERSION_1_3
GLX_VERSION_1_4
GLX_EXTENSION_NAME
; Tokens for glXChooseVisual and glXGetConfig:
GLX_USE_GL
GLX_BUFFER_SIZE
GLX_LEVEL
GLX_RGBA
GLX_DOUBLEBUFFER
GLX_STEREO
... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/libraries/lib/glx.scm | scheme | based on
Tokens for glXChooseVisual and glXGetConfig:
Error codes returned by glXGetConfig:
/*
*/
/*
*/
#define GLX_X_VISUAL_TYPE 0x22
#define GLX_TRANSPARENT_TYPE 0x23
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
#define GLX_PIXMAP_BIT 0x00000002
#define GLX_FRON... | Mesa 3 - D graphics library
(define-library (lib glx)
(export
GLX_VERSION_1_1
GLX_VERSION_1_2
GLX_VERSION_1_3
GLX_VERSION_1_4
GLX_EXTENSION_NAME
GLX_USE_GL
GLX_BUFFER_SIZE
GLX_LEVEL
GLX_RGBA
GLX_DOUBLEBUFFER
GLX_STEREO
GLX_AUX_BUFFERS
GLX_RED_SIZE
GLX_GREEN_SIZE
GLX_BLUE... |
5c3ee76775c189bee80e6d45e1ec1204b7c1d31e14c333f5a8a4e3f82b03d8b1 | ghcjs/ghcjs-boot | IORef.hs | # LANGUAGE Unsafe #
# LANGUAGE NoImplicitPrelude , MagicHash , AutoDeriveTypeable #
{-# OPTIONS_GHC -funbox-strict-fields #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.IORef
Copyright : ( c ) The University of Glasgow 20... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/GHC/IORef.hs | haskell | # OPTIONS_GHC -funbox-strict-fields #
# OPTIONS_HADDOCK hide #
---------------------------------------------------------------------------
|
Module : GHC.IORef
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
The IORef type
------------------------------------------------... | # LANGUAGE Unsafe #
# LANGUAGE NoImplicitPrelude , MagicHash , AutoDeriveTypeable #
Copyright : ( c ) The University of Glasgow 2008
Portability : non - portable ( GHC Extensions )
module GHC.IORef (
IORef(..),
newIORef, readIORef, writeIORef, atomicModifyIORef
) where
import GHC.Base
... |
1d2b1e6b71dd7d1c41e63472770ff5f183036cc284213ca0d1e55ede8521cb57 | fpco/ide-backend | TempFile.hs | # LANGUAGE CPP #
{-# OPTIONS_HADDOCK hide #-}
module Distribution.Compat.TempFile (
openTempFile,
openBinaryTempFile,
openNewBinaryFile,
createTempDirectory,
) where
import System.FilePath ((</>))
import Foreign.C (eEXIST)
import System.IO (Handle, openTempFile, openBinaryT... | null | https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.22.0.0/Distribution/Compat/TempFile.hs | haskell | # OPTIONS_HADDOCK hide #
------------------------------------------------------------
* temporary files
------------------------------------------------------------
TODO: This file should probably be removed.
This is a copy/paste of the openBinaryTempFile definition, but
needs to be changed to make this better.
... | # LANGUAGE CPP #
module Distribution.Compat.TempFile (
openTempFile,
openBinaryTempFile,
openNewBinaryFile,
createTempDirectory,
) where
import System.FilePath ((</>))
import Foreign.C (eEXIST)
import System.IO (Handle, openTempFile, openBinaryTempFile)
import Data.Bits ... |
035a43749f00880cef8793cd290d753134a2ca59635eb0377f77ffc15c00cfa4 | bradrn/brassica | Parse.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE KindSignatures #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Brassica.SoundChange.Parse
( parseRule
, parseRuleWithCategories
, parseSoundChanges
-- ** Re-export
, errorBundlePretty
) where
... | null | https://raw.githubusercontent.com/bradrn/brassica/2184253a8f60d544973cd953ad3c7efc7b40e940/src/Brassica/SoundChange/Parse.hs | haskell | # LANGUAGE KindSignatures #
** Re-export
space consumer which does not match newlines
consume newlines (which are important for rule separation)
space consumer which matches newlines
Use Target here because it only allows graphemes, not boundaries
parse category declarations, adding to the set of known
categor... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Brassica.SoundChange.Parse
( parseRule
, parseRuleWithCategories
, parseSoundChanges
, errorBundlePretty
) where
import Data.Char (isSpace)
import Data.Foldable (asum)
i... |
25b99c174be54f9d33dd716b9be6f78f47ccbe72ca93de67de0f5588cbddcafa | np/ling | Ling.hs | {-# LANGUAGE LambdaCase #-}
{-# LANGUAGE QuasiQuotes #-}
# LANGUAGE TemplateHaskell #
module Ling where
import Control.Monad.Writer (tell, execWriter)
import Data.Char (isDigit)
import System.Environment (getArgs)
import System.Exit (exitFailure)
import ... | null | https://raw.githubusercontent.com/np/ling/ca942db83ac927420d1ae5e24b4da164394ddbbe/Ling.hs | haskell | # LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
math.h
complex.h
if we don't print any term we should at least force the result | # LANGUAGE TemplateHaskell #
module Ling where
import Control.Monad.Writer (tell, execWriter)
import Data.Char (isDigit)
import System.Environment (getArgs)
import System.Exit (exitFailure)
import System.IO (hPutStrLn, stderr)
import qualified MiniC... |
1570c7a38e3a713918a7141a3894ad099c7deb3eb8599946aa6e900b8fece574 | roelvandijk/numerals | TestData.hs | |
[ @ISO639 - 1@ ] ln
[ @ISO639 - 2@ ]
[ @ISO639 - 3@ ]
[ @Native name@ ]
[ @English name@ ]
[@ISO639-1@] ln
[@ISO639-2@] lin
[@ISO639-3@] lin
[@Native name@] Ngala
[@English name@] Lingala
-}
module Text.Numeral.Language.LIN.TestData ... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src-test/Text/Numeral/Language/LIN/TestData.hs | haskell | ------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Test data
---------------------------------------------------------------... | |
[ @ISO639 - 1@ ] ln
[ @ISO639 - 2@ ]
[ @ISO639 - 3@ ]
[ @Native name@ ]
[ @English name@ ]
[@ISO639-1@] ln
[@ISO639-2@] lin
[@ISO639-3@] lin
[@Native name@] Ngala
[@English name@] Lingala
-}
module Text.Numeral.Language.LIN.TestData ... |
0d9b0da23cc2262c25c603073816ea719d873647fadf30814a02b9d3dc91656d | hbr/albatross | argument_parser.mli | open Module_types
module type S =
sig
type a (* The result of the argument parser *)
type key = string (* option key, must start with '-' *)
type doc = string (* option description *)
type spec (* specification of an option *)
=
| Unit of (a -> a) (* option with no argumen... | null | https://raw.githubusercontent.com/hbr/albatross/8f28ef97951f92f30dc69cf94c0bbe20d64fba21/ocaml/fmlib/basic/argument_parser.mli | ocaml | The result of the argument parser
option key, must start with '-'
option description
specification of an option
option with no argument
option with string argument
option with integer argument
function taking an anonymus argument into
the result | open Module_types
module type S =
sig
=
type error =
| Unknown_option of string
| Missing_argument of key*spec*doc
| Invalid_argument of key*spec*doc*string
val parse: string array ->
a ->
(key*spec*doc) list ->
anon ->
... |
ece17dd87d6a79d702b4496c1de782d01d6febf361a749f20d5853cb4b5d8a90 | aeternity/aeternity | aefa_stores.erl | %%%-------------------------------------------------------------------
( C ) 2019 , Aeternity Anstalt
%%% @doc
ADT for contract stores in FATE .
%%%
%%% The code assumes that if a get/put is issued, the contract is
%%% already in the store. Care must be taken to explicitly check if
%%% a contract is pr... | null | https://raw.githubusercontent.com/aeternity/aeternity/d4863b7233f406c753fd42da10b7ee19a14aa399/apps/aefate/src/aefa_stores.erl | erlang | -------------------------------------------------------------------
@doc
The code assumes that if a get/put is issued, the contract is
already in the store. Care must be taken to explicitly check if
a contract is present, and put it (using put_contract/2) if it is not.
reading/converting and to avoid... | ( C ) 2019 , Aeternity Anstalt
ADT for contract stores in FATE .
Entries are cached in a read / write manner to avoid multiple
-module(aefa_stores).
-include_lib("aebytecode/include/aeb_fate_data.hrl").
-export([ finalize/3
, find_value/3
, has_contract/2
, initial_contract_store... |
97dde83723539fdd6168249416bbb9ef514c14f0d1b7648c2ebdf0fefde41ac8 | melange-re/melange | arg.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/stdlib-412/stdlib_modules/arg.ml | ocaml | ************************************************************************
OCaml
... | , projet Para , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type key = string
type doc = string
type usage_msg = string
type anon_fun = (string -> unit)
type spec =
... |
755064befabf687f8f1114f9b6c13e9047d27dc602bb0717aaba85e2d8465281 | faylang/fay | JsFunctionPassing.hs | {-# LANGUAGE EmptyDataDecls #-}
module JsFunctionPassing where
import FFI
data Func
makeFunc0 :: Int -> Func
makeFunc0 = ffi "function() {return %1;}"
callFunc0 :: Func -> Fay Int
callFunc0 = ffi "%1()"
makeFunc1 :: Int -> Func
makeFunc1 = ffi "function(x) {return %1;}"
callFunc1 :: Func -> Fay Int
cal... | null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/JsFunctionPassing.hs | haskell | # LANGUAGE EmptyDataDecls # |
module JsFunctionPassing where
import FFI
data Func
makeFunc0 :: Int -> Func
makeFunc0 = ffi "function() {return %1;}"
callFunc0 :: Func -> Fay Int
callFunc0 = ffi "%1()"
makeFunc1 :: Int -> Func
makeFunc1 = ffi "function(x) {return %1;}"
callFunc1 :: Func -> Fay Int
callFunc1 = ffi "%1(1)"
main = do
... |
12ff79e72bd454eae5b7f5dd9e1980454af3cf3eec040baf2ff03997e56d0bbb | antoniogarrote/clj-ml | filters.clj | ;;
;; Data processing of data with different filtering algorithms
@author
;;
(ns #^{:author "Antonio Garrote <>"}
clj-ml.filters
"This namespace defines a set of functions that can be applied to data sets to modify the
dataset in some way: transforming nominal attributes into binary attributes, removing
... | null | https://raw.githubusercontent.com/antoniogarrote/clj-ml/a6e3a41b7eed0c31ea344b286ebbeb0e81ce68bc/src/clj_ml/filters.clj | clojure |
Data processing of data with different filtering algorithms
There is no necessity of passing the :dataset-format option, *ds* format is used
automatically
Options for the filters
Creation of filters
Processing the filtering of data | @author
(ns #^{:author "Antonio Garrote <>"}
clj-ml.filters
"This namespace defines a set of functions that can be applied to data sets to modify the
dataset in some way: transforming nominal attributes into binary attributes, removing
attributes etc.
A sample use of the API is shown below:
* ds *... |
3788727f02472580a20c602d840a827f4b9ad52e7a559d46a99dd0464f67628d | CardanoSolutions/ogmios | Mary.hs | 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 /.
# LANGUAGE TypeApplications #
module Ogmios.Data.Json.Mary where
import Ogmios.Data.Json.Prelude
import Cardano.Binary
( serialize'
... | null | https://raw.githubusercontent.com/CardanoSolutions/ogmios/317c826d9d0388cb7efaf61a34085fc7c1b12b06/server/src/Ogmios/Data/Json/Mary.hs | haskell |
Encoders
Conversion To Text
| 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 /.
# LANGUAGE TypeApplications #
module Ogmios.Data.Json.Mary where
import Ogmios.Data.Json.Prelude
import Cardano.Binary
( serialize'
... |
85bb7ee24f705cf3f58a6af2cd551b06b0a46a9c0a301a5e48707cb1fa901d60 | tisnik/clojure-examples | core.clj | (ns carmine9.core
(:require [taoensso.carmine :as carmine :refer (wcar)]))
(def redis-connection {
:pool {}
:spec {
:uri "redis@127.0.0.1:6379"}})
(defmacro wcar*
[& body]
`(carmine/wcar redis-connection ~@body))
(defn -main
[& args]
(println "Working with two sets")
(println "Fill in sets s1 ... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/303b7784f9238309af9b9853b426a88accf042e4/carmine9/src/carmine9/core.clj | clojure | (ns carmine9.core
(:require [taoensso.carmine :as carmine :refer (wcar)]))
(def redis-connection {
:pool {}
:spec {
:uri "redis@127.0.0.1:6379"}})
(defmacro wcar*
[& body]
`(carmine/wcar redis-connection ~@body))
(defn -main
[& args]
(println "Working with two sets")
(println "Fill in sets s1 ... | |
a6816c934017842fa480a57f80cf064f5fb7da0dcf6b5163f21388dd3910a1c5 | sgbj/MaximaSharp | opers.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/opers.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
created, the ... |
(in-package :maxima)
(macsyma-module opers)
This file is the run - time half of the OPERS package , an interface to the
general representation simplifier . When new expressions are being
rather than the entrypoints in SIMP such as SIMPLIFYA or SIMPLUS . Many of
kept in two different places . ]
The ba... |
4bec47368567568e37a24df81753be81b076eb1b2ab0c1b588cad3096af9f759 | glguy/advent | 16.hs | {-# Language QuasiQuotes, ImportQualifiedPost #-}
|
Module : Main
Description : Day 16 solution
Copyright : ( c ) , 2018
License : ISC
Maintainer :
< >
Module : Main
Description : Day 16 solution
Copyright : (c) Eric Mertens, 2018
License : ISC
Maintainer :
<>
-}
module ... | null | https://raw.githubusercontent.com/glguy/advent/7ab9f9e47208fd5720e36bac33fee2b78d4ec50b/solutions/src/2018/16.hs | haskell | # Language QuasiQuotes, ImportQualifiedPost #
| Examples are registers before, an instruction, and registers after.
| Print the answers to day 16
>>> :main
registers -----------------------------------------------------------
fromList [(0,1),(1,2),(2,4),(3,8)]
semantics -----------------------------------------... | |
Module : Main
Description : Day 16 solution
Copyright : ( c ) , 2018
License : ISC
Maintainer :
< >
Module : Main
Description : Day 16 solution
Copyright : (c) Eric Mertens, 2018
License : ISC
Maintainer :
<>
-}
module Main (main) where
import Advent (format, countBy)... |
f73a105b33e7f1683bd1c69563a43e5abb0dcf934002c54be3414de9bcda82bb | MrEbbinghaus/Todoish | root.cljs | (ns todoish.ui.root
(:require
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[material-ui.utils :as mutils :refer [css-baseline]]
[material-ui.styles :as styles :refer [prefers-dark?]]
[todoish.ui.themes :as themes]
[taoensso.timbre :as log]
[com.fulcrologic.fulcro.routing.dynamic... | null | https://raw.githubusercontent.com/MrEbbinghaus/Todoish/42c5a8e575c19937e4ed3332b738e5f35e847f07/src/main/todoish/ui/root.cljs | clojure | default will be used when the current state isn't yet set | (ns todoish.ui.root
(:require
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[material-ui.utils :as mutils :refer [css-baseline]]
[material-ui.styles :as styles :refer [prefers-dark?]]
[todoish.ui.themes :as themes]
[taoensso.timbre :as log]
[com.fulcrologic.fulcro.routing.dynamic... |
37cda6197028b30e22bb430c744d2463441d2b71985f8733dd5ab4a102b655db | landakram/kiwi-desktop | core.cljs | (ns kiwi.page.core
(:require [clojure.string :as string]
[kiwi.utils :as utils]
[kiwi.markdown-processors :as markdown-processors]))
(defn capitalize-words [s]
(->> (string/split (str s) #"\b")
(map string/capitalize)
(string/join)))
(defn get-permalink-from-title [title]
(... | null | https://raw.githubusercontent.com/landakram/kiwi-desktop/cc7d0a5f28430f39d43dffb26850183601fd28f9/src/cljs/kiwi/page/core.cljs | clojure | (ns kiwi.page.core
(:require [clojure.string :as string]
[kiwi.utils :as utils]
[kiwi.markdown-processors :as markdown-processors]))
(defn capitalize-words [s]
(->> (string/split (str s) #"\b")
(map string/capitalize)
(string/join)))
(defn get-permalink-from-title [title]
(... | |
cfdfcbd8837aea8773f728c4e37c9560e788a5e1a09c2cb70ce3c9d188e47944 | SquidDev/illuaminate | lua_reference.mli | type t =
| Unknown
| InManual of string
| Undocumented
(** Get a link to a section of the manual *)
val manual_section : string -> string
(** Convert a Lua reference to a url. *)
val to_url : t -> string option
* Resolve a Lua ( 5.1 ) name and convert it into a section of the manual
val lookup_name : string ->... | null | https://raw.githubusercontent.com/SquidDev/illuaminate/da18b101b4710881b71c42554d70a3a7d17c3cd6/src/semantics/lua_reference.mli | ocaml | * Get a link to a section of the manual
* Convert a Lua reference to a url. | type t =
| Unknown
| InManual of string
| Undocumented
val manual_section : string -> string
val to_url : t -> string option
* Resolve a Lua ( 5.1 ) name and convert it into a section of the manual
val lookup_name : string -> t
* Result a Lua ( 5.1 ) type and convert it into a section of the manual
val lookup... |
7de45915b358a7efdc7f286422ef8418ee2046ffef18241d5c4d7a7d89efc9e6 | mfikes/fifth-postulate | ns371.cljs | (ns fifth-postulate.ns371)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns371.cljs | clojure | (ns fifth-postulate.ns371)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
13181f060709ecc6e494bb6fd1331b56382be4a0827c81ceb107f8433163c239 | uw-unsat/serval | target.rkt | #lang racket/base
(require ffi/unsafe
ffi/unsafe/alloc
"core.rkt")
(provide (all-defined-out))
(define _LLVMByteOrdering
(_enum
'(big = 0
little)))
(struct _data-layout (pointer module) #:transparent)
(define _LLVMTargetDataRef
(make-ctype _pointer
_data-layout-pointer... | null | https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/serval/llvm/capi/target.rkt | racket | #lang racket/base
(require ffi/unsafe
ffi/unsafe/alloc
"core.rkt")
(provide (all-defined-out))
(define _LLVMByteOrdering
(_enum
'(big = 0
little)))
(struct _data-layout (pointer module) #:transparent)
(define _LLVMTargetDataRef
(make-ctype _pointer
_data-layout-pointer... | |
f118404b2922df1fd672a2428641cf46f2bae4d5a3cc6f680c0453a141bd9392 | jashmenn/gen_server_mock | gen_server_mock.erl | %%%-------------------------------------------------------------------
%%% File : gen_server_mock.erl
%%% Author :
%%% Description : Mocking for gen_server. Expectations are ordered, every
%%% message required and no messages more than are expected are allowed.
%%%
Expectations get the same input as the handl... | null | https://raw.githubusercontent.com/jashmenn/gen_server_mock/1a1ea3d858afd5cefe2056e5ab0e625a129c7e7c/src/gen_server_mock.erl | erlang | -------------------------------------------------------------------
File : gen_server_mock.erl
Author :
Description : Mocking for gen_server. Expectations are ordered, every
message required and no messages more than are expected are allowed.
Inspired by: -questions/2008-April/034140.html
----------------... | Expectations get the same input as the handle_(whatever ) gen_server methods . They should return - > ok | { ok , NewState }
Created : 2009 - 08 - 05
-module(gen_server_mock).
-behaviour(gen_server).
-export([new/0, new/1, stop/1, crash/1,
expect/3, expect_call/2, expect_info/2, expect_cast/2,
... |
5990edc427efff4aec2e7f17d15e89c14257b46680440aa728c641aaf4942bc3 | johnswanson/tictag | utils.clj | (ns tictag.utils
(:require [com.stuartsierra.component :as component]
[clj-time.local]
[clj-time.format :as f]
[clj-time.core :as t]
[clj-time.coerce :as tc]
[clojure.string :as str]
[taoensso.timbre :as timbre]))
(def wtf (f/formatter "yyyy-MM-... | null | https://raw.githubusercontent.com/johnswanson/tictag/89140b5084817690ec417b07b7d095ba7677f4e0/src/clj/tictag/utils.clj | clojure | => {:foo {:bar :baz, :fuzz :buzz}}
contrast with clojure.core/merge
=> {:foo {:fuzz :quzz}} ; note how last value for :foo wins" | (ns tictag.utils
(:require [com.stuartsierra.component :as component]
[clj-time.local]
[clj-time.format :as f]
[clj-time.core :as t]
[clj-time.coerce :as tc]
[clojure.string :as str]
[taoensso.timbre :as timbre]))
(def wtf (f/formatter "yyyy-MM-... |
cc7ffcde2ab6a96e3260bc3e1e62e89a604a83a77e7f872ce45ad0604cc56d5d | haskell-jp/slack-log | Types.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE StrictData #
module SlackLog.Types
( module SlackLog.Duration
, Config (..)
, TemplatePaths (..)
, TargetChannels
, UserName
, UserId
, ChannelName
, ChannelId
) where
import qualified Data.Aeson as Json
import ... | null | https://raw.githubusercontent.com/haskell-jp/slack-log/ccf7a64643b62cefa329600120ec5590a527c9c1/src/SlackLog/Types.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
| Configuration type used mainly when converting JSON files into HTML.
^ Show the times on this timezone.
^ How long slack-logger saves replies before.
slack-logger checks if a thread has more replies for every saved parent
thread is after 'saveRepliesBef... | # LANGUAGE StrictData #
module SlackLog.Types
( module SlackLog.Duration
, Config (..)
, TemplatePaths (..)
, TargetChannels
, UserName
, UserId
, ChannelName
, ChannelId
) where
import qualified Data.Aeson as Json
import qualified Data.HashMap.Strict as HM
import qualified Data.Text ... |
a86ae3021aeaa13a4bbb2d94fde181811b9940e189274249d10c4a875b1efb56 | kawasima/darzana | mapper.clj | (ns darzana.command.mapper
(:require [clojure.java.data :refer [to-java from-java]]
[clojure.spec.alpha :as s]
[darzana.validator :as v]))
(defmethod clojure.java.data/to-java [Long String] [clazz value]
(Long/parseLong value))
(defmethod clojure.java.data/to-java [Integer String] [clazz v... | null | https://raw.githubusercontent.com/kawasima/darzana/4b37c8556f74219b707d23cb2d6dce70509a0c1b/src/darzana/command/mapper.clj | clojure | (ns darzana.command.mapper
(:require [clojure.java.data :refer [to-java from-java]]
[clojure.spec.alpha :as s]
[darzana.validator :as v]))
(defmethod clojure.java.data/to-java [Long String] [clazz value]
(Long/parseLong value))
(defmethod clojure.java.data/to-java [Integer String] [clazz v... | |
d9a3b89059b796bc2efa906900ee822a0a6297c7b12ddd35ee67c5d790dada54 | synsem/texhs | Reference.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
----------------------------------------------------------------------
-- |
Module : Text . Bib . Reader .
Copyright : 2015 - 2017 ,
2015 - 2016 Language Science Press .
-- License : GPL-3
--
-- Maintainer :
-- Stability ... | null | https://raw.githubusercontent.com/synsem/texhs/9e2dce4ec8ae0b2c024e1883d9a93bab15f9a86f/src/Text/Bib/Reader/BibTeX/Reference.hs | haskell | # LANGUAGE OverloadedStrings #
--------------------------------------------------------------------
|
License : GPL-3
Maintainer :
Stability : experimental
interpret field values according to BibLaTeX's data model
(also see "Text.Bib.Types"), e.g. extract person names.
Cross-references between BibTe... | # LANGUAGE CPP #
Module : Text . Bib . Reader .
Copyright : 2015 - 2017 ,
2015 - 2016 Language Science Press .
Portability : GHC
BibTeX parser , layer 2 :
module Text.Bib.Reader.BibTeX.Reference
* Parsers
parseBib
, parseAgents
, parseList
) where
#if MIN_VERSION... |
77d82c0c49f3755ee1d35ef1d1e7ef83cb5986f86e61427526781f55a6d2289f | ekmett/categories | Functor.hs | # LANGUAGE KindSignatures #
# LANGUAGE PolyKinds #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAG... | null | https://raw.githubusercontent.com/ekmett/categories/4a02808d28b275f59d9d6c08f0c2d329ee567a97/src/Math/Functor.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE GADTs #
# LANGUAGE ConstraintKinds #
------------------------------------------------------------------------------
* Functors
------------------------------------------------------------------------------
------------------------------------------------------------------------------... | # LANGUAGE KindSignatures #
# LANGUAGE PolyKinds #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeOperators #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.