_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 |
|---|---|---|---|---|---|---|---|---|
f72fe43ce90f45e2b49e74a5f2934b526076f0181da83e9fdc67a4cbf5b5edea | yetibot/core | about.clj | (ns yetibot.core.commands.about
(:require [yetibot.core.hooks :refer [cmd-hook]]))
(defn about-cmd
"about # about Yetibot"
{:yb/cat #{:info}}
[& _]
{:result/data
{:about/url ""
:about/name "Yetibot"
:about/logo
""
:about/description
(str
"Yetibot is a chat bot written in Clojure;... | null | https://raw.githubusercontent.com/yetibot/core/e35cc772622e91aec3ad7f411a99fff09acbd3f9/src/yetibot/core/commands/about.clj | clojure | (ns yetibot.core.commands.about
(:require [yetibot.core.hooks :refer [cmd-hook]]))
(defn about-cmd
"about # about Yetibot"
{:yb/cat #{:info}}
[& _]
{:result/data
{:about/url ""
:about/name "Yetibot"
:about/logo
""
:about/description
(str
"Yetibot is a chat bot written in Clojure;... | |
dce867d484b915c36e8ba3c3f28c5b25c39b68f588e265147fc1661813b63b91 | metosin/ring-swagger | swagger2_test.clj | (ns ring.swagger.swagger2-test
(:require [schema.core :as s]
[ring.swagger.swagger2 :as swagger2]
[ring.swagger.swagger2-full-schema :as full-schema]
[ring.swagger.json-schema :as rsjs]
[ring.swagger.extension :as extension]
[ring.swagger.validator :as valid... | null | https://raw.githubusercontent.com/metosin/ring-swagger/0ef9046174dec0ebd4cbf97d6cc5c6846ef11996/test/ring/swagger/swagger2_test.clj | clojure |
facts
body models
response models | (ns ring.swagger.swagger2-test
(:require [schema.core :as s]
[ring.swagger.swagger2 :as swagger2]
[ring.swagger.swagger2-full-schema :as full-schema]
[ring.swagger.json-schema :as rsjs]
[ring.swagger.extension :as extension]
[ring.swagger.validator :as valid... |
9077ea57ed20e8b6aa02c516ed535000cc7e7904380dd84829d9f8c0b968334f | xapi-project/message-switch | q.ml |
* Copyright ( c ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... | null | https://raw.githubusercontent.com/xapi-project/message-switch/b51b75a5789bec8f8c3a7825eb2af576cdef95ab/switch/q.ml | ocaml | if transient, name of the owning connection
compute a valid next_id
If a queue doesn't exist then drop the message
operations which need to be persisted
origin * queue * id * body
drop |
* Copyright ( c ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... |
75acd259ab135df967bf418c6b253c9340654196d295d672c1c72b0d5e14dc8f | facebook/flow | search_tests.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/services/export/search/__tests__/search_tests.ml | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
7d5545c8d7cff05b2f3f41efa5ce5e3e5eda3f19a4114a3c7a65763966b2556f | transient-haskell/transient-stack | Internals.hs | ------------------------------------------------------------------------------
--
-- Module : Transient.Internals
-- Copyright :
License : MIT
--
-- Maintainer :
-- Stability :
-- Portability :
--
-- | See -haskell/transient
-- Everything in this module is exported in order to allow extensibility... | null | https://raw.githubusercontent.com/transient-haskell/transient-stack/dde6f6613a946d57bb70879a5c0e7e5a73a91dbe/transient/src/Transient/Internals.hs | haskell | ----------------------------------------------------------------------------
Module : Transient.Internals
Copyright :
Maintainer :
Stability :
Portability :
| See -haskell/transient
Everything in this module is exported in order to allow extensibility.
-------------------------------------------... | License : MIT
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
{ - # LANGUAGE MonoLocalBinds # - }
module Transient.Internals where
import ... |
6d6ae15947229f737200eab95dc0c781c2be7b28f61b7fa3b531613942a95f34 | haskell/haskell-language-server | NoExplicitExportCommentAtTop.hs | module Test where
-- | a comment
class Semigroup a => SomeData a
instance SomeData All
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/fdbc555a9245cb3761c2bf7335f3d18b8cf7673c/plugins/hls-refactor-plugin/test/data/import-placement/NoExplicitExportCommentAtTop.hs | haskell | | a comment | module Test where
class Semigroup a => SomeData a
instance SomeData All
|
4da5ee08cd45aee2fb2782eb1f884c77ced60d4d0ba58a2a3b3ee79846af5338 | Bogdanp/racket-lua | lexer.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse)
racket/match
racket/port
racket/string)
(provide
(struct-out exn:fail:lexer)
(struct-out token)
make-lexer
lexer-peek
lexer-take)
(struct exn:fail:lexer exn:fail (line col pos)
#:transparent)
(de... | null | https://raw.githubusercontent.com/Bogdanp/racket-lua/e92528c03a66a42adcc7cfede2d4216cf7a581e6/lua-lib/lang/lexer.rkt | racket | readers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(make-token 'semicolon)]
helpers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
matchers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
readers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | #lang racket/base
(require (for-syntax racket/base
syntax/parse)
racket/match
racket/port
racket/string)
(provide
(struct-out exn:fail:lexer)
(struct-out token)
make-lexer
lexer-peek
lexer-take)
(struct exn:fail:lexer exn:fail (line col pos)
#:transparent)
(de... |
cd13912624f2cb7eb813b291534270c33dad20eaf704121a77a641afc400f922 | Workiva/eva | errorcode_generation.clj | Copyright 2015 - 2019 Workiva Inc.
;;
;; Licensed under the Eclipse Public License 1.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -1.0.php
;;
;; Unless required by applicable law or agreed to in writing, software
dist... | null | https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/dev/src/eva/dev/tasks/errorcode_generation.clj | clojure |
Licensed under the Eclipse Public License 1.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-1.0.php
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre... | Copyright 2015 - 2019 Workiva Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns eva.dev.tasks.errorcode-generation
(:require [clojure.java.io :as io])
(:import [java.nio.file Files Path Paths FileVisitOption LinkOption]))
(def enum-template
"// Copyright 2015-2019 Workiva Inc.
//... |
e7552ef897eda1f2e2d6ac646e93a22226f0e21a41d2c3a6219fe0c0256e60d3 | hspec/hspec | LocationSpec.hs | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - incomplete - patterns #
# OPTIONS_GHC -fno - warn - missing - fields #
# OPTIONS_GHC -fno - warn - overlapping - patterns #
# OPTIONS_GHC -fno - warn - missing - methods #
# OPTIONS_GHC -fno - warn - incomplete - uni - patterns #
{-# OPTIONS_GHC -O0 #-}
module Test.Hspec.Cor... | null | https://raw.githubusercontent.com/hspec/hspec/b87b226730e6997cc516c60727120210a4cf1cf4/hspec-core/test/Test/Hspec/Core/Example/LocationSpec.hs | haskell | # OPTIONS_GHC -O0 # | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - incomplete - patterns #
# OPTIONS_GHC -fno - warn - missing - fields #
# OPTIONS_GHC -fno - warn - overlapping - patterns #
# OPTIONS_GHC -fno - warn - missing - methods #
# OPTIONS_GHC -fno - warn - incomplete - uni - patterns #
module Test.Hspec.Core.Example.LocationSpec (... |
3223f4f58fa24b43a9ae7f55203406eee00647aba112ec588fd2b3a2f0fc6c69 | NorfairKing/validity | Clock.hs | # OPTIONS_GHC -fno - warn - orphans #
module Data.GenValidity.Time.Clock where
import Data.GenValidity
import Data.GenValidity.Time.Calendar ()
import Data.Time.Clock
import Data.Validity.Time.Clock ()
import Test.QuickCheck
instance GenValid UniversalTime where
genValid = ModJulianDate <$> genValid
shrinkValid ... | null | https://raw.githubusercontent.com/NorfairKing/validity/35bc8d45b27e6c21429e4b681b16e46ccd541b3b/genvalidity-time/src/Data/GenValidity/Time/Clock.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Data.GenValidity.Time.Clock where
import Data.GenValidity
import Data.GenValidity.Time.Calendar ()
import Data.Time.Clock
import Data.Validity.Time.Clock ()
import Test.QuickCheck
instance GenValid UniversalTime where
genValid = ModJulianDate <$> genValid
shrinkValid ... | |
38b254b380790b9c93307afc4029536c5c86b54b09562e4e41a28fdcb5b45a1f | clojure/clojurescript | base64_vlq.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the t... | null | https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/main/clojure/cljs/source_map/base64_vlq.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
tes... | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns cljs.source-map.base64-vlq
(:require [clojure.string :as string]
[cljs.source-map.base64 :as base64]))
(def ^:const vlq-base-shift 5)
(def ^:const vlq-base (bit-shift-left 1 vlq-base-shift))
(def ^:const vlq-base-ma... |
98c41bca4768bbc29746a893a7e26a6536133102fecf8df54d609a0495e001df | khibino/haskell-relational-record | Qualify.hs | # LANGUAGE GeneralizedNewtypeDeriving #
-- |
Module : Database . Relational . Monad . Trans . Qualify
Copyright : 2013 - 2019
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : unknown
--
-- This module defines monad transformer which qualify uniquely SQL table for... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-query/src/Database/Relational/Monad/Trans/Qualify.hs | haskell | |
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
This module defines monad transformer which qualify uniquely SQL table forms.
This is not public interface.
* Qualify monad
| Monad type to qualify SQL table forms.
| Run qualify monad with initial state to get only result... | # LANGUAGE GeneralizedNewtypeDeriving #
Module : Database . Relational . Monad . Trans . Qualify
Copyright : 2013 - 2019
module Database.Relational.Monad.Trans.Qualify (
Qualify, qualify,
evalQualifyPrime, qualifyQuery
) where
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Sta... |
6f952a42e92921b0d549cf71181856bc65ff2d3bf14d52efd929bfef972ef1f9 | elaforge/karya | CallDoc_test.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Cmd.CallDoc_test where
import Util.Test
import qualified Cmd.CallDoc as CallDoc
import qualified Derive.C.All as C.All
import qualified Derive.Scale.All as Scale.All
test_doc_htm... | null | https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Cmd/CallDoc_test.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt | Copyright 2013
module Cmd.CallDoc_test where
import Util.Test
import qualified Cmd.CallDoc as CallDoc
import qualified Derive.C.All as C.All
import qualified Derive.Scale.All as Scale.All
test_doc_html :: Test
test_doc_html = do
Mostly this just makes HPC coverage for all the documentation .
let hstate = (... |
9a4b31bdf41d089cb1195db3005f3d32efa7944f51274a57a3cf07343011e285 | TrustInSoft/tis-kernel | stop_at_nth.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/value/slevel/stop_at_nth.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
3235324a44f542d745165b8f37033cb3bdd069c50a1fc6386a92af9d8e172c77 | hiredman/clojurebot | tinyurl.clj | (ns hiredman.clojurebot.tinyurl
(:use (hiredman.clojurebot core)))
(def url-reg #"[A-Za-z]+://[^ ^/]+\.[^ ^/]+[^ ]+")
(defn get-tiny-url [url]
(with-open [pt (.getContent (java.net.URL. (str "-create.php?url=" (java.net.URLEncoder/encode url))))
dis (java.io.DataInputStream. pt)]
... | null | https://raw.githubusercontent.com/hiredman/clojurebot/1e8bde92f2dd45bb7928d4db17de8ec48557ead1/src/hiredman/clojurebot/tinyurl.clj | clojure | (ns hiredman.clojurebot.tinyurl
(:use (hiredman.clojurebot core)))
(def url-reg #"[A-Za-z]+://[^ ^/]+\.[^ ^/]+[^ ]+")
(defn get-tiny-url [url]
(with-open [pt (.getContent (java.net.URL. (str "-create.php?url=" (java.net.URLEncoder/encode url))))
dis (java.io.DataInputStream. pt)]
... | |
9deef5fd2de9957c036638b47890d073b2bba9fd07e5b3914e18a49e56e457af | softlab-ntua/bencherl | unit_utils.erl | Copyright ( C ) 2003 - 2014
%
This file is part of the Ceylan Erlang library .
%
% This library is free software: you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License or
the GNU General Public License , as they are published by the Free Software
Foundation , eith... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/common/src/utils/unit_utils.erl | erlang |
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License or
any later version.
You can also redistribute it and/or modify it under the terms of the
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; w... | Copyright ( C ) 2003 - 2014
This file is part of the Ceylan Erlang library .
the GNU General Public License , as they are published by the Free Software
Foundation , either version 3 of these Licenses , or ( at your option )
Mozilla Public License , version 1.1 or later .
GNU Lesser General Public License... |
28df771b7ead8589e127a68abcb4fafafda3596e02950c8c800fa575cff5fd1c | ngerakines/etap | etap_t_006.erl | -module(etap_t_006).
-export([start/0, start_loop/1]).
start() ->
etap:plan(3),
etap_process:is_pid(spawn(?MODULE, start_loop, [test_group_a]), "Spawned process is a pid"),
etap_process:is_alive(spawn(?MODULE, start_loop, [test_group_a]), "Spawned process is alive"),
etap_process:is_mfa(spawn(?MODULE,... | null | https://raw.githubusercontent.com/ngerakines/etap/3d46faf192a4e1436a058c9cfd7830deac72424b/t/etap_t_006.erl | erlang | -module(etap_t_006).
-export([start/0, start_loop/1]).
start() ->
etap:plan(3),
etap_process:is_pid(spawn(?MODULE, start_loop, [test_group_a]), "Spawned process is a pid"),
etap_process:is_alive(spawn(?MODULE, start_loop, [test_group_a]), "Spawned process is alive"),
etap_process:is_mfa(spawn(?MODULE,... | |
fbe9a6410363f75350000e6501dd16ce33c84fe9c5a4355827a1f4d3ac8872c1 | dfordivam/tenjinreader | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Language . Javascript . JSaddle . Warp
import Reflex . Dom . Core ( mainWidget , mainWidgetWithCss )
import Reflex . hiding ( mainWidget , run )
import Reflex.Dom
import Data . FileEmbed
import TopWidget
import Protolude
-- main :: IO ()
-- main = m... | null | https://raw.githubusercontent.com/dfordivam/tenjinreader/894a6f6b23d52c9c048740c0ea62f4c0f47d9561/frontend/src/Main.hs | haskell | # LANGUAGE OverloadedStrings #
main :: IO ()
main = mainWidget $ text "hi"
mainWidget $ topWidget
($(embedFile "src/bootstrap.css") <> $(embedFile "src/custom.css")) |
module Main where
import Language . Javascript . JSaddle . Warp
import Reflex . Dom . Core ( mainWidget , mainWidgetWithCss )
import Reflex . hiding ( mainWidget , run )
import Reflex.Dom
import Data . FileEmbed
import TopWidget
import Protolude
main :: IO ()
main =
run 3911 $
mainWidgetWithCss
( $ ... |
a60b321e4a8a0e78de3cd37b1e7c51cbf415c48fe798088d02bd8552f8afd7dc | tfausak/strive | HTTP.hs | -- | Helpers for dealing with HTTP requests.
module Strive.Internal.HTTP
( delete,
get,
post,
put,
buildRequest,
performRequest,
handleResponse,
decodeValue,
)
where
import Data.Aeson (FromJSON, eitherDecode)
import Data.ByteString.Char8 (unpack)
import Data.ByteString.Lazy (ByteString)... | null | https://raw.githubusercontent.com/tfausak/strive/82294daca85ca624ca1e746d7aa4c01d57233356/source/library/Strive/Internal/HTTP.hs | haskell | | Helpers for dealing with HTTP requests.
| Perform an HTTP DELETE request.
| Perform an HTTP GET request.
| Perform an HTTP POST request.
| Perform an HTTP request.
| Build a request.
| Build a URL.
| Build a query.
| Actually perform an HTTP request.
| Handle decoding a potentially failed response.
| Decod... | module Strive.Internal.HTTP
( delete,
get,
post,
put,
buildRequest,
performRequest,
handleResponse,
decodeValue,
)
where
import Data.Aeson (FromJSON, eitherDecode)
import Data.ByteString.Char8 (unpack)
import Data.ByteString.Lazy (ByteString)
import Network.HTTP.Client
( Request,
... |
3d7d18538ecf675f1721d542597d908ed21188f2b7d48436ee9c691dc5ac289e | polytypic/f-omega-mu | FomPP.mli | open FomPPrint
module Kind : sig
module Numbering : sig
type t
val create : unit -> t
end
val pp : ?numbering:Numbering.t -> FomAST.Kind.t -> document
val pp_annot : ?numbering:Numbering.t -> FomAST.Kind.t -> document
val to_string : ?numbering:Numbering.t -> FomAST.Kind.t -> string
end
module Lab... | null | https://raw.githubusercontent.com/polytypic/f-omega-mu/92590f4ba55d96870dbe7f7d3400d5a4ce8683f0/src/main/FomPP/FomPP.mli | ocaml | open FomPPrint
module Kind : sig
module Numbering : sig
type t
val create : unit -> t
end
val pp : ?numbering:Numbering.t -> FomAST.Kind.t -> document
val pp_annot : ?numbering:Numbering.t -> FomAST.Kind.t -> document
val to_string : ?numbering:Numbering.t -> FomAST.Kind.t -> string
end
module Lab... | |
c98122301a5a0a9fe72de57acda35ea2adf19b1721371166cd81af12d878aa85 | genenetwork/guix-bioinformatics | genenetwork.scm | (define-module (gn services genenetwork))
(use-modules (gnu)
(ice-9 match)
(past packages python)
(past packages web)
(gn packages genenetwork)
(gn packages python24))
(use-service-modules web)
(define %default-httpd22-modules
(map (match-lambda
... | null | https://raw.githubusercontent.com/genenetwork/guix-bioinformatics/9e1e668e4f9f9e2b595620fda831da0525db4095/gn/services/genenetwork.scm | scheme | MySQLdb
The genotypes folder doesn't have it's shebangs patched.
Defaults to httpd, should be same as 'package' above.
Only while debugging
xdg-open :8042 | (define-module (gn services genenetwork))
(use-modules (gnu)
(ice-9 match)
(past packages python)
(past packages web)
(gn packages genenetwork)
(gn packages python24))
(use-service-modules web)
(define %default-httpd22-modules
(map (match-lambda
... |
85541b861fdf25321d38c1b50e4a8d9a7c4403a3be36c0afd966d1c9cc544ac2 | danieljharvey/mimsa | Builder.hs | # LANGUAGE DerivingStrategies #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module Builder (doJobsIO, doJobsPure, getMissing, Plan (..), State (..), Job, Inputs) where
import qualified Control.Concurrent.STM as STM
import Control.Monad.Identity
import Data.Foldable ... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/703513748847b3dc9be99573afb582ec05244f3f/builder/src/Builder.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
a thing we want to do
how we're going to do it
state of the job
list the required deps that cannot possibly be provided (usually indicates
an error with implementation)
disregard any jobs that are inflight
get jobs we are ready to do
| remove job from input... | # LANGUAGE DerivingStrategies #
# LANGUAGE ScopedTypeVariables #
module Builder (doJobsIO, doJobsPure, getMissing, Plan (..), State (..), Job, Inputs) where
import qualified Control.Concurrent.STM as STM
import Control.Monad.Identity
import Data.Foldable (traverse_)
import Data.Map.Strict (Map)
import qualified Data.... |
ab547fbeb58ff7fcdb609a03d1d5c15a9cf8d956f6556ddfd92260bbe4399d18 | lichenscript/lichenscript | linker.mli | open Lichenscript_typing
type t
val create: prog:Program.t -> unit -> t
val link_from_entry: t -> verbose:bool -> int -> Typedtree.Declaration.t list
val set_module: t -> string -> Module.t -> unit
val get_module: t -> string -> Module.t option
val has_module: t -> string -> bool
val iter_modules: t -> f:(Module... | null | https://raw.githubusercontent.com/lichenscript/lichenscript/0b03566b85079e5360ec75fdeb120c028c3d39dd/lib/resolver/linker.mli | ocaml | open Lichenscript_typing
type t
val create: prog:Program.t -> unit -> t
val link_from_entry: t -> verbose:bool -> int -> Typedtree.Declaration.t list
val set_module: t -> string -> Module.t -> unit
val get_module: t -> string -> Module.t option
val has_module: t -> string -> bool
val iter_modules: t -> f:(Module... | |
8a500cb5f5d6dc1ce2e89ebc87faf6c06307d72971238a7cd450eac9bce63ddf | papertrail/slack-hooks | tender.clj | (ns slack-hooks.service.tender
(:require [slack-hooks.slack :as slack]
[clojurewerkz.urly.core :as urly]))
(def tender-base-url
(System/getenv "TENDER_BASE_URL"))
(def tender-username
(or
(System/getenv "TENDER_USERNAME")
"tender"))
(def tender-avatar
(System/getenv "TENDER_AVATAR"))
(de... | null | https://raw.githubusercontent.com/papertrail/slack-hooks/e9cfdbfee40e678be956416366684ee22d6cb282/src/slack_hooks/service/tender.clj | clojure | (ns slack-hooks.service.tender
(:require [slack-hooks.slack :as slack]
[clojurewerkz.urly.core :as urly]))
(def tender-base-url
(System/getenv "TENDER_BASE_URL"))
(def tender-username
(or
(System/getenv "TENDER_USERNAME")
"tender"))
(def tender-avatar
(System/getenv "TENDER_AVATAR"))
(de... | |
3149080ad670d9dbed084c0e27a89fb0f56cc140fd9cbd688212f9c31416772c | onaio/milia | retry_test.clj | (ns milia.utils.retry-test
(:require [chimera.seq :refer [mapply]]
[midje.sweet :refer :all]
[milia.utils.retry :refer :all]
[milia.api.http :refer [parse-http]]))
(facts "about retry-parse-http"
(fact "should return result of mapply parse-http"
(retry-parse-ht... | null | https://raw.githubusercontent.com/onaio/milia/c68b612bd640aa2499e4ac2f907a7ef793d0820a/test/clj/milia/utils/retry_test.clj | clojure | (ns milia.utils.retry-test
(:require [chimera.seq :refer [mapply]]
[midje.sweet :refer :all]
[milia.utils.retry :refer :all]
[milia.api.http :refer [parse-http]]))
(facts "about retry-parse-http"
(fact "should return result of mapply parse-http"
(retry-parse-ht... | |
edd605875748bad772ea0efd0e0664a609265e422f4bf96de7e8da98eb256e0d | rizo/snowflake-os | play.ml |
open Bigarray
open BlockIO
open FileSystems
open Ext2fs
provide a static buffer size of 65536 bytes
let ba = Array1.create int8_unsigned c_layout 65536
let init () =
match !FileSystems.fs with
| None -> ()
| Some fs ->
(* add a command to shell thing *)
let did_it = ref false in
let play nam... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/kernel/play.ml | ocaml | add a command to shell thing |
open Bigarray
open BlockIO
open FileSystems
open Ext2fs
provide a static buffer size of 65536 bytes
let ba = Array1.create int8_unsigned c_layout 65536
let init () =
match !FileSystems.fs with
| None -> ()
| Some fs ->
let did_it = ref false in
let play name =
begin try
let inode = fs.... |
ee359deccfa2d4dc4cdfcb13667fae5ef2b324a396167ba85995975345f0315c | softwarelanguageslab/maf | R5RS_scp1_list-compare-n-5.scm | ; Changes:
* removed : 0
* added : 1
* swaps : 0
* negated predicates : 1
* swapped branches : 2
* calls to i d fun : 1
(letrec ((compare (lambda (lijst1 lijst2)
(if (let ((__or_res (null? lijst1))) (<change> (if __or_res __or_res (null? lijst2)) ((lambda (x) x) (if (<change> __or_res (n... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_list-compare-n-5.scm | scheme | Changes: | * removed : 0
* added : 1
* swaps : 0
* negated predicates : 1
* swapped branches : 2
* calls to i d fun : 1
(letrec ((compare (lambda (lijst1 lijst2)
(if (let ((__or_res (null? lijst1))) (<change> (if __or_res __or_res (null? lijst2)) ((lambda (x) x) (if (<change> __or_res (not __or_res... |
def474f99bbffdba00f47411f0b2540305b6b0437a8cabaa0a2e02bfd314092a | opencog/learn | in-group.scm | ;
; in-group.scm
;
; Obtain an in-group of similar words. In-groups are those whose members
have a lot in common with one - another . In - groups can be cliques , and
; more generally are almost-cliques.
;
Copyright ( c ) 2021 Linas Vepstas
;
; ---------------------------------------------------------------------
;... | null | https://raw.githubusercontent.com/opencog/learn/b3f2bc8260bdea5f2ba64dab7a20e265d23a14c3/scm/gram-class/in-group.scm | scheme |
in-group.scm
Obtain an in-group of similar words. In-groups are those whose members
more generally are almost-cliques.
---------------------------------------------------------------------
OVERVIEW
--------
Given a word-pair with a high similarity score, expand that word-pair
into a clique or an almost-cliq... | have a lot in common with one - another . In - groups can be cliques , and
Copyright ( c ) 2021 Linas Vepstas
(use-modules (srfi srfi-1))
(define-public (find-in-group SIMFUN WA WB
LOWER-BOUND EPSILON TIGHTNESS CANDIDATES)
"
find-in-group SIMFUN WA WB LOWER-BOUND EPSILON TIGHTNESS ... |
5603de9fe19ba2cd444df8ae2b3cd89889b01d15b6f6090dd93181af2d395278 | rescript-association/reanalyze | RunConfig.ml | type t = {
mutable bsbProjectRoot : string;
mutable dce : bool;
mutable exception_ : bool;
mutable noalloc : bool;
mutable projectRoot : string;
mutable suppress : string list;
mutable termination : bool;
mutable unsuppress : string list;
}
let runConfig =
{
bsbProjectRoot = "";
dce = false;
... | null | https://raw.githubusercontent.com/rescript-association/reanalyze/57c22938d266d7eeae00e7caf09924fd271207c2/src/RunConfig.ml | ocaml | type t = {
mutable bsbProjectRoot : string;
mutable dce : bool;
mutable exception_ : bool;
mutable noalloc : bool;
mutable projectRoot : string;
mutable suppress : string list;
mutable termination : bool;
mutable unsuppress : string list;
}
let runConfig =
{
bsbProjectRoot = "";
dce = false;
... | |
8355719a87c21010211db523ca3abaa850579317e7eb5c0e161be1ff2ee0a225 | meooow25/haccepted | MiscSpec.hs | # LANGUAGE ScopedTypeVariables #
module MiscSpec where
import Data.List
import Test.Hspec
import Test.Hspec.QuickCheck
import Misc ( foldExclusive )
spec :: Spec
spec = do
prop "foldExclusive" $
\(xs :: [Int]) -> foldExclusive (+) 0 xs `shouldBe` naiveFoldExclusive (+) 0 xs
naiveFoldExclusive :: (b -> ... | null | https://raw.githubusercontent.com/meooow25/haccepted/2bc153ca95038de3b8bac83eee4419b3ecc116c5/tests/MiscSpec.hs | haskell | # LANGUAGE ScopedTypeVariables #
module MiscSpec where
import Data.List
import Test.Hspec
import Test.Hspec.QuickCheck
import Misc ( foldExclusive )
spec :: Spec
spec = do
prop "foldExclusive" $
\(xs :: [Int]) -> foldExclusive (+) 0 xs `shouldBe` naiveFoldExclusive (+) 0 xs
naiveFoldExclusive :: (b -> ... | |
e733e4887e44945c11b9086e80c6a811a93107c839af803389f327b907a0559d | clojurians-org/haskell-example | Streaming.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE OverloadedLabels #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE DataKinds #
module Backend.Streaming where
import Common.Types
import Data.Conduit (ConduitT, runConduit, runConduitRes, bracketP, yield, (.|))
import qualified Data.Conduit.Combinators as C
import qualified Data.... | null | https://raw.githubusercontent.com/clojurians-org/haskell-example/c96b021bdef52a121e04ea203c8c3e458770a25a/conduit-ui/backend/src/Backend/Streaming.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| # LANGUAGE OverloadedLabels #
# LANGUAGE DataKinds #
module Backend.Streaming where
import Common.Types
import Data.Conduit (ConduitT, runConduit, runConduitRes, bracketP, yield, (.|))
import qualified Data.Conduit.Combinators as C
import qualified Data.Conduit.List as CL
import qualified Data.Text as T
import Data... |
21a646ce1daf887f30d709dacaef108eb63f51559ec173c9124a295927753a0b | deadpendency/deadpendency | DependencyType.hs | {-# LANGUAGE DeriveAnyClass #-}
module Common.Model.Dependency.DependencyType
( DependencyType (..),
)
where
import Common.Aeson.Aeson
import Data.Aeson
data DependencyType
= CoreDependency
| DevDependency
deriving stock (Eq, Show, Generic, Ord)
deriving anyclass (NFData)
instance ToJSON DependencyType ... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Model/Dependency/DependencyType.hs | haskell | # LANGUAGE DeriveAnyClass # |
module Common.Model.Dependency.DependencyType
( DependencyType (..),
)
where
import Common.Aeson.Aeson
import Data.Aeson
data DependencyType
= CoreDependency
| DevDependency
deriving stock (Eq, Show, Generic, Ord)
deriving anyclass (NFData)
instance ToJSON DependencyType where
toJSON = genericToJSON c... |
6cd789be72b694b3180a3b31e6aff3defa1593a2cd5e60af3e994c6d479ad3f8 | simmsb/calamity | SnowflakeMap.hs | | Module for custom instance of Data . . Strict that decodes from any list of objects that have an i d field
module Calamity.Internal.SnowflakeMap where
import Calamity.Internal.Utils ()
import Calamity.Types.Snowflake
import Data.Aeson (FromJSON (..), ToJSON (..), withArray)
import Data.Data
import Data.Foldable q... | null | https://raw.githubusercontent.com/simmsb/calamity/be310255b446e87e7432673de1fbc67ef46de3ae/calamity/Calamity/Internal/SnowflakeMap.hs | haskell | at k f m = at (unSnowflakeMap k) f m
SAFETY: 'Snowflake' always uses the underlying hash function (Word64)
# INLINEABLE unionWith #
# INLINEABLE mapWithKey #
# INLINEABLE intersectionWithKey #
# INLINEABLE mapMaybe # | | Module for custom instance of Data . . Strict that decodes from any list of objects that have an i d field
module Calamity.Internal.SnowflakeMap where
import Calamity.Internal.Utils ()
import Calamity.Types.Snowflake
import Data.Aeson (FromJSON (..), ToJSON (..), withArray)
import Data.Data
import Data.Foldable q... |
c35bb337d5c1cabc328c11c9d89353803e64c6ab0b581293d2e4cffbb8c8737a | foxford/mqtt-gateway | mqttgw_ratelimit.erl | -module(mqttgw_ratelimit).
%% API
-export([
read_config/0,
read_config_file/1
]).
%% Types
-type config() :: mqttgw_ratelimitstate:constraints().
%% =============================================================================
%% API
%% ========================================================================... | null | https://raw.githubusercontent.com/foxford/mqtt-gateway/21428a63ef6d3676934b51b8a96481c9274ad7ff/src/mqttgw_ratelimit.erl | erlang | API
Types
=============================================================================
API
=============================================================================
=============================================================================
=================================================================... | -module(mqttgw_ratelimit).
-export([
read_config/0,
read_config_file/1
]).
-type config() :: mqttgw_ratelimitstate:constraints().
-spec read_config() -> disabled | {enabled, config()}.
read_config() ->
case os:getenv("APP_RATE_LIMIT_ENABLED", "1") of
"0" ->
error_logger:info_msg("[CO... |
ed379e444501e342ce88b38d64dd6f8ae6e524353876c0329b93763950dea148 | haskell-suite/haskell-src-exts | TrailingWhere2.hs | data Baz = Baz
instance Show Baz where
show _ = ""
where
show _ = ""
| null | https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/TrailingWhere2.hs | haskell | data Baz = Baz
instance Show Baz where
show _ = ""
where
show _ = ""
| |
5dee93f07084636b7f9206cb117ee389aecb34664e0c981cd92627ed01e3e65a | hasufell/hsfm | Data.hs | -
HSFM , a written in Haskell .
Copyright ( C ) 2016
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation .
This program is distributed in the hope that it will be useful ,
but... | null | https://raw.githubusercontent.com/hasufell/hsfm/322c766ae534fb21e3427d2845011123ddb90952/src/HSFM/GUI/Gtk/Data.hs | haskell | }
----------------
[ Base Types ]--
----------------
|Monolithic object passed to various GUI functions in order
to keep the API stable and not alter the parameters too much.
This only holds GUI widgets that are needed to be read during
runtime.
|main Window
widgets on the main window
other
because we might wan... | -
HSFM , a written in Haskell .
Copyright ( C ) 2016
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation .
This program is distributed in the hope that it will be useful ,
but... |
681fe8ff13946bb74591c71729fb48f085787fd5874d796bdeffd90fc19a4ce1 | janestreet/universe | token.ml | open Base
open Ppxlib
module Directive = struct
type t = If | Else | Elif | Endif | Ifdef | Ifndef |
Define | Undef |
Error | Warning | Import |
(* deprecated, but provide useful warnings *)
Elifdef | Elifndef
let matches ~expected matched =
String.(=) expected ma... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_optcomp/src/token.ml | ocaml | deprecated, but provide useful warnings
not using [matches] here because I'm pretty sure the pattern matching
compiler will make this faster than string equality.
* blocks with no optcomp extensions in it | open Base
open Ppxlib
module Directive = struct
type t = If | Else | Elif | Endif | Ifdef | Ifndef |
Define | Undef |
Error | Warning | Import |
Elifdef | Elifndef
let matches ~expected matched =
String.(=) expected matched ||
String.(=) ("optcomp." ^ expected) matched... |
aa46b8443e71e11a8ce818bea0f8ba9df7abbf89eec0842dc0c30c0c338c5f60 | sbtourist/clamq | project.clj | (defproject clamq "0.5-SNAPSHOT"
:description "Clojure APIs for Message Queues"
:dev-dependencies
[[lein-sub "0.1.1"]]
:sub
["clamq-core"
"clamq-jms"
"clamq-activemq"
"clamq-rabbitmq"
"clamq-runner"]) | null | https://raw.githubusercontent.com/sbtourist/clamq/34a6bbcb7a2a431ea629aa5cfbc687ef31f860f2/project.clj | clojure | (defproject clamq "0.5-SNAPSHOT"
:description "Clojure APIs for Message Queues"
:dev-dependencies
[[lein-sub "0.1.1"]]
:sub
["clamq-core"
"clamq-jms"
"clamq-activemq"
"clamq-rabbitmq"
"clamq-runner"]) | |
ceba3901a69b64d8b9b46e917ab2eaa508d80e09aba8d4d434f24c801f2a2291 | MarkCurtiss/sicp | interpreted-procedures-compiler.scm | (load "book_code/ch5-compiler.scm")
;; generate interpreted procedure calls
(define (compile-procedure-call target linkage)
(let ((primitive-branch (make-label 'primitive-branch))
(compiled-branch (make-label 'compiled-branch))
(interpreted-branch (make-label 'interpreted-branch))
(after-call (make-... | null | https://raw.githubusercontent.com/MarkCurtiss/sicp/8b55a3371458014c815ba8792218b6440127ab40/chapter_5_exercises/interpreted-procedures-compiler.scm | scheme | generate interpreted procedure calls
applying interpreted procedures | (load "book_code/ch5-compiler.scm")
(define (compile-procedure-call target linkage)
(let ((primitive-branch (make-label 'primitive-branch))
(compiled-branch (make-label 'compiled-branch))
(interpreted-branch (make-label 'interpreted-branch))
(after-call (make-label 'after-call)))
(let ((compiled... |
4cc9b9e2d94e3bd2ea73196d42c7874410ea6bdba286bbaa1362a122e6350092 | acl2/acl2 | variable-mix-upper-lower-case.cpp.ref.ast.lsp |
(funcdef foo (a) (block (declare A 2) (return a)))
| null | https://raw.githubusercontent.com/acl2/acl2/c2d69bad0ed3132cc19a00cb632de8b73558b1f9/books/projects/rac/tests/yaml_test/program_structure/variable-mix-upper-lower-case.cpp.ref.ast.lsp | lisp |
(funcdef foo (a) (block (declare A 2) (return a)))
| |
09e744798bdfcade93eda4e3530901c0d3a711e07136c6259fe7e758203f333f | c-cube/funarith | Rat_zarith.mli |
include Funarith.Rat.S with type t = Q.t
| null | https://raw.githubusercontent.com/c-cube/funarith/1c86ac45e9608efaa761e3f14455402730885339/src/zarith/Rat_zarith.mli | ocaml |
include Funarith.Rat.S with type t = Q.t
| |
df77190d37100c42085fde8e9dc0ad49d62436c177b99092e406bd9b751d2336 | binsec/binsec | imap.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/base/imap.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
b252d28dab208ea91a6c0fd9495b0109df2ee047edfb301cc1f6b39ed9a18917 | Leberwurscht/Diaspora-User-Directory | bdbwrap.ml | (************************************************************************)
This file is part of SKS . SKS is free software ; you can
redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation ; either
version 2 of the License , or (... | null | https://raw.githubusercontent.com/Leberwurscht/Diaspora-User-Directory/1ca4a06a67d591760516edffddb0308b86b6314c/trie_manager/bdbwrap.ml | ocaml | **********************************************************************
*********************************************************************
* Wrapper module for Bdb to allow for logging of database operations | This file is part of SKS . SKS is free software ; you can
redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation ; either
version 2 of the License , or ( at your option ) any later version .
This program is distributed in ... |
3407a7237a90aab417579bc127750a41f0c14c959a7377b82af6f123ab9710d7 | haskellari/indexed-traversable | CoerceCompat.hs | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
#endif
module CoerceCompat where
#if __GLASGOW_HASKELL__ >=708
import Data.Coerce (Coercible, coerce)
#else
import Unsafe.Coerce (unsafeCoerce)
#endif
#if __GLASGOW_HASKELL__ >=708
(#.) :: Coercible b c => (b -> c) -> (a -> b) -> (a -> c)
_ #. ... | null | https://raw.githubusercontent.com/haskellari/indexed-traversable/8403a52163e5b8f3ec32a2846b53ccc2e8088a6f/indexed-traversable/src/CoerceCompat.hs | haskell | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
#endif
module CoerceCompat where
#if __GLASGOW_HASKELL__ >=708
import Data.Coerce (Coercible, coerce)
#else
import Unsafe.Coerce (unsafeCoerce)
#endif
#if __GLASGOW_HASKELL__ >=708
(#.) :: Coercible b c => (b -> c) -> (a -> b) -> (a -> c)
_ #. ... | |
8fbc0bb21a5240a802c72dd57b8ccd73f7e05427fa3e1fe76e4c1b255ba6e5a5 | erdos/sphere | macros.clj | (ns erdos.lenart.macros)
(defn- expr-branch? [x]
(and (coll? x)
(not (and (seq? x) (= 'quote (first x))))))
(defn- expr-deref? [x]
(when (and (seq? x)
(= 'clojure.core/deref (first x)))
(second x)))
(def genkwd
"Generate a random keyword, like gensym"
(comp keyword name gensym))
(def... | null | https://raw.githubusercontent.com/erdos/sphere/8de04d3e7c2b18430cff5d3f05933c8243919523/src/erdos/lenart/macros.clj | clojure | procedural style programming
todo: find :elsif clauses in #'as
todo: test :recur clause
idea; can parse str now
output | (ns erdos.lenart.macros)
(defn- expr-branch? [x]
(and (coll? x)
(not (and (seq? x) (= 'quote (first x))))))
(defn- expr-deref? [x]
(when (and (seq? x)
(= 'clojure.core/deref (first x)))
(second x)))
(def genkwd
"Generate a random keyword, like gensym"
(comp keyword name gensym))
(def... |
00cb09ab9ddb4d9898fa787256f2bc02f75f1bb40f80dd98c9d3ec31e2b9adcf | spawnfest/eep49ers | wxCommandEvent.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2021 . 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/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxCommandEvent.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 2008 - 2021 . 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(wxCommandEvent).
-include("wxe.hrl").
-export([getClientData/1,getExtraLong/1,getInt/1,getSelection/1,getStr... |
ad89dc8e16b2fa8e9ab92029ee3fd060ea55787b78af301c5af159aa0a439dbd | softlab-ntua/bencherl | list_utils.erl | Copyright ( C ) 2003 - 2014
%
This file is part of the Ceylan Erlang library .
%
% This library is free software: you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License or
the GNU General Public License , as they are published by the Free Software
Foundation , eith... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/common/src/utils/list_utils.erl | erlang |
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License or
any later version.
You can also redistribute it and/or modify it under the terms of the
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; w... | Copyright ( C ) 2003 - 2014
This file is part of the Ceylan Erlang library .
the GNU General Public License , as they are published by the Free Software
Foundation , either version 3 of these Licenses , or ( at your option )
Mozilla Public License , version 1.1 or later .
GNU Lesser General Public License... |
28afa645288f33bd51e16ee03f8a16a4c1437d73d2421b1535b5cf0dc9017394 | alanz/ghc-exactprint | T10045.hs | module T10045 where
newtype Meta = Meta ()
foo (Meta ws1) =
let copy :: _
copy w from = copy w True
in copy ws1 False
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T10045.hs | haskell | module T10045 where
newtype Meta = Meta ()
foo (Meta ws1) =
let copy :: _
copy w from = copy w True
in copy ws1 False
| |
d44f3cbe48eac3516e948f40934ceed060d86ee579d3f3a0ded73211e45f1f26 | Clozure/ccl-tests | exp.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Sep 1 21:24:44 2003
Contains : Tests of EXP
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
(compile-and-load "exp-aux.lsp")
;;; Error tests
(deftest exp.error.1
(signals-error (exp) program-error)
t)
(deftest exp.error.2
(signals-error... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/exp.lsp | lisp | -*- Mode: Lisp -*-
Error tests
Other tests
Add more tests here for floating point accuracy | Author :
Created : Mon Sep 1 21:24:44 2003
Contains : Tests of EXP
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
(compile-and-load "exp-aux.lsp")
(deftest exp.error.1
(signals-error (exp) program-error)
t)
(deftest exp.error.2
(signals-error (exp 0 nil) program-error)
t)
(defte... |
86613c37868c9b219df9122ae39d47534a0865b9bc641a6eebb113094b771d69 | expipiplus1/vulkan | VK_KHR_external_fence.hs | {-# language CPP #-}
-- | = Name
--
-- VK_KHR_external_fence - device extension
--
-- == VK_KHR_external_fence
--
-- [__Name String__]
-- @VK_KHR_external_fence@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
114
--
-- [__Revision__]
1
--
-- [__Extension and V... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_KHR_external_fence.hs | haskell | # language CPP #
| = Name
VK_KHR_external_fence - device extension
== VK_KHR_external_fence
[__Name String__]
@VK_KHR_external_fence@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
- Requires @VK_KHR_exter... | 114
1
- Requires support for Vulkan 1.0
-
2017 - 05 - 08
- Promoted to Vulkan 1.1 Core
- , Google
- , NVIDIA
- , NVIDIA
- , Oculus
create fences from which non - Vulkan handles that reference the
= = Promotion to Vulkan 1.1
... |
359c390608002a8435cc633e2e38f0635bc870486cf1da8534b722e6d4163f17 | leviroth/ocaml-reddit-api | test_trophies.ml | open! Core
open! Async
open! Import
let%expect_test _ =
with_cassette "trophies" ~f:(fun connection ->
let%bind trophies = Connection.call_exn connection Endpoint.trophies in
print_s [%message "" (trophies : Thing.Award.t list)];
[%expect
{|
(trophies
(((award_id (String v)... | null | https://raw.githubusercontent.com/leviroth/ocaml-reddit-api/6519697a39d68d675c3c36fd54add8ba35e939f3/test/test_trophies.ml | ocaml | open! Core
open! Async
open! Import
let%expect_test _ =
with_cassette "trophies" ~f:(fun connection ->
let%bind trophies = Connection.call_exn connection Endpoint.trophies in
print_s [%message "" (trophies : Thing.Award.t list)];
[%expect
{|
(trophies
(((award_id (String v)... | |
02620aa7bd6c228b5d64590995696694cd87c143de3e7ee9c3b317d42d7fc964 | reborg/clojure-essential-reference | 6.clj | < 1 >
;; IllegalArgumentException Duplicate key: (rand)
< 2 >
# { 0.53148213003 0.7171734431 0.5055531620 } | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Sets/hash-set/6.clj | clojure | IllegalArgumentException Duplicate key: (rand) | < 1 >
< 2 >
# { 0.53148213003 0.7171734431 0.5055531620 } |
6cc7e8eb6397f31ddff86cab20fd0094ff319ddbf2b338d6d39f37f84356432a | serokell/universum | Reexport.hs | {-# LANGUAGE Safe #-}
| This module reexports functions to work with ' ' type .
module Universum.Bool.Reexport
( module Control.Monad
, module Data.Bool
) where
import Control.Monad (guard, unless, when)
import Data.Bool (Bool (..), bool, not, otherwise, (&&), (||))
| null | https://raw.githubusercontent.com/serokell/universum/7fc5dd3951d1177d1873e36b0678c759aeb5dc08/src/Universum/Bool/Reexport.hs | haskell | # LANGUAGE Safe # |
| This module reexports functions to work with ' ' type .
module Universum.Bool.Reexport
( module Control.Monad
, module Data.Bool
) where
import Control.Monad (guard, unless, when)
import Data.Bool (Bool (..), bool, not, otherwise, (&&), (||))
|
55ab8badca1f38d3e1a1fbc8de88060bbcdc94d32bf70f84073b8726bc72cc95 | onedata/op-worker | connection_api.erl | %%%-------------------------------------------------------------------
@author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% Public API for sending messages vi... | null | https://raw.githubusercontent.com/onedata/op-worker/66f5efb3212be16b492e4f500913327777ca7961/src/modules/communication/connection/connection_api.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
Public API for sending messages via connections of given session.
@end
-------------------------------------------------------------------
API
==========================... | @author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(connection_api).
-author("Bartosz Walkowicz").
-include("proto/oneclient/client_messages.hrl").
-include("proto/oneclient/server_messages.hrl").
-include_lib("ctool/include/logging.hrl").
-... |
4c3b7c7142c74546ffec9767c0b22fe5c0baee26c49c294060cede34bc630099 | backtracking/combine | pyth.ml |
Given a Pythagorean triple ( a , b , c ) , with a < b < c ,
tile a c*c square using the hooks ( L shapes ) from the two
squares a*a and b*b
tile a c*c square using the hooks (L shapes) from the two
squares a*a and b*b *)
open Format
primitive Pythagorean triples are generated using
a = ... | null | https://raw.githubusercontent.com/backtracking/combine/d2d9276c99f6d09662900c348f062c618a1b4c95/examples/cmb/pyth.ml | ocaml |
Given a Pythagorean triple ( a , b , c ) , with a < b < c ,
tile a c*c square using the hooks ( L shapes ) from the two
squares a*a and b*b
tile a c*c square using the hooks (L shapes) from the two
squares a*a and b*b *)
open Format
primitive Pythagorean triples are generated using
a = ... | |
26797a31c653570636b0fd4c823b3d717d9eed7bdc11a80ca592dc455da35173 | orbitz/oort | msg_dispatch.erl | %%%-------------------------------------------------------------------
%%% File : msg_dispatch.erl
%%% Author : ortitz <>
%%% Description : Handles dispatching messages to select receivers
%%%
Created : 14 May 2006 by ortitz < >
%%%-------------------------------------------------------------------
-module(msg_d... | null | https://raw.githubusercontent.com/orbitz/oort/a61ec85508917ae9a3f6672a0b708d47c23bb260/src/msg_dispatch.erl | erlang | -------------------------------------------------------------------
File : msg_dispatch.erl
Author : ortitz <>
Description : Handles dispatching messages to select receivers
-------------------------------------------------------------------
API
gen_server callbacks
===========================================... | Created : 14 May 2006 by ortitz < >
-module(msg_dispatch).
-behaviour(gen_server).
-export([start_link/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-export([add/1, remove/0, remove/1, dispatch/3, stop/0]).
-export([test/0]).
-record(state, {dispatch_m... |
b58079a6cd02e98217c1a408291ab037c19541e3fec2286cbb71d0c74db47824 | amnh/PCG | Internal.hs | ----------------------------------------------------------------------------
-- |
-- Module : File.Format.TNT.Internal
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
Internal types and functions for ... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/file-parsers/src/File/Format/TNT/Internal.hs | haskell | --------------------------------------------------------------------------
|
Module : File.Format.TNT.Internal
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
should be exported from top level module.
------------------------------------------------------------... | Copyright : ( c ) 2015 - 2021 Ward Wheeler
Internal types and functions for TNT parsing . Only a subset of types
# LANGUAGE BangPatterns #
# LANGUAGE DeriveFoldable #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase ... |
7601d23b174c08c183b98aa75a41f92e700e20a070db9cc3b0ef1e93d2d7de7b | digikar99/numericals | n-arg-fn-compiler-macros.lisp | (numericals.common:compiler-in-package numericals.common:*compiler-package*)
(5am:in-suite nu::array)
;; TODO: Add macros for comparison and bitwise operations
(define-condition out-unknown-at-compile-time
(compiler-macro-notes:optimization-failure-note)
((args :initarg :args :reader condition-args))
(:repor... | null | https://raw.githubusercontent.com/digikar99/numericals/34601bc63f02774c012ed4949f87baf7e63661ff/src/n-arg-fn-compiler-macros.lisp | lisp | TODO: Add macros for comparison and bitwise operations
TODO: Handle BROADCAST option
0. Abort optimization if not asked to do so; to help debug better
check for broadcast once , to avoid " wasting time " later
FIXME: Mysterious consing
(declare (optimize (safety 0)))
(optimize (safety 0)) | (numericals.common:compiler-in-package numericals.common:*compiler-package*)
(5am:in-suite nu::array)
(define-condition out-unknown-at-compile-time
(compiler-macro-notes:optimization-failure-note)
((args :initarg :args :reader condition-args))
(:report (lambda (c s)
(format s "Unable to infer :O... |
708158e459f72e15f7f909ee69af6ddcfdb746d8646646b15546aa7080a41740 | genmeblog/genuary | day01.clj | Draw 10,000 of something .
(ns genuary.2022.day01
(:require [clojure2d.core :as c2d]
[clojure2d.extra.utils :as utils]
[fastmath.core :as m]
[fastmath.random :as r]
[clojure2d.color :as c]))
(defn iterator [x curr] (+ 4.0 curr (* 18.0 (r/noise x (/ curr 5.0)))))
(de... | null | https://raw.githubusercontent.com/genmeblog/genuary/effe2cd784a38a688a58edf703b3acc1900d1805/src/genuary/2022/day01.clj | clojure | (c2d/save c "results/2022/day01.jpg") | Draw 10,000 of something .
(ns genuary.2022.day01
(:require [clojure2d.core :as c2d]
[clojure2d.extra.utils :as utils]
[fastmath.core :as m]
[fastmath.random :as r]
[clojure2d.color :as c]))
(defn iterator [x curr] (+ 4.0 curr (* 18.0 (r/noise x (/ curr 5.0)))))
(de... |
81315560a8832d4484d6bbad407e77b2e961d75bd9a3b2537e2b2959585faf97 | rrnewton/haskell-lockfree | Fetch.hs | module Fetch (tests) where
-- tests for our fetch-and-* family of functions.
import Control.Monad
import System.Random
import Test.Framework.Providers.HUnit (testCase)
import Test.Framework (Test)
import Test.HUnit (assertEqual,assertBool)
import Data.Primitive
import Data.List
import Data.Bits
import Data.Atomics
imp... | null | https://raw.githubusercontent.com/rrnewton/haskell-lockfree/87122157cbbc96954fcc575b4b110003d3e5c2f8/atomic-primops/testing/Fetch.hs | haskell | tests for our fetch-and-* family of functions.
Test all operations at once, somewhat randomly, ensuring they behave like
their corresponding bitwise operator; we compose a few operations before
inspecting the intermediate result, and spread them randomly around a small
array.
Inf list of different short sequences... | module Fetch (tests) where
import Control.Monad
import System.Random
import Test.Framework.Providers.HUnit (testCase)
import Test.Framework (Test)
import Test.HUnit (assertEqual,assertBool)
import Data.Primitive
import Data.List
import Data.Bits
import Data.Atomics
import Control.Monad.Primitive
import Control.Concurr... |
0d2cc2ecc2887b90e49c0e7e357a56d2db65ccd8530367593cc28dbe2d9b99cc | roburio/udns | dns_client_lwt.ml | { ! } provides the implementation of the underlying flow
that is in turn used by { ! Dns_client_flow . Make } to provide the
Lwt convenience module
that is in turn used by {!Dns_client_flow.Make} to provide the
Lwt convenience module
*)
open Lwt.Infix
module Uflow : Dns_client_flow.S
with type ... | null | https://raw.githubusercontent.com/roburio/udns/585c40933ac3d5eceb351f7edd3f45cf2615a9f8/lwt/client/dns_client_lwt.ml | ocaml | { ! } provides the implementation of the underlying flow
that is in turn used by { ! Dns_client_flow . Make } to provide the
Lwt convenience module
that is in turn used by {!Dns_client_flow.Make} to provide the
Lwt convenience module
*)
open Lwt.Infix
module Uflow : Dns_client_flow.S
with type ... | |
786bfbb4a21d30c124e707e033ba1d52f84cb320ecee826e7a697d456e737078 | racket/scribble | xref.rkt | #lang racket/base
(require scribble/xref
racket/fasl
setup/dirs
tests/eli-tester)
FIXME : need to look for out < i>.sxref files
(provide xref-tests)
(module+ main (xref-tests))
(define (xref-tests)
(define sxref (build-path (find-doc-dir) "reference" "out.sxref"))
(when (file-exists? ... | null | https://raw.githubusercontent.com/racket/scribble/beb2d9834169665121d34b5f3195ddf252c3c998/scribble-test/tests/scribble/xref.rkt | racket | #lang racket/base
(require scribble/xref
racket/fasl
setup/dirs
tests/eli-tester)
FIXME : need to look for out < i>.sxref files
(provide xref-tests)
(module+ main (xref-tests))
(define (xref-tests)
(define sxref (build-path (find-doc-dir) "reference" "out.sxref"))
(when (file-exists? ... | |
6bffd433886ff01758e2dfa3238a0763cd8478ba5317f7968680fbe029460dd4 | hbr/albatross | proof_context.ml | Copyright ( C ) < helmut dot brandl at gmx dot net >
This file is distributed under the terms of the GNU General Public License
version 2 ( GPLv2 ) as published by the Free Software Foundation .
This file is distributed under the terms of the GNU General Public License
version 2 (GPLv2) as publ... | null | https://raw.githubusercontent.com/hbr/albatross/8f28ef97951f92f30dc69cf94c0bbe20d64fba21/ocaml/alba1/proof_context.ml | ocaml | all proved (incl. schematic) terms
deferred: int option; ( * The owner class of a deferred assertion
* The [i]th proved term in the current environment.
The variables
All assumptions of the contexts which are needed to define the variables
[vars] and the number of variables in these contexts.
collec... | Copyright ( C ) < helmut dot brandl at gmx dot net >
This file is distributed under the terms of the GNU General Public License
version 2 ( GPLv2 ) as published by the Free Software Foundation .
This file is distributed under the terms of the GNU General Public License
version 2 (GPLv2) as publ... |
8f435595cf63f648635c48e00d8764a824a9f3e22a6ecf4c67dc5c8dc6a9a914 | emotiq/emotiq | package.lisp | (defpackage #:emotiq-test
(:use #:cl #:emotiq #:lisp-unit)
(:export test-blockchain))
(defpackage #:emotiq-config-generate-test
(:nicknames #:test-generate) ;;; The road to madness
(:use #:cl #:emotiq #:lisp-unit))
| null | https://raw.githubusercontent.com/emotiq/emotiq/9af78023f670777895a3dac29a2bbe98e19b6249/src/test/package.lisp | lisp | The road to madness | (defpackage #:emotiq-test
(:use #:cl #:emotiq #:lisp-unit)
(:export test-blockchain))
(defpackage #:emotiq-config-generate-test
(:use #:cl #:emotiq #:lisp-unit))
|
15991640086297115751b43558f76978bb3c5be0ec892c860e099846baaf9cbb | icfpcontest2021/icfpcontest2021.github.io | JasperSolver.hs | module Main where
import qualified BrainWall.JasperSolver
main :: IO ()
main = BrainWall.JasperSolver.main
| null | https://raw.githubusercontent.com/icfpcontest2021/icfpcontest2021.github.io/fb23fea2a8ecec7740017d3dda78d921c1df5a26/toolchain/src/JasperSolver.hs | haskell | module Main where
import qualified BrainWall.JasperSolver
main :: IO ()
main = BrainWall.JasperSolver.main
| |
db66f22dad4103b83e86384cadb43db3aadb0e7880d14216d4d9131f687fbb34 | kupl/FixML | sub4.ml |
let rec max : int list -> int
=fun l ->
match l with
|[] -> 0
|h::t -> if h > max t then h else max t
| null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/maxmin/maxmin/submissions/sub4.ml | ocaml |
let rec max : int list -> int
=fun l ->
match l with
|[] -> 0
|h::t -> if h > max t then h else max t
| |
a74ba63d67003f3a44adb636da1349577d3f4d941c97271371bf21d947cd6c29 | mokus0/junkbox | DoubleExponential.hs | module Monads.DoubleExponential where
import Control.Comonad
import Control.Monad.Instances
-- the exponential bifunctor;
contravariant argument placed last , because that 's the one
-- we're interested in here.
newtype E x y = E { runE :: y -> x }
-- 'E x' is a contravariant functor.
-- its action on arrows is po... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Monads/DoubleExponential.hs | haskell | the exponential bifunctor;
we're interested in here.
'E x' is a contravariant functor.
its action on arrows is postcomposition.
That functor is self-adjoint, and the hom-isomorphism is 'flip' (modulo newtype wrapping)
the unit/counit:
the zig/zag transformations
mu = zig
the zig-zag equation (@zag . zig = id@... | module Monads.DoubleExponential where
import Control.Comonad
import Control.Monad.Instances
contravariant argument placed last , because that 's the one
newtype E x y = E { runE :: y -> x }
cmap :: (a -> b) -> E x b -> E x a
cmap f (E g) = E (g . f)
adj :: (a -> E x b) -> (b -> E x a)
adj f = E . flip (runE . f)
... |
48bed6d7f4c71df98b769f0109654d88ea5ab3d61b53022aaeeb78127b8d07fc | wangweihao/ProgrammingErlangAnswer | test3.erl | -module(test3).
-export([test/0, factorial/1]).
test() -> factorial(-5).
factorial(0) -> 1;
factorial(N) -> N*factorial(N-1).
| null | https://raw.githubusercontent.com/wangweihao/ProgrammingErlangAnswer/b145b5e6a19cb866ce5d2ceeac116d751f6e2b3d/9/1/test3.erl | erlang | -module(test3).
-export([test/0, factorial/1]).
test() -> factorial(-5).
factorial(0) -> 1;
factorial(N) -> N*factorial(N-1).
| |
de3c34c3f58288bfcb3571c471424cf18aa9ea81ade704245c24761afb6209b1 | psyeugenic/fgraph | provisual_fgraph.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public Lic... | null | https://raw.githubusercontent.com/psyeugenic/fgraph/c485fefc9de78012b13b35abe59f0d29090ff6d1/src/provisual_fgraph.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(provisual_fgraph).
-export([
compositio... |
ea51d1e369247d697531bf5b3cc6cfabfff94380e5ce9e55e79783e7602290e3 | Datomic/ion-starter | attributes.clj | Copyright ( c ) Cognitect , Inc.
;; All rights reserved.
(ns datomic.ion.starter.attributes)
(defn valid-sku?
[s]
(boolean (re-matches #"SKU-(\d+)" s)))
| null | https://raw.githubusercontent.com/Datomic/ion-starter/295e69df0850dee9ff75b355c546b68e33207f95/src/datomic/ion/starter/attributes.clj | clojure | All rights reserved. | Copyright ( c ) Cognitect , Inc.
(ns datomic.ion.starter.attributes)
(defn valid-sku?
[s]
(boolean (re-matches #"SKU-(\d+)" s)))
|
4f48cc8a85df9c3fb765bca321660d36b00ed0d1dc41b8bbe5900c53fd8e05e9 | macourtney/Conjure | template_flow.clj | (ns flows.test.template-flow
(:use clojure.test
flows.template-flow)
(:require [conjure.util.request :as request]))
(deftest test-model-name
(let [test-service "foo"]
(request/set-request-map { :service test-service }
(is (= (model-name) test-service))))) | null | https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_scaffold/test/flows/test/template_flow.clj | clojure | (ns flows.test.template-flow
(:use clojure.test
flows.template-flow)
(:require [conjure.util.request :as request]))
(deftest test-model-name
(let [test-service "foo"]
(request/set-request-map { :service test-service }
(is (= (model-name) test-service))))) | |
689e7b34c3ef5c988fd43010ea37e9f1fd57f61692b32220ce8e004e88f34503 | markbastian/partsbin | core.clj | (ns partsbin.aleph.http.core
(:require [partsbin.aleph.http.alpha :as web]
[integrant.core :as ig]))
(derive ::server ::web/server)
(def config {::server {:host "0.0.0.0"
:port 3000
:handler (constantly {:status 200 :body "OK"})}})
(comment
(defonce... | null | https://raw.githubusercontent.com/markbastian/partsbin/8dc159327f296c9625d129b5943ec79433019e54/src/partsbin/aleph/http/core.clj | clojure | (ns partsbin.aleph.http.core
(:require [partsbin.aleph.http.alpha :as web]
[integrant.core :as ig]))
(derive ::server ::web/server)
(def config {::server {:host "0.0.0.0"
:port 3000
:handler (constantly {:status 200 :body "OK"})}})
(comment
(defonce... | |
f5ac1cd0b91fd4485d50dc58c9f424759a0d13dd54315d0bf6fa7e8db6ecf9f7 | skanev/playground | 30.scm | EOPL exercise 2.30
;
; The procedure parse-expression as defined above is fragile: it does not
; detect several possible syntactic errors, such as (a b c), and aborts with
; inappropriate error messages for other expressions, such as (lambda). Modify
; it so that it is robust, accepting any s-exp and issuing an appro... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/02/30.scm | scheme |
The procedure parse-expression as defined above is fragile: it does not
detect several possible syntactic errors, such as (a b c), and aborts with
inappropriate error messages for other expressions, such as (lambda). Modify
it so that it is robust, accepting any s-exp and issuing an appropriate
error message if t... | EOPL exercise 2.30
(load-relative "23.scm")
(define (parse datum)
(cond ((symbol? datum)
(when (eqv? datum 'lambda)
(eopl:error 'parse "lambda is not a valid identifier"))
(var-exp datum))
((and (pair? datum)
(eqv? (car datum) 'lambda))
(unless (= (lengt... |
f79235a07ec834e06512b2f47b007acce1f3f30312292263d4802bf5501e685a | haguenau/wyrd | interface_draw.ml | -- a curses - based front - end for Remind
* Copyright ( C ) 2005 , 2006 , 2007 , 2008 , 2010 , 2011 - 2013
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License , Version 2 ,
* as published by the Free Software Foun... | null | https://raw.githubusercontent.com/haguenau/wyrd/490ce39ad9ecf36969eb74b9f882f85a1ef14ba3/interface_draw.ml | ocaml | interface_draw.ml
* All drawing operations are found here.
sort timed lineinfo entries by starting timestamp
No choice but to break the word apart
Draw a string in a specified window and location, using exactly 'len'
* characters and truncating with ellipses if necessary.
draw the vertical line to the right... | -- a curses - based front - end for Remind
* Copyright ( C ) 2005 , 2006 , 2007 , 2008 , 2010 , 2011 - 2013
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License , Version 2 ,
* as published by the Free Software Foun... |
de937b8c5aa3dc25041a9519da20b6dd42780ff13eed68d68b3379faed2121df | facebook/duckling | Corpus.hs | Copyright ( c ) 2016 - 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.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Numeral.KN.Corpus
( corpus
) where
import Data.Stri... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Numeral/KN/Corpus.hs | haskell | 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.
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Numeral.KN.Corpus
( corpus
) where
import Data.String
import Prelude
import Duckling.Locale
import Duckling.Numeral.Types
import Duckling.Resolve
import Duckling.Testing.Types
corpus :: Corpus
corpus = (testContext {locale = makeLocale KN Noth... |
11a22774ce9552fc0a4ba6535ace113ee5e1a98fe13fb8946ec1bdcc05aa7b28 | brownplt/Resugarer | racket-stepper.rkt | (module racket-stepper racket
(provide (all-defined-out))
;(provide test-eval profile-eval test-term expand unexpand)
(require "term.rkt")
(require "utility.rkt")
(require "convert.rkt")
(require profile)
(define expand (make-parameter #f))
(define unexpand (make-parameter #f))
; See debug-racke... | null | https://raw.githubusercontent.com/brownplt/Resugarer/1353b4309c101f0f1ac2df2cba7f3cba1f0a3a37/racket/racket-stepper.rkt | racket | (provide test-eval profile-eval test-term expand unexpand)
See debug-racket-3.rkt
for a much cleaner presentation of the debugging approach.
This code is OK to run in sequence; not so good concurrently.
call/cc must be spelt call/cc, and not call-with-current-continuation
Keeping track of the stack ;;;
Emitting T... | (module racket-stepper racket
(provide (all-defined-out))
(require "term.rkt")
(require "utility.rkt")
(require "convert.rkt")
(require profile)
(define expand (make-parameter #f))
(define unexpand (make-parameter #f))
(define resugarer-dir "../confection/Confection")
(define-struct ... |
dbd826a93cf47c0eb82df53fb4e4fadf4930233328277aaf26b3463f9be57c2e | v-kolesnikov/sicp | 2_38_test.clj | (ns sicp.chapter02.2-38-test
(:require [clojure.test :refer [deftest]]
[sicp.chapter02.2-38 :as sicp-2-38]
[sicp.common :as sicp]
[sicp.test-helper :refer [assert-equal]]))
(deftest test-fold-right
(let [fold-right sicp/accumulate]
(assert-equal 3/2 (fold-right / 1 (list 1 2... | null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter02/2_38_test.clj | clojure | (ns sicp.chapter02.2-38-test
(:require [clojure.test :refer [deftest]]
[sicp.chapter02.2-38 :as sicp-2-38]
[sicp.common :as sicp]
[sicp.test-helper :refer [assert-equal]]))
(deftest test-fold-right
(let [fold-right sicp/accumulate]
(assert-equal 3/2 (fold-right / 1 (list 1 2... | |
666295475a236d7a188015240572acb3078a1854ebf4f1c0da7f9b2ac5fa7a9a | astampoulis/makam | pegQuote.ml | open Camlp4 ;;
open Camlp4.PreCast ;;
let myparser : (UChannel.loc -> string -> Obj.t) ref = ref (fun loc s -> Obj.magic s) ;;
let conv_loc _loc =
let file = Loc.file_name _loc in
let lineno = string_of_int (Loc.start_line _loc) in
let colno = string_of_int (Loc.start_off _loc - Loc.start_bol _loc) in
<:ex... | null | https://raw.githubusercontent.com/astampoulis/makam/bf7ed7592c21e0439484d7464e659eca5be3b2f9/parsing/pegQuote.ml | ocaml | open Camlp4 ;;
open Camlp4.PreCast ;;
let myparser : (UChannel.loc -> string -> Obj.t) ref = ref (fun loc s -> Obj.magic s) ;;
let conv_loc _loc =
let file = Loc.file_name _loc in
let lineno = string_of_int (Loc.start_line _loc) in
let colno = string_of_int (Loc.start_off _loc - Loc.start_bol _loc) in
<:ex... | |
b80dc8f365515e97e75668375e8309a045dc82fc0ba17066b467a3f53d9ea5df | ghcjs/jsaddle-dom | BlobCallback.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.BlobCallback
(newBlobCallback, newBlobCallbackSync, newBlobCallbackAsync,
BlobCallback)
where
import... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/BlobCallback.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.BlobCallback
(newBlobCallback, newBlobCallbackSync, newBlobCallbackAsync,
BlobCallback)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, r... |
b4dbdde480943a346b9588431ef5dba62839d949731b31974f844f48f21454a7 | PacktPublishing/Haskell-High-Performance-Programming | fundeps.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
import qualified Data.Text as T
import qualified Data.ByteString as BS
import Data.Word (Word8)
-- class Index container index elem where
class Index container index elem | container -> elem where
index :: contai... | null | https://raw.githubusercontent.com/PacktPublishing/Haskell-High-Performance-Programming/2b1bfdb8102129be41e8d79c7e9caf12100c5556/Chapter04/fundeps.hs | haskell | class Index container index elem where | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
import qualified Data.Text as T
import qualified Data.ByteString as BS
import Data.Word (Word8)
class Index container index elem | container -> elem where
index :: container -> index -> elem
instance Index Strin... |
b3fb16aa147d5ca86a05e1650bb6315d7a2f6b19e01865f2a8e002eb1c23a682 | basho/clique | clique_handler.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may ob... | null | https://raw.githubusercontent.com/basho/clique/01a99227a4eb546a9beda763bb5aea6189285a4f/src/clique_handler.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(... |
14cec55e92dbcd3ca47978068e5f71aa13868578149101c75d5b6b5e1dd6e004 | acieroid/scala-am | eta-1.scm | (letrec ((do-something (lambda () 10))
(id (lambda (y)
(letrec ((tmp1 (do-something)))
y)))
(tmp2 ((id (lambda (a) a)) #t)))
((id (lambda (c) c)) #f))
| null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/changesBenevolPaper/eta-1.scm | scheme | (letrec ((do-something (lambda () 10))
(id (lambda (y)
(letrec ((tmp1 (do-something)))
y)))
(tmp2 ((id (lambda (a) a)) #t)))
((id (lambda (c) c)) #f))
| |
b18b45432da86db7bbf6e85b669a1c5b23f2e31e518b42578a75ce74d5d2066c | ijvcms/chuanqi_dev | ui_function_config.erl | %%%-------------------------------------------------------------------
@author zhengsiying
%%% @doc
%%% 自动生成文件,不要手动修改
%%% @end
Created : 2016/10/12
%%%-------------------------------------------------------------------
-module(ui_function_config).
-include("common.hrl").
-include("config.hrl").
-compile([export... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/config/ui_function_config.erl | erlang | -------------------------------------------------------------------
@doc
自动生成文件,不要手动修改
@end
------------------------------------------------------------------- | @author zhengsiying
Created : 2016/10/12
-module(ui_function_config).
-include("common.hrl").
-include("config.hrl").
-compile([export_all]).
get_list_conf() ->
[ ui_function_config:get(X) || X <- get_list() ].
get_list() ->
[1].
get(1) ->
#ui_function_conf{
id = 1,
state = 1
};
get(_Key) ->
?ERR("u... |
863f3c0ec6bf92855dc352169cc80ee0488ba68363c31248eefeaf0efe20bdc4 | caiorss/Functional-Programming | funcrecs.hs |
| Our usual CustomColor type to play with
data CustomColor =
CustomColor {red :: Int,
green :: Int,
blue :: Int}
deriving (Eq, Show, Read)
| A new type that stores a name and a function .
The function takes an Int , applies some computation to it , and returns
an Int along wi... | null | https://raw.githubusercontent.com/caiorss/Functional-Programming/ef3526898e3014e9c99bf495033ff36a4530503d/haskell/rwh/ch13/funcrecs.hs | haskell |
| Our usual CustomColor type to play with
data CustomColor =
CustomColor {red :: Int,
green :: Int,
blue :: Int}
deriving (Eq, Show, Read)
| A new type that stores a name and a function .
The function takes an Int , applies some computation to it , and returns
an Int along wi... | |
93ebb4b6caa5fa9c11025009ba70de95345a6cc23bdb6e3577403dd3682bd952 | 0xd34df00d/coformat | Language.hs | # LANGUAGE TupleSections #
module Language.Coformat.Language where
import qualified Data.HashMap.Strict as HM
import Data.List.NonEmpty
import Data.Maybe
import System.FilePath.Posix
data Language = Cpp
deriving (Eq, Ord, Show)
guessLanguage :: NonEmpty FilePath -> Either String Language
guessLanguage files = cas... | null | https://raw.githubusercontent.com/0xd34df00d/coformat/5ea8cf57d9df08e6b72d341e4c73f9933cad8a3d/src/Language/Coformat/Language.hs | haskell | # LANGUAGE TupleSections #
module Language.Coformat.Language where
import qualified Data.HashMap.Strict as HM
import Data.List.NonEmpty
import Data.Maybe
import System.FilePath.Posix
data Language = Cpp
deriving (Eq, Ord, Show)
guessLanguage :: NonEmpty FilePath -> Either String Language
guessLanguage files = cas... | |
624b81f23eae2deb5f72545508f752bc52ebe5e06c9c08e6a02736f55b17c611 | ygmpkk/house | ResumeReader.hs | import Unstable.Control.Monad.Transformers
import Unstable.Control.Monad.Identity
type R = (String,String,String)
t1,t2,t3 :: (MonadReader String m, MonadResume m) => m R
t1 = do e1 <- ask
e2 <- local ('a':) ask
e3 <- ask
return (e1,e2,e3)
t1_1 = ("x","ax","x")
t1_2 = ("x","ax","x")
t2 = d... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/monads/Unstable/Control/Monad/tests/ResumeReader.hs | haskell |
t4 = do e1 <- ask
e2 <- local ('a':) $ delay ask
e3 <- ask
return (e1,e2,e3)
| import Unstable.Control.Monad.Transformers
import Unstable.Control.Monad.Identity
type R = (String,String,String)
t1,t2,t3 :: (MonadReader String m, MonadResume m) => m R
t1 = do e1 <- ask
e2 <- local ('a':) ask
e3 <- ask
return (e1,e2,e3)
t1_1 = ("x","ax","x")
t1_2 = ("x","ax","x")
t2 = d... |
bd77cbf3f83c59289e2b86ce22918cce4f3f41e4aec8c42ce4c4e967be9861bf | fulcrologic/fulcro-rad-kvstore | alter_remove_test.clj | (ns test.com.example.components.alter-remove-test
(:require [clojure.test :refer :all]
[com.fulcrologic.rad.database-adapters.key-value :as key-value]
[com.fulcrologic.rad.database-adapters.key-value.key-store :as kv-key-store]
[com.example.components.seeded-connection :refer [kv-c... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-rad-kvstore/686331880682777a4d1739eb399e20f33ed725fe/src/test/test/com/example/components/alter_remove_test.clj | clojure | (ns test.com.example.components.alter-remove-test
(:require [clojure.test :refer :all]
[com.fulcrologic.rad.database-adapters.key-value :as key-value]
[com.fulcrologic.rad.database-adapters.key-value.key-store :as kv-key-store]
[com.example.components.seeded-connection :refer [kv-c... | |
028ca0fce58322a83df589494c9e42854da69a12aaddfaec21f33b0a90b60eab | serokell/ariadne | Update.hs | -- | UPDATE operations on the wallet-spec state
module Ariadne.Wallet.Cardano.Kernel.DB.Spec.Update
( -- * Errors
NewPendingFailed(..)
-- * Updates
, newPending
, cancelPending
, applyBlock
, switchToFork
-- * Testing
, observableRollbackUseInTestsOnl... | null | https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ariadne/cardano/src/Ariadne/Wallet/Cardano/Kernel/DB/Spec/Update.hs | haskell | | UPDATE operations on the wallet-spec state
* Errors
* Updates
* Testing
------------------------------------------------------------------------------
Errors
------------------------------------------------------------------------------
| Errors thrown by 'newPending'
| Some inputs are not in the wallet utxo
... | module Ariadne.Wallet.Cardano.Kernel.DB.Spec.Update
NewPendingFailed(..)
, newPending
, cancelPending
, applyBlock
, switchToFork
, observableRollbackUseInTestsOnly
) where
import Data.SafeCopy (base, deriveSafeCopySimple)
import Test.QuickCheck (Arbitrary(..))
impo... |
e17a3ce7828be73433e2b15dc5d64e6af994ca42e0fe33d2100d9b1dee23be76 | manuel-serrano/bigloo | rgc_insert.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / recette / rgc - insert.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation :... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/recette/rgc_insert.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Some rgc-buffer-insert-string tests */
*===========================... | * serrano / prgm / project / bigloo / recette / rgc - insert.scm * /
* Author : * /
* Creation : Thu Sep 3 12:29:48 2009 * /
* Last change : Thu Sep 3 14:10:30 2009 ( serrano ) * /
* Cop... |
e91f84c21bfaad06d0c3d8570b897766d64bf352f5a9ab30e5043abf02ad9a8b | LexiFi/menhir | coqBackend.mli | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/coqBackend.mli | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
9842d0d1ef0ec0a6b61fbe517cf6277b6508767b0adc614e115288eb1adf03d2 | uw-unsat/jitsynth | sltu.rkt | #lang rosette
(require "../riscv/test-macros.rkt")
(provide run-riscv-sltu-tests)
(define (run-riscv-sltu-tests)
; See LICENSE for license details.
;*****************************************************************************
; 'sltu.S
;-----------------------------------------------------------------------------
;
;... | null | https://raw.githubusercontent.com/uw-unsat/jitsynth/69529e18d4a8d4dace884bfde91aa26b549523fa/test/rv64ui/sltu.rkt | racket | See LICENSE for license details.
*****************************************************************************
'sltu.S
-----------------------------------------------------------------------------
Test 'sltu instruction.
include "riscv_test.h"
include "test_macros.h"
-----------------------------------------------... | #lang rosette
(require "../riscv/test-macros.rkt")
(provide run-riscv-sltu-tests)
(define (run-riscv-sltu-tests)
) |
aad9680b717c363ddfcfc811bd8fcf49b5e0e4f4a316f457cda08a7fe506807e | fosskers/aura | Records.hs | -- |
Module : . . Records
Copyright : ( c ) , 2012 - 2021
-- License : GPL3
Maintainer : < >
--
Handle the storing of PKGBUILDs .
module Aura.Pkgbuild.Records
( hasPkgbuildStored
, storePkgbuilds
, pkgbuildPath
) where
import Aura.Types
import RIO
import RIO.... | null | https://raw.githubusercontent.com/fosskers/aura/08cd46eaa598094f7395455d66690d3d8c59e965/haskell/aura/lib/Aura/Pkgbuild/Records.hs | haskell | |
License : GPL3
-
| The default location: \/var\/cache\/aura\/pkgbuilds\/
This is `True` when a package has been built successfully once before. | Module : . . Records
Copyright : ( c ) , 2012 - 2021
Maintainer : < >
Handle the storing of PKGBUILDs .
module Aura.Pkgbuild.Records
( hasPkgbuildStored
, storePkgbuilds
, pkgbuildPath
) where
import Aura.Types
import RIO
import RIO.Directory
import R... |
5cac8ffd9736e49709de8c8227920e19b357791e1c6987b6f80f4da0af089fd0 | ymyzk/lambda-dti | test_pp.ml | open Format
open OUnit2
open Lambda_dti
open Syntax
open Pp
let id x = x
let parse str =
Parser.toplevel Lexer.main @@ Lexing.from_string str
let test_pp_ty =
let test (expected, u) =
expected >:: fun ctxt ->
assert_equal ~ctxt:ctxt ~printer:id expected @@ asprintf "%a" pp_ty u
in
List.map test [... | null | https://raw.githubusercontent.com/ymyzk/lambda-dti/f476c0094832cbaaa336dc1bc86babfb8b652f14/test/test_pp.ml | ocaml | open Format
open OUnit2
open Lambda_dti
open Syntax
open Pp
let id x = x
let parse str =
Parser.toplevel Lexer.main @@ Lexing.from_string str
let test_pp_ty =
let test (expected, u) =
expected >:: fun ctxt ->
assert_equal ~ctxt:ctxt ~printer:id expected @@ asprintf "%a" pp_ty u
in
List.map test [... | |
f131e7ae90d59fafeb9e88f6623a5d3249cb33ad335af0982e1aab80cafd5b02 | NetComposer/nksip | nksip_unparse.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2019 . All Rights Reserved .
%%
This file is provided to you 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... | null | https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/src/nksip_unparse.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2019 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(nksip_unparse).
-aut... |
9e404fceb715dd57ec21e5bb9cdc48b65366b7b9828570ca6f9373ac560435de | dharmatech/abstracting | 1.scm |
(case scheme-implementation
((ypsilon) (: loader 'lib "srfi/1/ypsilon"))
((larceny) (: loader 'lib "srfi/1/larceny"))
((chicken) (: loader 'lib "srfi/1/chicken"))) | null | https://raw.githubusercontent.com/dharmatech/abstracting/9dc5d9f45a9de03c6ee379f1928ebb393dfafc52/src/srfi/1/1.scm | scheme |
(case scheme-implementation
((ypsilon) (: loader 'lib "srfi/1/ypsilon"))
((larceny) (: loader 'lib "srfi/1/larceny"))
((chicken) (: loader 'lib "srfi/1/chicken"))) | |
fb56b9a37a159f81331448b104d6c5b76b9ec5274d994265a1bbe7d508af2005 | webnf/webnf | promise.cljs | (ns webnf.promise
(:require
[webnf.channel :refer [serve-read-waiters]]
[cljs.core.async.impl.dispatch :as dispatch]
[cljs.core.async.impl.protocols :as async]
[cljs.core.async :refer [<!]])
(:require-macros [cljs.core.async.macros :refer [go]]))
(defn- wrap-error [e]
(if (instance? js/Error e) e (js... | null | https://raw.githubusercontent.com/webnf/webnf/6a2ccaa755e6e40528eb13a5c36bae16ba4947e7/cljs/src/webnf/promise.cljs | clojure | (ns webnf.promise
(:require
[webnf.channel :refer [serve-read-waiters]]
[cljs.core.async.impl.dispatch :as dispatch]
[cljs.core.async.impl.protocols :as async]
[cljs.core.async :refer [<!]])
(:require-macros [cljs.core.async.macros :refer [go]]))
(defn- wrap-error [e]
(if (instance? js/Error e) e (js... | |
d8709ce59f8087a583841bf9566f80083f71a65d05c064c28060cc56c7a05bdd | Andromedans/andromeda | eqchk.ml | (** Type-directed equality checking based on user-provided rules. *)
open Eqchk_common
(** Types and functions for manipulation of rules. *)
(* An equality checker is given by beta rules and extensionality rules. We organize them
as maps taking a symbol to a list of rules which have that symbol at the head. This
... | null | https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/src/equality/eqchk.ml | ocaml | * Type-directed equality checking based on user-provided rules.
* Types and functions for manipulation of rules.
An equality checker is given by beta rules and extensionality rules. We organize them
as maps taking a symbol to a list of rules which have that symbol at the head. This
allows us to quickly determi... |
open Eqchk_common
type checker = {
normalizer : Eqchk_normalizer.normalizer ;
ext_rules : Eqchk_extensionality.equation list SymbolMap.t ;
}
let empty_checker =
{ normalizer = Eqchk_normalizer.empty_normalizer ;
ext_rules = SymbolMap.empty }
let add_type_computation' checker drv =
let sym, bt, normal... |
253093d5f82181d0c1c1120a227accbc6d1e4c456da8d8a418ed324d22ca7a81 | icicle-lang/icicle-ambiata | Statement.hs | -- | Turn Core primitives into Flat - removing the folds
-- The input statements must be in A-normal form.
# LANGUAGE NoImplicitPrelude #
# LANGUAGE PatternGuards #
module Icicle.Avalanche.Statement.Flatten.Statement (
flatten
) where
import Icicle.Avalanche.Statement.Flatten.Base
import ... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/src/Icicle/Avalanche/Statement/Flatten/Statement.hs | haskell | | Turn Core primitives into Flat - removing the folds
The input statements must be in A-normal form.
| Flatten the primitives in a statement.
This just calls @flatX@ for every expression, wrapping the statement. | # LANGUAGE NoImplicitPrelude #
# LANGUAGE PatternGuards #
module Icicle.Avalanche.Statement.Flatten.Statement (
flatten
) where
import Icicle.Avalanche.Statement.Flatten.Base
import Icicle.Avalanche.Statement.Flatten.Exp
import Icicle.Avalanche.Statement.Statement
import ... |
a5360c406491c2b0f807a1f7c46de5253caf58a202d944f56a0c084436655096 | ucsd-progsys/dsolve | mymapfoo.ml | let m0 = Mymap.make 1 0
let m1 = Mymap.sett m0 2 3
let m2 = Mymap.sett m1 3 3
let _ = assert ( Mymap.gett m2 3 = 3 )
let _ = assert ( Mymap.gett m2 2 = 3 )
let _ = assert ( Mymap.gett m2 1 = 0 )
let _ = assert (Mymap.gett m2 3 = 3)
let _ = assert (Mymap.gett m2 2 = 3)
let _ = assert (Mymap.gett m2 1 = 0)*)
| null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/mymapfoo.ml | ocaml | let m0 = Mymap.make 1 0
let m1 = Mymap.sett m0 2 3
let m2 = Mymap.sett m1 3 3
let _ = assert ( Mymap.gett m2 3 = 3 )
let _ = assert ( Mymap.gett m2 2 = 3 )
let _ = assert ( Mymap.gett m2 1 = 0 )
let _ = assert (Mymap.gett m2 3 = 3)
let _ = assert (Mymap.gett m2 2 = 3)
let _ = assert (Mymap.gett m2 1 = 0)*)
| |
6597fbe50100444630c582d4f0c5dbc3e2a7446749a15abc14de5136ac2fa339 | synduce/Synduce | mts.ml | * @synduce -s 2 -NB
type 'a clist =
| CNil
| Single of 'a
| Concat of 'a clist * 'a clist
type 'a list =
| Nil
| Cons of 'a * 'a list
let rec mts = function
| Nil -> 0, 0
| Cons (hd, tl) ->
let amts, asum = mts tl in
let new_sum = asum + hd in
max amts new_sum, new_sum
;;
let rec clist_to_... | null | https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/benchmarks/incomplete/list/mts.ml | ocaml | * @synduce -s 2 -NB
type 'a clist =
| CNil
| Single of 'a
| Concat of 'a clist * 'a clist
type 'a list =
| Nil
| Cons of 'a * 'a list
let rec mts = function
| Nil -> 0, 0
| Cons (hd, tl) ->
let amts, asum = mts tl in
let new_sum = asum + hd in
max amts new_sum, new_sum
;;
let rec clist_to_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.