_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 |
|---|---|---|---|---|---|---|---|---|
2fcbd8f1ad316b685e6ca696505b0d8ee21d32cc09ef3344ef3cc2ae056812cf | project-oak/hafnium-verification | ClangQuotes.ml |
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/integration/ClangQuotes.ml | ocaml | * module for escaping clang arguments on the command line and put them into files
* quoting style of the arguments
* the arguments should be enclosed in "double quotes" and are already escaped
* the arguments should be enclosed in 'single quotes' and have to be escaped
* the arguments should not be enclosed in quot... |
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
ed1fbe0709de0117fd79af44e6d47689cf02948d2360f2613279ce86ee68f3e5 | basho/riak_api | riak_api_test_util.erl | -module(riak_api_test_util).
-compile([export_all, nowarn_export_all]).
wait_for_application_shutdown(App) ->
case lists:keymember(App, 1, application:which_applications()) of
true ->
timer:sleep(250),
wait_for_application_shutdown(App);
false ->
ok
end.
T... | null | https://raw.githubusercontent.com/basho/riak_api/41f4b72d6a946c710e1523fd69b5b8deb5b57153/test/riak_api_test_util.erl | erlang | applications. They will not handle circular or mutually-dependent
applications. | -module(riak_api_test_util).
-compile([export_all, nowarn_export_all]).
wait_for_application_shutdown(App) ->
case lists:keymember(App, 1, application:which_applications()) of
true ->
timer:sleep(250),
wait_for_application_shutdown(App);
false ->
ok
end.
T... |
5d1c8916e9ee05ed28d2051fb843133710c563d6e26478d4a4338fcd2b977e3d | stevenvar/OMicroB | jdlv.ml | open Pic32
class cell a =
object
val mutable v = (a : bool)
method isAlive = v
end ;;
4.2
class virtual absWorld n m =
object(self)
val mutable tcell = Array.create_matrix n m (new cell false)
val maxx = n
val maxy = m
val mutable gen = 0
method private dessine(c) =
(* i... | null | https://raw.githubusercontent.com/stevenvar/OMicroB/e4324d0736ac677b3086741dfdefb0e46775642b/targets/pic32/tests/lchip/jdlv/jdlv.ml | ocaml | if c#isAlive then print_string "*"
else print_string "."
print_string " " ;
print_newline() | open Pic32
class cell a =
object
val mutable v = (a : bool)
method isAlive = v
end ;;
4.2
class virtual absWorld n m =
object(self)
val mutable tcell = Array.create_matrix n m (new cell false)
val maxx = n
val maxy = m
val mutable gen = 0
method private dessine(c) =
if c... |
e0af5025e2fba929e103ccb8aa9326572fa8b0ca011f47a3fec5f8f1b1adac7f | Kalimehtar/gtk-cffi | misc.lisp | (in-package :gtk-cffi)
(defclass misc (widget)
())
(defcfun gtk-misc-set-alignment :void (misc pobject) (x :float) (y :float))
(defgeneric (setf alignment) (coords misc)
(:method (coords (misc misc))
(gtk-misc-set-alignment misc
(float (first coords))
(... | null | https://raw.githubusercontent.com/Kalimehtar/gtk-cffi/fbd8a40a2bbda29f81b1a95ed2530debfe2afe9b/gtk/misc.lisp | lisp | (in-package :gtk-cffi)
(defclass misc (widget)
())
(defcfun gtk-misc-set-alignment :void (misc pobject) (x :float) (y :float))
(defgeneric (setf alignment) (coords misc)
(:method (coords (misc misc))
(gtk-misc-set-alignment misc
(float (first coords))
(... | |
3bd98ffe2e23fb17b88efe4d0edf6d0bc7154a18751baeac43b361a1b9c17278 | opencog/pln | pln-utils.scm | (use-modules (srfi srfi-1))
(use-modules (ice-9 regex))
(use-modules (opencog))
(use-modules (opencog exec))
(use-modules (opencog logger))
(use-modules (opencog ure))
;; Atomspace containing all PLN rules. All operations of loading
;; rules, etc, take place in this atomspace to not pollute the current
;; atomspace.
... | null | https://raw.githubusercontent.com/opencog/pln/e990f7c5d5c7a39c6fcc7a7eaedeebece8c6c4e8/opencog/pln/pln-utils.scm | scheme | Atomspace containing all PLN rules. All operations of loading
rules, etc, take place in this atomspace to not pollute the current
atomspace.
Avoid confusing the user with a return value
Avoid confusing the user with a return value
Clear PLN atomspace
Attach rules to PLN rule-base
Deduction
Modus Ponens
Fuzzy ... | (use-modules (srfi srfi-1))
(use-modules (ice-9 regex))
(use-modules (opencog))
(use-modules (opencog exec))
(use-modules (opencog logger))
(use-modules (opencog ure))
(define-public pln-atomspace (cog-new-atomspace))
(define-public (pln-load-from-path FILENAME)
"
pln-load-from-path FILENAME
Like load-from-path... |
0ac29d2cfba564b1eeda132018b0c8258ebcf6aa25c25170a3fc0671df560964 | TrustInSoft/tis-kernel | GuiSource.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/GuiSource.ml | 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 WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
0a04691e2d6f4432554585e9f1b582972ff982b2a94c4f07ef38d1d2bdb6aaf5 | peterschwarz/clj-firmata | impl.cljs | (ns firmata.test.stream.impl
(:require [cemerick.cljs.test :as t]
[firmata.stream.impl :as impl]
[firmata.test.mock-stream :refer [create-byte-stream]])
(:require-macros [cemerick.cljs.test
:refer (is are deftest testing)]))
(defn ->vec [buffer]
(if (coll? buffer)
... | null | https://raw.githubusercontent.com/peterschwarz/clj-firmata/cd263fe4a1b6ffb4b0e817aac019e70fe84df629/test/cljs/firmata/test/stream/impl.cljs | clojure | version | (ns firmata.test.stream.impl
(:require [cemerick.cljs.test :as t]
[firmata.stream.impl :as impl]
[firmata.test.mock-stream :refer [create-byte-stream]])
(:require-macros [cemerick.cljs.test
:refer (is are deftest testing)]))
(defn ->vec [buffer]
(if (coll? buffer)
... |
5d8bdc7c5351f827ea8e17ca0342aeb1e0a90b366bb3cff4c0d72d93f7802e5a | melange-re/melange | bs_ast_invariant.mli | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/melange-re/melange/b595c2647a285e8bb8b16f109d0ab0fbfa22afa3/jscomp/common/bs_ast_invariant.mli | ocaml | * [warn_discarded_unused_attributes discarded]
warn if [discarded] has unused bs attribute
* Ast invariant checking for detecting errors | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
e58ec3066d27f0037a5b6bdcd6fa49257a47e8e0352b66458bc31459959f6a2b | chvanikoff/webserver | webserver_app.erl | -module(webserver_app).
-behaviour(application).
%% Application callbacks
-export([
start/2,
stop/1
]).
%% API
-export([dispatch_rules/0]).
%% ===================================================================
%% API functions
%% ===================================================================
dispatch_... | null | https://raw.githubusercontent.com/chvanikoff/webserver/42b66ba0f0315eab2db9e95556c4ff80ae54b0ef/src/webserver_app.erl | erlang | Application callbacks
API
===================================================================
API functions
===================================================================
===================================================================
Application callbacks
==============================================... | -module(webserver_app).
-behaviour(application).
-export([
start/2,
stop/1
]).
-export([dispatch_rules/0]).
dispatch_rules() ->
Static = fun(Filetype) ->
{lists:append(["/", Filetype, "/[...]"]), cowboy_static, [
{directory, {priv_dir, webserver, [list_to_binary(Filetype)]}},
... |
05de62954615d3479c7aa908c12e39997bf168b0f6126ebf9354ca97d1d3c2e2 | bitemyapp/esqueleto | ToAliasReference.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
module Database.Esqueleto.Experimental.ToAliasReference
where
import Data.Coerce
import Database.Esqueleto.Internal.Internal hiding (From, from, on)
import Database.Esqueleto.Internal.PersistentImport
{-# DEPRECATED ToAli... | null | https://raw.githubusercontent.com/bitemyapp/esqueleto/ea4ff33b9308360e10f450963bb1b15a4fbb1bec/src/Database/Esqueleto/Experimental/ToAliasReference.hs | haskell | # LANGUAGE OverloadedStrings #
# DEPRECATED ToAliasReferenceT "This type alias doesn't do anything. Please delete it. Will be removed in the next release." #
more tedious tuple magic | # LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
module Database.Esqueleto.Experimental.ToAliasReference
where
import Data.Coerce
import Database.Esqueleto.Internal.Internal hiding (From, from, on)
import Database.Esqueleto.Internal.PersistentImport
type ToAliasReferenceT a = a
class ToAliasReference a ... |
44fc91d016df4c081da42dd3417e1ea6e8dd08cd6b00dedc72c7b469ba964432 | yrashk/erlang | typer_annotator.erl | -*- erlang - indent - level : 2 -*-
%%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 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 hav... | null | https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/typer/src/typer_annotator.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... | -*- erlang - indent - level : 2 -*-
Copyright Ericsson AB 2008 - 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 "
Aut... |
b0bd7a029f9de450d56fabdd83df83a80d22245d1ca26cacc42900c70c95271a | coq/coq | vmbytegen.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/1c739a0ddce17bda4198a5f988056019745213ca/kernel/vmbytegen.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
46484a6137b40e50348008bf4ecfc894cd4cc0130846b868c6b815d6b10f7fca | triffon/fp-2021-22 | ex11-20211221-solutions.rkt | #lang racket
(define head car)
(define tail cdr)
; Стандартни, полезни функции
(define (all? p? lst)
(or (null? lst)
(and (p? (head lst))
(all? p? (tail lst)))))
(define (any? p? lst)
(not (none? p? lst)))
(define (none? p? lst)
(all? (lambda (x) (not (p? x))) lst))
ацикличен граф
(define G ... | null | https://raw.githubusercontent.com/triffon/fp-2021-22/fa2df63a654d37c7725bd5b888979a24acc48bee/exercises/5/ex11-20211221-solutions.rkt | racket | Стандартни, полезни функции
в случай на невалиден вход
[ v | v<-vertices g, edge? v u g ]
Зад.1а)
Локални помощни функции
Понякога са полезни и операции като с множества
lst1 / lst2
Зад.1б)
Зад.2
(define (subsets lst) (combinations lst)) в Racket
Зад.3
Зад.4
(0 1 2 3)
(0 1 2 3) | #lang racket
(define head car)
(define tail cdr)
(define (all? p? lst)
(or (null? lst)
(and (p? (head lst))
(all? p? (tail lst)))))
(define (any? p? lst)
(not (none? p? lst)))
(define (none? p? lst)
(all? (lambda (x) (not (p? x))) lst))
ацикличен граф
(define G '((0 1 3)
(1 2 5)
... |
b4000a9195c08d6f8be147bf3bb9ae6a8286a4b3210da465aa91234a66d0ff7f | wireapp/saml2-web-sso | Util.hs | {-# LANGUAGE OverloadedStrings #-}
module SAML2.Util
( module SAML2.Util,
module Text.XML.Util,
)
where
import Control.Lens
import Control.Monad.Except
import Data.String.Conversions
import qualified Data.Text as ST
import Data.Typeable
import GHC.Stack
import Text.XML.Util
import URI.ByteString
renderURI ::... | null | https://raw.githubusercontent.com/wireapp/saml2-web-sso/ac88b934bb4a91d4d4bb90c620277188e4087043/src/SAML2/Util.hs | haskell | # LANGUAGE OverloadedStrings #
| You probably should not use this. If you have a string literal, consider "URI.ByteString.QQ". |
module SAML2.Util
( module SAML2.Util,
module Text.XML.Util,
)
where
import Control.Lens
import Control.Monad.Except
import Data.String.Conversions
import qualified Data.Text as ST
import Data.Typeable
import GHC.Stack
import Text.XML.Util
import URI.ByteString
renderURI :: URI -> ST
renderURI = cs . seriali... |
bd4356ed3e51f62a6d6b1d69f86e4efa2426485581c4e96c34f8024ebcaebe2c | tomahawkins/atom | Tokens.hs | module Parser.Tokens
( Token (..)
, TokenName (..)
, tokenString
) where
import Common
tokenString :: Token -> String
tokenString (Token _ s _) = s
data Token = Token TokenName String Location deriving (Show, Eq)
instance Locate Token where locate (Token _ _ l) = l
data TokenName
= InfixL9 | Infix... | null | https://raw.githubusercontent.com/tomahawkins/atom/e552e18859c6d249af4b293e9d2197878c0fd4fd/src/Parser/Tokens.hs | haskell | module Parser.Tokens
( Token (..)
, TokenName (..)
, tokenString
) where
import Common
tokenString :: Token -> String
tokenString (Token _ s _) = s
data Token = Token TokenName String Location deriving (Show, Eq)
instance Locate Token where locate (Token _ _ l) = l
data TokenName
= InfixL9 | Infix... | |
c7a812d10a181cbda96232b9a3a90b301a9edd7d962ea5d0c324f53fbdfc6e45 | mitchellwrosen/planet-mitchell | Semigroupoid.hs | module Alg.Semigroupoid
*
Semigroupoid(..)
-- ** Newtypes
, Semi(..)
, Dual(..)
) where
import Data.Semigroupoid (Semi(Semi, getSemi), Semigroupoid(o))
import Data.Semigroupoid.Dual (Dual(Dual, getDual))
| null | https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Alg/Semigroupoid.hs | haskell | ** Newtypes | module Alg.Semigroupoid
*
Semigroupoid(..)
, Semi(..)
, Dual(..)
) where
import Data.Semigroupoid (Semi(Semi, getSemi), Semigroupoid(o))
import Data.Semigroupoid.Dual (Dual(Dual, getDual))
|
42d52d270e27db5a7d7f06a3ed5f72e96eedf953a9e6bc1a6c1c63297a48551d | fukamachi/clozure-cl | compile-hemlock.lisp | (in-package "CCL")
(defparameter *hemlock-src-dir-pathname* "ccl:cocoa-ide;hemlock;src;")
(defparameter *hemlock-binary-dir-pathname* "ccl:cocoa-ide;hemlock;bin;openmcl;")
(defparameter *hemlock-binary-file-extension*
(pathname-type (compile-file-pathname "foo.lisp")))
(defun hemlock-source-pathname (name)
(mak... | null | https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/cocoa-ide/compile-hemlock.lisp | lisp | early declarations of functions and stuff
moved "comments" | (in-package "CCL")
(defparameter *hemlock-src-dir-pathname* "ccl:cocoa-ide;hemlock;src;")
(defparameter *hemlock-binary-dir-pathname* "ccl:cocoa-ide;hemlock;bin;openmcl;")
(defparameter *hemlock-binary-file-extension*
(pathname-type (compile-file-pathname "foo.lisp")))
(defun hemlock-source-pathname (name)
(mak... |
3cf36749518e367ae966e146b45fa252c2036a2a4c4edb8b16f12f3c7b650878 | 2600hz/kazoo | knm_rename_carrier.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc Handle renaming module_name for admins
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file ... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_numbers/src/providers/knm_rename_carrier.erl | erlang | -----------------------------------------------------------------------------
@doc Handle renaming module_name for admins
@end
-----------------------------------------------------------------------------
------------------------------------------------------------------------------
@doc This function is called eac... | ( C ) 2010 - 2020 , 2600Hz
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(knm_rename_carrier).
-behaviour(knm_gen_provider).
-export([save/1]).
-export([delete/1]).
-... |
efed132c83eb7311d447210249ca853ff857284560ffd2d38f15b3e688cfc432 | ryanpbrewster/haskell | SumFullSet.hs | -- SumFullSet.hs
import qualified System.Environment as Env
import qualified Data.ByteString.Char8 as BS
import Data.Maybe (fromJust)
main = do
args <- Env.getArgs
inps <- fmap concat (mapM parseInput args)
mapM_ putStrLn [ if isClosed inp then "closed" else "not closed" | inp <- inps ]
parseInput :: String ->... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/TopCoder/SumFullSet/SumFullSet.hs | haskell | SumFullSet.hs |
import qualified System.Environment as Env
import qualified Data.ByteString.Char8 as BS
import Data.Maybe (fromJust)
main = do
args <- Env.getArgs
inps <- fmap concat (mapM parseInput args)
mapM_ putStrLn [ if isClosed inp then "closed" else "not closed" | inp <- inps ]
parseInput :: String -> IO [[Int]]
parse... |
6b01de37ffa212641b23155aee9b03610c39f76f5729b8c61ae44e27ae02ec4c | r-willis/biten | protocol.erl | %%% --------------------------------------------------------------------------
@author <
@doc Protocol related bits - message construction and parsing
%%% @end
%%% --------------------------------------------------------------------------
-module(protocol).
-compile([export_all]).
-include("include/records.hrl... | null | https://raw.githubusercontent.com/r-willis/biten/75b13ea296992f8fa749646b9d7c15c5ef23d94d/apps/biten/src/protocol.erl | erlang | --------------------------------------------------------------------------
@end
--------------------------------------------------------------------------
get_message(B) ->
service
port
/biten:0.0.1/ | @author <
@doc Protocol related bits - message construction and parsing
-module(protocol).
-compile([export_all]).
-include("include/records.hrl").
-define(MAIN_MAGIC, <<16#F9BEB4D9:32/big>>).
-define(MAGIC, ?MAIN_MAGIC).
-define(PROTOCOL_VERSION, <<16#62EA0000:32/big>>).
hexstr_to_binary(S) ->
T = strin... |
9f3b8239c624fff876e9e44e4beb7913fec326fc10ea27f184df894b3a868f00 | JoeKennedy/fantasy | Application.hs | # OPTIONS_GHC -fno - warn - orphans #
module Application
( getApplicationDev
, appMain
, develMain
, makeFoundation
-- * for DevelMain
, getApplicationRepl
, shutdownApp
-- * for GHCI
, handler
, db
) where
import Control.Monad.Logger (liftLoc, runLoggingT)
i... | null | https://raw.githubusercontent.com/JoeKennedy/fantasy/eb9dc9bf6074be5c5ca951e323c6497676424dda/Application.hs | haskell | * for DevelMain
* for GHCI
Import all relevant handler modules here.
Don't forget to add new modules to your cabal file!
comments there for more details.
Create migration function using both our entities and the
serversession-persistent-backend ones.
| This function allocates resources (such as a database conne... | # OPTIONS_GHC -fno - warn - orphans #
module Application
( getApplicationDev
, appMain
, develMain
, makeFoundation
, getApplicationRepl
, shutdownApp
, handler
, db
) where
import Control.Monad.Logger (liftLoc, runLoggingT)
import Database.Persist.Postgresql ... |
a5a56f318d7307e365a21f6cc80394fd56d72e921cf534256567987563046b93 | silky/quipper | BooleanFormula.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE Und... | null | https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/Algorithms/BF/BooleanFormula.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
======================================================================
# LANGUAGE TypeSynonymInstances #
# LANGUAGE DeriveDataTypeable #
| This module contains the implementation of the various quantum circ... | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
module Algorithms.BF.BooleanFormula where
import Quipper
import Quipper.Internal
import Algorithms.BF.QuantumIf
... |
7a9a334e7fd8a115a02d9a6a49144fbd9d9a01c9b77489305c96f4ad069932b8 | heraldry/heraldicon | humetty.cljs | (ns heraldicon.heraldry.ordinary.humetty
(:require
[heraldicon.context :as c]
[heraldicon.heraldry.field.environment :as environment]
[heraldicon.interface :as interface]))
(defn options [context]
(let [humetty? (interface/get-raw-data (c/++ context :humetty?))]
(cond-> {:humetty? {:type :option.type/... | null | https://raw.githubusercontent.com/heraldry/heraldicon/3b52869f611023b496a29473a98c35ca89262aab/src/heraldicon/heraldry/ordinary/humetty.cljs | clojure | (ns heraldicon.heraldry.ordinary.humetty
(:require
[heraldicon.context :as c]
[heraldicon.heraldry.field.environment :as environment]
[heraldicon.interface :as interface]))
(defn options [context]
(let [humetty? (interface/get-raw-data (c/++ context :humetty?))]
(cond-> {:humetty? {:type :option.type/... | |
d4685a43d81796e5d3c1a516bdbe9b6194c32fc6bc75e2de2b8ab8f39e369315 | discus-lang/salt | Term.hs |
module Salt.Core.Codec.Text.Pretty.Term where
import Salt.Core.Codec.Text.Pretty.Type
import Salt.Core.Codec.Text.Pretty.Base
import Salt.Core.Exp
import Salt.Data.Pretty
import qualified Data.Set as Set
import qualified Data.Map as Map
--------------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/salt/Salt/Core/Codec/Text/Pretty/Term.hs | haskell | ----------------------------------------------------------------------------------------- Term --
terms
the
app
let
record / project
data
box / run
list / set / map
proc launch / return
proc cell / update
proc when / whens
proc loop / break / continue
key
---------------------------------------------------... |
module Salt.Core.Codec.Text.Pretty.Term where
import Salt.Core.Codec.Text.Pretty.Type
import Salt.Core.Codec.Text.Pretty.Base
import Salt.Core.Exp
import Salt.Data.Pretty
import qualified Data.Set as Set
import qualified Data.Map as Map
instance Pretty c (Term a) where
ppr c m = pprTerm c m
pprTerm :: c -> Term a ... |
9eac7fdc8ee545a6d217c57236e9c067f9c9e5dcf4cd1cd5d1ab367430940594 | matterhorn-chat/matterhorn | Channels.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE RankNTypes #-}
module Matterhorn.State.Channels
( updateViewed
, refreshChannel
, refreshChannelsAndUsers
, setFocus
, refreshChannelById
, applyPreferenceChange
, leaveChannel
, leaveCurrentChannel
, getNextUnreadChannel
, getNextUnre... | null | https://raw.githubusercontent.com/matterhorn-chat/matterhorn/19a73ce833a8a8de3616cf884c03e9f08a4db0a7/src/Matterhorn/State/Channels.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE RankNTypes #
# SOURCE #
# SOURCE #
| When a new channel has been selected for viewing, this will
notify the server of the change, and also update the local channel
state to set the last-viewed time for the previous channel and
update the viewed time to now for the newly selected c... | # LANGUAGE LambdaCase #
module Matterhorn.State.Channels
( updateViewed
, refreshChannel
, refreshChannelsAndUsers
, setFocus
, refreshChannelById
, applyPreferenceChange
, leaveChannel
, leaveCurrentChannel
, getNextUnreadChannel
, getNextUnreadUserOrChannel
, nextUnreadChannel
, nextUnreadUser... |
fc73b64a8186ed99d69387927cc8154bb7d00f459b618d14ac03485a50660f3a | expipiplus1/vulkan | VK_AMD_texture_gather_bias_lod.hs | {-# language CPP #-}
-- | = Name
--
-- VK_AMD_texture_gather_bias_lod - device extension
--
-- == VK_AMD_texture_gather_bias_lod
--
-- [__Name String__]
-- @VK_AMD_texture_gather_bias_lod@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
42
--
-- [__Revision__]
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_AMD_texture_gather_bias_lod.hs | haskell | # language CPP #
| = Name
VK_AMD_texture_gather_bias_lod - device extension
== VK_AMD_texture_gather_bias_lod
[__Name String__]
@VK_AMD_texture_gather_bias_lod@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
... | 42
1
- Requires support for Vulkan 1.0
-
2017 - 03 - 21
< >
- , AMD
- , AMD
- , AMD
- , AMD
- , AMD
- , AMD
- , AMD
This extension adds two related features .
Firstly , support for the fol... |
3cbe0172740589759424be778b75ac310dd4e0fe4ac4c0f11e865bda3c8c9fc4 | aryx/xix | preprocessor.mli |
type cmdline_defs = (string * string) list
type system_paths = Common.filename list
type include_paths = Common.filename * system_paths
| null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/macroprocessor/preprocessor.mli | ocaml |
type cmdline_defs = (string * string) list
type system_paths = Common.filename list
type include_paths = Common.filename * system_paths
| |
a084ab48fcc754c938b7bbf616c9c78dd24ef8af28c15d3630a99bba57affaa2 | replikativ/datahike-frontend | client.cljs | (ns app.client
(:require
[app.application :refer [SPA]]
[app.ui.root :as root]
[app.dashboard.ui.queries.datoms :as dui]
[app.dashboard.ui.queries.schema :as sui]
[com.fulcrologic.fulcro.application :as app]
[com.fulcrologic.fulcro.networking.http-remote :as net]
[com.fulcrologic.fulcro.da... | null | https://raw.githubusercontent.com/replikativ/datahike-frontend/6e3ab3bb761b41c4ffea792297286f8942a27909/src/main/app/client.cljs | clojure | (ns app.client
(:require
[app.application :refer [SPA]]
[app.ui.root :as root]
[app.dashboard.ui.queries.datoms :as dui]
[app.dashboard.ui.queries.schema :as sui]
[com.fulcrologic.fulcro.application :as app]
[com.fulcrologic.fulcro.networking.http-remote :as net]
[com.fulcrologic.fulcro.da... | |
61f9293e959503e65fe3c00f6f06bf8346170d6653676da3214fe6c0b7b74410 | esl/MongooseIM | mod_event_pusher_push_plugin.erl | %%%-------------------------------------------------------------------
@author
( C ) 2017 Erlang Solutions Ltd.
This software is released under the Apache License , Version 2.0
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% Plugin behav... | null | https://raw.githubusercontent.com/esl/MongooseIM/dda03c16c83f5ea9f5c9b87c3b36c989813b9250/src/event_pusher/mod_event_pusher_push_plugin.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
Plugin behaviour module for mod_event_pusher_push.
This module defines API for some dynamic customizations.
@end
--------------------------------------------------------... | @author
( C ) 2017 Erlang Solutions Ltd.
This software is released under the Apache License , Version 2.0
cited in ' LICENSE.txt ' .
-module(mod_event_pusher_push_plugin).
-author('').
-export([init/2,
should_publish/3,
prepare_notification/2,
publish_notification/4,
defa... |
940731b745004fcf8a66f2254289ec8c3d73caacda1c8495ff97fc34bb8ccfa1 | jyp/glpk-hs | Internal.hs | # LANGUAGE RecordWildCards , ScopedTypeVariables , ForeignFunctionInterface , BangPatterns #
module Data.LinearProgram.GLPK.Internal (writeProblem, solveSimplex, mipSolve,
getObjVal, getRowPrim, getColPrim, mipObjVal, mipRowVal, mipColVal, getBadRay) where
( writeProblem , addCols ,
addRows , createIndex , findCol ... | null | https://raw.githubusercontent.com/jyp/glpk-hs/a1f4410e93eb76047bafa58583c31b8c8a404860/src/Data/LinearProgram/GLPK/Internal.hs | haskell | foreign import ccall "c_glp_set_obj_name" glpSetObjName :: Ptr GlpProb -> CString -> IO ()
foreign import ccall unsafe "c_glp_set_obj_dir" glpSetObjDir :: Ptr GlpProb -> CInt -> IO ()
foreign import ccall unsafe "c_glp_create_index" glpCreateIndex :: Ptr GlpProb -> IO ()
# SPECIALIZE setMatRow :: Int -> [(Int, Doubl... | # LANGUAGE RecordWildCards , ScopedTypeVariables , ForeignFunctionInterface , BangPatterns #
module Data.LinearProgram.GLPK.Internal (writeProblem, solveSimplex, mipSolve,
getObjVal, getRowPrim, getColPrim, mipObjVal, mipRowVal, mipColVal, getBadRay) where
( writeProblem , addCols ,
addRows , createIndex , findCol ... |
4b0442d63040af209fbb2e581c214458cbd49d07766bd408eb4f6fe3451ccdec | KavehYousefi/Esoteric-programming-languages | main.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Remarks
;; =======
;;
= = ENSURE A VALUE OF ZERO = =
;; When proceeding from left to right, the following code fragment
ensures that the current cell contains the value zero ( 0 ):
;; [+-]
;;
= = ENSURE A VALUE OF ONE = =
;; When ... | null | https://raw.githubusercontent.com/KavehYousefi/Esoteric-programming-languages/62f7280ada463846eb7c8ba338af32aff25fc420/Yaren/Yaren_001/main.lisp | lisp |
Remarks
=======
When proceeding from left to right, the following code fragment
[+-]
When proceeding from left to right, the following code fragment
[+-]+-
--------------------------------------------------------------------
Sources:
-> ""
-- Declaration of types. ... | = = ENSURE A VALUE OF ZERO = =
ensures that the current cell contains the value zero ( 0 ):
= = ENSURE A VALUE OF ONE = =
ensures that the current cell contains the value one ( 1 ):
Author :
Date : 2022 - 03 - 28
(deftype hash-table-of (&optional (key-type T) (value-type T))
"The ``hash-table-of'... |
9d6e03de56da2953c2cc396cd94436eab8cc5d752c497e443b2d7aefdd023d53 | kappamodeler/kappa | annotated_contact_map.ml | open Data_structures
open Pb_sig
open Tools
open Output_contact_map
open Ode_print_sig
open Ode_print
open Error_handler
let debug = false
type template_piece = {kept_sites:StringSet.t}
type ode_skeleton =
{subviews:(template_piece list) StringMap.t;
solid_edges: String22Set.t }
type compression_m... | null | https://raw.githubusercontent.com/kappamodeler/kappa/de63d1857898b1fc3b7f112f1027768b851ce14d/complx_rep/ODE/annotated_contact_map.ml | ocaml | let classes =
List.fold_left
(fun classes obs -> get_sitesets_of_solution obs classes)
classes obs
in
let solid_edges =
List.fold_left
(fun solid_edges obs -> get_links_of_solution obs solid_edges)
solid_edges
obs
in
| open Data_structures
open Pb_sig
open Tools
open Output_contact_map
open Ode_print_sig
open Ode_print
open Error_handler
let debug = false
type template_piece = {kept_sites:StringSet.t}
type ode_skeleton =
{subviews:(template_piece list) StringMap.t;
solid_edges: String22Set.t }
type compression_m... |
6cd4ea91374644bfcc0763307f4651b61ec6dbbc248d869ec142882609019a41 | 5HT/ant | Parser.mli |
open XNum;
open Runtime;
open Unicode.Types;
open Unicode.SymbolTable;
open Lexer;
Priorities :
2 right ||
3 right & &
4 non = = < > > < > = < =
5 left land lor lxor lsr lsl
6 left + -
7 left * / mod
8 left ^
9 left function application
11 right prefix ope... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/VM/Private/Parser.mli | ocaml | | SForce of array term |
open XNum;
open Runtime;
open Unicode.Types;
open Unicode.SymbolTable;
open Lexer;
Priorities :
2 right ||
3 right & &
4 non = = < > > < > = < =
5 left land lor lxor lsr lsl
6 left + -
7 left * / mod
8 left ^
9 left function application
11 right prefix ope... |
b46bc82bb753c83c8bb27ec02ea3d847915c390bc48aaff865ca73d9ce2145f7 | thheller/shadow-cljsjs | moment_timezone.cljs | (ns cljsjs.moment-timezone
(:require ["moment-timezone"]))
| null | https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/moment_timezone.cljs | clojure | (ns cljsjs.moment-timezone
(:require ["moment-timezone"]))
| |
f8804459673a053413e8b598bc15e352e483e19785b25e4f57a43811619276d5 | kupl/FixML | sub5.ml | type formula =
| True
| False
| Not of formula
| AndAlso of formula * formula
| OrElse of formula * formula
| Imply of formula * formula
| Equal of exp * exp
and exp =
| Num of int
| Plus of exp * exp
| Minus of exp * exp
let rec eval : formula -> bool
= fun f ->
match f with
| True -> true
... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula1/submissions/sub5.ml | ocaml | type formula =
| True
| False
| Not of formula
| AndAlso of formula * formula
| OrElse of formula * formula
| Imply of formula * formula
| Equal of exp * exp
and exp =
| Num of int
| Plus of exp * exp
| Minus of exp * exp
let rec eval : formula -> bool
= fun f ->
match f with
| True -> true
... | |
fd6c397e7027c581c5715251bec9cc6df8eb31f865e73a133e6b5d3cfd38777a | KaroshiBee/weevil | dap_terminate.ml | module D = Dap_messages.Data
module On_request =
Dap_handlers.Request_response.Make
(struct
type enum = Dap_commands.terminate
type contents = D.TerminateArguments.t option
type presence = D.Presence.opt
type msg = (enum, contents, presence) Dap_request.Message.t
type t = msg Da... | null | https://raw.githubusercontent.com/KaroshiBee/weevil/1b166ba053062498c1ec05c885e04fba4ae7d831/lib/dapper/dap_terminate.ml | ocaml | module D = Dap_messages.Data
module On_request =
Dap_handlers.Request_response.Make
(struct
type enum = Dap_commands.terminate
type contents = D.TerminateArguments.t option
type presence = D.Presence.opt
type msg = (enum, contents, presence) Dap_request.Message.t
type t = msg Da... | |
d320ba289ac530b9fe4b2327f57f750ae3106c02d316db3007a746f844cf0695 | Vaguery/klapaucius | print_test.clj | (ns push.type.modules.print_test
(:use midje.sweet)
(:use [push.util.test-helpers])
(:use [push.type.module.print])
)
(fact "print-module has :name ':print'"
(:name print-module) => :print)
(fact "print-module has the expected :attributes"
(:attributes print-module) =>
(contains #{:io}))
(fact "p... | null | https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/test/push/type/modules/print_test.clj | clojure | (ns push.type.modules.print_test
(:use midje.sweet)
(:use [push.util.test-helpers])
(:use [push.type.module.print])
)
(fact "print-module has :name ':print'"
(:name print-module) => :print)
(fact "print-module has the expected :attributes"
(:attributes print-module) =>
(contains #{:io}))
(fact "p... | |
483791612b59437a25fdf17d9a654d7568dd93fc40608c2be52353337ff840fc | acl2/acl2 | lp8@useless-runes.lsp | (SYMBOL-TO-INTEGER-ALISTP)
(SUM-VALS
(542 40 (:REWRITE TRUE-LIST-LISTP-IMPLIES-TRUE-LISTP-XXX))
(404 37 (:DEFINITION TRUE-LIST-LISTP))
(227 227 (:REWRITE DEFAULT-CAR))
(197 44 (:DEFINITION TRUE-LISTP))
(168 168 (:TYPE-PRESCRIPTION TRUE-LIST-LISTP))
(62 2 (:REWRITE MEMBER-EQUAL-NEWVAR-COMPONENTS-1))
(45 45 (:REWR... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/demos/loop-primer/.sys/lp8%40useless-runes.lsp | lisp | (SYMBOL-TO-INTEGER-ALISTP)
(SUM-VALS
(542 40 (:REWRITE TRUE-LIST-LISTP-IMPLIES-TRUE-LISTP-XXX))
(404 37 (:DEFINITION TRUE-LIST-LISTP))
(227 227 (:REWRITE DEFAULT-CAR))
(197 44 (:DEFINITION TRUE-LISTP))
(168 168 (:TYPE-PRESCRIPTION TRUE-LIST-LISTP))
(62 2 (:REWRITE MEMBER-EQUAL-NEWVAR-COMPONENTS-1))
(45 45 (:REWR... | |
de8f22840063366feb776ee585cd02533c2412f1cbdc474cdb10f3489a50fe30 | pjotrp/guix | linux-container.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/gnu/system/linux-container.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu system linux-container)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
#:use-modu... |
fc2eab69caf61781d6e9bb366bad718d1aba353f24d6b8dbe8ed6f3e65eebeed | thelema/ocaml-community | common.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet , ... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/lex/common.mli | ocaml | *********************************************************************
OCaml
... | , projet , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
type line_tracker;;
val open_tracker : string ->... |
a718c04f42ec8438cb84cb6f98339097e43cdf1b9cf80f8886f50ac67416e7b0 | 5outh/Molecule | mi.hs | import Parser
import Typechecker
import Evaluator
import Types
import Control.Monad.Random
import Control.Monad.Trans
import System.Console.Haskeline
main :: IO ()
main = runInputT defaultSettings loop
where
loop :: InputT IO ()
loop = do
minput <- getInputLine "> "
case minput of
Not... | null | https://raw.githubusercontent.com/5outh/Molecule/48effd7d3b4323b3678fd3a5cf1ee31aff41dbfb/mi.hs | haskell | we're just having fun here, right? | import Parser
import Typechecker
import Evaluator
import Types
import Control.Monad.Random
import Control.Monad.Trans
import System.Console.Haskeline
main :: IO ()
main = runInputT defaultSettings loop
where
loop :: InputT IO ()
loop = do
minput <- getInputLine "> "
case minput of
Not... |
9a4ac6b245fc1e97d5941585169f62d499f9a753d73ff95ba24b689a6f82bbb2 | bytekid/mkbtt | pss.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/logic/src/pss.ml | ocaml | ** FUNCTIONS *************************************************************** | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either ve... |
1e52242a3075664507146ec5088f3c1907234a4da375235f8bfd808aad7a6237 | babashka/scittle | core.cljs | (ns scittle.core
(:refer-clojure :exclude [time])
(:require [cljs.reader :refer [read-string]]
[goog.object :as gobject]
[goog.string]
[sci.core :as sci]
[sci.impl.unrestrict]
[scittle.impl.common :refer [cljns]]
[scittle.impl.error :as error])... | null | https://raw.githubusercontent.com/babashka/scittle/11b7a56ab8073efd7e9e123b74f10bd38e6e4f16/src/scittle/core.cljs | clojure | save source for error messages | (ns scittle.core
(:refer-clojure :exclude [time])
(:require [cljs.reader :refer [read-string]]
[goog.object :as gobject]
[goog.string]
[sci.core :as sci]
[sci.impl.unrestrict]
[scittle.impl.common :refer [cljns]]
[scittle.impl.error :as error])... |
7f361adefe015730121b8b46b7887812e2f01d810ead10b2dedc0944deab2be8 | CryptoKami/cryptokami-core | Update.hs | -- | Binary serialization of core Update types.
module Pos.Binary.Core.Update
(
) where
import Universum
import Control.Lens (_Left)
import Data.Time.Units (Millisecond)
import Serokell.Data.Memory.Units (Byte)
import Pos.Binary.Class (Bi (..), Cons (.... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/core/Pos/Binary/Core/Update.hs | haskell | | Binary serialization of core Update types. |
module Pos.Binary.Core.Update
(
) where
import Universum
import Control.Lens (_Left)
import Data.Time.Units (Millisecond)
import Serokell.Data.Memory.Units (Byte)
import Pos.Binary.Class (Bi (..), Cons (..), Field (..), Raw, deriveSimpleBi,
... |
81c04388b48aff87f49152990298243efc6b502f7d102b5bde6ad1dce1d2e769 | erlang/otp | gen_tcp_api_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1998 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/erlang/otp/12283bef143829a53593484eb28b87c1df57cef9/lib/kernel/test/gen_tcp_api_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 1998 - 2022 . 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(gen_tcp_api_SUITE).
Tests the documented API for the gen_tcp functions . The " normal " cases
-include_... |
abbcf7268e83dcaa45883176418d4d9263a3b35b23cd09c636b45201f392712f | haskell-waargonaut/waargonaut | JObject.hs | # LANGUAGE DeriveFoldable #
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE CPP #-}
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE No... | null | https://raw.githubusercontent.com/haskell-waargonaut/waargonaut/4671958c7d8557c72bf881fabed5612ace1ec936/src/Waargonaut/Types/JObject.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveTraversable #
# LANGUAGE FlexibleContexts #
# LANGUAGE CPP #
# LANGUAGE RankNTypes #
# LANGUAGE TypeFamilies #
| Types and functions for handling our representation of a JSON object.
* Object Type
* Key/value pai... | # LANGUAGE DeriveFoldable #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
module Waargonaut.Types.JObject
(
JObject (..)
, HasJObject (..)
, JAssoc (..)
, HasJAssoc (..)
, MapLikeObj
, toMapLi... |
b082e5dc5d23b3a008c030a0340a1267d3fb12008081863e3357d52bd1fcf086 | scymtym/architecture.builder-protocol | variables.lisp | ;;;; variables.lisp --- Variables provided by the architecture.builder-protocol system.
;;;;
Copyright ( C ) 2014 , 2015 Jan Moringen
;;;;
Author : < >
(cl:in-package #:architecture.builder-protocol)
(defvar *builder* nil
"Stores the builder object which should be used for constructing the
result.")
| null | https://raw.githubusercontent.com/scymtym/architecture.builder-protocol/a48abddff7f6e0779b89666f46ab87ef918488f0/src/variables.lisp | lisp | variables.lisp --- Variables provided by the architecture.builder-protocol system.
| Copyright ( C ) 2014 , 2015 Jan Moringen
Author : < >
(cl:in-package #:architecture.builder-protocol)
(defvar *builder* nil
"Stores the builder object which should be used for constructing the
result.")
|
73e98c6b3f665be3693e6a548133343a8229390ab77b444efca6d82838101090 | tonatona-project/tonatona | Postgresql.hs | module Tonatona.Persist.Postgresql
( run
, TonaDbM
, Config(..)
, DbConnStr(..)
, DbConnNum(..)
, runMigrate
) where
import RIO
import Control.Monad.Logger as Logger (Loc, LoggingT(..), LogLevel, LogSource, LogStr, runStdoutLoggingT)
import Data.Pool (Pool)
import Database.Persist.Postgresql (withPostgr... | null | https://raw.githubusercontent.com/tonatona-project/tonatona/b6b67bf0f14d345c01dcf9ea7870b657891f032c/tonatona-persistent-postgresql/src/Tonatona/Persist/Postgresql.hs | haskell | | Main function.
----------
Config --
---------- | module Tonatona.Persist.Postgresql
( run
, TonaDbM
, Config(..)
, DbConnStr(..)
, DbConnNum(..)
, runMigrate
) where
import RIO
import Control.Monad.Logger as Logger (Loc, LoggingT(..), LogLevel, LogSource, LogStr, runStdoutLoggingT)
import Data.Pool (Pool)
import Database.Persist.Postgresql (withPostgr... |
30f182caccc967133e8ef8615600739bed214ee26484074952402914a9a320a4 | wireapp/wire-server | Budget.hs | # LANGUAGE GeneralizedNewtypeDeriving #
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Fou... | null | https://raw.githubusercontent.com/wireapp/wire-server/97286de4e9745b89e0146c0cb556b1f90e660133/services/brig/src/Brig/Budget.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | # LANGUAGE GeneralizedNewtypeDeriving #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public Licens... |
f083b886a3c09aa16259feaca30080dd40469bff856c56e9d4a88bd5626ac055 | ddmcdonald/sparser | dispatch.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1994 - 1996,2011 - 2019 -- all rights reserved
extensions copyright ( c ) 2010 BBNT Solutions LLC . All Rights Reserved
;;;
;;; File: "dispatch"
;;; Module: "analyzers;traversal:"
Version : November 2019
initiated 6/1... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/5a16c18417f725575e8c8c4a58fde433519e86cb/Sparser/code/s/analyzers/traversal/dispatch.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "dispatch"
Module: "analyzers;traversal:"
and the pair passed in to here aren't the ones that are intended
to match. 2/23/07 Removed the ecases. Added flag to permit long
category so that we can write form rules against these if we want.
... | copyright ( c ) 1994 - 1996,2011 - 2019 -- all rights reserved
extensions copyright ( c ) 2010 BBNT Solutions LLC . All Rights Reserved
Version : November 2019
initiated 6/15/94 v2.3 . 9/26 Fixed : multiple - initial - edges bug
9/13/95 fleshed out stub for hook being a cfr . 9/15 fixed a bug .
... |
b46c128db5e655f4be5d1fa6a92791057ebd7793fa22215ccbafdc0f25573831 | notduncansmith/factfold | core.cljc | (ns factfold.core)
(defn evaluate
"Given a model, a state, and a new fact, return the model's next state"
[model state fact]
(reduce
(fn [new-state property-map]
(reduce-kv
(fn [order-values property-name property-formula]
(assoc order-values property-name
(if (= (type pro... | null | https://raw.githubusercontent.com/notduncansmith/factfold/240f68018f32cd2c69396894e1c337dbe859fd03/src/factfold/core.cljc | clojure | commented until tested
"Update the state in an agent (as opposed to an atom) with a given model and fact"
[state-agent model fact]
(send state-agent (partial evaluate model) fact)) | (ns factfold.core)
(defn evaluate
"Given a model, a state, and a new fact, return the model's next state"
[model state fact]
(reduce
(fn [new-state property-map]
(reduce-kv
(fn [order-values property-name property-formula]
(assoc order-values property-name
(if (= (type pro... |
2788ed75757043527ef3c45b5417a57981ca6440214b7b61cd782bfa5ec459ad | anurudhp/CPHaskell | Heap.hs | module Heap where
import Control.Monad
import Control.Monad.ST
import Data.Array.ST
import Data.Array.Unboxed
import Data.List (sort)
import Data.Maybe (catMaybes)
import Data.STRef
data Heap a s = Heap {size :: STRef s Int, heapST :: STArray s Int a}
mkHeap :: (Ord a) => Int -> ST s (Heap a s)
mkHeap n = Heap <$> n... | null | https://raw.githubusercontent.com/anurudhp/CPHaskell/67a55ab34c0365d42fb092c2378bc3972186970c/Templates/DataStructures/Heap.hs | haskell | module Heap where
import Control.Monad
import Control.Monad.ST
import Data.Array.ST
import Data.Array.Unboxed
import Data.List (sort)
import Data.Maybe (catMaybes)
import Data.STRef
data Heap a s = Heap {size :: STRef s Int, heapST :: STArray s Int a}
mkHeap :: (Ord a) => Int -> ST s (Heap a s)
mkHeap n = Heap <$> n... | |
2e5c597dac57a8b59a04b0cac057f7841e0ca64ac51baca6243bfba240f8afd6 | yariv/twoorl | twoorl_eng.erl | This file is part of Twoorl .
%%
%% Twoorl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) any later version.
%%
%% Twoorl is distributed in the ho... | null | https://raw.githubusercontent.com/yariv/twoorl/77b6bea2e29283d09a95d8db131b916e16d2960b/src/bundles/twoorl_eng.erl | erlang |
Twoorl is free software: you can redistribute it and/or modify
(at your option) any later version.
Twoorl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License f... | This file is part of Twoorl .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
along with . If not , see < / > .
-module(twoorl_eng).
-export([bundle/1]... |
42551c6f1ef2fd395da8daa6d3c6d40896b0d89808663f26f7c0cd4736fff45e | shnarazk/mios | Mios.hs | # LANGUAGE
TupleSections
, ViewPatterns
#
TupleSections
, ViewPatterns
#-}
{-# LANGUAGE Safe #-}
| Minisat - based Implementation and Optimization Study on SAT solver
module SAT.Mios
(
-- * Interface to the core of solver
versionId
, CNFDescription (..)
, ... | null | https://raw.githubusercontent.com/shnarazk/mios/d032d761d73224f981a07ec2ea90936db6f495e8/MultiConflict/SAT/Mios.hs | haskell | # LANGUAGE Safe #
* Interface to the core of solver
* Assignment Validator
* For standalone programs
* File IO
| version name
| executes a solver on the given CNF file.
This is another entry point for standalone programs.
| new top-level interface that returns:
* conflicting literal set :: Left [Int]
* satis... | # LANGUAGE
TupleSections
, ViewPatterns
#
TupleSections
, ViewPatterns
#-}
| Minisat - based Implementation and Optimization Study on SAT solver
module SAT.Mios
(
versionId
, CNFDescription (..)
, module SAT.Mios.OptionParser
, runSolver
, solveSAT
... |
1f7452e74303af56dd0d2f296ec638e44cc7569eb2965743bb38ba92fa686675 | dreixel/syb | Perm.hs | {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module Perm (tests) where
{-
This module illustrates permutation phrases.
Disclaimer: this is a perhaps naive, certainly undebugged example.
-}
import Test.Tasty.HUnit
import Control.Applicative (Alternative... | null | https://raw.githubusercontent.com/dreixel/syb/4806afeb2ea824a3ea9969e23ca2c9569cd20d84/tests/Perm.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE RankNTypes #
This module illustrates permutation phrases.
Disclaimer: this is a perhaps naive, certainly undebugged example.
-------------------------------------------------------------------------
We want to read terms of type T3 regardless of the order T1 and... | # LANGUAGE ScopedTypeVariables #
module Perm (tests) where
import Test.Tasty.HUnit
import Control.Applicative (Alternative(..), Applicative(..))
import Control.Monad
import Data.Generics
data T1 = T1 deriving (Show, Eq, Typeable, Data)
data T2 = T2 deriving (Show, Eq, Typeable, Data)
data T3 = T3 T1 T... |
636656658e85945970e77ad86f2f1eecea867b31be7adf76d082df18307a482e | mbenke/zpf2013 | MyParsec2a.hs | module MyParsec2a
( testP,
parse,
Parser,
char,
eof,
(<|>),
module MyParsec2a.Combinators,
)where
import MyParsec2a.Prim
import MyParsec2a.Combinators
import Data.Char(isDigit,digitToInt)
parse :: Parser a -> String -> String -> Either ParseError a
parse p... | null | https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/Parse1/MyParsec2a.hs | haskell | "'b', c" | module MyParsec2a
( testP,
parse,
Parser,
char,
eof,
(<|>),
module MyParsec2a.Combinators,
)where
import MyParsec2a.Prim
import MyParsec2a.Combinators
import Data.Char(isDigit,digitToInt)
parse :: Parser a -> String -> String -> Either ParseError a
parse p... |
df8aba563c162c6247f701abcf194b593b2caaa7515285cb33d8ddb010669e75 | finnishtransportagency/harja | listings.cljs | (ns harja.ui.listings
(:require [reagent.core :as reagent :refer [atom]]
[clojure.string :as s]
[harja.loki :refer [log tarkkaile!]]
[harja.ui.yleiset :refer [nuolivalinta]]))
(defn suodatettu-lista
"Luettelo, jossa on hakukenttä filtteröinnille.
opts voi sisältää
:term ... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/src/cljs/harja/ui/listings.cljs | clojure | Alas
Enter | (ns harja.ui.listings
(:require [reagent.core :as reagent :refer [atom]]
[clojure.string :as s]
[harja.loki :refer [log tarkkaile!]]
[harja.ui.yleiset :refer [nuolivalinta]]))
(defn suodatettu-lista
"Luettelo, jossa on hakukenttä filtteröinnille.
opts voi sisältää
:term ... |
15783b3204f7b0765902bff92066dba8729e9be10bbabec17c1a0793f7644da8 | 8c6794b6/guile-tjit | canonicalize.scm | ;;; Tree-il canonicalizer
Copyright ( C ) 2011 , 2012 , 2013 Free Software Foundation , Inc.
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License ,... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/language/tree-il/canonicalize.scm | scheme | Tree-il canonicalizer
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A P... |
Copyright ( C ) 2011 , 2012 , 2013 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
(define-module (language tree-il ca... |
3750e2c07429e5297f886985fcbcb9070eb61cd8f6ccb8537bfa08e5c8587e49 | jvf/scalaris | sup_dht_node.erl | 2007 - 2015 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
d... | null | https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/src/sup_dht_node.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2007 - 2015 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
If one of the supervised processes fails , only the failed process
-module(sup_dht_node).
-author('').
-vs... |
419e40af428c2cf59cc9941562301798f098fbde83189f8be5795a1c79d89786 | marick/Midje | t_tap.clj | (ns midje.emission.plugins.t-tap
(:require [midje
[sweet :refer :all]
[util :refer :all]
[test-util :refer :all]]
[midje.emission.plugins.tap :as tap]
[midje.config :as config]
[midje.emission.plugins.default-failure-lines :as failure-lines]
... | null | https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/midje/emission/plugins/t_tap.clj | clojure | (ns midje.emission.plugins.t-tap
(:require [midje
[sweet :refer :all]
[util :refer :all]
[test-util :refer :all]]
[midje.emission.plugins.tap :as tap]
[midje.config :as config]
[midje.emission.plugins.default-failure-lines :as failure-lines]
... | |
418d28a2670b5c225035284fae3ca97714aab09b89daf611f950c73fa5537e59 | remyoudompheng/hs-language-go | Lexer.hs | -- |
Module : Tests .
Copyright : ( c ) 2013
License : ( see COPYING )
--
-- This module provides tests for the lexer.
module Tests.Lexer (testsLexer) where
import Test.Tasty
import Test.Tasty.HUnit
import Language.Go.Parser.Lexer
import Language.Go.Parser.Tokens (
GoToken(..)
, GoTokenP... | null | https://raw.githubusercontent.com/remyoudompheng/hs-language-go/5440485f6404356892eab4832cff4f1378c11670/tests/Tests/Lexer.hs | haskell | |
This module provides tests for the lexer. | Module : Tests .
Copyright : ( c ) 2013
License : ( see COPYING )
module Tests.Lexer (testsLexer) where
import Test.Tasty
import Test.Tasty.HUnit
import Language.Go.Parser.Lexer
import Language.Go.Parser.Tokens (
GoToken(..)
, GoTokenPos(..)
, insertSemi
)
testLex :: String -> String -... |
04934910503adb6c15251f998c07a0d4946a9355a8b2d36a4bdb2bde9b45ef13 | ocaml-batteries-team/batteries-included | batteriesExceptionless.ml | open this to extend all with and . Exceptionless if available
include (Batteries :
module type of Batteries
with module Array := Batteries.Array
and module Hashtbl := Batteries.Hashtbl
and module List := Batteries.List
and module Map := Batteries.Map
and... | null | https://raw.githubusercontent.com/ocaml-batteries-team/batteries-included/f143ef5ec583d87d538b8f06f06d046d64555e90/src/batteriesExceptionless.ml | ocaml | end
Batteries specific modules | open this to extend all with and . Exceptionless if available
include (Batteries :
module type of Batteries
with module Array := Batteries.Array
and module Hashtbl := Batteries.Hashtbl
and module List := Batteries.List
and module Map := Batteries.Map
and... |
6cf3a9fc9b2922c45b708b7e3612e63f7b8d2a6a991c16f00d907a089ea72fe9 | jellelicht/guix | suckless.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; ei... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/suckless.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages suckless)
#:use-module ((guix licenses) #:prefix license:... |
a1e61cf96fd0e1beeb9fac3781302057cadca0c2c4a1978f242f2a1a66bd9e9c | ocurrent/ocaml-multicore-ci | test.ml | let () =
Unix.putenv "HOME" "/idontexist";
(* Ignore user's git configuration *)
Unix.putenv "GIT_AUTHOR_NAME" "test";
Unix.putenv "GIT_COMMITTER_NAME" "test";
Unix.putenv "EMAIL" "";
Lwt_main.run
@@ Alcotest_lwt.run "ocaml-multicore-ci"
[ ("index", Test_index.tests); ("analyse", Test_analyse.tests... | null | https://raw.githubusercontent.com/ocurrent/ocaml-multicore-ci/d46eecaf7269283a4b95ee40d2a9d6c7ec34a7bf/test/test.ml | ocaml | Ignore user's git configuration | let () =
Unix.putenv "HOME" "/idontexist";
Unix.putenv "GIT_AUTHOR_NAME" "test";
Unix.putenv "GIT_COMMITTER_NAME" "test";
Unix.putenv "EMAIL" "";
Lwt_main.run
@@ Alcotest_lwt.run "ocaml-multicore-ci"
[ ("index", Test_index.tests); ("analyse", Test_analyse.tests) ]
|
054da9ef5db4141dd72a2992fc44ec3fa22a888f253622ad771c5059964891a5 | jordanthayer/ocaml-search | recording_dfs.ml | *
@author jtd7
@since 2010 - 08 - 17
Recording version of depth first search , for the kids
@author jtd7
@since 2010-08-17
Recording version of depth first search, for the kids
*)
type 'a node = {
parent : 'a node;
data : 'a;
g : float;
f : float;
depth : int;
h : float;
... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/recording/recording_dfs.ml | ocaml | * takes a function to be applied to the data payload
such as the goal-test or the domain heuristic and
wraps it so that it can be applied to the entire
node
* Unwraps a solution which is in the form of a search node and presents
it in the format the domain expects it, which is domain data follo... | *
@author jtd7
@since 2010 - 08 - 17
Recording version of depth first search , for the kids
@author jtd7
@since 2010-08-17
Recording version of depth first search, for the kids
*)
type 'a node = {
parent : 'a node;
data : 'a;
g : float;
f : float;
depth : int;
h : float;
... |
7e46a6a915609585e3724b7f9f77baf483929754e8719df6ff5d66295b75b73b | aratare-jp/shinsetsu | server.clj | (ns shinsetsu.server
(:require
[aleph.http :as http]
[mount.core :as m]
[clojure.tools.cli :as cli]
[taoensso.timbre :as log]
[shinsetsu.config :refer [env]]
[shinsetsu.app :refer [app]]
[shinsetsu.nrepl :as nrepl])
(:gen-class))
;; log uncaught exceptions in threads
(Thread/setDefaultU... | null | https://raw.githubusercontent.com/aratare-jp/shinsetsu/22b9add9f52716fc4e13c83cf667695be8a3e06f/src/clj/shinsetsu/server.clj | clojure | log uncaught exceptions in threads | (ns shinsetsu.server
(:require
[aleph.http :as http]
[mount.core :as m]
[clojure.tools.cli :as cli]
[taoensso.timbre :as log]
[shinsetsu.config :refer [env]]
[shinsetsu.app :refer [app]]
[shinsetsu.nrepl :as nrepl])
(:gen-class))
(Thread/setDefaultUncaughtExceptionHandler
(reify Threa... |
7042d5d059d1ff9a0b272de9200246f3ab4d1c91a4f63a78b94a411c5449bd8f | ocamllabs/ocaml-modular-implicits | t240-c_call3.ml | open Lib;;
if Hashtbl.hash_param 5 6 [1;2;3] <> 697606130 then raise Not_found;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 CONSTINT 196799
11 PUSHGETGLOBAL < 0>(1 , < 0>(2 , < 0>(3 , 0 ) ) )
13 PUSHCONSTINT 6
15 PUSHCONSTINT 5 ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t240-c_call3.ml | ocaml | open Lib;;
if Hashtbl.hash_param 5 6 [1;2;3] <> 697606130 then raise Not_found;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 CONSTINT 196799
11 PUSHGETGLOBAL < 0>(1 , < 0>(2 , < 0>(3 , 0 ) ) )
13 PUSHCONSTINT 6
15 PUSHCONSTINT 5 ... | |
b31f568e77f0df956ebe4f005fbe4806f1acb467f658125ea42e9038a8eb1a5c | haskell-suite/haskell-src-exts | FFIInterruptible.hs | # LANGUAGE InterruptibleFFI #
foo = interruptible
| null | https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/FFIInterruptible.hs | haskell | # LANGUAGE InterruptibleFFI #
foo = interruptible
| |
9a315444e7defd787d94bd9f0210ade88f3678b62f40ccd67900449e3db998da | chef/sqerl | gobot_tests.erl | -module(gobot_tests).
-include_lib("eunit/include/eunit.hrl").
exports_test() ->
Exports = gobot_test_object1:module_info(exports),
ExpectedExports = [
{'#new', 0},
{getval, 2},
{fromlist, 1},
{'fields', 0},
{'#insert_fields', 0},
{'#update_fields', 0},
... | null | https://raw.githubusercontent.com/chef/sqerl/a27e3e58da53240dc9925ec03ecdb894b8231cf9/test/gobot_tests.erl | erlang | -module(gobot_tests).
-include_lib("eunit/include/eunit.hrl").
exports_test() ->
Exports = gobot_test_object1:module_info(exports),
ExpectedExports = [
{'#new', 0},
{getval, 2},
{fromlist, 1},
{'fields', 0},
{'#insert_fields', 0},
{'#update_fields', 0},
... | |
a9c18ed812a3fbf57f69359b6d028cbd9e2b98367b34de1f83e7bd33b0890cae | ppaml-op3/insomnia | Type.hs | {-# LANGUAGE OverloadedStrings #-}
-- | Kind checking for types.
-- Well-formed kind checking is also here because it is trivial.
module Insomnia.Typecheck.Type where
import Control.Lens
import Control.Monad (zipWithM_, forM)
import Control.Monad.Reader.Class (MonadReader(..))
import Data.List (intersperse)
import Da... | null | https://raw.githubusercontent.com/ppaml-op3/insomnia/5fc6eb1d554e8853d2fc929a957c7edce9e8867d/src/Insomnia/Typecheck/Type.hs | haskell | # LANGUAGE OverloadedStrings #
| Kind checking for types.
Well-formed kind checking is also here because it is trivial.
# SOURCE #
| Check that a kind is well-formed. Note that for now, all kinds
are well-formed.
| The subkinding relation. For our simple kinds it is reflexive.
| Ensure that the given kind is of ... | module Insomnia.Typecheck.Type where
import Control.Lens
import Control.Monad (zipWithM_, forM)
import Control.Monad.Reader.Class (MonadReader(..))
import Data.List (intersperse)
import Data.Monoid (Monoid(..),(<>))
import qualified Data.Set as S
import qualified Unbound.Generics.LocallyNameless as U
import Insomni... |
6714feeac28038a9263c6091a78ce1e265f0f04597df8a7914db4b37a39f8468 | rmculpepper/crypto | all.rkt | Copyright 2018
;;
;; This library is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation , either version 3 of the License , or
;; (at your option) any later version.
;;
;; This library is distributed in... | null | https://raw.githubusercontent.com/rmculpepper/crypto/fec745e8af7e3f4d5eaf83407dde2817de4c2eb0/crypto-lib/all.rkt | racket |
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
(at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCH... | Copyright 2018
by the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
#lang racket/base
(require "main.rkt"
"libcrypto.rkt"
"gcrypt.rkt"
"ne... |
fce83ec8e99e79810bc388ed2b898b07252f23ef0d2bf4280415bcba817d4fd0 | nuprl/gradual-typing-performance | moment-base.rkt | #lang typed/racket/base
;; Support for moment.rkt
;; (Works together with offset-resolvers.rkt)
(provide
moment->iso8601
moment->iso8601/tzid
make-moment
(struct-out Moment)
)
;; -----------------------------------------------------------------------------
(require
benchmark-util
racket/match
(only-in rac... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/postmortem/experiments/adaptor/many-adaptor/gregor/typed/moment-base.rkt | racket | Support for moment.rkt
(Works together with offset-resolvers.rkt)
-----------------------------------------------------------------------------
============================================================================= | #lang typed/racket/base
(provide
moment->iso8601
moment->iso8601/tzid
make-moment
(struct-out Moment)
)
(require
benchmark-util
racket/match
(only-in racket/format ~r)
"datetime-adapted.rkt"
)
(struct Moment ([datetime/local : DateTime]
[utc-offset : Integer]
[zone : (U ... |
2996eee2d16de53848270570b2019e1e051eb88ed318467a3ae14f4196103320 | haskell-tools/haskell-tools | PatternBind.hs | module Decl.PatternBind where
(x,y) | 1 == 1 = (1,2) | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/examples/Decl/PatternBind.hs | haskell | module Decl.PatternBind where
(x,y) | 1 == 1 = (1,2) | |
9ef4d1b0c42897e37788b5cadb1a073e2a40ddf6a2391144207b47fdfb143d78 | janestreet/ecaml | input_event0.ml | open! Core
open! Import0
include Value.Make_subtype (struct
let name = "input-event"
let here = [%here]
let is_in_subtype = Value.is_event
end)
let description = Funcall.Wrap.("single-key-description" <: t @-> return string)
let sexp_of_t t = [%sexp (description t : string)]
| null | https://raw.githubusercontent.com/janestreet/ecaml/da88f7ddde41838f6ad0ef90c85d81fbfb1526c3/src/input_event0.ml | ocaml | open! Core
open! Import0
include Value.Make_subtype (struct
let name = "input-event"
let here = [%here]
let is_in_subtype = Value.is_event
end)
let description = Funcall.Wrap.("single-key-description" <: t @-> return string)
let sexp_of_t t = [%sexp (description t : string)]
| |
011f3d9ab8f49aa2d5b9f36f452042e8cd846ca7e68bbb296713c7dc28e9960f | gwkkwg/metatilities-base | generic-interface.lisp | (in-package #:metatilities)
;;; System variables
(declaim (special *development-mode* *use-native-debugger*))
(defvar *development-mode* t)
(defvar *use-native-debugger* nil)
;;; progress bars
(defvar *dummy-progress-variable*)
(defvar *progress-bar-count* 0)
(defmacro with-progress-bar ((min max &rest args
... | null | https://raw.githubusercontent.com/gwkkwg/metatilities-base/ef04337759972fd622c9b27b53149f3d594a841f/dev/generic-interface.lisp | lisp | System variables
progress bars
avoid compiler warnings
cleanup
just execute body
Error handling
Otherwise set up our nice error handlers...
beeping
no interface interface implementations
Progress bars
Errors and warnings
Make-color with sensible arguments
y-or-n-dialog
choose-file-question
choose-new-fil... | (in-package #:metatilities)
(declaim (special *development-mode* *use-native-debugger*))
(defvar *development-mode* t)
(defvar *use-native-debugger* nil)
(defvar *dummy-progress-variable*)
(defvar *progress-bar-count* 0)
(defmacro with-progress-bar ((min max &rest args
&key (t... |
2769b19e33a5ec3eb522f6d977b23a1a5dc38794a1de30c396a3a483e8969442 | nixeagle/nisp | alerts.lisp | We d Mar 20 17:24:00 1991 by < >
;;; alerts.lisp
;;; ****************************************************************
;;; Alerts: A Convenient Debugging Status Indicator ****************
;;; ****************************************************************
;;;
Written by < >
;;;
From -cgi.cs.cmu.edu/afs/cs... | null | https://raw.githubusercontent.com/nixeagle/nisp/680b40b3b9ea4c33db0455ac73cbe3756afdbb1e/3rd-party/alerts.lisp | lisp | alerts.lisp
****************************************************************
Alerts: A Convenient Debugging Status Indicator ****************
****************************************************************
Copying/distribution/modification are all allowed by original author.
See: -cgi.cs.cmu.edu/afs/cs/projec... | We d Mar 20 17:24:00 1991 by < >
Written by < >
From -cgi.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/ext/alerts/alerts.cl
Modifications made to make this compile on sbcl by
Copyright ( C ) 2010 , released under the same terms as original author .
(in-package :cl-user)
(defpackage #:a... |
17e0193576dcd464036eef0364ffbc745494d2442f2e7cb617ff77e761a98770 | HealthSamurai/us-npi | beat_test.clj | (ns usnpi.beat-test
(:require [clojure.test :refer :all]
[usnpi.db :as db]
[usnpi.error :refer [error!]]
[usnpi.beat :as beat]
[usnpi.tasks :as tasks]
[usnpi.time :as time]))
(defn task-test-ok []
(/ 2 1))
(defn task-test-err []
(error! "Failure exampl... | null | https://raw.githubusercontent.com/HealthSamurai/us-npi/a28a8ec8d45e19fadab0528791e7de78f19dc87e/test/usnpi/beat_test.clj | clojure | (ns usnpi.beat-test
(:require [clojure.test :refer :all]
[usnpi.db :as db]
[usnpi.error :refer [error!]]
[usnpi.beat :as beat]
[usnpi.tasks :as tasks]
[usnpi.time :as time]))
(defn task-test-ok []
(/ 2 1))
(defn task-test-err []
(error! "Failure exampl... | |
072eed850b006aa852f201d23987c2d71958f49dcc2c91cde2d5d7d8053bccbf | input-output-hk/rscoin-core | CoinSpec.hs | # LANGUAGE ViewPatterns #
| RSCoin . Core . Coin specification
module Test.RSCoin.Core.CoinSpec
( spec
) where
import qualified Data.IntMap.Strict as M (mapWithKey, member, size, (!))
import Test.Hspec (Spec, describe)
import Test.Hspec.QuickCheck (prop)
import ... | null | https://raw.githubusercontent.com/input-output-hk/rscoin-core/5b3fde8de1bdce71ee6ea0e8f1582ea28f451171/test/Test/RSCoin/Core/CoinSpec.hs | haskell | | This property does the following:
* generate list of coins, giving them all the same color;
| These properties do the following:
* for every color in the map:
* give its corresponding coin that color (so the operations are safe);
* verify it's the sum (subtraction, respectively) of
* the corresponding values i... | # LANGUAGE ViewPatterns #
| RSCoin . Core . Coin specification
module Test.RSCoin.Core.CoinSpec
( spec
) where
import qualified Data.IntMap.Strict as M (mapWithKey, member, size, (!))
import Test.Hspec (Spec, describe)
import Test.Hspec.QuickCheck (prop)
import ... |
7829285382dc44a72e2faf4b0c08a758d441dafe57d7b354da36695cf2fe1f06 | ucsd-progsys/liquidhaskell | Records.hs | {-@ LIQUID "--expect-any-error" @-}
module Records where
import qualified Data.Set as S
import GHC.CString -- This import interprets Strings as constants!
import DataBase
data Value = I Int
@ rec : : { v : Dict < { \x y - > true } > String Value | listElts ( ddom v ) ~~ ( Set_sng " bar " ) } @
rec :: Dict Strin... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/benchmarks/icfp15/neg/Records.hs | haskell | @ LIQUID "--expect-any-error" @
This import interprets Strings as constants! | module Records where
import qualified Data.Set as S
import DataBase
data Value = I Int
@ rec : : { v : Dict < { \x y - > true } > String Value | listElts ( ddom v ) ~~ ( Set_sng " bar " ) } @
rec :: Dict String Value
rec = ("foo" := I 8) += empty
unsafe :: Dict String Value
unsafe = ("bar" := I 8) += empty
|
2007043b661673a282600dbb0f4ea53fd543243863bb57e20acd14a4f2500428 | monadfix/ormolu-live | ForeignCall.hs |
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
\section[Foreign]{Foreign calls }
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[Foreign]{Foreign calls}
-}
{-# LANGUAGE DeriveDataTypeable #-}
module ForeignCall (
ForeignCall(..), isSafeForeignCall,
Safety(... | null | https://raw.githubusercontent.com/monadfix/ormolu-live/d8ae72ef168b98a8d179d642f70352c88b3ac226/ghc-lib-parser-8.10.1.20200412/compiler/prelude/ForeignCall.hs | haskell | # LANGUAGE DeriveDataTypeable #
************************************************************************
* *
\subsubsection{Data types}
* *
*****************************************... |
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
\section[Foreign]{Foreign calls }
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[Foreign]{Foreign calls}
-}
module ForeignCall (
ForeignCall(..), isSafeForeignCall,
Safety(..), playSafe, playInterruptible,
... |
8f7ec9a3c3e9a3203b823ee643b69e659caa1de0c049e85d83a3c7dffe15c38c | cbilson/Camp | package.clj | (ns camp.tasks.package
"Package up project artifacts into a nupkg."
(:require [camp.nuget :as nuget]))
(defn package
"Packages up project targets into a nuget package. The equivalent of
`nuget pack'.
***NOT IMPLEMENTED YET***"
[project & _]
(println "TODO: Gather dlls, exes, and other content in targets... | null | https://raw.githubusercontent.com/cbilson/Camp/57320423a4a78df32d8edee58a6e3857e03f7af2/src/camp/tasks/package.clj | clojure | (ns camp.tasks.package
"Package up project artifacts into a nupkg."
(:require [camp.nuget :as nuget]))
(defn package
"Packages up project targets into a nuget package. The equivalent of
`nuget pack'.
***NOT IMPLEMENTED YET***"
[project & _]
(println "TODO: Gather dlls, exes, and other content in targets... | |
478187ad2238dd495f1837ea02c4006da726b53aeac8f5bd2a90b13b5aafaa35 | acowley/GLUtil | Drawing.hs | -- | Simplify common drawing commands.
module Graphics.GLUtil.Drawing where
import Foreign.Ptr (nullPtr)
import Graphics.Rendering.OpenGL
| @drawIndexedTris n@ draws @n@ ' Triangles ' using vertex data from
-- the currently bound 'ArrayBuffer' and indices from the beginning of
-- the currently bound 'ElementArrayBuf... | null | https://raw.githubusercontent.com/acowley/GLUtil/09faac00072b08c72ab12bcc57d4ab2a02ff1c88/src/Graphics/GLUtil/Drawing.hs | haskell | | Simplify common drawing commands.
the currently bound 'ArrayBuffer' and indices from the beginning of
the currently bound 'ElementArrayBuffer'. Note that there must be
at least @n * 3@ indices in the 'ElementArrayBuffer'! | module Graphics.GLUtil.Drawing where
import Foreign.Ptr (nullPtr)
import Graphics.Rendering.OpenGL
| @drawIndexedTris n@ draws @n@ ' Triangles ' using vertex data from
drawIndexedTris :: GLsizei -> IO ()
drawIndexedTris n = drawElements Triangles (n*3) UnsignedInt nullPtr |
c7e1694006c48915b0964ff9c53bff6fdde49f6ddd6ea40b669c47ef37ac9431 | charlieg/Sparser | fill.lisp | ;;; -*- Mode:Lisp; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1991 Content Technologies Inc.
copyright ( c ) 1992 -- all rights reserved
;;;
;;; File: "fill"
;;; module: "interface;windows:articles:"
Version : 1.0 January 1991
initiated 1/92 , added file version 3/29/... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/interface/workbench/fill.lisp | lisp | -*- Mode:Lisp; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "fill"
module: "interface;windows:articles:"
--------------------------------------------
recording significant segments of the text
--------------------------------------------
-------------------------------------------------
getting an... | copyright ( c ) 1991 Content Technologies Inc.
copyright ( c ) 1992 -- all rights reserved
Version : 1.0 January 1991
initiated 1/92 , added file version 3/29/92
(in-package :sparser)
(defvar *significant-text-segments* nil
"Accumulates records of significant text segments in the article(s... |
9e26728d64b83018079a2018c0f6ca11372e69ea3352d8e9c4406d9684d0a78a | lvh/caesium | aead.clj | (ns caesium.crypto.aead
(:require [caesium.binding :as b]
[caesium.byte-bufs :as bb]
[caesium.randombytes :as r]))
(b/defconsts [chacha20poly1305-ietf-keybytes
chacha20poly1305-ietf-nsecbytes
chacha20poly1305-ietf-npubbytes
chacha20poly1305-ietf-abyte... | null | https://raw.githubusercontent.com/lvh/caesium/cb90a4325fa48a2e4fb6cad810f340125a53fc57/src/caesium/crypto/aead.clj | clojure | (ns caesium.crypto.aead
(:require [caesium.binding :as b]
[caesium.byte-bufs :as bb]
[caesium.randombytes :as r]))
(b/defconsts [chacha20poly1305-ietf-keybytes
chacha20poly1305-ietf-nsecbytes
chacha20poly1305-ietf-npubbytes
chacha20poly1305-ietf-abyte... | |
fbcc0e54ec3e72f8dc082898162e3288fa29b276a02f5b740abf2b423e00c752 | facebook/infer | ErlangBlock.mli |
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/fbf40c8bd6fdf492df48ade70b270ad04aad7be0/infer/src/erlang/ErlangBlock.mli | ocaml | * Chain a list of blocks together in a conjunctive style: a failure in any block leads to a global
failure, and successes lead to the next block.
* Chain a list of blocks together in a disjunctive style: a success in any block leads to a global
success, and failures lead to the next block.
* Make a branch bas... |
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
bdff0fff010a6b8b966602d14d6923865dc3e1c16e73f9e6181d78a6ca6491da | abengoa/clj-stripe | customers.clj | Copyright ( c ) 2011 . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound b... | null | https://raw.githubusercontent.com/abengoa/clj-stripe/d4870d6ea57140d23385878bcf7faea21cf90da8/test/clj_stripe/test/customers.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) 2011 . All rights reserved .
(ns clj-stripe.test.customers
(:use [clj-stripe common customers])
(:require [clojure.test :as test]))
(with-token "sk_test_BQokikJOvBiI2HlWgH4olfQ2:"
(def test-card (card (number "4242424242424242") (expiration 12 2020) (cvc 123) (owner-name "Mr. Owner")))
... |
de0d4051798072933d598eff866b3fb78e92679a8a3ba4921154fa743eabd74d | cognesence/planner | core_test.clj | (ns planner.core-test
(:require [clojure.test :refer :all]
[planner.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/cognesence/planner/f8f7d8048d609a248a1a4c1060c17c8784c43b5b/test/planner/core_test.clj | clojure | (ns planner.core-test
(:require [clojure.test :refer :all]
[planner.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
aeb44a4ab6f54dee865547f5a8b64f26becaa1bd0ecaa34abdd01e584ddf1dfe | dsorokin/aivika | Process.hs |
-- |
-- Module : Simulation.Aivika.Internal.Process
Copyright : Copyright ( c ) 2009 - 2017 , < >
-- License : BSD3
Maintainer : < >
-- Stability : experimental
Tested with : GHC 8.0.1
--
-- This is an internal implementation module that should never be used directly.
--
-- A value in the 'Proces... | null | https://raw.githubusercontent.com/dsorokin/aivika/7a14f460ab114b0f8cdfcd05d5cc889fdc2db0a4/Simulation/Aivika/Internal/Process.hs | haskell | |
Module : Simulation.Aivika.Internal.Process
License : BSD3
Stability : experimental
This is an internal implementation module that should never be used directly.
A value in the 'Process' monad represents a discontinuous process that
can suspend in any simulation time point and then resume later in t... |
Copyright : Copyright ( c ) 2009 - 2017 , < >
Maintainer : < >
Tested with : GHC 8.0.1
computations . Moreover , a value in the can be run within
The characteristic property of the @Process@ type is function ' holdProcess '
module Simulation.Aivika.Internal.Process
ProcessId,
Proces... |
782bd73f55d0ae63acb89839dc18ff19f3ba0a0c0fd7c0bd088d758e2c739997 | realworldocaml/examples | blow_up.ml | open Core.Std
exception Empty_list
let list_max = function
| [] -> raise Empty_list
| hd :: tl -> List.fold tl ~init:hd ~f:(Int.max)
let () =
printf "%d\n" (list_max [1;2;3]);
printf "%d\n" (list_max [])
| null | https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/error-handling/blow_up.ml | ocaml | open Core.Std
exception Empty_list
let list_max = function
| [] -> raise Empty_list
| hd :: tl -> List.fold tl ~init:hd ~f:(Int.max)
let () =
printf "%d\n" (list_max [1;2;3]);
printf "%d\n" (list_max [])
| |
447483dfa8f08a8bb1f8200eb7e80f7c1b8f99e359f2c9659f1c36adb1c80f7f | antoniogarrote/jobim | events.clj | (ns jobim.events
(:use [lamina.core])
(:use [clojure.contrib.logging :only [log]])
(:import [java.util LinkedList HashMap])
(:import [java.util.concurrent LinkedBlockingQueue]))
(defonce ^LinkedBlockingQueue *reactor-thread* (LinkedBlockingQueue.))
(defonce ^HashMap *events-handlers* (HashMap.))
(defonce ^Has... | null | https://raw.githubusercontent.com/antoniogarrote/jobim/f041331d2c02cf38741e8604263bd08a3a1f11a5/jobim-core/src/jobim/events.clj | clojure | Reactor
create queues
create reactor threads
multiplexer thread
(.put ch item)
Not using reactor threads
- register events + handlers as lambda + closures | (ns jobim.events
(:use [lamina.core])
(:use [clojure.contrib.logging :only [log]])
(:import [java.util LinkedList HashMap])
(:import [java.util.concurrent LinkedBlockingQueue]))
(defonce ^LinkedBlockingQueue *reactor-thread* (LinkedBlockingQueue.))
(defonce ^HashMap *events-handlers* (HashMap.))
(defonce ^Has... |
459630565ec4f5d817af50d08993e72d7ee46eb2b9e12349ddb3a2c6ecf1ddb7 | juspay/medea | Array.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
module Data.Medea.Parser.Spec.Array
( Specification (..),
defaultSpec,
parseSpecification,
)
where
import Control.Applicative ((<|>))
import Control.Applicative.Permutations (runPermutation, toPermutationWithDefault)
import Data.Medea.Parser.Pr... | null | https://raw.githubusercontent.com/juspay/medea/b493dd96f7f8d465ec95d3dafa0da430625c9c87/src/Data/Medea/Parser/Spec/Array.hs | haskell | tupleSpec with an empty list indicates an empty tuple/encoding of unit
tupleSpec of Nothing indicates that there is no tuple spec at all
the user must specify length, or a type, or a tuple spec
the user has defined both element type and tuple.
this is illegal behaviour
the user cannot specify length and tuples | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
module Data.Medea.Parser.Spec.Array
( Specification (..),
defaultSpec,
parseSpecification,
)
where
import Control.Applicative ((<|>))
import Control.Applicative.Permutations (runPermutation, toPermutationWithDefault)
import Data.Medea.Parser.Pr... |
207cb1d5f4f112feeb7ba7e808e317e3ae7b2666c00ab6193d43ce0c146499a9 | danieljharvey/mimsa | Typecheck.hs | # LANGUAGE BlockArguments #
# LANGUAGE DerivingStrategies #
module Language.Mimsa.Typechecker.Typecheck
( typecheck,
)
where
import Control.Monad.Except
import Control.Monad.State (State, runState)
import Control.Monad.Writer.CPS
import Data.Map.Strict (Map)
import Language.Mimsa.Core
import Language.Mimsa.Typech... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/97421f00f4487dc7d4988eb1dcddd65c4e379538/compiler/src/Language/Mimsa/Typechecker/Typecheck.hs | haskell | run inference, and substitute everything possible | # LANGUAGE BlockArguments #
# LANGUAGE DerivingStrategies #
module Language.Mimsa.Typechecker.Typecheck
( typecheck,
)
where
import Control.Monad.Except
import Control.Monad.State (State, runState)
import Control.Monad.Writer.CPS
import Data.Map.Strict (Map)
import Language.Mimsa.Core
import Language.Mimsa.Typech... |
6621e1c3d8ad755ba7c24a847a2df17a89b0b481984167a223637124d008a3e8 | RefactoringTools/HaRe | pfe.hs |
import System(getArgs )
import PPU(getPPopts)
import HsParser(parse)
import HsLexerPass1(lexerPass0)
import DefinedNamesBase ( )
import FreeNamesBase()
import ScopeNamesBase()
import NameMapsBase()
import ReAssocBase()
import RemoveListCompBase()
import SimpPatMatchBase()
import TiDecorate(TiDecls) -- to choose resu... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/pfe/pfe.hs | haskell | to choose result type from the type checker
for removing pattern bindings in PfeTransformCmds.
tcOutput = id :: I [[HsModuleR]] |
import System(getArgs )
import PPU(getPPopts)
import HsParser(parse)
import HsLexerPass1(lexerPass0)
import DefinedNamesBase ( )
import FreeNamesBase()
import ScopeNamesBase()
import NameMapsBase()
import ReAssocBase()
import RemoveListCompBase()
import SimpPatMatchBase()
import HsModule
import Pfe0Cmds(addHelpCmd)... |
bc4ea9e6bbe47599cc1fb09eeb0b0163cc3eb0c4dc5dfd42557a0cc1b2cac333 | haslab/HAAP | plab.hs | # LANGUAGE FlexibleContexts , TypeOperators , RankNTypes , DoAndIfThenElse , TypeFamilies , TupleSections , TemplateHaskell , DeriveDataTypeable , EmptyDataDecls , DeriveGeneric , OverloadedStrings , ScopedTypeVariables #
module Main where
import HAAP hiding ((.=))
import qualified Data.Vector as Vector
import quali... | null | https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/examples/plab/plab.hs | haskell | * Data types
lookupTourneyGroup :: Int -> [TourneyGroup] -> TourneyGroup
lookupTourneyGroup i [] = error $ "lookupTourneyGroup " ++ show i
lookupTourneyGroup i (tg@(TourneyGroup (Left g,_)):xs)
| otherwise = lookupTourneyGroup i xs
lookupTourneyGroup i (tg@(TourneyGroup (Right _,_)):xs) = lookupTourneyGroup i xs
... | # LANGUAGE FlexibleContexts , TypeOperators , RankNTypes , DoAndIfThenElse , TypeFamilies , TupleSections , TemplateHaskell , DeriveDataTypeable , EmptyDataDecls , DeriveGeneric , OverloadedStrings , ScopedTypeVariables #
module Main where
import HAAP hiding ((.=))
import qualified Data.Vector as Vector
import quali... |
570f415574808ac246f82a5b3cb7ded1fe057b5c47b1ae705c1dc98b790a908a | LesBoloss-es/ppx_deriving_madcast | show.ml | open Ppxlib
(** Compile a type to a caster **********************************************)
let compile typ =
try
let itype, otype =
Lexing.from_string typ
|> Parse.core_type
|> Madcast.split_arrow
in
let cast = Madcast.find_caster itype otype in
Format.printf "%a@." Pprintast.expre... | null | https://raw.githubusercontent.com/LesBoloss-es/ppx_deriving_madcast/2c728604cf87c07c937b18d9b599fc6785670a9b/test/show.ml | ocaml | * Compile a type to a caster *********************************************
* Run show.ml ************************************************************ | open Ppxlib
let compile typ =
try
let itype, otype =
Lexing.from_string typ
|> Parse.core_type
|> Madcast.split_arrow
in
let cast = Madcast.find_caster itype otype in
Format.printf "%a@." Pprintast.expression cast
with
| Madcast.NoCastFound -> Format.printf "no cast found!@."... |
3326dccb09121c9d2621150bac508f06dc32260285bb13c35f3b5d46d46620a3 | flora-pm/flora-server | Orphans.hs | # OPTIONS_GHC -Wno - orphans #
module Data.Password.Orphans where
import Control.DeepSeq
import Data.Password.Argon2
instance NFData (PasswordHash Argon2) where
rnf :: PasswordHash Argon2 -> ()
rnf a = seq a ()
| null | https://raw.githubusercontent.com/flora-pm/flora-server/c214c0b5d5db71a8330eb69326284be5a4d5e858/src/orphans/Data/Password/Orphans.hs | haskell | # OPTIONS_GHC -Wno - orphans #
module Data.Password.Orphans where
import Control.DeepSeq
import Data.Password.Argon2
instance NFData (PasswordHash Argon2) where
rnf :: PasswordHash Argon2 -> ()
rnf a = seq a ()
| |
d509380c4dfbc50af07734111b293a698ab62d88c4463a53c662f92428662397 | huangjs/cl | fnwrap-tests.lisp | (defpackage #:fnwrap-tests
(:use #:common-lisp #:lisp-unit #:fnwrap)
)
(in-package #:fnwrap-tests)
;;; Tests to make sure wrapping produces the
;;; correct behavior
(define-test fnwrap-effects
(let ((fn-name (gensym)))
(setf (symbol-function fn-name)
(lambda (x) (* x x)))
(assert-equal 9 (funcal... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/other-code/cs325/www.cs.northwestern.edu/academics/courses/325/programs/fnwrap-tests.lisp | lisp | Tests to make sure wrapping produces the
correct behavior
wrapper replaces old code
wrapper modifies return value of old code
wrapper tests arguments
unwrap restores original code
Tests to make sure wrapping, unwrapping,
and redefining interact correctly
After wrapping, the function should be changed
After un... | (defpackage #:fnwrap-tests
(:use #:common-lisp #:lisp-unit #:fnwrap)
)
(in-package #:fnwrap-tests)
(define-test fnwrap-effects
(let ((fn-name (gensym)))
(setf (symbol-function fn-name)
(lambda (x) (* x x)))
(assert-equal 9 (funcall fn-name 3))
(set-wrapper fn-name (lambda (fn x) (+ x x)... |
0f0f006cbc727e58389fd55618bd7ff49d3b48959aa9e24dc57edf34d57581d5 | arttuka/reagent-material-ui | stack.cljs | (ns reagent-mui.material.stack
"Imports @mui/material/Stack as a Reagent component.
Original documentation is at -ui/api/stack/ ."
(:require [reagent.core :as r]
["@mui/material/Stack" :as MuiStack]))
(def stack (r/adapt-react-class (.-default MuiStack)))
| null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/stack.cljs | clojure | (ns reagent-mui.material.stack
"Imports @mui/material/Stack as a Reagent component.
Original documentation is at -ui/api/stack/ ."
(:require [reagent.core :as r]
["@mui/material/Stack" :as MuiStack]))
(def stack (r/adapt-react-class (.-default MuiStack)))
| |
c3b64e52fbbe5d84869c42b3f11b0615bb8e0caec3b3f62d638ed4ee20b11430 | nyu-acsys/drift | a-copy-print.ml | (*
USED: PLDI2011 as a-cppr
USED: PEPM2013 as a-cppr
*)
let make_array n i = assert (0 <= i && i < n); 0
let update (i:int) (n:int) des x : int -> int =
des i;
let a j = if i=j then x else des j in a
let print_int (n:int) = ()
let f (m:int) src des =
let rec bcopy (m:int) src des i =
if i >= m then
des... | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/r_type/array/a-copy-print.ml | ocaml |
USED: PLDI2011 as a-cppr
USED: PEPM2013 as a-cppr
|
let make_array n i = assert (0 <= i && i < n); 0
let update (i:int) (n:int) des x : int -> int =
des i;
let a j = if i=j then x else des j in a
let print_int (n:int) = ()
let f (m:int) src des =
let rec bcopy (m:int) src des i =
if i >= m then
des
else
let des = update i m des (src i) in
... |
68d2dd99b9deef22bd63bb69198052c75158b86fc74204d757ed499dd4988437 | marcoheisig/cl-mpi | package.lisp | (defpackage :cl-mpi-extensions
(:nicknames :mpi-extensions)
(:use :cl :cl-mpi :static-vectors :alexandria)
(:export
#:mpi-send-anything
#:mpi-recv-anything
#:mpi-waitall-anything
#:mpi-isend-anything
#:mpi-irecv-anything
#:mpi-broadcast-anything))
| null | https://raw.githubusercontent.com/marcoheisig/cl-mpi/ba92be06ec1dca74d0ca5256aa387d8a28c8ad86/extensions/package.lisp | lisp | (defpackage :cl-mpi-extensions
(:nicknames :mpi-extensions)
(:use :cl :cl-mpi :static-vectors :alexandria)
(:export
#:mpi-send-anything
#:mpi-recv-anything
#:mpi-waitall-anything
#:mpi-isend-anything
#:mpi-irecv-anything
#:mpi-broadcast-anything))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.