_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 |
|---|---|---|---|---|---|---|---|---|
69507bec4a62ee63ccd6365081f34bcefaf816a42f423d08ef5b7e424dd7d70f | GoNZooo/gotyno-hs | Compilation.hs | {-# LANGUAGE BangPatterns #-}
module Compilation where
import qualified CodeGeneration.FSharp as FSharp
import qualified CodeGeneration.Haskell as Haskell
import qualified CodeGeneration.Kotlin as Kotlin
import qualified CodeGeneration.Python as Python
import qualified CodeGeneration.TypeScript as TypeScript
import C... | null | https://raw.githubusercontent.com/GoNZooo/gotyno-hs/83c2da62dcbf683a2e3ccbd1be358d5f8a13489b/src/Compilation.hs | haskell | # LANGUAGE BangPatterns # |
module Compilation where
import qualified CodeGeneration.FSharp as FSharp
import qualified CodeGeneration.Haskell as Haskell
import qualified CodeGeneration.Kotlin as Kotlin
import qualified CodeGeneration.Python as Python
import qualified CodeGeneration.TypeScript as TypeScript
import Control.Lens (_1, _2)
import qu... |
e94a839203daa281f66e64f0d6dbe4d5760fdd20aea47f68e5279f897264b6c7 | favonia/ocaml-objdump | Objdump.ml | let pp_double fmt = Format.fprintf fmt "%h"
let pp_sep fmt () = Format.fprintf fmt ",@,"
let pp_list ?(start_with_sep=false) pp fmt l =
if start_with_sep
then List.iter (fun x -> pp_sep fmt (); pp fmt x) l
else Format.pp_print_list ~pp_sep pp fmt l
let pp_rawfield fmt = Format.fprintf fmt "<%#nx>"
let rec spe... | null | https://raw.githubusercontent.com/favonia/ocaml-objdump/dde88b90e34b76b8ba45d5c09d412a9873f38b32/Objdump.ml | ocaml | this is safe because [pp_closure] will not recuresely call [pp] on opaque fields. | let pp_double fmt = Format.fprintf fmt "%h"
let pp_sep fmt () = Format.fprintf fmt ",@,"
let pp_list ?(start_with_sep=false) pp fmt l =
if start_with_sep
then List.iter (fun x -> pp_sep fmt (); pp fmt x) l
else Format.pp_print_list ~pp_sep pp fmt l
let pp_rawfield fmt = Format.fprintf fmt "<%#nx>"
let rec spe... |
bd6d9397309e9416439a7eefc967f42ed9d0ad62ed5bb04eae90d282f01d18dd | tezos/tezos-mirror | environment_V9.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 Nomadic Labs . < >
Copyright ( c ) 2018... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/448daee0f4ae76893ae524536e428aa0e22f1d60/src/lib_protocol_environment/environment_V9.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 Nomadic Labs . < >
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2020 Metastate AG < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit perso... |
0448e165591578f8259b5439892a5a6bf42bb70eedbafc52608c91a0248bfac2 | blindglobe/lisp-matrix | templates.lisp | ;;;; templates.lisp
Author : mfh
Created : 15 Oct 2006
Last modified : 19 Oct 2006
;;;;
A templated defclass mechanism somewhat like templates in C++ .
;;;; Needs: mangle.lisp
;;;;
;;;; BUGS: Doesn't play nice with the class system yet. There are
;;;; some tricky problems to solve with the macrology. I think... | null | https://raw.githubusercontent.com/blindglobe/lisp-matrix/f9c88dae132baf52884dd54612581d1331b82b40/src/experimental/templates.lisp | lisp | templates.lisp
Needs: mangle.lisp
BUGS: Doesn't play nice with the class system yet. There are
some tricky problems to solve with the macrology. I think the
with access to the original package variable from which the
macro was called. It could be a problem if the macro is called
in a different package fro... | Author : mfh
Created : 15 Oct 2006
Last modified : 19 Oct 2006
A templated defclass mechanism somewhat like templates in C++ .
DEFMETHOD INSTANTIATE created by the macro needs to be a closure
UNTESTED !
(defpackage :templates
(:use :common-lisp :mangle)
(:export :register-template-type
:template-ty... |
16a023549e295f06d4eb735acc1198279ae17f33aeffdc812a251e92f29c2d9b | gonzojive/sbcl | early-setf.lisp | SETF and friends ( except for stuff defined with COLLECT , which
;;;; comes later)
;;;;
Note : The expansions for SETF and friends sometimes create
;;;; needless LET-bindings of argument values. The compiler will
remove most of these spurious bindings , so SETF does n't worry too
;;;; much about creating them.
... | null | https://raw.githubusercontent.com/gonzojive/sbcl/3210d8ed721541d5bba85cbf51831238990e33f1/src/code/early-setf.lisp | lisp | comes later)
needless LET-bindings of argument values. The compiler will
much about creating them.
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
The inverse for a generalized-variable r... | SETF and friends ( except for stuff defined with COLLECT , which
Note : The expansions for SETF and friends sometimes create
remove most of these spurious bindings , so SETF does n't worry too
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system ,... |
76e2ba99a697cecd7e05fd0bedf45f8df4b0aeec16210e1dad22a5247cd61d4e | haskell-works/hw-xml | Show.hs | module App.Show
( tshow
) where
import Data.Text (Text)
import qualified Data.Text as T
tshow :: Show a => a -> Text
tshow = T.pack . show
| null | https://raw.githubusercontent.com/haskell-works/hw-xml/e30a4cd8e6dc7451263a3d45c1ae28b3f35d0079/app/App/Show.hs | haskell | module App.Show
( tshow
) where
import Data.Text (Text)
import qualified Data.Text as T
tshow :: Show a => a -> Text
tshow = T.pack . show
| |
982dbcc0da92cdea33249f1e1b87eef8e02956de032f175cc517979e91ef6cf2 | qrilka/xlsx | ContentTypes.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE DeriveGeneric #
module Codec.Xlsx.Types.Internal.ContentTypes where
import Control.Arrow
import Data.Foldable (asum)
import Data.Map (Map)
import qualified Data.Map as M
import Data.Text (Text)
import qualified Data.Text as T
import GHC.Gene... | null | https://raw.githubusercontent.com/qrilka/xlsx/397c3c9db965419a2d2d72470ba68f478748c573/src/Codec/Xlsx/Types/Internal/ContentTypes.hs | haskell | # LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
Parsing
------------------------------------------------------------------------------
| Add package relationship namespace to name | # LANGUAGE RecordWildCards #
# LANGUAGE DeriveGeneric #
module Codec.Xlsx.Types.Internal.ContentTypes where
import Control.Arrow
import Data.Foldable (asum)
import Data.Map (Map)
import qualified Data.Map as M
import Data.Text (Text)
import qualified Data.Text as T
import GHC.Generics (Generic)
import System.FilePa... |
5d722f793861d85a8697671371074e48bffb0685d2d297f3016271895b0a67b0 | dvanhorn/oaam | graph.rkt | #lang racket
(require racket/stxparam racket/trace)
(provide graph-file dump-dot add-edge! generate-graph?
ev-state! co-after-var-state! reset-kind! state-kind)
for destination for * .dot files
(define graph-file (make-parameter #f))
(define state-kind #f) (define (reset-kind!) (set! state-kind #f))
(define ... | null | https://raw.githubusercontent.com/dvanhorn/oaam/79bc68ecb79fef45474a948deec1de90d255f307/code/graph.rkt | racket | The given graph will be from states to sets of states.
Rename states with symbols for node names. | #lang racket
(require racket/stxparam racket/trace)
(provide graph-file dump-dot add-edge! generate-graph?
ev-state! co-after-var-state! reset-kind! state-kind)
for destination for * .dot files
(define graph-file (make-parameter #f))
(define state-kind #f) (define (reset-kind!) (set! state-kind #f))
(define ... |
0e24a8dc30482d6b7d9e663046084607e932f8d7ecf521e910e0a2c6c65e8343 | auser/alice | mochiweb_multipart.erl | @author < >
2007 Mochi Media , Inc.
@doc Utilities for parsing multipart / form - data .
-module(mochiweb_multipart).
-author('').
-export([parse_form/1, parse_form/2]).
-export([parse_multipart_request/2]).
-export([test/0]).
-define(CHUNKSIZE, 4096).
-record(mp, {state, boundary, length, buffer, callba... | null | https://raw.githubusercontent.com/auser/alice/e0f867071ede99f451d09053608bd6719c72d1c9/deps/mochiweb/src/mochiweb_multipart.erl | erlang | TODO: DOCUMENT THIS MODULE.
TODO: Support chunked?
Assume headers must be less than ?CHUNKSIZE
Underflow
False positive
Underflow | @author < >
2007 Mochi Media , Inc.
@doc Utilities for parsing multipart / form - data .
-module(mochiweb_multipart).
-author('').
-export([parse_form/1, parse_form/2]).
-export([parse_multipart_request/2]).
-export([test/0]).
-define(CHUNKSIZE, 4096).
-record(mp, {state, boundary, length, buffer, callba... |
178193317a7174fc0b770fb7087c757862137e549438b7a7a31a18c882beab6e | OCamlPro/ezjs | ezjs_canvas.ml | module Js = Js_of_ocaml.Js
module Dom_html = Js_of_ocaml.Dom_html
type repetition =
| Repeat
| RepeatX
| RepeatY
| NoRepeat
type style =
| Color of string
| Gradient of Dom_html.canvasGradient Js.t
| Pattern of Dom_html.canvasPattern Js.t
type image =
| Image of Dom_html.imageElement Js.t
| Canvas ... | null | https://raw.githubusercontent.com/OCamlPro/ezjs/d412d0840355e510ce46a28dac29eca22b156b8f/libs/utils/ezjs_canvas.ml | ocaml | todo: calculate position
Careful : must have been loaded by the browser | module Js = Js_of_ocaml.Js
module Dom_html = Js_of_ocaml.Dom_html
type repetition =
| Repeat
| RepeatX
| RepeatY
| NoRepeat
type style =
| Color of string
| Gradient of Dom_html.canvasGradient Js.t
| Pattern of Dom_html.canvasPattern Js.t
type image =
| Image of Dom_html.imageElement Js.t
| Canvas ... |
58cd6c94dd0d2d0f7d9734564091d2773cf796eed4fb60a65d16bdf2a704eb39 | haskelling/aoc2020 | 18a.hs | import AOC
expr = buildExpressionParser table term
term = paren <|> integer
paren = char '(' *> expr <* char ')'
table = [[Infix (char '+' >> return (+)) AssocLeft, Infix (char '*' >> return (*)) AssocLeft]]
main = interact' $ sum . parselist expr . lines . filter (/=' ')
| null | https://raw.githubusercontent.com/haskelling/aoc2020/0f0e44ad16d3eda4add1f05684070dd161010d75/18a.hs | haskell | import AOC
expr = buildExpressionParser table term
term = paren <|> integer
paren = char '(' *> expr <* char ')'
table = [[Infix (char '+' >> return (+)) AssocLeft, Infix (char '*' >> return (*)) AssocLeft]]
main = interact' $ sum . parselist expr . lines . filter (/=' ')
| |
3fcdfa720dcfc53ba39ff561ab24f1634df135dc49d354bd26a91af52bd1bbd7 | Yuras/pdf-toolbox | Pdf.hs | {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
module Pdf.Document.Pdf
(
Pdf,
withPdfFile,
fromFile,
fromHandle,
fromBytes,
document,
lookupObject,
streamContent,
rawStreamContent,
deref,
isEncrypted,
setUserPassword,
defaultUserPassword,
EncryptedError (..),
enabl... | null | https://raw.githubusercontent.com/Yuras/pdf-toolbox/f1d20479fe6782bc293468ac05186e658216388b/document/lib/Pdf/Document/Pdf.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
| Make Pdf with interface to pdf file
| Make Pdf with seekable handle
| Get PDF document
| Find object by it's reference
| Cache object for future lookups
| Don't cache object for future lookups
| Get stream content, decoded and decrypted
| Get str... |
module Pdf.Document.Pdf
(
Pdf,
withPdfFile,
fromFile,
fromHandle,
fromBytes,
document,
lookupObject,
streamContent,
rawStreamContent,
deref,
isEncrypted,
setUserPassword,
defaultUserPassword,
EncryptedError (..),
enableCache,
disableCache,
)
where
import Pdf.Core.Object
import Pdf.Core... |
eefb345b4db00f828bf7aadfba7652bec008a934e8bd54ce474f42c13da7a6f6 | mirage/orm | sql_cache.ml |
* Copyright ( c ) 2009 - 2010
* < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " A... | null | https://raw.githubusercontent.com/mirage/orm/24c2e0e3157853b2328d09feacdbe637e34d354c/lib/sql_cache.ml | ocaml | custom function needs to be registred for each connection
trigger needs to be registred once per pair (database * type)
'a = 'b Weaktbl.t |
* Copyright ( c ) 2009 - 2010
* < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " A... |
d5613ffdf0e29ef3af31dc7324d5cdef96a14cc98494de4cb45443eccc1f362d | GaloisInc/saw-script | Logo.hs | |
Module : . REPL.Logo
Description :
License : : huffman
Stability : provisional
Module : SAWScript.REPL.Logo
Description :
License : BSD3
Maintainer : huffman
Stability : provisional
-}
module SAWScript.REPL.Logo where
import SAWScript.Version (versionText)
import System.Co... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/46249dbc7bae5f48623a709b1df1cc1ea002d4c5/saw/SAWScript/REPL/Logo.hs | haskell | |
Module : . REPL.Logo
Description :
License : : huffman
Stability : provisional
Module : SAWScript.REPL.Logo
Description :
License : BSD3
Maintainer : huffman
Stability : provisional
-}
module SAWScript.REPL.Logo where
import SAWScript.Version (versionText)
import System.Co... | |
d92294e8624b7a6c0d37a649a2d5c6dcdc359856c47a26ac6d65c380e20ab0f9 | Perry961002/SICP | exa4.4.4-select-system.scm | (define input-prompt ";;; Query input:")
(define output-prompt ";;; Query output:")
;如果表达式是规则或者断言,就把有关信息加入数据库
否则就认为是查询 , 将这个查询送给求值器qeval , 同时还有一个只包含空框架的框架流
求值结果是一个框架流 , 驱动循环使用这些框架产生一个新流 , 包含了所有通过将原始查询里的变量用上述框架流提供的值实例化后得到的副本 , 供终端打印
(define (query-driver-loop)
(prompt-for-input input-prompt)
(let ((q (query-sy... | null | https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap4/example/exa4.4.4-select-system.scm | scheme | 如果表达式是规则或者断言,就把有关信息加入数据库
实例化一个表达式
这些值本身也可能需要实例化
qeval是查询的基本求值器
simple-query处理简单查询, 以简单查询和框架流作为实际参数, 通过将查询与数据库做匹配的方式扩充其中的每个框架
组合两个流
做模式与数据库里所有断言的匹配
处理and
处理or
处理not
过滤器
execute将谓词应用与对应的参数
特殊形式always-true是为了描述一种总能满足的查询
find-assertions以一个模式和一个框架作为输入,返回一个框架流,其中每个框架都是由某个给定框架,经过对给定模式与数据库的匹配扩充得到的
check-an-assertion以一个... | (define input-prompt ";;; Query input:")
(define output-prompt ";;; Query output:")
否则就认为是查询 , 将这个查询送给求值器qeval , 同时还有一个只包含空框架的框架流
求值结果是一个框架流 , 驱动循环使用这些框架产生一个新流 , 包含了所有通过将原始查询里的变量用上述框架流提供的值实例化后得到的副本 , 供终端打印
(define (query-driver-loop)
(prompt-for-input input-prompt)
(let ((q (query-syntax-process (read))))
... |
8b4d5de673837f5127d60dfb967a635623b69fe1a5335081a96e56324481c12a | returntocorp/semgrep | Core_jsonnet.ml |
*
* Copyright ( C ) 2022 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICENSE .
... | null | https://raw.githubusercontent.com/returntocorp/semgrep/1fe267d6fcda7bc470520ebd892d9202b7333437/libs/ojsonnet/Core_jsonnet.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Tokens (leaves)
****************************************************************... |
*
* Copyright ( C ) 2022 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICENSE .
... |
02512d14172429f30e45c56a25a094fd0d083da00d5783889a8aa559ac201dcc | FlowForwarding/lincx | linc_max_fast_actions_tests.erl | %%------------------------------------------------------------------------------
Copyright 2012 FlowForwarding.org
%%
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
%%... | null | https://raw.githubusercontent.com/FlowForwarding/lincx/7795923b51fa1e680511669f4a27404b2ed1f1dc/apps/linc_max/src/linc_max_fast_actions_tests.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, eithe... | Copyright 2012 FlowForwarding.org
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Erlang Solutions Ltd. < >
@author Cloudozer LLP . < >
2012 FlowForwarding.org
-module(linc_max_fast_actions_tests).
-inclu... |
f564cbc237e82b3b6a8d067ff3243578de7e1f2d2a28a4059f34eafc23be4edb | hadolint/hadolint | DL3010.hs | module Hadolint.Rule.DL3010 (rule) where
import Data.Foldable (toList)
import Data.Function ((&))
import Data.List.NonEmpty (NonEmpty)
import qualified Data.Set as Set
import qualified Data.Sequence as Seq
import qualified Data.Text as Text
import Hadolint.Rule
import qualified Hadolint.Shell as Shell
import Language.... | null | https://raw.githubusercontent.com/hadolint/hadolint/321ffc1e00b5e97ec6b516775dae32b616fccc33/src/Hadolint/Rule/DL3010.hs | haskell | module Hadolint.Rule.DL3010 (rule) where
import Data.Foldable (toList)
import Data.Function ((&))
import Data.List.NonEmpty (NonEmpty)
import qualified Data.Set as Set
import qualified Data.Sequence as Seq
import qualified Data.Text as Text
import Hadolint.Rule
import qualified Hadolint.Shell as Shell
import Language.... | |
4af63a50419c4c467284462a20efa12c45e5d4b1324bbfddf2d3f05b220030b1 | heroku/logplex | logplex_shard_replace_SUITE.erl | -module(logplex_shard_replace_SUITE).
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
all() ->
[replace_shard].
init_per_suite(Config) ->
set_os_vars(),
ok = logplex_app:a_start(logplex, temporary),
Config.
init_per_testcase(Case, Config) ->
Name = atom_to_binary(Case, latin1),
... | null | https://raw.githubusercontent.com/heroku/logplex/fc520c44cf4687726d5d51464d3264ddc6abb0ba/test/logplex_shard_replace_SUITE.erl | erlang | Replace the shard with itself
This will fetch them from the shard | -module(logplex_shard_replace_SUITE).
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
all() ->
[replace_shard].
init_per_suite(Config) ->
set_os_vars(),
ok = logplex_app:a_start(logplex, temporary),
Config.
init_per_testcase(Case, Config) ->
Name = atom_to_binary(Case, latin1),
... |
5f98c38bf7af617219be008345a2e8d2cc7e287c0852acf1e028316a433ff229 | christoff-buerger/racr | ast-specification.scm | ; This program and the accompanying materials are made available under the
terms of the MIT license ( X11 license ) which accompanies this distribution .
Author :
#!r6rs
(import (rnrs) (racr-meta core) (racr-meta testing))
(define spec)
(define (create-ast-scheme startsymbol)
(set! spec (create-specificati... | null | https://raw.githubusercontent.com/christoff-buerger/racr/ecb2a9b8bf3f333550728cf45b97607a8298532f/tests/ast-specification.scm | scheme | This program and the accompanying materials are made available under the
Test AST rule parser.
Undefined start symbol.
Undefined supertype.
Undefined symbol.
No unique context names for terminals.
No unique context names for non-terminals.
No unique context names for lists.
No unique context names because of i... | terms of the MIT license ( X11 license ) which accompanies this distribution .
Author :
#!r6rs
(import (rnrs) (racr-meta core) (racr-meta testing))
(define spec)
(define (create-ast-scheme startsymbol)
(set! spec (create-specification-2))
(specify-start-symbol-2 spec startsymbol)
(racr-specification-2-... |
bcf635fcfdb712e4cb65e534063a88fbf247e09681799ea562014385a58f2723 | ocaml-ppx/ppx_view | ex05_not.ml | open Migrate_parsetree.Ast_407
let print_desc : string -> Parsetree.expression -> unit = fun value expr ->
let open Viewast.Parseview in
match%view expr with
| Pexp_constant (Not (Pconst_integer _)) ->
Printf.printf "%S is not an integer\n" value
| Pexp_constant (Pconst_integer _) ->
Printf.printf "%S... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx_view/ffc7ecc3aa21af798a315ddd27538333e31080c5/example/ex05_not.ml | ocaml | open Migrate_parsetree.Ast_407
let print_desc : string -> Parsetree.expression -> unit = fun value expr ->
let open Viewast.Parseview in
match%view expr with
| Pexp_constant (Not (Pconst_integer _)) ->
Printf.printf "%S is not an integer\n" value
| Pexp_constant (Pconst_integer _) ->
Printf.printf "%S... | |
270433db7e344b321f59c9a2c29cbb32d31bcae68b743d698baf019282e324e6 | roman/Haskell-capataz | Lib.hs | # LANGUAGE BangPatterns #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE TypeSynonymInstances #-}
# OPTIONS_GHC -fno - warn - orphans #
module Lib where
import qua... | null | https://raw.githubusercontent.com/roman/Haskell-capataz/0952178a8afdc41e86f3d3ff22fbb731bd21519e/examples/capataz-repo-watcher/src/Lib.hs | haskell | # LANGUAGE TypeSynonymInstances #
------------------------------------------------------------------------------
| A combination of both file modification events and git repository
synchronization.
| Message triggered when a monitored file changes
| Message triggered when a sync request is made
-------------------... | # LANGUAGE BangPatterns #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE OverloadedStrings #
# OPTIONS_GHC -fno - warn - orphans #
module Lib where
import qualified Prelude
import RIO
imp... |
7295ddc295024dff00be123bc2f10fa3c00909a1041dc15dbf656f0df64d784d | haskell-servant/servant | Inflections.hs | {-# LANGUAGE OverloadedStrings #-}
module Servant.Foreign.Inflections
( concatCase
, snakeCase
, camelCase
-- lenses
, concatCaseL
, snakeCaseL
, camelCaseL
) where
import Control.Lens hiding
(cons)
import qualified Data.Char as C
import ... | null | https://raw.githubusercontent.com/haskell-servant/servant/0b706aa6d171c59e010f4ea585c8c59529a8f7df/servant-foreign/src/Servant/Foreign/Inflections.hs | haskell | # LANGUAGE OverloadedStrings #
lenses
| Use the snake_case convention.
Each part is separated by a single underscore character.
@[ "get", "documents", "by", "id" ] → "get_documents_by_id"@
| Use the camelCase convention.
@[ "get", "documents", "by", "id" ] → "getDocumentsById"@ | module Servant.Foreign.Inflections
( concatCase
, snakeCase
, camelCase
, concatCaseL
, snakeCaseL
, camelCaseL
) where
import Control.Lens hiding
(cons)
import qualified Data.Char as C
import Data.Text hiding
... |
2df909f8ed47d80305e99cebbfebc4581073b3146cc6626c3828b078a6c8b947 | district0x/cljs-ipfs-http-client | core.cljs | (ns cljs-ipfs-api.core)
(def ^:dynamic *ipfs-instance* (atom nil))
(defn get-instance [] @*ipfs-instance*)
(defn init-ipfs
([] (init-ipfs {}))
([params]
(let [instance (merge {:host ":5001" :endpoint "/api/v0"} params)]
(reset! *ipfs-instance* instance)
instance)))
| null | https://raw.githubusercontent.com/district0x/cljs-ipfs-http-client/703f5cdece25d987d5cac201181d3f5305fe584f/src/cljs_ipfs_api/core.cljs | clojure | (ns cljs-ipfs-api.core)
(def ^:dynamic *ipfs-instance* (atom nil))
(defn get-instance [] @*ipfs-instance*)
(defn init-ipfs
([] (init-ipfs {}))
([params]
(let [instance (merge {:host ":5001" :endpoint "/api/v0"} params)]
(reset! *ipfs-instance* instance)
instance)))
| |
e7c7318b1b0d48f51968b607059c4a0c947762abce68a8b9b2d66658ccef680f | OCamlPro/ocp-build | autoconfFS.ml | (**************************************************************************)
(* *)
(* Typerex Tools *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-autoconf/autoconfFS.ml | ocaml | ************************************************************************
Typerex Tools
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU General Public License version 3 described in the file
open OcpCompat
type oc = string * OcpCompat.Buffer.t
let post_commit_hooks = ref []
let add_post_commit_hook (f : unit -> string list) =
post_commit_hooks := f :: !p... |
a247ff2fc20b3d00b6cd72114cd7afba5db698f75098349044dc0a5073ee56ed | mfikes/fifth-postulate | ns450.cljs | (ns fifth-postulate.ns450)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns450.cljs | clojure | (ns fifth-postulate.ns450)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
50b8c9ed28998353b66300a5d9e6724bbcd3350b15f2bc2ea772f7445ba9b1d2 | tezos-commons/baseDAO | Run.hs | SPDX - FileCopyrightText : 2021 Tezos Commons
SPDX - License - Identifier : LicenseRef - MIT - TC
module SMT.Common.Run
( runBaseDaoSMT
) where
import Universum hiding (drop, swap)
import Data.Map qualified as Map
import Data.Typeable (eqT, (:~:)(..))
import Fmt (Buildable, build, pretty, unlinesF)
import He... | null | https://raw.githubusercontent.com/tezos-commons/baseDAO/01eedff3e222945815816fd5e2a1623040a75388/haskell/test/SMT/Common/Run.hs | haskell | | The functions run the generator to get a list of entrypoints
- Setup initial level (generated by the generator)
- Originate auxiliary contracts
- Originate basedao contract
Run the generator to get a function that will generate a list of entrypoint calls.
Generate a list of entrypoint calls
as well as in... | SPDX - FileCopyrightText : 2021 Tezos Commons
SPDX - License - Identifier : LicenseRef - MIT - TC
module SMT.Common.Run
( runBaseDaoSMT
) where
import Universum hiding (drop, swap)
import Data.Map qualified as Map
import Data.Typeable (eqT, (:~:)(..))
import Fmt (Buildable, build, pretty, unlinesF)
import He... |
9911d32ded882266ef507c425ddac775c1baff0717fc1f3ffa1ce445e855bc6e | liquidz/antq | function_test.clj | (ns antq.util.function-test
(:require
[antq.util.function :as sut]
[clojure.test :as t]))
(defn- test-fn*
[m counter-atom]
(assoc m :count (swap! counter-atom inc)))
(t/deftest memoize-by-test
(let [test-fn (sut/memoize-by test-fn* :name)
counter (atom 0)]
(t/testing "Should be counted becau... | null | https://raw.githubusercontent.com/liquidz/antq/ca8472b28702f5e568492001bc476fb09e5b2e6b/test/antq/util/function_test.clj | clojure | (ns antq.util.function-test
(:require
[antq.util.function :as sut]
[clojure.test :as t]))
(defn- test-fn*
[m counter-atom]
(assoc m :count (swap! counter-atom inc)))
(t/deftest memoize-by-test
(let [test-fn (sut/memoize-by test-fn* :name)
counter (atom 0)]
(t/testing "Should be counted becau... | |
24e7c0b3fe309d08b9859a9b22c3beff9306845b6b5c4526def71d7ba772a439 | luminus-framework/luminus-template | datomic.clj | (ns <<project-ns>>.db.core
(:require
[datomic.api :as d]
[io.rkn.conformity :as c]
[mount.core :refer [defstate]]
[<<project-ns>>.config :refer [env]]))
(defstate conn
:start (do (-> env :database-url d/create-database) (-> env :database-url d/connect))
:stop (-> conn .release))
(defn install-sc... | null | https://raw.githubusercontent.com/luminus-framework/luminus-template/3278aa727cef0a173ed3ca722dfd6afa6b4bbc8f/resources/leiningen/new/luminus/db/src/datomic.clj | clojure | find Specifications using ':find ?a .' will return single scalar | (ns <<project-ns>>.db.core
(:require
[datomic.api :as d]
[io.rkn.conformity :as c]
[mount.core :refer [defstate]]
[<<project-ns>>.config :refer [env]]))
(defstate conn
:start (do (-> env :database-url d/create-database) (-> env :database-url d/connect))
:stop (-> conn .release))
(defn install-sc... |
c8146d414506a3f74925849b52b2fc6868a858a6d00bf866c802adc2359ffc9b | ajhc/ajhc | Binary.hs | module Name.Binary() where
import Data.Monoid
import Data.Maybe
import Data.Binary
import Name.Id
import Name.Name
instance Binary IdSet where
put ids = do
put [ id | id <- idSetToList ids, isNothing (fromId id)]
put [ n | id <- idSetToList ids, n <- fromId id]
get = do
(idl:: [Id]) ... | null | https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/src/Name/Binary.hs | haskell | module Name.Binary() where
import Data.Monoid
import Data.Maybe
import Data.Binary
import Name.Id
import Name.Name
instance Binary IdSet where
put ids = do
put [ id | id <- idSetToList ids, isNothing (fromId id)]
put [ n | id <- idSetToList ids, n <- fromId id]
get = do
(idl:: [Id]) ... | |
ed9785d80dea02ec448e6938cb3f5c2dffc82bb20295a59a24c237b9d1c3a808 | wertercatt/mrifk | Mrifk_print.hs |
Mrifk , a decompiler for Glulx story files .
Copyright 2004 .
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any late... | null | https://raw.githubusercontent.com/wertercatt/mrifk/48687e5b6881cf41d4828cca2ec5dec1c5f4cad3/Mrifk_print.hs | haskell | ------------
FIXME: quote
ppExpr prec foo = "{{{" ++ show foo ++ "}}}"
------------
------------
FIXME: negatives?
------------
-------------
FIXME: check meta
------------
earlier in the list takes precedence
earlier in the list takes precedence
|
Mrifk , a decompiler for Glulx story files .
Copyright 2004 .
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any late... |
893a6547822cc982149f1186a672890c0882ab7bf0c45c4563cbca7aa3a1d6c1 | kelamg/HtDP2e-workthrough | ex521.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex521) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Accumulators/ex521.rkt | racket | about the language level of this file in a form that our tools can easily process.
(make-bank N N)
interp. miss is the number of missionaries and
cann is the number of cannibals
- 'left
- 'right
checks whether all people are on the right river bank
renders an image of the given state | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex521) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/image)
(define RADIUS 10)
(define CANN... |
85d0debc9b810ca641879af39da76394fbf49855d3ea58db57289439d95d6cb1 | nitrogen/nprocreg | nprocreg_sup.erl | Nitrogen Web Framework for Erlang
Copyright ( c ) 2008 - 2010
See MIT - LICENSE for licensing information .
-module(nprocreg_sup).
-behaviour(supervisor).
-export([start_link/1, init/1]).
start_link(Args) ->
supervisor:start_link({local, ?MODULE}, ?MODULE, Args).
init(_) ->
NProcReg = {nprocreg, {npr... | null | https://raw.githubusercontent.com/nitrogen/nprocreg/7b7ae7b8d12c728158a7649defffc006670132ac/src/nprocreg_sup.erl | erlang | Nitrogen Web Framework for Erlang
Copyright ( c ) 2008 - 2010
See MIT - LICENSE for licensing information .
-module(nprocreg_sup).
-behaviour(supervisor).
-export([start_link/1, init/1]).
start_link(Args) ->
supervisor:start_link({local, ?MODULE}, ?MODULE, Args).
init(_) ->
NProcReg = {nprocreg, {npr... | |
2cf524b4f670008ce5ab070b0636bb5e0680704ffdd1c1f6c6ffb63a6654b807 | TyOverby/mono | nonempty_list.mli | open Core
(** A ['a t] represents a non-empty list, as evidenced by the fact that there is no [[]]
variant. The sexp representation is as a regular list (i.e., the same as the
[Stable.V3] module below).
*)
type 'a t = ( :: ) of 'a * 'a list
[@@deriving compare, equal, sexp, sexp_grammar, hash, quickcheck, type... | null | https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-core_kernel/nonempty_list/src/nonempty_list.mli | ocaml | * A ['a t] represents a non-empty list, as evidenced by the fact that there is no [[]]
variant. The sexp representation is as a regular list (i.e., the same as the
[Stable.V3] module below).
* [min_elt'] and [max_elt'] differ from [min_elt] and [max_elt] (included in
[Container.S1]) in that they don't retu... | open Core
type 'a t = ( :: ) of 'a * 'a list
[@@deriving compare, equal, sexp, sexp_grammar, hash, quickcheck, typerep]
include Comparator.Derived with type 'a t := 'a t
include Container.S1 with type 'a t := 'a t
include Invariant.S1 with type 'a t := 'a t
include Monad.S with type 'a t := 'a t
val create : 'a -> '... |
a113cea7af28d4672232b4fda84d1c272bbecc68e3647347d32ccbe9959acdca | originrose/cortex | tensor_test.clj | (ns cortex.compute.cpu.tensor-test
(:require [cortex.verify.tensor :as verify-tensor]
[cortex.compute.verify.utils
:refer [def-double-float-test
def-all-dtype-test
*datatype*
def-int-long-test
test-wrapper]]
... | null | https://raw.githubusercontent.com/originrose/cortex/94b1430538e6187f3dfd1697c36ff2c62b475901/test/clj/cortex/compute/cpu/tensor_test.clj | clojure | Note that this is not a float-double test. | (ns cortex.compute.cpu.tensor-test
(:require [cortex.verify.tensor :as verify-tensor]
[cortex.compute.verify.utils
:refer [def-double-float-test
def-all-dtype-test
*datatype*
def-int-long-test
test-wrapper]]
... |
85d34c75d65989a76a465e58897ae50a11f1bf9becadcdef97786a42303be5c5 | lispnik/cl-http | utils.lisp | -*- Syntax : Ansi - Common - Lisp ; Base : 10 ; Mode : lisp ; Package : ( w4 : use ( future - common - lisp www - utils url http ) ) ; -*-
Copyright , 1995 - 96 .
;;; All rights reserved.
;;;-------------------------------------------------------------------
;;;
MACROS AND UTILITIES
;;;
(in-package :w4)
... | null | https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/w4/utils.lisp | lisp | Base : 10 ; Mode : lisp ; Package : ( w4 : use ( future - common - lisp www - utils url http ) ) ; -*-
All rights reserved.
-------------------------------------------------------------------
|
Copyright , 1995 - 96 .
MACROS AND UTILITIES
(in-package :w4)
(define debug-walker (&optional (on-p (not *debug-walker*)))
"Toggles walker debugging according to ON-P."
(setq *debug-walker* (not (null on-p))))
(define %constraint-class-for-type (type)
(or (cdr (assoc type *constraint-class-alist*))... |
a35ed614fd09d289f71bc02093f55d4eb03901abd096d2db19e6f4fe2c6e68d7 | MaskRay/OJHaskell | sort.hs | {-# LANGUAGE BangPatterns #-}
import Control.Applicative
import Control.Monad
import Control.Monad.State
import Data.Char
import Data.Int
import Data.List
import Data.Maybe
import Data.Monoid
import qualified Data.ByteString.Char8 as B
data T = T [Int] !Int deriving Show
instance Monoid T where
mempty = T [] 0
T ... | null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Croatian%20Open%20Competition%20in%20Informatics/2011-2012/contest%20%231/sort.hs | haskell | # LANGUAGE BangPatterns # | import Control.Applicative
import Control.Monad
import Control.Monad.State
import Data.Char
import Data.Int
import Data.List
import Data.Maybe
import Data.Monoid
import qualified Data.ByteString.Char8 as B
data T = T [Int] !Int deriving Show
instance Monoid T where
mempty = T [] 0
T xs sl `mappend` T ys sr = T (x... |
4386684150f95605edafd05f0eaeaf2601d1430276ea6d1044c9e0c1c36f84a7 | ppaml-op3/insomnia | SelfSig.hs | | Selfified signatures .
-- A selfified signature is like a non-dependent record kind.
-- All dependencies among type components of an ordinary signature
-- become paths:
-- Self(p; {t:K1,a. K2})
= { t : Self(p ; K1 ) , Self(p ; / a ] ) }
module Insomnia.Typecheck.SelfSig where
import Insomnia.Identifier ... | null | https://raw.githubusercontent.com/ppaml-op3/insomnia/5fc6eb1d554e8853d2fc929a957c7edce9e8867d/src/Insomnia/Typecheck/SelfSig.hs | haskell | A selfified signature is like a non-dependent record kind.
All dependencies among type components of an ordinary signature
become paths:
Self(p; {t:K1,a. K2})
| A selfified signature. After selfification, all references to
declared types and values within the module are referenced
by their fully qualified nam... | | Selfified signatures .
= { t : Self(p ; K1 ) , Self(p ; / a ] ) }
module Insomnia.Typecheck.SelfSig where
import Insomnia.Identifier (Path)
import Insomnia.Types (Type, TypePath)
import Insomnia.Expr (QVar)
import Insomnia.ModuleType (TypeSigDecl, ModuleTypeNF)
data SelfSig =
UnitSelfSig
| ValueSelfS... |
12b24f724feb3e3f60a3aa97d449f88140068c15fe18d3f12d3e41243c0999fe | mochi/eswf | eswf_amf3.erl | @copyright 2008 Mochi Media , Inc.
@author < >
%%
%% @doc Simple AMF3 encoder. Does not provide a surjective mapping to
%% valid AMF3 encodings. Does not try to share object references.
%%
@reference See the < a
href=" / pub / labs / amf / amf3_spec_121207.pdf">AMF3
%% specification</a> for details on the AM... | null | https://raw.githubusercontent.com/mochi/eswf/51b60942cb34b8490aefe6f05e88852454681eee/src/eswf_amf3.erl | erlang |
@doc Simple AMF3 encoder. Does not provide a surjective mapping to
valid AMF3 encodings. Does not try to share object references.
specification</a> for details on the AMF3 format.
| int() | float() | amfstring()
| {bytes, binary()}
@doc Encode using AMF3.
The AMF3 format ca... | @copyright 2008 Mochi Media , Inc.
@author < >
@reference See the < a
href=" / pub / labs / amf / amf3_spec_121207.pdf">AMF3
-module(eswf_amf3).
-author("Matthew Dempsky <>").
-export([encode/1]).
-record(state, {strings = gb_trees:empty()}).
@spec encode(Object::amfterm ( ) ) - > iodata ( )
where (... |
5b70b61d083cf47136c7484413362391479bbffa95d4454c2273765235d8f577 | jarcane/clojurice | index.clj | ;;;; index.clj - app.index
;;; The main index page for the site
(ns app.index
(:require [hiccup.page :refer :all]
[system.repl :refer [system]]
[app.config :as config]))
(defn index
"Generates the main index.html for the site, given the system map."
[{:keys [config] :as sys}]
(let [tit... | null | https://raw.githubusercontent.com/jarcane/clojurice/8fd899a5bbad918902d306c6aa28e3724a6e0bbe/src/clj/app/index.clj | clojure | index.clj - app.index
The main index page for the site |
(ns app.index
(:require [hiccup.page :refer :all]
[system.repl :refer [system]]
[app.config :as config]))
(defn index
"Generates the main index.html for the site, given the system map."
[{:keys [config] :as sys}]
(let [title (:name config)]
(html5
[:head
[:title title]
... |
a0054d10999888a8a6a79ce0b32401223f2a67485ec02ee5d61de26b404e9a88 | huangjs/cl | mforma.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/mforma.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
user interact... |
(in-package :maxima)
(macsyma-module mforma macro)
A mini version of FORMAT for error messages , and other
Tuesday , 21 October 1980
This file is used at compile - time for macsyma system code in general ,
and also for MFORMT and MERROR .
Open - coding of MFORMAT is supported , as are run - time M... |
397af4c4942edbd7332ccf6526941eba036c32ebd45973ffea1707bd69aba405 | Kakadu/fp2022 | REPL.ml | Format.printf "REPL isn't implemented"
| null | https://raw.githubusercontent.com/Kakadu/fp2022/6831c4dc3a0f010e27cc2609aa415309bda7ff71/OCamlPrintfDenisov/REPL.ml | ocaml | Format.printf "REPL isn't implemented"
| |
9ee4ca246a9b48ae51a6e078b58df32578baa0daf63b85db77f82fe3d62ac407 | victornicolet/parsynt | VariableAnalysis.ml | open Utils
open Cil
open List
open VS
let un = VS.union
let empty = VS.empty
let uns = VS.unions
(** Variable classification *)
let is_simple v =
match v.vtype with
| TFloat _ | TInt _ | TEnum _ -> true
| _ -> false
let is_complex v =
match v.vtype with
| TComp _ -> true | _ -> false
let is_array v =
ma... | null | https://raw.githubusercontent.com/victornicolet/parsynt/d3f530923c0c75537b92c2930eb882921f38268c/src/cilfront/VariableAnalysis.ml | ocaml | * Variable classification
* Retrieve indexes
* Va_Write set
* Set of analyzable variables of b
* Host / Offset
* PlusPI and IndexPI are semantically equivalent | open Utils
open Cil
open List
open VS
let un = VS.union
let empty = VS.empty
let uns = VS.unions
let is_simple v =
match v.vtype with
| TFloat _ | TInt _ | TEnum _ -> true
| _ -> false
let is_complex v =
match v.vtype with
| TComp _ -> true | _ -> false
let is_array v =
match v.vtype with
| TArray _ -... |
376ad8eb576d36b3decc780cfcc4028874a034a498b3179a43eff1d17192892c | tezos/tezos-mirror | client_proto_args.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/6fa868fe6be543b5831e79f34dd48ca341d79eac/src/proto_alpha/lib_client/client_proto_args.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2019 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITH... |
7e7da85f59e5cf1d70d4d32c6656a51b33be568909b1110e68d2beea4485064f | lamdu/lamdu | Theme.hs | {-# OPTIONS -O0 #-}
# LANGUAGE TemplateHaskell , MultiParamTypeClasses , TypeFamilies #
-- | The themes/ config format
module Lamdu.Config.Theme
( Help(..)
, helpTextSize, helpTextColor, helpInputDocColor, helpBGColor, helpTint
, helpShownIconTint, helpSrcLocColor
, Eval(..), neighborsScaleFact... | null | https://raw.githubusercontent.com/lamdu/lamdu/bf308b6cf1372bc94a11f601f3e572e02838760d/src/Lamdu/Config/Theme.hs | haskell | # OPTIONS -O0 #
| The themes/ config format
as ratio of space character size | # LANGUAGE TemplateHaskell , MultiParamTypeClasses , TypeFamilies #
module Lamdu.Config.Theme
( Help(..)
, helpTextSize, helpTextColor, helpInputDocColor, helpBGColor, helpTint
, helpShownIconTint, helpSrcLocColor
, Eval(..), neighborsScaleFactor, neighborsPadding, staleResultTint
, ToolTip... |
c8b7973a151759e09f74af5dc695a0240431a670623a2711665b372bab91e2c8 | asmala/clj-simple-form | giddyup_test.clj | (ns clj-simple-form.giddyup-test
(:use [clj-simple-form.giddyup]
[clojure.test])
(:require [hiccup.form :as hiccup]))
(deftest test-with-form-scope
(testing "with-form-scope"
(with-form-scope :profile {} {}
(is (= hiccup/*group* ["profile"])))))
(deftest test-with-nested-form-scope
(testing ... | null | https://raw.githubusercontent.com/asmala/clj-simple-form/b1c566b1f0fe532639b15832b557f1608598a0a2/clj-simple-form-giddyup/test/clj_simple_form/giddyup_test.clj | clojure | (ns clj-simple-form.giddyup-test
(:use [clj-simple-form.giddyup]
[clojure.test])
(:require [hiccup.form :as hiccup]))
(deftest test-with-form-scope
(testing "with-form-scope"
(with-form-scope :profile {} {}
(is (= hiccup/*group* ["profile"])))))
(deftest test-with-nested-form-scope
(testing ... | |
8ac80635352b97142e656a7b58f566cefb54b1870bcff65c3e42818d048214fb | inhabitedtype/ocaml-aws | getOpsItem.mli | open Types
type input = GetOpsItemRequest.t
type output = GetOpsItemResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/getOpsItem.mli | ocaml | open Types
type input = GetOpsItemRequest.t
type output = GetOpsItemResponse.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
7acf9fb695e86946acb7df61d9595930158dd509a2d29576d978015f57897a2c | racket/xrepl | main.rkt | #lang at-exp racket/base
(module test racket/base
(displayln "run as program for tests"))
(require "xrepl.rkt" "wrapped-output.rkt" "known-module.rkt" tests/eli-tester)
(test do (test-wrapped-output)
do (test-known-module)
do (test-xrepl))
| null | https://raw.githubusercontent.com/racket/xrepl/334f40aa3c3cf8616eaf05349c4d3ec99501ced3/xrepl-test/tests/xrepl/main.rkt | racket | #lang at-exp racket/base
(module test racket/base
(displayln "run as program for tests"))
(require "xrepl.rkt" "wrapped-output.rkt" "known-module.rkt" tests/eli-tester)
(test do (test-wrapped-output)
do (test-known-module)
do (test-xrepl))
| |
8270015d89611e250b7f229e8c3b59a0b2b7f86a57d6fdf50912504a0c41c3d4 | input-output-hk/ouroboros-network | CallStack.hs | # LANGUAGE GeneralizedNewtypeDeriving #
-- | CallStack with a nicer 'Show' instance
--
-- Use of this module is intended to /replace/ import of @GHC.Stack@
module Ouroboros.Consensus.Util.CallStack (
prettyCallStack
-- * opaque
, PrettyCallStack
-- * Re-exports
, HasCallStack
) where
import ... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/c82309f403e99d916a76bb4d96d6812fb0a9db81/ouroboros-consensus/src/Ouroboros/Consensus/Util/CallStack.hs | haskell | | CallStack with a nicer 'Show' instance
Use of this module is intended to /replace/ import of @GHC.Stack@
* opaque
* Re-exports
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-------------------------------... | # LANGUAGE GeneralizedNewtypeDeriving #
module Ouroboros.Consensus.Util.CallStack (
prettyCallStack
, PrettyCallStack
, HasCallStack
) where
import GHC.Stack (CallStack, HasCallStack)
import qualified GHC.Stack as GHC
import NoThunks.Class (NoThunks)
Auxiliary : CallStack with differ... |
e042013518b3a27e15fb1fe08c5deb15a6f8d79f184a1a48025654c5c4d09848 | SimSaladin/rnfssp | Posts.hs | module Handler.Posts
( getPostNewestR
, getPostsViewR, postPostsViewR
, getPostsEditR, postPostsEditR
, getPostsAddR, postPostsAddR
, getPostsTagR
, activePosts
) where
import Import
import qualified Data.List as L
import qualified Data.Conduit as C
import qualifie... | null | https://raw.githubusercontent.com/SimSaladin/rnfssp/d04993524d13ed5d993e4b85e604c824ef7283ba/Handler/Posts.hs | haskell | * Posts
** Handlers
| Home shows the newest post.
| View a post specified in the url.
| Post action in a view is for posting comments.
commentCounts <- liftHandlerT . runDB $ do
mapM (\Entity pid _ -> count [PostCommentPost ==. pid]) posts
** Widgets
| Render a preview of the most recent post.
** ... | module Handler.Posts
( getPostNewestR
, getPostsViewR, postPostsViewR
, getPostsEditR, postPostsEditR
, getPostsAddR, postPostsAddR
, getPostsTagR
, activePosts
) where
import Import
import qualified Data.List as L
import qualified Data.Conduit as C
import qualifie... |
7aa962d3e82c2b2c451b174e3c2fa3dc3c3b5b78f13c1a41c602c74757a8a94a | nikodemus/SBCL | compiler.impure-cload.lisp | (eval-when (:compile-toplevel :load-toplevel :execute)
(load "assertoid.lisp")
(load "compiler-test-util.lisp")
(load "test-util.lisp")
(use-package "ASSERTOID"))
bug 254 : compiler falure
(defpackage :bug254 (:use :cl))
(in-package :bug254)
(declaim (optimize (safety 3) (debug 2) (speed 2) (space 1)))
(defs... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/tests/compiler.impure-cload.lisp | lisp |
compiler failure
BLOCK-LAST in CONSTANT-FOLD-CALL and DO-NODES
zombie variables, arising from constraints
of FIND-RESULT-TYPE in dealing with deleted code; reported by
Nikodemus Siivola (simplified version)
(iter (for i in '(1 2 3)) (+ i 50))
this be a nasal demon, but test anyways
broken inference of an uppe... | (eval-when (:compile-toplevel :load-toplevel :execute)
(load "assertoid.lisp")
(load "compiler-test-util.lisp")
(load "test-util.lisp")
(use-package "ASSERTOID"))
bug 254 : compiler falure
(defpackage :bug254 (:use :cl))
(in-package :bug254)
(declaim (optimize (safety 3) (debug 2) (speed 2) (space 1)))
(defs... |
a572672ef6160badc914b685c021ceef973e594435a0b2466121643694ca1e6d | byorgey/diagrams-play | Arrowheads.hs | # LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE TypeFamilies #-}
import Diagrams.Backend.Cairo.CmdLine
import Diagrams.Prelude
main = defaultMain $ dia # frame 0.1
dia = arrowheads
vrule 1 ||| arrows ||| vrule 1
arrowheads =
mconcat
[ drawHead halfDart # translateY 0.2
,... | null | https://raw.githubusercontent.com/byorgey/diagrams-play/5362c715db394be6848ff5de1bbe71178e5f173f/Arrowheads.hs | haskell | # LANGUAGE TypeFamilies # | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Backend.Cairo.CmdLine
import Diagrams.Prelude
main = defaultMain $ dia # frame 0.1
dia = arrowheads
vrule 1 ||| arrows ||| vrule 1
arrowheads =
mconcat
[ drawHead halfDart # translateY 0.2
, drawHead dart
]
arrows = vcat' (with & ... |
54ae446aa27e14b02356ee189281e8a83cad932ff6d98c436660cbca322a6ce0 | cac-t-u-s/om-sharp | loop.lisp | ;============================================================================
; om#: visual programming language for computer-assisted music composition
;============================================================================
;
; This program is free software. For information on usage
; and redistribution, see... | null | https://raw.githubusercontent.com/cac-t-u-s/om-sharp/e99c153a554c22ff1d4951e2f44a736602866690/src/visual-language/patch/loop.lisp | lisp | ============================================================================
om#: visual programming language for computer-assisted music composition
============================================================================
This program is free software. For information on usage
and redistribution, see the "... | File author :
(in-package :om)
ITERATORS
(defclass OMPatchLoop (OMPatchComponent)
((it-var :initform (gentemp "IT-") :accessor it-var)
(it-value :initform nil :accessor it-value)))
(defmethod index ((self OMPatchLoop)) 0)
(defclass OMPatchLoopBox (OMPatchComponentBox) ())
(defmethod get-box-class (... |
31b1ad5e43bb0d5df27daf4181afd05057663ade758fe8289f3ac4fd1656d40a | spell-music/csound-expression | UnfoldMultiOuts.hs | {-# Language TupleSections #-}
module Csound.Dynamic.Tfm.UnfoldMultiOuts(
unfoldMultiOuts, Selector(..)
) where
import Data.List(sortBy)
import Data.Ord(comparing)
import Control.Monad.Trans.State.Strict
import qualified Data.IntMap.Strict as IM
import Data.Either (partitionEithers)
import Csound.Dynamic.Tfm.InferT... | null | https://raw.githubusercontent.com/spell-music/csound-expression/e384b7e3f69345bbe236730dee2fb0864d575259/csound-expression-dynamic/src/Csound/Dynamic/Tfm/UnfoldMultiOuts.hs | haskell | # Language TupleSections #
---------------------------------------------------------------------
unfolds multiple rates generic functions | module Csound.Dynamic.Tfm.UnfoldMultiOuts(
unfoldMultiOuts, Selector(..)
) where
import Data.List(sortBy)
import Data.Ord(comparing)
import Control.Monad.Trans.State.Strict
import qualified Data.IntMap.Strict as IM
import Data.Either (partitionEithers)
import Csound.Dynamic.Tfm.InferTypes(Var(..), Stmt(..), Inferen... |
37ad3577a0ccbfba8e63876230d62b6a1c247f4685458d18f607fbfa25ea9a1c | heechul/crest-z3 | clist.mli |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions... | null | https://raw.githubusercontent.com/heechul/crest-z3/cfcebadddb5e9d69e9956644fc37b46f6c2a21a0/cil/ocamlutil/clist.mli | ocaml | * Utilities for managing "concatenable lists" (clists). We often need to
concatenate sequences, and using lists for this purpose is expensive. This
module provides routines to manage such lists more efficiently. In this
model, we never do cons or append explicitly. Instead we maintain
the elements of th... |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions... |
8adaf3014bb7c2e0d832f938d77e501caa947883e4ee98934419491b0ff69c73 | sjl/sand | urn.lisp | (defpackage :sand.urn
(:use
:cl
:losh
:iterate
:sand.quickutils
:sand.utils)
(:export))
(in-package :sand.urn)
(defun make-vec-from (contents)
(make-array (length contents)
:initial-contents contents
:fill-pointer (length contents)
:adjustable t))
(defun make-empty-vec (size)
... | null | https://raw.githubusercontent.com/sjl/sand/fc0cb77fd8eefec8d29d69a1eca36f599101b890/src/urn.lisp | lisp | (print-hash-table (frequencies *population*))
(print-hash-table (proportions *population* :float t))
(-<> *population*
(proportions <> :float t)
(print-hash-table <>)
)
(-<> *population*
(proportions <> :float nil)
(print-hash-table <>)
) | (defpackage :sand.urn
(:use
:cl
:losh
:iterate
:sand.quickutils
:sand.utils)
(:export))
(in-package :sand.urn)
(defun make-vec-from (contents)
(make-array (length contents)
:initial-contents contents
:fill-pointer (length contents)
:adjustable t))
(defun make-empty-vec (size)
... |
84d7379f8be3815da9d2d11ed8b542ae7aec0f10ac66ca3b749e8a562543c470 | zack-bitcoin/amoveo | found_block_timer.erl | %add/0, get/0
-module(found_block_timer).
-behaviour(gen_server).
-export([start_link/0,code_change/3,handle_call/3,handle_cast/2,handle_info/2,init/1,terminate/2,
add/0, get/0]).
init(ok) -> {ok, now()}.
start_link() -> gen_server:start_link({local, ?MODULE}, ?MODULE, ok, []).
code_change(_OldVsn, State, _Extra) -> {... | null | https://raw.githubusercontent.com/zack-bitcoin/amoveo/257f3e8cc07f1bae9df1a7252b8bc67a0dad3262/apps/amoveo_core/src/consensus/chain/found_block_timer.erl | erlang | add/0, get/0 | -module(found_block_timer).
-behaviour(gen_server).
-export([start_link/0,code_change/3,handle_call/3,handle_cast/2,handle_info/2,init/1,terminate/2,
add/0, get/0]).
init(ok) -> {ok, now()}.
start_link() -> gen_server:start_link({local, ?MODULE}, ?MODULE, ok, []).
code_change(_OldVsn, State, _Extra) -> {ok, State}.
te... |
070012f4d3d4c8dffc2990794b5967dbb329ef64e821f49c924487bda7e1a11a | deadcode/Learning-CL--David-Touretzky | 8.44.lisp | (defun tree-depth (x)
(cond ((null x) 0)
((atom x) 0)
(t (max (+ 1 (tree-depth (car x)))
(+ 1 (tree-depth (cdr x)))))))
(let ((test1 '(tree-depth '(a . b)))
(test2 '(tree-depth '((a b c d))))
(test3 '(tree-depth '((a . b) . (c . d)))))
(format t "~s = ~s~%" test... | null | https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%208/8.44.lisp | lisp | (defun tree-depth (x)
(cond ((null x) 0)
((atom x) 0)
(t (max (+ 1 (tree-depth (car x)))
(+ 1 (tree-depth (cdr x)))))))
(let ((test1 '(tree-depth '(a . b)))
(test2 '(tree-depth '((a b c d))))
(test3 '(tree-depth '((a . b) . (c . d)))))
(format t "~s = ~s~%" test... | |
b84525227ef2de269f9af0ffe8fc37875366acdbd29e100ea93223fdb3ff0e16 | abakst/Brisk | Annotations.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Brisk.Annotations
( BriskAnnotation(..)
, top
) where
import Language.Haskell.TH
import Data.Data
data BriskAnnotation = SpecModule
| Assume Name
| Forever
deriving (Data, Show)
top :: a
top = error "any"
| null | https://raw.githubusercontent.com/abakst/Brisk/3e4ce790a742d3e3b786dba45d36f715ea0e61ef/src/Brisk/Annotations.hs | haskell | # LANGUAGE DeriveDataTypeable # | module Brisk.Annotations
( BriskAnnotation(..)
, top
) where
import Language.Haskell.TH
import Data.Data
data BriskAnnotation = SpecModule
| Assume Name
| Forever
deriving (Data, Show)
top :: a
top = error "any"
|
a134755ea545706f234d4728b7ed5557be42c7e51bda815b147af3caf0409808 | markbastian/partsbin | core.clj | (ns partsbin.crux.api.core
(:require [partsbin.crux.api.alpha :as crux]
[crux.api :as crux-api]
[integrant.core :as ig]))
(derive ::node ::crux/node)
;
#_get_started
(def config
{::node {:crux.node/topology :crux.standalone/topology
:crux.node/kv-store ... | null | https://raw.githubusercontent.com/markbastian/partsbin/8dc159327f296c9625d129b5943ec79433019e54/src/partsbin/crux/api/core.clj | clojure | (ns partsbin.crux.api.core
(:require [partsbin.crux.api.alpha :as crux]
[crux.api :as crux-api]
[integrant.core :as ig]))
(derive ::node ::crux/node)
#_get_started
(def config
{::node {:crux.node/topology :crux.standalone/topology
:crux.node/kv-store ... | |
86d71a75b6c94c024d5542b0d771132382926aed4bcb324667c33cfbecf7d361 | qitab/pyjure | unparse.clj | (ns pyjure.unparse
(:use [pyjure.utilities]
[pyjure.parsing]))
(defn unparse
([x] (unparse x 0))
([x i] ;; expression, indentation
(NIY)))
| null | https://raw.githubusercontent.com/qitab/pyjure/b9aa49b4f74c85f2b617e924f61eaddb194119bf/src/pyjure/unparse.clj | clojure | expression, indentation | (ns pyjure.unparse
(:use [pyjure.utilities]
[pyjure.parsing]))
(defn unparse
([x] (unparse x 0))
(NIY)))
|
3c7fd0fac5a1790d1ce13a244f6c08629dacb88759df02b143fa43124febd8d3 | SahilKang/cl-rdkafka | conf.lisp | Copyright ( C ) 2018 - 2020 < >
Copyright 2023 Google LLC
;;;
;;; This file is part of cl-rdkafka.
;;;
;;; cl-rdkafka 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 , o... | null | https://raw.githubusercontent.com/SahilKang/cl-rdkafka/cd47e1a67f6dcf6b22f0b9e93a4486d8c5ab88fa/src/high-level/conf.lisp | lisp |
This file is part of cl-rdkafka.
cl-rdkafka is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-rdkafka 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 PURPOS... | Copyright ( C ) 2018 - 2020 < >
Copyright 2023 Google LLC
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
(in-package #:cl-rdkafka)
(defun alloc-rd-ka... |
3a942fecbdd5f6a32da42a167da67d696c6716986fe6d37acb2d0174c21f269e | andgate/type-theory-compiler | Eval.hs | # LANGUAGE LambdaCase , FlexibleContexts , RankNTypes #
module Eval where
import Syntax
import Unbound.Generics.LocallyNameless
import Control.Monad.Reader
import Data.Map (Map)
import qualified Data.Map.Strict as Map
import Data.Text (Text)
type Eval = FreshMT (Reader Env)
data Env = Env { envTerms :: Map Text Va... | null | https://raw.githubusercontent.com/andgate/type-theory-compiler/a404f085d19a19b16ae8c26616707dc46707ea10/qtt/src/Eval.hs | haskell | # LANGUAGE LambdaCase , FlexibleContexts , RankNTypes #
module Eval where
import Syntax
import Unbound.Generics.LocallyNameless
import Control.Monad.Reader
import Data.Map (Map)
import qualified Data.Map.Strict as Map
import Data.Text (Text)
type Eval = FreshMT (Reader Env)
data Env = Env { envTerms :: Map Text Va... | |
60fbd460215b4da3c53eaa4592b1728e6b3de41529c655f0985aef9fcead5e3e | aws-beam/aws-erlang | aws_license_manager_linux_subscriptions.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
%% @doc With License Manager, you can discover and track your commercial
Linux subscriptions on running Amazon EC2 instances .
-module(aws_license_manager_linux_subscriptions).
-export([get_service_settings/2,
get_serv... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_license_manager_linux_subscriptions.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
@doc With License Manager, you can discover and track your commercial
====================================================================
API
====================================================================
@doc Lists the Linux subscriptions service settings.
If you... | See -beam/aws-codegen for more details .
Linux subscriptions on running Amazon EC2 instances .
-module(aws_license_manager_linux_subscriptions).
-export([get_service_settings/2,
get_service_settings/3,
list_linux_subscription_instances/2,
list_linux_subscription_instances/3,
li... |
463fa0b34dba1f71e7a0ec2b7c94c9722ae6e8a01245e1ed2e675fb385de4d64 | j-mie6/ParsleyHaskell | Patterns.hs | # LANGUAGE CPP ,
PatternSynonyms ,
ViewPatterns #
PatternSynonyms,
ViewPatterns #-}
module Parsley.Patterns (
Pos,
deriveLiftedConstructors, deriveDeferredConstructors,
deriveSubtype, deriveSubtypeUsing
) where
import Prelude hiding (pure, (<*>))
i... | null | https://raw.githubusercontent.com/j-mie6/ParsleyHaskell/f216d02793ccc502649e98a7c8142d3dd3ad89a6/parsley/src/ghc/Parsley/Patterns.hs | haskell | # OVERLAPPING #
These release us from having to orphan a bunch of Lift instances (and reduces compile time)
We should only need these constructors to do our work :) | # LANGUAGE CPP ,
PatternSynonyms ,
ViewPatterns #
PatternSynonyms,
ViewPatterns #-}
module Parsley.Patterns (
Pos,
deriveLiftedConstructors, deriveDeferredConstructors,
deriveSubtype, deriveSubtypeUsing
) where
import Prelude hiding (pure, (<*>))
i... |
a9cc7b1d4a4ba2470f0f5df8969256553ec554080e857d453daecd430fc194c8 | cedlemo/OCaml-GI-ctypes-bindings-generator | Stack_sidebar_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Stack_sidebar_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Stack_sidebar_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Stack_sidebar_private"
| |
ca17e9a80b7ad23082e042675888dae78f9793771527b8ac6253a61520c09eb4 | greglook/vault | store.clj | (ns vault.blob.store
"Blob storage protocol and functions.
When blob records are returned from a blob store, they may include 'stat'
metadata about the blobs:
- `:stat/size` content size in bytes
- `:stat/stored-at` time blob was added to the store
- `:stat/origin` resource location for the ... | null | https://raw.githubusercontent.com/greglook/vault/3c117589c574bf5d3028c745b24bb4f1ac688098/src/vault/blob/store.clj | clojure | (ns vault.blob.store
"Blob storage protocol and functions.
When blob records are returned from a blob store, they may include 'stat'
metadata about the blobs:
- `:stat/size` content size in bytes
- `:stat/stored-at` time blob was added to the store
- `:stat/origin` resource location for the ... | |
61a48a88092682616c72195dd897fe5423f08402c162691a8fecc4f6eb05f996 | onedata/op-worker | space_quota.erl | %%%-------------------------------------------------------------------
@author
( C ) 2016 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc Model holding current quota state all ... | null | https://raw.githubusercontent.com/onedata/op-worker/b0e4045090b180f28c79d40b9b334d7411ec3ca5/src/modules/datastore/models/spaces/space_quota.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc Model holding current quota state all supported spaces.
@end
-------------------------------------------------------------------
API
datastore_model callbacks
==========... | @author
( C ) 2016 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(space_quota).
-author("Rafal Slota").
-include("modules/datastore/datastore_models.hrl").
-include("modules/datastore/datastore_runner.hrl").
-include("modules/fslogic/fslogic_common.hrl").... |
01d855a4fd0e572fe4ca42964781418acacc3f2bc718af3874d2c6c28507f75a | bsaleil/lc | perm9.scm.scm | ;;------------------------------------------------------------------------------
Macros
(##define-macro (def-macro form . body)
`(##define-macro ,form (let () ,@body)))
(def-macro (FLOATvector-const . lst) `',(list->vector lst))
(def-macro (FLOATvector? x) `(vector? ,x))
(def-macro (FLOATvector . lst... | null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultVMIL-lc-gsc-lc/LCnaive/perm9.scm.scm | scheme | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Gabriel benchmarks
C benchmarks
Other benchmarks
File: perm9.sch
Crea... | Macros
(##define-macro (def-macro form . body)
`(##define-macro ,form (let () ,@body)))
(def-macro (FLOATvector-const . lst) `',(list->vector lst))
(def-macro (FLOATvector? x) `(vector? ,x))
(def-macro (FLOATvector . lst) `(vector ,@lst))
(def-macro (FLOATmake-vector n . init) `(make-vector ,... |
25df228dcd9aec46ef47d6f9e94acbc3f11f2f6a67c3204c39908c08ac9d439f | naoto-ogawa/h-xproto-mysql | Example08.hs | # LANGUAGE OverloadedStrings , DeriveGeneric , ScopedTypeVariables , TemplateHaskell , TypeInType , TypeFamilies , KindSignatures , DataKinds , TypeOperators , GADTs , TypeSynonymInstances , FlexibleInstances #
# LANGUAGE DuplicateRecordFields #
module Example.Example08 where
import Language.Haskell.TH
import Lang... | null | https://raw.githubusercontent.com/naoto-ogawa/h-xproto-mysql/1eacd6486c99b849016bf088788cb8d8b166f964/src/Example/Example08.hs | haskell | protocolbuffers
protocol buffer library
my library
======================================================================= --
======================================================================= -- | # LANGUAGE OverloadedStrings , DeriveGeneric , ScopedTypeVariables , TemplateHaskell , TypeInType , TypeFamilies , KindSignatures , DataKinds , TypeOperators , GADTs , TypeSynonymInstances , FlexibleInstances #
# LANGUAGE DuplicateRecordFields #
module Example.Example08 where
import Language.Haskell.TH
import Lang... |
a292e096006b9215e8b89c1dded933cc4727b79d68ddcb8e0083e234c8dfeba9 | jonase/eastwood | hash.clj | (ns testcases.performance.green.hash)
(case 1 1 :long 922337203900225948N :big 2)
| null | https://raw.githubusercontent.com/jonase/eastwood/605ab4a1d169270701200005792fa37b4c025405/cases/testcases/performance/green/hash.clj | clojure | (ns testcases.performance.green.hash)
(case 1 1 :long 922337203900225948N :big 2)
| |
d006f0c16fcf7f8edbb7cb21168848b2d2d4d295d5a99378d5700c6e5a099314 | racket/redex | stlc-with-binding-3.rkt | #lang racket/base
(require redex/benchmark
"util.rkt"
redex/reduction-semantics)
(provide (all-defined-out))
(define the-error "the order of the types in the function position of application has been swapped")
(define-rewrite bug3
(typeof Γ M (σ → σ_2))
==>
(typeof Γ M (σ_2 → σ))
#:context ... | null | https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-benchmark/redex/benchmark/models/stlc%2Blists/stlc-with-binding-3.rkt | racket | #lang racket/base
(require redex/benchmark
"util.rkt"
redex/reduction-semantics)
(provide (all-defined-out))
(define the-error "the order of the types in the function position of application has been swapped")
(define-rewrite bug3
(typeof Γ M (σ → σ_2))
==>
(typeof Γ M (σ_2 → σ))
#:context ... | |
7458120b0d9df7d0e2beafade7a747c47fa407944ab8a4496ebf196439dbc244 | mbutterick/aoc-racket | input.rkt | #lang reader "lang.rkt"
cpy a b
dec b
cpy a d
cpy 0 a
cpy b c
inc a
dec c
jnz c -2
dec d
jnz d -5
dec b
cpy b c
cpy c d
dec d
inc c
jnz d -2
tgl c
cpy -16 c
jnz 1 c
cpy 70 c
jnz 87 d
inc a
inc d
jnz d -2
inc c
jnz c -5 | null | https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2016/day23/input.rkt | racket | #lang reader "lang.rkt"
cpy a b
dec b
cpy a d
cpy 0 a
cpy b c
inc a
dec c
jnz c -2
dec d
jnz d -5
dec b
cpy b c
cpy c d
dec d
inc c
jnz d -2
tgl c
cpy -16 c
jnz 1 c
cpy 70 c
jnz 87 d
inc a
inc d
jnz d -2
inc c
jnz c -5 | |
c8b6a70913b7d4694e136b5c5b77dfb2fa04821e1e6c3dab24b5e3b0fc142b90 | matijapretnar/eff | runtime.ml | (* Evaluation of the intermediate language, big step. *)
open Utils
module V = Value
module Type = Language.Type
module Backend : Language.Backend.S = struct
type state = Eval.state
let initial_state = Eval.initial_state
let load_primitive_value state x prim =
Eval.update x (Primitives.primitive_value pri... | null | https://raw.githubusercontent.com/matijapretnar/eff/0b0ec7a83e7db4d040ed8fdfc1ac6e3c0f344be1/src/05-backends/runtime/runtime.ml | ocaml | Evaluation of the intermediate language, big step.
Processing functions |
open Utils
module V = Value
module Type = Language.Type
module Backend : Language.Backend.S = struct
type state = Eval.state
let initial_state = Eval.initial_state
let load_primitive_value state x prim =
Eval.update x (Primitives.primitive_value prim) state
let load_primitive_effect state eff prim =
... |
daffed7796dea7b355475c8bc3ac9928cdfeff6ca3bc854790577769e6811db7 | nuvla/api-server | module_component.cljc | (ns sixsq.nuvla.server.resources.spec.module-component
(:require
[clojure.spec.alpha :as s]
[sixsq.nuvla.server.resources.spec.common :as common]
[sixsq.nuvla.server.resources.spec.container :as container]
[sixsq.nuvla.server.resources.spec.core :as core]
[sixsq.nuvla.server.resources.spec.deploym... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/src/sixsq/nuvla/server/resources/spec/module_component.cljc | clojure | arm variants added | (ns sixsq.nuvla.server.resources.spec.module-component
(:require
[clojure.spec.alpha :as s]
[sixsq.nuvla.server.resources.spec.common :as common]
[sixsq.nuvla.server.resources.spec.container :as container]
[sixsq.nuvla.server.resources.spec.core :as core]
[sixsq.nuvla.server.resources.spec.deploym... |
ec2ae899be0f2797de7e4c868715130ddca7b89946983c08adb83054b4967e78 | johnmn3/cljs-thread | core.cljs | (ns dashboard.core
(:require
[re-frame.core :as rf]
[dashboard.regs.db]
[dashboard.regs.home-panel]
[dashboard.regs.shell]
[dashboard.regs.sign-in]
[cljs-thread.env :as env]
[cljs-thread.state :as s]
[cljs-thread.core :as thread :refer [future spawn in =>> dbg break in? pmap pcalls pvalues]]))... | null | https://raw.githubusercontent.com/johnmn3/cljs-thread/e98edc26ae71d1e17cea96a1f0e978df41b34d3f/shadow_dashboard/src/main/dashboard/core.cljs | clojure | uncomment for advanced compile tests
:starting
:i 0
=> :starting-dbg
=> nil
:done
work in progress - transferring typed arrays
:res #js [nil] ;; broken :(
Also can't do `(future (println :a a :a-again a))`
build again, because transfer neutered buffer
:res #js [nil] ;; also broken
:res #object [Uint8Array 0 1 2 3 4... | (ns dashboard.core
(:require
[re-frame.core :as rf]
[dashboard.regs.db]
[dashboard.regs.home-panel]
[dashboard.regs.shell]
[dashboard.regs.sign-in]
[cljs-thread.env :as env]
[cljs-thread.state :as s]
[cljs-thread.core :as thread :refer [future spawn in =>> dbg break in? pmap pcalls pvalues]]))... |
981c8468850c9e9cd5081d61fd066d7cf5c4a4c5ef5712094dc1517c32e808ec | spurious/sagittarius-scheme-mirror | io.scm | (import (rnrs)
(srfi :64)
(rename (binary io) (get-line binary:get-line)))
(test-begin "binary io")
(define (string->binary-port s)
(open-bytevector-input-port (string->utf8 s)))
(let ((bin (string->binary-port "hello\nworld")))
(test-equal "linefeed \\n(1)" "hello"
(binary:get-line bin :transcoder (na... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/binary/io.scm | scheme | chunked port
test chunked port
some cases
input/output
(print (port-position in/out))
multiple chunks
reset this affects original port as well
set-port-position! affects original port if it supports
port position operations.
recreation can continue | (import (rnrs)
(srfi :64)
(rename (binary io) (get-line binary:get-line)))
(test-begin "binary io")
(define (string->binary-port s)
(open-bytevector-input-port (string->utf8 s)))
(let ((bin (string->binary-port "hello\nworld")))
(test-equal "linefeed \\n(1)" "hello"
(binary:get-line bin :transcoder (na... |
0f2fc6a4303c739c4fbfc9862a736a0f88c076a0539245fd1202f32f53491d4a | clojure/tools.analyzer | constant_lifter.clj | Copyright ( c ) , Rich Hickey & contributors .
;; 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 b... | null | https://raw.githubusercontent.com/clojure/tools.analyzer/5d1d0dcf3dfe693e71ef36a44f50d4aa944dc65f/src/main/clojure/clojure/tools/analyzer/passes/constant_lifter.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 ) , Rich Hickey & contributors .
(ns clojure.tools.analyzer.passes.constant-lifter
(:require [clojure.tools.analyzer.utils :refer [const-val]]))
(defmulti constant-lift
"If the node represents a collection with no metadata, and every item of that
collection is a literal, transform the node ... |
8703759e7c3db866272ede190167840e5d9084f142872d045c5d85d834d14a70 | valerauko/kitsune-alpha | user.clj | (ns kitsune.routes.user
(:require [spec-tools.data-spec :as ds]
[kitsune.handlers.activitypub :as ap]
[kitsune.handlers.user :as user]
[kitsune.handlers.statuses :refer [account-statuses]]
[kitsune.wrappers.oauth :as oauth]
[kitsune.spec.oauth :refer [auth-h... | null | https://raw.githubusercontent.com/valerauko/kitsune-alpha/34ca08e4013541aeaf1a5a5786f3189ff17c1a58/src/kitsune/routes/user.clj | clojure | maybe this should go to its own file?
TODO: should be the local UI
TODO: this needs massive rework
::status-spec/statuses}} | (ns kitsune.routes.user
(:require [spec-tools.data-spec :as ds]
[kitsune.handlers.activitypub :as ap]
[kitsune.handlers.user :as user]
[kitsune.handlers.statuses :refer [account-statuses]]
[kitsune.wrappers.oauth :as oauth]
[kitsune.spec.oauth :refer [auth-h... |
2891f89d595615c83535325d5af53a2dbd5952bdc8c01370b33450e31bef4e53 | masaomi-yamaguchi/synbit | Enumerate.hs | # LANGUAGE BangPatterns #
{-# LANGUAGE DeriveFunctor #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE RankNTypes #-}
module Control.Monad.Enumerate
(
LWS, Matrix, Enumerate, printResults,
module Control.Applicative
... | null | https://raw.githubusercontent.com/masaomi-yamaguchi/synbit/4553ae090dfcda4965a16b09130c1d6874b5a849/src/Control/Monad/Enumerate.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE RankNTypes #
| A monad inspired by Spivey's "Combiantors for Breadth-First
An intuition underlying the data is that the ith element of the
outer stream represents elements in the ith level in the search
tree, which are supposed to be finite.
meani... | # LANGUAGE BangPatterns #
# LANGUAGE ExistentialQuantification #
# LANGUAGE GeneralizedNewtypeDeriving #
module Control.Monad.Enumerate
(
LWS, Matrix, Enumerate, printResults,
module Control.Applicative
) where
import Control.Applicative (Alternative (..))
import Con... |
141978b4fc9bd3fb3d540c453e59febb231d2cc7ee9d57f6fb2c30ce913c8268 | cram2/cram | vector-add.lisp | Regression test VECTOR - ADD for GSLL , automatically generated
;;
Copyright 2009 , 2011
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Sof... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/vector-add.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Publi... | Regression test VECTOR - ADD for GSLL , automatically generated
Copyright 2009 , 2011
Distributed under the terms of the GNU General Public License
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 rece... |
4e234df66867ac77cbcfafbe8b3d13953a9e54f3ac040c02644da8320291250e | jpvoigt/lalily | markup-init.scm | ;;;; This file is part of lalily, an extension to lilypond </>.
;;;;
Copyright ( C ) 2011 - -2012 Jan - < >
;;;;
;;;; lalily 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 Licens... | null | https://raw.githubusercontent.com/jpvoigt/lalily/48681fc2fff4dd1735e7822282384f98c3153024/lalily/lalily/markup-init.scm | scheme | This file is part of lalily, an extension to lilypond </>.
lalily is free software: you can redistribute it and/or modify
(at your option) any later version.
lalily 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... | Copyright ( C ) 2011 - -2012 Jan - < >
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
(use-modules (lalily markup)(lalily laly))
(re-export register-ma... |
64371a3fcfc85f7a9a7e49c2555494cd7f2ef490f0d229ecaf257b216a77dc28 | aantron/luv | luv.ml | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
All the public submodules of Luv . For example , Error is a submodule . So , from
outside Luv , you can refer to it as Luv . Error .
To see the contents of each module , ... | null | https://raw.githubusercontent.com/aantron/luv/decdaad7511855d012e31f22b35538ddd874c08d/src/luv.ml | ocaml | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
All the public submodules of Luv . For example , Error is a submodule . So , from
outside Luv , you can refer to it as Luv . Error .
To see the contents of each module , ... | |
1a8658d31c1af1c191bef7836343aa9580353c52d08c712b7afb51f35821d533 | wireapp/saml2-web-sso | Config.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Strict #-}
{-# LANGUAGE StrictData #-}
-- FUTUREWORK: set `-XNoDeriveAnyClass`.
module SAML2.WebSSO.Config where
import Control.Exception
import Control.Lens hiding (Level, (.=))
import Control.Monad (when)
import Data.Aeson
import Data.S... | null | https://raw.githubusercontent.com/wireapp/saml2-web-sso/74371cd775cb98d6cf85f6e182244a3c4fd48702/src/SAML2/WebSSO/Config.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
# LANGUAGE Strict #
# LANGUAGE StrictData #
FUTUREWORK: set `-XNoDeriveAnyClass`.
--------------------------------------------------------------------
data types
| this looks exactly like tinylog's type, but we redefine it here to avoid the dependency.
-----... |
module SAML2.WebSSO.Config where
import Control.Exception
import Control.Lens hiding (Level, (.=))
import Control.Monad (when)
import Data.Aeson
import Data.String.Conversions
import qualified Data.Yaml as Yaml
import GHC.Generics
import SAML2.WebSSO.Types
import System.Environment
import System.FilePath
import Syste... |
03c5a2290be0b49f116cb6a2b106325c7dc4225a3a66649057b91701e1d41a97 | countvajhula/cli | args.rkt | #lang cli
(provide echo)
(program (echo name)
name)
| null | https://raw.githubusercontent.com/countvajhula/cli/7ac7e62b56aa64331b7f2509bae4f59e88f3ab5d/tests/scripts/args.rkt | racket | #lang cli
(provide echo)
(program (echo name)
name)
| |
e2a4b5db854d5e6f845fb31fe78997abd42092da591b8fdd3e69a8330782ccef | epiccastle/spire | user.clj | (ns spire.module.user
(:require [spire.utils :as utils]
[spire.ssh :as ssh]
[spire.facts :as facts]
[clojure.string :as string])
(:import [org.apache.commons.codec.digest Crypt]
[java.security SecureRandom]))
(def failed-result {:exit 1 :out "" :err "" :result :failed... | null | https://raw.githubusercontent.com/epiccastle/spire/f1161ae5ff74124d603c1679507fc0a1b31c26eb/src/clj/spire/module/user.clj | clojure | (ns spire.module.user
(:require [spire.utils :as utils]
[spire.ssh :as ssh]
[spire.facts :as facts]
[clojure.string :as string])
(:import [org.apache.commons.codec.digest Crypt]
[java.security SecureRandom]))
(def failed-result {:exit 1 :out "" :err "" :result :failed... | |
989cb253217ed00e3cf2d38c6cab72123c703390b012311eb8c5f1b61d4980f6 | kelamg/HtDP2e-workthrough | ex524.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex524) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Accumulators/ex524.rkt | racket | about the language level of this file in a form that our tools can easily process.
or null to represent the initial state
(make-bank N N)
interp. miss is the number of missionaries and
cann is the number of cannibals
- 'left
- 'right
is the final state reachable from state0
generative... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex524) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/image)
(require 2htdp/universe)
(defin... |
bc2d2fd8d241fbaf06ac1bc83bfe5b4dccfd8a853d602bad0a450b255bdd3e37 | inhabitedtype/websocketaf | websocket.ml | module Opcode = struct
type standard_non_control =
[ `Continuation
| `Text
| `Binary ]
type standard_control =
[ `Connection_close
| `Ping
| `Pong ]
type standard =
[ standard_non_control
| standard_control ]
type t =
[ standard
| `Other of int ]
let code = function... | null | https://raw.githubusercontent.com/inhabitedtype/websocketaf/d2460e57adc248b8e6cb520222da3da96f0efb05/lib/websocket.ml | ocaml | module Opcode = struct
type standard_non_control =
[ `Continuation
| `Text
| `Binary ]
type standard_control =
[ `Connection_close
| `Ping
| `Pong ]
type standard =
[ standard_non_control
| standard_control ]
type t =
[ standard
| `Other of int ]
let code = function... | |
e15a74b91fe9e91cb93c2e58b44f1e22fb2e6b21f0c1b742325c39a1bac48233 | magicant/flesh | Class.hs |
Copyright ( C ) 2017 WATANABE >
This program is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at your option ) any later version .
This program is distribut... | null | https://raw.githubusercontent.com/magicant/flesh/0e76312d291aae8f890ba55d8131ade78600d7e8/src/Flesh/Language/Parser/Class.hs | haskell | # LANGUAGE Safe #
* The 'ParserT' monad transformer
| Collection of properties required for basic parser implementation.
@MonadParser@ is a subclass of the input and error handling monads,
supporting the basic behavior of the parser. It is also an instance of
* 'empty' and 'mzero' are equal to 'failure'; and
... |
Copyright ( C ) 2017 WATANABE >
This program is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at your option ) any later version .
This program is distribut... |
45c5a5557419d7bcaa30222ac189b60e433056b9e474df3aee60ab0256e4a974 | bef/poc-apps | ast_ami_drv.erl | %%%
%%% 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 2.1 of the License , or ( at your option ) any later version .
%%%
%%% This library is distributed in the hope th... | null | https://raw.githubusercontent.com/bef/poc-apps/754c308f0f170a3dd766f828fff7081122867f8b/lib/erlast/lib/ast_man/src/ast_ami_drv.erl | erlang |
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
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 PARTICULAR PURPOSE. See the GNU... | License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA
Author : < >
Created : 1... |
4238d4adbce0cb1dbe656c6b28c1cae76379c3149b8a9981428346aff79887e8 | jedimahdi/soltan | Socket.hs | module Hokm.Api.Network.Server.Socket
( Effects
, server
) where
import qualified Data.UUID as UUID
import Hokm.Api.Data.User
import Hokm.Api.Effect.GamesState ( GamesStateL )
import Hokm.Api.Effect.Hub ( HubL )
import ... | null | https://raw.githubusercontent.com/jedimahdi/soltan/50a97213ec83c81f5ec79898e2855d0c5e78f06c/backend/hokm-api/src/Hokm/Api/Network/Server/Socket.hs | haskell | module Hokm.Api.Network.Server.Socket
( Effects
, server
) where
import qualified Data.UUID as UUID
import Hokm.Api.Data.User
import Hokm.Api.Effect.GamesState ( GamesStateL )
import Hokm.Api.Effect.Hub ( HubL )
import ... | |
1d3e6fc0c7bc52ab499a32eddd5cd26d4839c91612d696129c727dda8ccbe61d | athos/pogonos | parse_test.cljc | (ns pogonos.parse-test
(:require [clojure.test :refer [deftest is are testing]]
[pogonos.error :as error]
[pogonos.nodes :as nodes]
[pogonos.parse :as parse]
[pogonos.reader :as reader]))
(deftest node-buffer-test
(let [buf (parse/make-node-buffer)]
(buf "foo\n")... | null | https://raw.githubusercontent.com/athos/pogonos/ef32ed91012b5ea5a5aa46ef576d4ed5a95852b6/test/pogonos/parse_test.cljc | clojure | (ns pogonos.parse-test
(:require [clojure.test :refer [deftest is are testing]]
[pogonos.error :as error]
[pogonos.nodes :as nodes]
[pogonos.parse :as parse]
[pogonos.reader :as reader]))
(deftest node-buffer-test
(let [buf (parse/make-node-buffer)]
(buf "foo\n")... | |
cd209ecb831b774b5ed027e426d72f8e4e88b5e3dfc0bc4da6cc60b65074ef6d | w3ntao/sicp-solution | vector.rkt | #lang racket
(provide (all-defined-out))
(define (make-vect x y)
(cons x y))
(define (xcor-vect v)
(car v))
(define (ycor-vect v)
(cdr v))
(define (add-vect v-0 v-1)
(make-vect (+ (xcor-vect v-0)
(xcor-vect v-1))
(+ (ycor-vect v-0)
(ycor-vect v-1))))
(define (s... | null | https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/ToolBox/CoordinateSystem/vector.rkt | racket | #lang racket
(provide (all-defined-out))
(define (make-vect x y)
(cons x y))
(define (xcor-vect v)
(car v))
(define (ycor-vect v)
(cdr v))
(define (add-vect v-0 v-1)
(make-vect (+ (xcor-vect v-0)
(xcor-vect v-1))
(+ (ycor-vect v-0)
(ycor-vect v-1))))
(define (s... | |
4ffa1d0cad815c4f934ce1dfbdc5a98460163383e4ec7fa59afbaee3bc59bb6f | michaelballantyne/syntax-spec | define-star.rkt | #lang racket/base
(require "../../testing.rkt")
(syntax-spec
(binding-class var #:description "mylang variable")
(extension-class mylang-macro)
(nonterminal expr
#:description "mylang expression"
#:allow-extension mylang-macro
v:var
n:number
(+ e1:expr e2:expr)
(block d:def-or-ex... | null | https://raw.githubusercontent.com/michaelballantyne/syntax-spec/87c308e1ea48a8ca02cc89552d15ecb71704482c/test/basic-langs/define-star.rkt | racket | tests | #lang racket/base
(require "../../testing.rkt")
(syntax-spec
(binding-class var #:description "mylang variable")
(extension-class mylang-macro)
(nonterminal expr
#:description "mylang expression"
#:allow-extension mylang-macro
v:var
n:number
(+ e1:expr e2:expr)
(block d:def-or-ex... |
9a59f840ad6d88c764a37bb8d6cc91f6ad81d7f587eb5d6aec7843e6acdf9135 | ucsd-progsys/liquidhaskell | T1659.hs | {-@ LIQUID "--expect-any-error" @-}
{-@ LIQUID "--reflection" @-}
# LANGUAGE TypeFamilies , TypeFamilyDependencies #
module T1659 where
@
data LWW = LWW {
lwwTime : : Int
}
@
data LWW = LWW {
lwwTime :: Int
}
@-}
data LWW = LWW {lwwTime :: Int}
type family Operation t = op
type instance O... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/T1659.hs | haskell | @ LIQUID "--expect-any-error" @
@ LIQUID "--reflection" @
@ claw :: x : Operation LWW -> { x /= x} @
ok. unsafe. `Operation LWW` changed to `LWW`
@ claw2 :: x : LWW -> { x /= x} @
ok. unsafe. No pattern matching
@ claw3 :: x : Operation LWW -> { x /= x} @ | # LANGUAGE TypeFamilies , TypeFamilyDependencies #
module T1659 where
@
data LWW = LWW {
lwwTime : : Int
}
@
data LWW = LWW {
lwwTime :: Int
}
@-}
data LWW = LWW {lwwTime :: Int}
type family Operation t = op
type instance Operation LWW = LWW
crash : SMTLIB2 respSat = Error " line 296 ... |
e8671970b396831a6c10019e3c77aea4fc18c0fa383ac6e70c3578dc086e0349 | bodil/BODOL | project.clj | (defproject org.bodil/bodol "0.1.0"
:description "The BODil Oriented Language (working title)"
:url ""
:license {:name "Apache License, version 2.0"
:url "-2.0.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[instaparse "1.2.2"]
[org.clojure/core.match "0.2.0-rc... | null | https://raw.githubusercontent.com/bodil/BODOL/ed00ab59a91a19da4d70ff5488c90ffad04904c6/project.clj | clojure | (defproject org.bodil/bodol "0.1.0"
:description "The BODil Oriented Language (working title)"
:url ""
:license {:name "Apache License, version 2.0"
:url "-2.0.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[instaparse "1.2.2"]
[org.clojure/core.match "0.2.0-rc... | |
42c102a5eb3fd7017ac8589683eb34f9432ff70156f6c01ad8365b22f7716451 | UU-ComputerScience/uhc | Main.hs |
Compute digits of e
Due to , Aug 2001
Compute digits of e
Due to John Hughes, Aug 2001
-}
module Main where
import System.Environment
Here 's a way to compute all the digits of e. We use the series
e = 2 + 1 + 1 + 1 + ...
-- -- --
2 ! 3 ! ... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/benchmark/nofib/imag/digits-of-e2/Main.hs | haskell | -- --
-- -- --
-- --
-- -- -- |
Compute digits of e
Due to , Aug 2001
Compute digits of e
Due to John Hughes, Aug 2001
-}
module Main where
import System.Environment
Here 's a way to compute all the digits of e. We use the series
e = 2 + 1 + 1 + 1 + ...
2 ! 3 ! 4 !
which we can think of as r... |
276dd7cc06c39690daee727c68a0d8a5aa8616b00f4204338fdd418399fbb08f | NorfairKing/validity | GenValidity.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
| Tests for GenValidity instances
--
-- You will need @TypeApplications@ to use these.
module Test.Syd.Validity.GenValidity
( genValidSpec,
genValidGeneratesValid,
genGenerates... | null | https://raw.githubusercontent.com/NorfairKing/validity/35bc8d45b27e6c21429e4b681b16e46ccd541b3b/genvalidity-sydtest/src/Test/Syd/Validity/GenValidity.hs | haskell |
You will need @TypeApplications@ to use these.
In general it is a good idea to add this spec to your test suite if you
write a custom implementation of @genValid@.
Example usage:
| @genValid@ only generates valid data
prop> genValidGeneratesValid @()
prop> genValidGeneratesValid @Bool
prop> genValidGenerat... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
| Tests for GenValidity instances
module Test.Syd.Validity.GenValidity
( genValidSpec,
genValidGeneratesValid,
genGeneratesValid,
genGeneratesInvalid,
)
where
import Dat... |
4ed54e7fcd80c591269d95bb7d8facfca958ba47697c1ae61eb2aa3a02757b53 | ngless-toolkit/ngless | Map.hs | Copyright 2013 - 2022 NGLess Authors
- License : MIT
- License: MIT
-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
module Interpretation.Map
( executeMap
, executeMapStats
, executeMergeSams
) where
import qualified Data.Text as T
import qualified Data.ByteString as B
import qu... | null | https://raw.githubusercontent.com/ngless-toolkit/ngless/36795ad133fb4d931e68e0b930226fc7ce5de8fe/NGLess/Interpretation/Map.hs | haskell | # LANGUAGE RankNTypes #
| internal type
| An object which represents a mapper
| lazy index creation
recheck if index exists with the lock in place
it may have been created in the meanwhile (especially if we slept waiting for the lock)
| parse map() args to return a reference
reversing is done just so that chunks... | Copyright 2013 - 2022 NGLess Authors
- License : MIT
- License: MIT
-}
# LANGUAGE FlexibleContexts #
module Interpretation.Map
( executeMap
, executeMapStats
, executeMergeSams
) where
import qualified Data.Text as T
import qualified Data.ByteString as B
import qualified Data.ByteString.Char... |
a76cb9c4744746c0a6bcbddaa821aca2eb90ec10414742bdd2746ec630d744e0 | MinaProtocol/mina | staged_ledger_diff_body.mli | open Utils
module Types : sig
module type S = sig
module V1 : S0
end
end
module type Concrete = sig
module V1 : sig
type t = { staged_ledger_diff : Staged_ledger_diff_diff.V2.t }
end
end
module M : Types.S
module type Local_sig = Signature(Types).S
module Make
(Signature : Local_sig) (_ : funct... | null | https://raw.githubusercontent.com/MinaProtocol/mina/7a380064e215dc6aa152b76a7c3254949e383b1f/src/lib/mina_wire_types/staged_ledger_diff/staged_ledger_diff_body.mli | ocaml | open Utils
module Types : sig
module type S = sig
module V1 : S0
end
end
module type Concrete = sig
module V1 : sig
type t = { staged_ledger_diff : Staged_ledger_diff_diff.V2.t }
end
end
module M : Types.S
module type Local_sig = Signature(Types).S
module Make
(Signature : Local_sig) (_ : funct... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.