_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 |
|---|---|---|---|---|---|---|---|---|
b944c350cfd54c4f380acfe234231dac5e0bda66c6544ed4024617daaf22663a | ruricolist/cloture | sycamore.lisp | (in-package #:cloture)
(in-readtable clojure-shortcut)
(defmethod fset:with ((map sy:tree-map) k &optional (v nil v-supplied?))
(assert v-supplied?)
(sycamore:tree-map-insert map k v))
(defmethod fset:less ((map sy:tree-map) k &optional (v nil v-supplied?))
(declare (ignore v))
(assert (not v-supplied?))
(s... | null | https://raw.githubusercontent.com/ruricolist/cloture/623c15c8d2e5e91eb87f46e3ecb3975880109948/clojure/sycamore.lisp | lisp | TODO sy:do-tree-set doesn't define a block.
TODO Pending pull request.
(#_empty (set) (sy:empty-tree-set set)) | (in-package #:cloture)
(in-readtable clojure-shortcut)
(defmethod fset:with ((map sy:tree-map) k &optional (v nil v-supplied?))
(assert v-supplied?)
(sycamore:tree-map-insert map k v))
(defmethod fset:less ((map sy:tree-map) k &optional (v nil v-supplied?))
(declare (ignore v))
(assert (not v-supplied?))
(s... |
cb736719a1d746d112698040d0121e3641c277c87ba672526eb0a5842f43a6c6 | austral/austral | TypeReplace.mli |
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions .
See LICENSE file for details .
SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception
Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions.
See LICENSE file for details.
SPDX... | null | https://raw.githubusercontent.com/austral/austral/69b6f7de36cc9576483acd1ac4a31bf52074dbd1/lib/TypeReplace.mli | ocaml | * Replace the type variables in a typed expression.
* Replace the type variables in a typed statement. |
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions .
See LICENSE file for details .
SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception
Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions.
See LICENSE file for details.
SPDX... |
fea160425d3658cd58141a90841a573f91a14cb5007668d11dc4bfd008a51dcc | NorfairKing/validity | ArbitrarySpec.hs | # LANGUAGE TypeApplications #
module Test.Syd.Validity.ArbitrarySpec where
import Test.Syd
import Test.Syd.Validity.Arbitrary
spec :: Spec
spec = arbitrarySpec @Int
| null | https://raw.githubusercontent.com/NorfairKing/validity/1c3671a662673e21a1c5e8056eef5a7b0e8720ea/genvalidity-sydtest/test/Test/Syd/Validity/ArbitrarySpec.hs | haskell | # LANGUAGE TypeApplications #
module Test.Syd.Validity.ArbitrarySpec where
import Test.Syd
import Test.Syd.Validity.Arbitrary
spec :: Spec
spec = arbitrarySpec @Int
| |
a41da23e7c03f356e4a50e027822f4b019a85cf360075540c278e18159f5671c | samcf/ogres | forms.cljs | (ns ogres.app.render.forms
(:require [clojure.string :refer [capitalize]]
[ogres.app.hooks :refer [use-dispatch use-image use-image-uploader use-portal use-query use-store]]
[ogres.app.render :refer [icon]]
[ogres.app.render.pattern :refer [pattern]]
[uix.core.alpha :as... | null | https://raw.githubusercontent.com/samcf/ogres/c6441f6556403b3c4ed4300f38718173c18e8838/src/main/ogres/app/render/forms.cljs | clojure | (ns ogres.app.render.forms
(:require [clojure.string :refer [capitalize]]
[ogres.app.hooks :refer [use-dispatch use-image use-image-uploader use-portal use-query use-store]]
[ogres.app.render :refer [icon]]
[ogres.app.render.pattern :refer [pattern]]
[uix.core.alpha :as... | |
9fbdf1803443d819f2245459f46a87faa139dd487daba46bd21851950e149bf2 | ghc/packages-dph | Vector.hs |
module Vector (treeReverse) where
import qualified Data.Vector.Unboxed as V
import Data.Vector.Unboxed (Vector)
-- | Reverse the elements in an array using a tree.
treeReverse :: Vector Int -> Vector Int
# NOINLINE treeReverse #
treeReverse xx
| V.length xx == 1
= xx
| ot... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-examples/examples/smoke/sharing/Reverse/Vector.hs | haskell | | Reverse the elements in an array using a tree. |
module Vector (treeReverse) where
import qualified Data.Vector.Unboxed as V
import Data.Vector.Unboxed (Vector)
treeReverse :: Vector Int -> Vector Int
# NOINLINE treeReverse #
treeReverse xx
| V.length xx == 1
= xx
| otherwise
= let len = V.length xx
... |
fb53df02acb8c122e1963dd6934a6c7b53d32a9e0e663f4a2eb09c2eed1d4d47 | donut/OCamURL-server | select.ml |
open Lib_common
open Lib_model
open Lwt.Infix
open Printf
open Util
exception ID_not_int
let first_row_of_result res =
stream res >>= stream_next_opt >>= Lwt.return
let id_of_first_row result =
let exception ID_not_int in
first_row_of_result result >>= function
| None -> Lwt.return_none
| Some row ->
... | null | https://raw.githubusercontent.com/donut/OCamURL-server/87738c1a0bbfc2c848f9f4e2052cacc81a176489/lib/db/select.ml | ocaml |
open Lib_common
open Lib_model
open Lwt.Infix
open Printf
open Util
exception ID_not_int
let first_row_of_result res =
stream res >>= stream_next_opt >>= Lwt.return
let id_of_first_row result =
let exception ID_not_int in
first_row_of_result result >>= function
| None -> Lwt.return_none
| Some row ->
... | |
59d2a1401b95240c559a4737f3a5304cbe643b7d0dc0483aaddbd87c10d108a4 | Plisp/vico | closures.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*-
$ Header : /usr / local / cvsrep / cl - ppcre / closures.lisp , v 1.45 2009/09/17 19:17:30 edi Exp $
;;; Here we create the closures which together build the final
;;; scanner.
Copyright ( c ) 2002 - 2009 , Dr. . All rights reserv... | null | https://raw.githubusercontent.com/Plisp/vico/40606aea583ef9db98941ee337feb47f10c9696c/src/cl-ppcre-custom/closures.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*-
Here we create the closures which together build the final
scanner.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must ... | $ Header : /usr / local / cvsrep / cl - ppcre / closures.lisp , v 1.45 2009/09/17 19:17:30 edi Exp $
Copyright ( c ) 2002 - 2009 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-packa... |
4804035057785abfbd7254d201b0c0e275020ef9374f78167728fda5cd30f579 | sveri/ffdc | csv.cljs | (ns de.sveri.structconverter.csv)
(defn ^:export foo []
(println "foooooo")) | null | https://raw.githubusercontent.com/sveri/ffdc/303c94b9e3b1bd0e4aa13ca948d08eac26f96acf/src/cljs/de/sveri/structconverter/csv.cljs | clojure | (ns de.sveri.structconverter.csv)
(defn ^:export foo []
(println "foooooo")) | |
d6d9927455c0aa48927a29057902320602926eb4a28070a212daa4b47caa6753 | behrica/casagemas | notebook.clj | (ns notebook
(:require [tech.v3.dataset :as ds]
[org.scicloj.casagemas]
[org.scicloj.casagemas.kroki]
[org.scicloj.casagemas.dataset]))
(comment
(require '[nextjournal.clerk :as clerk]
'[nextjournal.clerk.viewer :as v])
(clerk/clear-cache!)
(def all-viewer-des... | null | https://raw.githubusercontent.com/behrica/casagemas/f51900bb91ed60f9988369d77ad1dc95fee282ee/notebooks/notebook.clj | clojure | In this notebook we give rendering hints to the values,
and then a suitable render is picked automatically
(or the default Clerk rendered,
when the rendering hint is not supported.
so this notebook does not call any function of Clerk
Clerk annotations are as well supported
## table
## html
Asigning meta-data ... | (ns notebook
(:require [tech.v3.dataset :as ds]
[org.scicloj.casagemas]
[org.scicloj.casagemas.kroki]
[org.scicloj.casagemas.dataset]))
(comment
(require '[nextjournal.clerk :as clerk]
'[nextjournal.clerk.viewer :as v])
(clerk/clear-cache!)
(def all-viewer-des... |
478d41dffa51f56a403eba77dac44fe17555e3ef3641dde25b9c8b63291f1d24 | IndianRoboticsOrganization/ArimaTTS | INST_LANG_phones.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2000 ... | null | https://raw.githubusercontent.com/IndianRoboticsOrganization/ArimaTTS/7377dca466306e2e6b90a063427273142cd50616/festvox/src/vox_diphone/festvox/INST_LANG_phones.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... | Phoneset definition
(defPhoneSet
INST_LANG
(vc + -)
vowel length : short long dipthong schwa
(vlng s l d a 0)
(vheight 1 2 3 0)
(vfront 1 2 3 0)
(vrnd + - 0)
(ctype s f a n l 0)
(cplace l a p b d v 0)
(cvox + - 0)
)
(
)
)
(PhoneSet.silences '(#))
(provide 'INST_LANG_phones)
|
80a6531a0997cb066d1bc918ae534e2620efcb54f3b0289004112d436984f605 | wh5a/thih | ListComp.hs | -- ListComp.hs
Output : 12
main :: Int
main = sum [x + 4 | (x,y,z) <- zipthree [1,3..] ['h'..'o'] [False ..], x > 0]
zipthree :: [a] -> [b] -> [c] -> [(a,b,c)]
zipthree = \xs ys zs -> case (xs, ys, zs) of
([], _, _) -> []
(_, [], _) -> []
... | null | https://raw.githubusercontent.com/wh5a/thih/dc5cb16ba4e998097135beb0c7b0b416cac7bfae/hatchet/examples/ListComp.hs | haskell | ListComp.hs | Output : 12
main :: Int
main = sum [x + 4 | (x,y,z) <- zipthree [1,3..] ['h'..'o'] [False ..], x > 0]
zipthree :: [a] -> [b] -> [c] -> [(a,b,c)]
zipthree = \xs ys zs -> case (xs, ys, zs) of
([], _, _) -> []
(_, [], _) -> []
(_,... |
44a5611a174ed0af3f9980ff99dd003aeac733915bfeb47868986b075ae639a3 | threatgrid/naga-http | server.clj | (ns ^{:doc "Defines a ring handler that exposes the Naga rule engine as a web service."
:author "Jesse Bouwman"}
naga-http.server
(:require [clojure.tools.logging :as log]
[clojure.string :as s]
[cheshire.core :as json]
[compojure.core :refer :all]
[compojure.... | null | https://raw.githubusercontent.com/threatgrid/naga-http/f3e9766bf67bb5494e0fac25bad54644ee439e1a/src/naga_http/server.clj | clojure | TODO get header params | (ns ^{:doc "Defines a ring handler that exposes the Naga rule engine as a web service."
:author "Jesse Bouwman"}
naga-http.server
(:require [clojure.tools.logging :as log]
[clojure.string :as s]
[cheshire.core :as json]
[compojure.core :refer :all]
[compojure.... |
4636017d219aff35b7338ca9f1aa999ec6755b741a8bd062082226c5c228cae5 | xapi-project/xen-api | test_scale.ml | open Test_common
let sync_string = "ready"
let send_ready sock =
let chan = Unix.out_channel_of_descr sock in
Printf.fprintf chan "%s\n" sync_string ;
flush chan
let sync sock =
let chan = Unix.in_channel_of_descr sock in
if input_line chan = sync_string then
()
else
failwith "Didn't get the sync... | null | https://raw.githubusercontent.com/xapi-project/xen-api/47fae74032aa6ade0fc12e867c530eaf2a96bf75/ocaml/xcp-rrdd/test/transport/test_scale.ml | ocaml | Child - we will be the writer.
Parent - we will be the reader. | open Test_common
let sync_string = "ready"
let send_ready sock =
let chan = Unix.out_channel_of_descr sock in
Printf.fprintf chan "%s\n" sync_string ;
flush chan
let sync sock =
let chan = Unix.in_channel_of_descr sock in
if input_line chan = sync_string then
()
else
failwith "Didn't get the sync... |
73acb80cdf745a7366a59c2333c68fd5e8d66bc5a56d51bb4ea2a3657729f6ed | aymanosman/cl-missile-command | dev.lisp | (ql:quickload "slynk")
(slynk:create-server :port 4005 :dont-close t)
(require :asdf)
(push "raylib/" asdf:*central-registry*)
(ql:quickload :raylib)
(ql:quickload :nibbles)
(load "wav.lisp")
(load "sound.lisp")
(load "sprite.lisp")
(load "font.lisp")
(load "main.lisp")
(in-package :raylib)
(main)
| null | https://raw.githubusercontent.com/aymanosman/cl-missile-command/32bf7cb1c51c8ca3961c9b61d9c84c8ef35055fd/dev.lisp | lisp | (ql:quickload "slynk")
(slynk:create-server :port 4005 :dont-close t)
(require :asdf)
(push "raylib/" asdf:*central-registry*)
(ql:quickload :raylib)
(ql:quickload :nibbles)
(load "wav.lisp")
(load "sound.lisp")
(load "sprite.lisp")
(load "font.lisp")
(load "main.lisp")
(in-package :raylib)
(main)
| |
c6339c6882462d1192dd9789a65bcc829a1434e24c410851ba4b2424cd87ec74 | Bogdanp/koyo | logging.rkt | #lang racket/base
(require mzlib/os
racket/contract
racket/format
racket/list
racket/logging
racket/match
racket/port
"private/term.rkt")
(provide
start-logger)
(define/contract (start-logger #:levels levels
#:color? [colo... | null | https://raw.githubusercontent.com/Bogdanp/koyo/bdea2cfa4d167184437968e6a463d67ddd6029a1/koyo-lib/koyo/logging.rkt | racket | #lang racket/base
(require mzlib/os
racket/contract
racket/format
racket/list
racket/logging
racket/match
racket/port
"private/term.rkt")
(provide
start-logger)
(define/contract (start-logger #:levels levels
#:color? [colo... | |
9bd9676825c24e1d8a518f3561b76dc0b187f782602fa474d5cb657e3157c80d | bobzhang/fan | lang_include.ml | let rec token: Lexing.lexbuf -> Tokenf.t =
function
| (lexbuf : Lexing.lexbuf) ->
let rec __ocaml_lex_next_char =
function
| () ->
if lexbuf.lex_curr_pos >= lexbuf.lex_buffer_len
then
(if lexbuf.lex_eof_reached
then 256
else (... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/tests/asts/failed_parse/lang_include.ml | ocaml | let rec token: Lexing.lexbuf -> Tokenf.t =
function
| (lexbuf : Lexing.lexbuf) ->
let rec __ocaml_lex_next_char =
function
| () ->
if lexbuf.lex_curr_pos >= lexbuf.lex_buffer_len
then
(if lexbuf.lex_eof_reached
then 256
else (... | |
aae7b4bb7812abdcd577c225f49e5bb731fc1f703e8c41eef7e167f17343cf9e | racket/math | quadratic.rkt | #lang typed/racket/base
(require racket/list
(only-in racket/math conjugate sgn nan?)
"types.rkt"
"../flonum/flonum-functions.rkt"
"../flonum/flonum-more-functions.rkt")
(provide complex-quadratic-solutions ; complex coefficients
quadratic-solutions ; real coeffi... | null | https://raw.githubusercontent.com/racket/math/67e19384a0923ccbf2ed9e8b7ce55ff92fdefe0e/math-lib/math/private/number-theory/quadratic.rkt | racket | complex coefficients
real coefficients
coefficients
coefficients
where a,b and c are complex numbers.
use the standard formula, unless -b and sqrt are almost equal
Note: Disabled for now.
This algorithm for complex quadratics is quite complex. A full
description can be found here:
-quadratic.html
In this case... | #lang typed/racket/base
(require racket/list
(only-in racket/math conjugate sgn nan?)
"types.rkt"
"../flonum/flonum-functions.rkt"
"../flonum/flonum-more-functions.rkt")
(: complex-quadratic-solutions : Complex Complex Complex -> (Listof Complex))
(define (complex-quadratic-solu... |
bb39fc6e40cd178ddea8e1f8869716d10705787c10789a407f9f76593ce8ee60 | Decentralized-Pictures/T4L3NT | replace_by_fees.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/tezt/tests/replace_by_fees.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
7894e96f77b9ff378ec0189b6cf0488d85c4975acd0df79b3f09cbd03e222604 | remyzorg/pendulum | utils.ml |
let fold_n f acc n =
let rec aux acc n =
if n < 0 then acc
else
aux (f acc n) (n - 1)
in aux acc n
module Tuple = struct
let tr_of_db ((v1, v2), v3) = (v1, v2, v3)
end
module Dot_pp = struct
let blue = "blue"
let darkgreen = "darkgreen"
let red = "red"
let font color p fmt e = Forma... | null | https://raw.githubusercontent.com/remyzorg/pendulum/a532681c6f99d77129e31fbe27cc56c396a7c63c/src/preproc/utils.ml | ocaml | let find_remove compare elt l =
| elt' :: l' ->
if compare elt elt' = 0 then
find_remove
there is no 64 bits literal integers in js |
let fold_n f acc n =
let rec aux acc n =
if n < 0 then acc
else
aux (f acc n) (n - 1)
in aux acc n
module Tuple = struct
let tr_of_db ((v1, v2), v3) = (v1, v2, v3)
end
module Dot_pp = struct
let blue = "blue"
let darkgreen = "darkgreen"
let red = "red"
let font color p fmt e = Forma... |
43c9a2901b8a4cdcca7dc36e9d03f802562c73c6a22d13617427305f5a93a4a0 | chrisa/acts_as_encrypted | mochiweb_app.erl | @author < >
2007 Mochi Media , Inc.
%% @doc Callbacks for the mochiweb application.
-module(mochiweb_app).
-author('').
-behaviour(application).
-export([start/2,stop/1]).
, _ ) - > ServerRet
%% @doc application start callback for mochiweb.
start(_Type, _StartArgs) ->
mochiweb_sup:start_link().
... | null | https://raw.githubusercontent.com/chrisa/acts_as_encrypted/587558a31876dfbbc47d7ab2070782fd3d9395d7/server/deps/mochiweb-src/src/mochiweb_app.erl | erlang | @doc Callbacks for the mochiweb application.
@doc application start callback for mochiweb.
@doc application stop callback for mochiweb. | @author < >
2007 Mochi Media , Inc.
-module(mochiweb_app).
-author('').
-behaviour(application).
-export([start/2,stop/1]).
, _ ) - > ServerRet
start(_Type, _StartArgs) ->
mochiweb_sup:start_link().
@spec stop(_State ) - > ServerRet
stop(_State) ->
ok.
|
34fff961b6bdac8a824a46f8b82a478fa68083a29ff5a9a3f73bdf6d8003a4a8 | kadena-io/chainweb-node | Chainweb.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE MultiWayIf #-}
... | null | https://raw.githubusercontent.com/kadena-io/chainweb-node/43e0c9df100a60dcbe071433b5e594cd1242ba58/src/Chainweb/Chainweb.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveAnyClass #
# LANGUAGE GADTs #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
|
Stability: experimental
This module provides the tools to initialize the different components of the
a handle that encapsulates those resources to an inner... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE NumericUnderscores #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSec... |
b0fb15664dd38f8e37d5c099951893f14dd1552679713f1bd03d3919d06b453c | silkapp/girella | Operators.hs | # LANGUAGE
FlexibleContexts
, NoImplicitPrelude
, TypeFamilies
#
FlexibleContexts
, NoImplicitPrelude
, TypeFamilies
#-}
module Girella.Operators
( (.==)
, (.==?)
, (./=)
, (.||)
, (.&&)
, (.>)
, (.>?)
, (.<)
, (.<?)
, (.>=)
, (.>=?)
, (.<=)
, (.<=?)
, quot_
, r... | null | https://raw.githubusercontent.com/silkapp/girella/f2fbbaaa2536f1afc5bc1a493d02f92cec81da18/src/Girella/Operators.hs | haskell | If you want to check if a value is null, use 'isNull' instead.
These
TODO: Add to opaleye
Query helpers
| 'Data.list.any' for 'Column'
| 'Data.List.all' for 'Column'
| 'Data.List.notElem' for 'Column'.
| 'isJust' for 'Column'.
Avoiding clashes with prelude
| Boolean negation.
| 'Nothing' for 'Column's.
| Tu... | # LANGUAGE
FlexibleContexts
, NoImplicitPrelude
, TypeFamilies
#
FlexibleContexts
, NoImplicitPrelude
, TypeFamilies
#-}
module Girella.Operators
( (.==)
, (.==?)
, (./=)
, (.||)
, (.&&)
, (.>)
, (.>?)
, (.<)
, (.<?)
, (.>=)
, (.>=?)
, (.<=)
, (.<=?)
, quot_
, r... |
2219a002812101e7bf1af8328d0f862fc1c143e8bc908f88985deb16193b0bbe | lotz84/bitcoin-spv-wallet | Tx.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
module Bitcoin.Protocol.Tx where
import Prelude hiding (sequence)
import Data.List (find)
import GHC.Generics (Generic)
import Data.Binary (Binary(..), encode)
import Data.ByteString (ByteString)
import qualified Data.ByteString as ... | null | https://raw.githubusercontent.com/lotz84/bitcoin-spv-wallet/3e52d76b201a3f46d825be0a612d51f70dfda131/src/Bitcoin/Protocol/Tx.hs | haskell | # LANGUAGE OverloadedStrings #
| 与えられた公開鍵をP2PKHのアウトプットに持つTxOutのインデックスを取得する
| トランザクションが与えられたOutPointを持つか調べる
| 与えられたインデックスのTxOutのvalueを取得する | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
module Bitcoin.Protocol.Tx where
import Prelude hiding (sequence)
import Data.List (find)
import GHC.Generics (Generic)
import Data.Binary (Binary(..), encode)
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import qualified Data.ByteString... |
024d30e37d0698f46eab9e3d15e30c4dd7608553e90bdd4775b296aa74eb1ea7 | UU-ComputerScience/uhc | InferMonad.hs | module InferMonad (Infer, returnI, eachI, thenI, guardI, useI, getSubI,
substituteI, unifyI, freshI, freshesI)
where
import MaybeM (Maybe, returnM, eachM, thenM, failM, guardM, theM, existsM, useM)
import StateX (StateX, returnSX, eachSX, thenSX, toSX, p... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/benchmark/nofib/real/infer/InferMonad.hs | haskell | module InferMonad (Infer, returnI, eachI, thenI, guardI, useI, getSubI,
substituteI, unifyI, freshI, freshesI)
where
import MaybeM (Maybe, returnM, eachM, thenM, failM, guardM, theM, existsM, useM)
import StateX (StateX, returnSX, eachSX, thenSX, toSX, p... | |
d8e43c5182a442d77fc0c4275fbe9e8e9f41cc3910cb1d4857b98878242f6be5 | janestreet/memtrace_viewer_with_deps | ppx_fields_conv.ml | Generated code should depend on the environment in scope as little as
possible . E.g. rather than [ foo = [ ] ] do [ match foo with [ ] - > ] , to eliminate the
use of [ =] . It is especially important to not use polymorphic comparisons , since we
are moving more and more to code that does n't have... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/ppx_fields_conv/src/ppx_fields_conv.ml | ocaml | Additional AST construction helpers | Generated code should depend on the environment in scope as little as
possible . E.g. rather than [ foo = [ ] ] do [ match foo with [ ] - > ] , to eliminate the
use of [ =] . It is especially important to not use polymorphic comparisons , since we
are moving more and more to code that does n't have... |
a17dd617da464eb4191139e3f03fd2e93cd9cf24b71504ac24b237b7dd0ee510 | matsubara0507/servant-kotlin | Generate.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
module Servant.Kotlin.Internal.Generate
( GenerateKotlin (..)
, generateKotlinForDefDataClass
, generateKotlinForDefDataClass'
, defKotlinImports
, ge... | null | https://raw.githubusercontent.com/matsubara0507/servant-kotlin/b65bf83a56b2de6dcfe29346e7cb09632c763ca3/src/Servant/Kotlin/Internal/Generate.hs | haskell | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
-
-
-
TODO: implements
if null (request ^. F.reqUrl . F.queryStr) then
empty
else
" +" <+> dquotes "?" <+> "+" <+>
"params.joinToString(" <> dquotes "&" <> ")"
|
Options to configure how code is generated.
^ Types that represent an ... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
module Servant.Kotlin.Internal.Generate
( GenerateKotlin (..)
, generateKotlinForDefDataClass
, generateKotlinForDefDataClass'
, defKotlinImports
, generateKotlinForAPIClass
, generateKotlinForAPI
, generateKotlinForAPIW... |
8ecae087e02dd5f1d79d87ee050f3c9e8fc98081011df21b3011875e06f6acf7 | maoe/lzma | xz-compress.hs | import System.Environment
import System.IO
import qualified Data.ByteString as S
import qualified Pipes.Internal as P
import Codec.Compression.LZMA.Incremental
main :: IO ()
main = do
file:_ <- getArgs
withFile file ReadMode cmpApp
cmpApp :: Handle -> IO ()
cmpApp h = go (compressIO defaultCompressParams)
whe... | null | https://raw.githubusercontent.com/maoe/lzma/f567015a2ed07ab0c5c766de7d9cee7fc40911f7/examples/xz-compress.hs | haskell | import System.Environment
import System.IO
import qualified Data.ByteString as S
import qualified Pipes.Internal as P
import Codec.Compression.LZMA.Incremental
main :: IO ()
main = do
file:_ <- getArgs
withFile file ReadMode cmpApp
cmpApp :: Handle -> IO ()
cmpApp h = go (compressIO defaultCompressParams)
whe... | |
161da0bca0b34f313451e2491ad53b6237b685cd751b73b4cf458b8d9a065afa | cl-rabbit/cl-bunny | fanout.lisp | (in-package :cl-bunny.test)
(plan 1)
(subtest "fanout-exchange-routing" ()
(let ((queues (make-hash-table)))
(with-connection ("amqp://")
(with-channel ()
(let ((x (exchange.fanout "examples.ping")))
(loop for i from 0 below 10
as q = (queue.declare :auto-delete t) do
... | null | https://raw.githubusercontent.com/cl-rabbit/cl-bunny/6da7fe161efc8d6bb0b8b09ac8efad03553d765c/t/integration/exchanges/fanout.lisp | lisp | (in-package :cl-bunny.test)
(plan 1)
(subtest "fanout-exchange-routing" ()
(let ((queues (make-hash-table)))
(with-connection ("amqp://")
(with-channel ()
(let ((x (exchange.fanout "examples.ping")))
(loop for i from 0 below 10
as q = (queue.declare :auto-delete t) do
... | |
ec5e9e26fbdf1bea04db15e26d77ca5902dab64b3926ca95e77849fd6e9fc90c | fukamachi/supertrace | cffi.lisp | (in-package #:supertrace/clock)
(cffi:defcstruct timespec
(tv-sec time-t)
(tv-nsec :long))
(cffi:defcfun ("clock_gettime" %clock-gettime) :int
(clk-id clockid-t)
(tp :pointer))
| null | https://raw.githubusercontent.com/fukamachi/supertrace/66d22c3ff131ecd1c8048dfced1d62ed6024ecb0/src/clock/cffi.lisp | lisp | (in-package #:supertrace/clock)
(cffi:defcstruct timespec
(tv-sec time-t)
(tv-nsec :long))
(cffi:defcfun ("clock_gettime" %clock-gettime) :int
(clk-id clockid-t)
(tp :pointer))
| |
5476f8c33c4090f912acac496cbbd3d8ef9fc7970434e23fc7ec3b9a47263b16 | grin-compiler/grin | OptimiseAbstractProgramSpec.hs | {-# LANGUAGE LambdaCase #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE QuasiQuotes #-}
module AbstractInterpretation.OptimiseAbstractProgramSpec where
import Test.Hspec
import Grin.Grin
import Grin.TH
import Grin.PrimOpsPrelude
import AbstractInterpretation.IR
import AbstractInterpretation.Reduce
import Abstra... | null | https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/test/AbstractInterpretation/OptimiseAbstractProgramSpec.hs | haskell | # LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes # | # LANGUAGE RecordWildCards #
module AbstractInterpretation.OptimiseAbstractProgramSpec where
import Test.Hspec
import Grin.Grin
import Grin.TH
import Grin.PrimOpsPrelude
import AbstractInterpretation.IR
import AbstractInterpretation.Reduce
import AbstractInterpretation.HeapPointsTo.CodeGen
import AbstractInterpretatio... |
8cc8aa4cfe161a5b530273605b3a52187a558eab85195bee6bb327217a634a22 | khibino/haskell-relational-record | KeyUpdate.hs | # LANGUAGE FlexibleContexts #
-- |
-- Module : Database.Relational.HDBC.KeyUpdate
Copyright : 2013 - 2017
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : unknown
--
This module provides typed ' KeyUpdate ' running sequence
-- which intermediate structures are typ... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-query-HDBC/src/Database/Relational/HDBC/KeyUpdate.hs | haskell | |
Module : Database.Relational.HDBC.KeyUpdate
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
which intermediate structures are typed.
| Typed prepared key-update type.
| Key to specify update target records.
| Untyped prepared statement before executed.
| Typed prep... | # LANGUAGE FlexibleContexts #
Copyright : 2013 - 2017
This module provides typed ' KeyUpdate ' running sequence
module Database.Relational.HDBC.KeyUpdate (
PreparedKeyUpdate,
prepare, prepareKeyUpdate, withPrepareKeyUpdate,
bindKeyUpdate,
runPreparedKeyUpdate, runKeyUpdate
) where
import Control... |
e2655cf2996fb3a648919170f8d8d16653bc9159299cd8023f02dbbb50526907 | abcdw/rde | accounts.scm | ;;; rde --- Reproducible development environment
Copyright © 2022 < >
;;;
;;; This file is part of rde.
;;;
;;; rde is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or ( ... | null | https://raw.githubusercontent.com/abcdw/rde/5b8605f421d0b8a9569e43cb6f7e651e7a8f7218/src/rde/system/services/accounts.scm | scheme | rde --- Reproducible development environment
This file is part of rde.
rde is free software; you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
rde is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the impl... | Copyright © 2022 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(define-module (rde system services accounts)
#:use-module (gnu services)
#:use-module (gnu services configuration)
#:use-module (gnu system accounts)
... |
3a6d70e4777acd9b327c912086687c3e4b98d5feefb5f2ca326908cf49cc4b0e | cofree-coffee/cofree-bot | CoinFlip.hs | module Data.Chat.Bot.CoinFlip
( -- * Bot
coinFlipBot,
*
coinFlipSerializer,
)
where
--------------------------------------------------------------------------------
import Data.Attoparsec.Text
import Data.Chat.Bot (Bot)
import Data.Chat.Bot.Serialization (TextSerializer)
import Data.Chat.Bot.Serializa... | null | https://raw.githubusercontent.com/cofree-coffee/cofree-bot/2466a444f17c560bfbadcad328f8a8c08d8da896/chat-bots-contrib/src/Data/Chat/Bot/CoinFlip.hs | haskell | * Bot
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------ | module Data.Chat.Bot.CoinFlip
coinFlipBot,
*
coinFlipSerializer,
)
where
import Data.Attoparsec.Text
import Data.Chat.Bot (Bot)
import Data.Chat.Bot.Serialization (TextSerializer)
import Data.Chat.Bot.Serialization qualified as S
import Data.Text (Text)
import Data.Text qualified as Text
import System.R... |
219e354c21cdca08cdcd80bd202db49b9c2f05bc945f30e0b844e860d9124e19 | ghcjs/ghcjs | cgrun014.hs | -- !! cg014: main = -42 -- twice: in Float and Double
main = print ((show ( (-42) :: Float )) ++ " " ++ (show ( (-42) :: Double )) ++ "\n")
| null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/codeGen/cgrun014.hs | haskell | !! cg014: main = -42 -- twice: in Float and Double |
main = print ((show ( (-42) :: Float )) ++ " " ++ (show ( (-42) :: Double )) ++ "\n")
|
384d8d0692249438fa1e845225f147be26146ad49014af9d3b238105de8e2a6b | elaforge/karya | File.hs | Copyright 2018
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
{-# LANGUAGE DataKinds, KindSignatures #-}
# LANGUAGE TypeApplications #
-- | Functions to read and write audio files. This should be able to read all
-- formats supported by libsndfile.... | null | https://raw.githubusercontent.com/elaforge/karya/6109905135b2e978bff8e8d0c495d8d37119a928/Util/Audio/File.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
# LANGUAGE DataKinds, KindSignatures #
| Functions to read and write audio files. This should be able to read all
formats supported by libsndfile.
* read
* write
* misc
| Check if rate and channels match ... | Copyright 2018
# LANGUAGE TypeApplications #
module Util.Audio.File (
check, checkA, getInfo, duration
, read, read44k, readUnknown
, readFrom, readFromClose
, concat
, readCheckpoints, readCheckpointsFrom
, write
, writeHandle
, writeCheckpoints
, wavFormat
, throwEnoent
) ... |
2242701b26b947fc51a5bbb996c070c480a9e1ae061a3c63368db5626a2e0709 | yzhs/ocamlllvm | scheduling.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/asmcomp/arm/scheduling.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : scheduling.ml 2553 1999 - 11 ... |
36e13d46bdcb9d5d6a0a4ed3fccb064d7decb89d309d0a74689028b739df28fa | nubank/vessel | helpers_test.clj | (ns vessel.jib.helpers-test
(:require [clojure.java.io :as io]
[clojure.test :refer :all]
[matcher-combinators.matchers :as m]
[matcher-combinators.test :refer [match?]]
[vessel.jib.helpers :as jib.helpers]
[vessel.misc :as misc]
[vessel.test-hel... | null | https://raw.githubusercontent.com/nubank/vessel/40036928d20cfd07b31b99bb2389d5421c49d26d/test/unit/vessel/jib/helpers_test.clj | clojure | (ns vessel.jib.helpers-test
(:require [clojure.java.io :as io]
[clojure.test :refer :all]
[matcher-combinators.matchers :as m]
[matcher-combinators.test :refer [match?]]
[vessel.jib.helpers :as jib.helpers]
[vessel.misc :as misc]
[vessel.test-hel... | |
fe9685e566d472641fd944165e6ae5084e0ea80473d1319758287a45cdbb57e8 | f-me/carma-public | Bulk.hs | {-# LANGUAGE DoAndIfThenElse #-}
# LANGUAGE NoImplicitPrelude #
{-| Bulk import handlers. -}
module AppHandlers.Bulk
( vinImport
)
where
import BasicPrelude
import Control.Monad.State.Class
import qualified Data.Aeson as Aeson
import qualified Data.ByteString.Char8 as B
import qualified... | null | https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/srv/src/AppHandlers/Bulk.hs | haskell | # LANGUAGE DoAndIfThenElse #
| Bulk import handlers.
file.
TODO Allow to select only program w/o subprogram.
TODO Use carma-models API to select user programs.
TODO Should VIN files really be stored permanently?
Check user permissions
Allow users with partner role to upload files only to their
assigned subpr... | # LANGUAGE NoImplicitPrelude #
module AppHandlers.Bulk
( vinImport
)
where
import BasicPrelude
import Control.Monad.State.Class
import qualified Data.Aeson as Aeson
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import Data.Pool (withResource)
imp... |
65cc8219d8fa40f1d4de41be235319837c1303d765aafcbc9524183a47b226a3 | TomerAberbach/programming-in-haskell-exercises | 1.hs | data Nat = Zero | Succ Nat deriving (Show)
nat2int :: Nat -> Int
nat2int Zero = 0
nat2int (Succ n) = 1 + nat2int n
int2nat :: Int -> Nat
int2nat 0 = Zero
int2nat n = Succ (int2nat (n - 1))
add :: Nat -> Nat -> Nat
add Zero n = n
add (Succ m) n = Succ (add m n)
mult :: Nat -> Nat -> Nat
mult Zero _ = Zero
mult _ Zer... | null | https://raw.githubusercontent.com/TomerAberbach/programming-in-haskell-exercises/a66830529ebc9c4d84d0e4c6e0ad58041b46bc32/parts/1/chapters/8/1.hs | haskell | data Nat = Zero | Succ Nat deriving (Show)
nat2int :: Nat -> Int
nat2int Zero = 0
nat2int (Succ n) = 1 + nat2int n
int2nat :: Int -> Nat
int2nat 0 = Zero
int2nat n = Succ (int2nat (n - 1))
add :: Nat -> Nat -> Nat
add Zero n = n
add (Succ m) n = Succ (add m n)
mult :: Nat -> Nat -> Nat
mult Zero _ = Zero
mult _ Zer... | |
f15163e3884b1c786a792620d8d642f62a4116958d537eea02f10f0142fd7265 | erlangonrails/devdb | mochiweb_echo.erl | @author < >
2007 Mochi Media , Inc.
%% @doc Simple and stupid echo server to demo mochiweb_socket_server.
-module(mochiweb_echo).
-author('').
-export([start/0, stop/0, loop/1]).
stop() ->
mochiweb_socket_server:stop(?MODULE).
start() ->
mochiweb_socket_server:start([{name, ?MODULE},
... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/riak-0.11.0/deps/mochiweb/src/mochiweb_echo.erl | erlang | @doc Simple and stupid echo server to demo mochiweb_socket_server.
Tests
| @author < >
2007 Mochi Media , Inc.
-module(mochiweb_echo).
-author('').
-export([start/0, stop/0, loop/1]).
stop() ->
mochiweb_socket_server:stop(?MODULE).
start() ->
mochiweb_socket_server:start([{name, ?MODULE},
{port, 6789},
{ip... |
b13c1f43b240dad6d78ca2989ec97668a4e2df3d4b0745b779a19e321b1a8d85 | pedestal/pedestal-app | handlers.cljs | Copyright 2013 Relevance , Inc.
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( )
; 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 licens... | null | https://raw.githubusercontent.com/pedestal/pedestal-app/509ab766a54921c0fbb2dd7c6a3cb20223b8e1a1/app/src/io/pedestal/app/render/push/handlers.cljs | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright 2013 Relevance , Inc.
Eclipse Public License 1.0 ( )
(ns io.pedestal.app.render.push.handlers
(:require [io.pedestal.app.util.log :as log]
[io.pedestal.app.render.push :as render]
[io.pedestal.app.render.events :as events]
[domina :as d]
[domina.events ... |
af834a7a6be7a803fe12896928e9e7e9f50765127f890347efa03304f06d0919 | metosin/sormilla | video_test.clj | (ns sormilla.video-test
(:require [sormilla.video :refer :all]
[sormilla.bin :refer [ubyte uint]]
[midje.sweet :refer :all]))
| null | https://raw.githubusercontent.com/metosin/sormilla/e50930930c41f64272f06c4bd02a4e3ab58e923f/test/sormilla/video_test.clj | clojure | (ns sormilla.video-test
(:require [sormilla.video :refer :all]
[sormilla.bin :refer [ubyte uint]]
[midje.sweet :refer :all]))
| |
2c13ab51bfa4742a33972608c3027c376d0916e48e8e9c941064ad6ccb4a5918 | Heimdell/LR | Main.hs |
import Data.Text.IO qualified as Text
import System.IO
import System.Environment
import Shower
import E
import AST
main :: IO ()
main = do
getArgs >>= \case
[src] -> do
hSetBuffering stdout NoBuffering
txt <- Text.readFile src
let e = test src txt
putStrLn "\n==== Parsed ===="
pri... | null | https://raw.githubusercontent.com/Heimdell/LR/0be9667487c1a347f9a4a3b4d889b56111b05452/app/Main.hs | haskell |
import Data.Text.IO qualified as Text
import System.IO
import System.Environment
import Shower
import E
import AST
main :: IO ()
main = do
getArgs >>= \case
[src] -> do
hSetBuffering stdout NoBuffering
txt <- Text.readFile src
let e = test src txt
putStrLn "\n==== Parsed ===="
pri... | |
dfbca564393e304819078f4c9d8c5b0492e14af64d30c997d46f75fa74943d5f | compufox/trivial-gamekit-ui | package.lisp | package.lisp
(defpackage #:trivial-gamekit-ui
(:use #:cl)
(:nicknames :gamekit.ui)
(:import-from :gamekit :vec2 :x :y)
(:export :make-label :make-button :make-panel :make-progress-bar
:text :size :widget-position :text-color :image
:stroke :hover-color :pressed-color
:on-cli... | null | https://raw.githubusercontent.com/compufox/trivial-gamekit-ui/e35aff114538b6e0f780b9a14b34dc59d28ecab5/package.lisp | lisp | package.lisp
(defpackage #:trivial-gamekit-ui
(:use #:cl)
(:nicknames :gamekit.ui)
(:import-from :gamekit :vec2 :x :y)
(:export :make-label :make-button :make-panel :make-progress-bar
:text :size :widget-position :text-color :image
:stroke :hover-color :pressed-color
:on-cli... | |
a52fb87d84ddff3be24e00dba4fe215a6085841f62cfc67a091a503f5aaad196 | cloudant-labs/couchdb-erlfdb | erlfdb_hca.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/cloudant-labs/couchdb-erlfdb/510664facbc28c946960db2d12b3baf33923f4ea/src/erlfdb_hca.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(erlfdb_hca).
-contention-allocator.html
-export([
create/1,
allocate/2
]).
-include("erlfdb.hrl").
-record(erlfdb_hca, {
cou... |
b7f3f819d508679da5b5b31548acbac3edcdf5bad3c7da4e907b215cb9d11735 | exercism/racket | sublist-test.rkt | #lang racket
(require "sublist.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(define million (range 1000000))
(define million+1 (range 1 1000001))
(define million1s (make-list 1000000 1))
(define suite
(test-suite "sublist tests"
; empty
(test-eqv? "empty equ... | null | https://raw.githubusercontent.com/exercism/racket/c20f0572bcc18a3da831c07d57c3cd4486f8d34a/exercises/practice/sublist/sublist-test.rkt | racket | empty
equal lists
different lists
sublist at start, middle, end
superlist at start, middle, end
large list
multiple matches
order matters
recurring values in sublist
slow tests
(test-case "slow: large at beginning"
(test-case "slow: large unequal" | #lang racket
(require "sublist.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(define million (range 1000000))
(define million+1 (range 1 1000001))
(define million1s (make-list 1000000 1))
(define suite
(test-suite "sublist tests"
(test-eqv? "empty equals empty" (sublis... |
07ba06c5533d063d53b6fde22c28e5e287ac78a6e42e9ca4671ee70531773dfa | iskandr/parakeet-retired | AST.mli | open Base
open Prim
open Printf
module StrSet : module type of Set.Make(String)
type ast_info = {
mutable defs_local : StrSet.t;
mutable defs_global : StrSet.t;
mutable reads_local : StrSet.t;
mutable reads_global : StrSet.t;
mutable writes_local : StrSet.t;
mutable writes_global : StrSet.t;
mutable ... | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/AST/AST.mli | ocaml | open Base
open Prim
open Printf
module StrSet : module type of Set.Make(String)
type ast_info = {
mutable defs_local : StrSet.t;
mutable defs_global : StrSet.t;
mutable reads_local : StrSet.t;
mutable reads_global : StrSet.t;
mutable writes_local : StrSet.t;
mutable writes_global : StrSet.t;
mutable ... | |
559a68e81020fccc3e77a04ac8dd8f851dcbf0a1be11365538843b96af23939b | lamdu/hypertypes | Nominal.hs | # LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
-- | Nominal (named) types declaration, instantiation, construction, and access.
module Hyper.Syntax.Nominal
( NominalDecl (..)
, nParams
, nScheme
, W_Nomi... | null | https://raw.githubusercontent.com/lamdu/hypertypes/5b2ebd330528a7559da63780a91ad0ceebfc884d/src/Hyper/Syntax/Nominal.hs | haskell | | Nominal (named) types declaration, instantiation, construction, and access.
| A declaration of a nominal type.
| An instantiation of a nominal type
| Nominal data constructor.
Wrap content with a data constructor
(analogues to a data constructor of a Haskell `newtype`'s).
Introduces the nominal's foralled ty... | # LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
module Hyper.Syntax.Nominal
( NominalDecl (..)
, nParams
, nScheme
, W_NominalDecl (..)
, NominalInst (..)
, nId
, nArgs
, ToNom (..)
, ... |
d0e6b96d093214a919041249820f86e9096f867924ebba4b817a6b5ce227781c | egonSchiele/salty | ToJs.hs | module ToJs where
import Types
import Print
import Data.List (intercalate)
import Utils (isConstant, join, stripNewline)
initToJs body = join "\n" $ map toJs (init body)
stripNewlineToJs (WithNewLine salty) = toJs salty
stripNewlineToJs salty = toJs salty
_maybe f Nothing = ""
_maybe f (Just x) = f x
isEmptyLine Emp... | null | https://raw.githubusercontent.com/egonSchiele/salty/c7f0a6d8726888e60f67477423a12764b6009b76/src/ToJs.hs | haskell | this is a hack -- it's the same as the statement above just w the WithNewLine added.
toJs (Operation x@(Variable _ _) Equals (WithNewLine (HigherOrderFunctionCall obj callName func accVar))) = toJs $ HigherOrderFunctionCall obj callName func (varName x)
currently hacking a semicolon at the end b/c otherwise my addSe... | module ToJs where
import Types
import Print
import Data.List (intercalate)
import Utils (isConstant, join, stripNewline)
initToJs body = join "\n" $ map toJs (init body)
stripNewlineToJs (WithNewLine salty) = toJs salty
stripNewlineToJs salty = toJs salty
_maybe f Nothing = ""
_maybe f (Just x) = f x
isEmptyLine Emp... |
4c30f27d208899fd7bde59ead1db50ead87f7edbca50b988c99c144717553264 | devonhollowood/search-algorithms | doctests.hs | import Test.DocTest
main :: IO ()
main = doctest ["-isrc", "src/Algorithm/Search.hs"]
| null | https://raw.githubusercontent.com/devonhollowood/search-algorithms/8defc3ff88639e3ae78f20767cda0bc9046b97c7/test/doctests.hs | haskell | import Test.DocTest
main :: IO ()
main = doctest ["-isrc", "src/Algorithm/Search.hs"]
| |
bc6e011bfa020a0fe501ee5316008ac120ae52d3242823556c0d933ff5e6242c | swaywm/cl-wlroots | edges.lisp | (in-package :wlr/util/edges)
(export '(edges))
| null | https://raw.githubusercontent.com/swaywm/cl-wlroots/f8a33979e45086ecd5c7deefd5ee067b941e0998/wlr/util/edges.lisp | lisp | (in-package :wlr/util/edges)
(export '(edges))
| |
257f3d41b317d7dbd12560cb65f5ed8f1a8a275df6a0049b88893bcce154f46d | cldm/cldm | registry-repository.lisp | (in-package :cldm)
(defclass registry-cld-repository (cld-repository)
((address :initarg :address
:initform (error "Provide the cld repository url address")
:accessor repository-address
:documentation "The cld repository url address")
(api-token :initarg :api-token
:ini... | null | https://raw.githubusercontent.com/cldm/cldm/899f1a92d52245ef0fc84d073ac35c4b0d2e9609/src/repository/registry-repository.lisp | lisp | has not previously failed
The uri has previously failed, do nothing
the uri failed, add the uri to failed ones
else, no download session | (in-package :cldm)
(defclass registry-cld-repository (cld-repository)
((address :initarg :address
:initform (error "Provide the cld repository url address")
:accessor repository-address
:documentation "The cld repository url address")
(api-token :initarg :api-token
:ini... |
082f65f209c4873cdfa806013ddadf2b83e5199cc86bdd39f8af932198489804 | theodormoroianu/SecondYearCourses | LambdaChurch_20210415164341.hs | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415164341.hs | haskell | alpha-equivalence
subst u x t defines [u/x]t, i.e., substituting u for x in t
This substitution avoids variable captures so it is safe to be used when
reducing terms with free variables (e.g., if evaluating inside lambda abstractions)
^ substitution term
^ variable to be substitutes
^ term in which the substit... | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... |
a036c790d5dee2c15287f1305fc86c5856e27f1f23627c0d4c32e9e2bda01891 | toddmohney/json-api | Show.hs | module Users.Actions.Show
( userShowSimple
, userShowFull
) where
import Data.Aeson.TH
import qualified Data.Aeson as AE
import Data.Default (def)
import Data.Maybe (fromJust)
import Data.Monoid ((<>))
import Data.Text (pack)
import Servant (Handler, ServantErr (..), throwError, err404)
import Network.JSONApi
... | null | https://raw.githubusercontent.com/toddmohney/json-api/8df9ac0959ebca4bab3494780e30321ddc712b0f/example/src/Users/Actions/Show.hs | haskell | A 'controller' action handler
A 'controller' action handler
Builds the Links data for the 'show' action
Builds a simple repsonse Document for our User resource
Builds a full repsonse Document for our User resource | module Users.Actions.Show
( userShowSimple
, userShowFull
) where
import Data.Aeson.TH
import qualified Data.Aeson as AE
import Data.Default (def)
import Data.Maybe (fromJust)
import Data.Monoid ((<>))
import Data.Text (pack)
import Servant (Handler, ServantErr (..), throwError, err404)
import Network.JSONApi
... |
23ede9d45aa414133ef31205c6aefe4c36e6a97311953fa3683572265b92242c | lexi-lambda/higher-rank | Types.hs | module Language.HigherRank.Types where
import Data.Map (Map)
--------------------------------------------------------------------------------
-- Expressions (interpreter & typechecker)
newtype EVar = MkEVar { unEVar :: String }
deriving (Eq, Ord, Show)
data Expr
= EUnit
| EVar EVar
| EAnn Expr Type
| ELam... | null | https://raw.githubusercontent.com/lexi-lambda/higher-rank/1d7533868165d2c1ce810ea8dfa91ae4801ef799/library/Language/HigherRank/Types.hs | haskell | ------------------------------------------------------------------------------
Expressions (interpreter & typechecker)
------------------------------------------------------------------------------
Types (typechecker)
------------------------------------------------------------------------------
Reduced expressions ... | module Language.HigherRank.Types where
import Data.Map (Map)
newtype EVar = MkEVar { unEVar :: String }
deriving (Eq, Ord, Show)
data Expr
= EUnit
| EVar EVar
| EAnn Expr Type
| ELam EVar Expr
| EApp Expr Expr
deriving (Eq, Ord, Show)
newtype TVar = MkTVar { unTVar :: String }
deriving (Eq, Ord, S... |
f9a435852ec6ea3ba8098ab966cf4e98895c667092f886ae0c8511dbb499e233 | input-output-hk/plutus-apps | MustPayToOtherScript.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE NumericUnderscores #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
mod... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/006f4ae4461094d3e9405a445b0c9cf48727fa81/plutus-contract/test/Spec/Contract/Tx/Constraints/MustPayToOtherScript.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE NumericUnderscores #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
, testGroup "cardano constraints" $ [v1Tests, v2Tests] ?? cardanoSubmitTx
| Contract to a single transaction with mustSpendScriptOutputs offchain
constraint and mint with policy using ma... | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Spec.Contract.Tx.Constraints.MustPayToOtherScript(tests) where
import Control.Lens ((&), (??), (^.))
import Control.Monad (void)
import Spec.Co... |
e12a883d629397d08ceeb367287a379dff27e91832a793cd20166155dbde090b | brendanhay/terrafomo | Resources.hs | -- This module is auto-generated.
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - unused - imports #
-- |
Module : . . Resources
Copyright : ( c ) 2017 - 2018
License : Mozil... | null | https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-docker/gen/Terrafomo/Docker/Resources.hs | haskell | This module is auto-generated.
|
Stability : auto-generated
* docker_config
* docker_image
* docker_network
* docker_secret
* docker_service
* docker_volume
| The main @docker_config@ resource definition.
^ @data@
- (Required, Forces New)
Base64-url-safe-encoded config data
^ @name@
- (Required, Force... |
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - unused - imports #
Module : . . Resources
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintain... |
30c7bb71b60f8493144a6164ba84a4a6337cbdf490e7992bc50637fba35252bd | caiorss/Functional-Programming | overloading.hs | class (Monoid a, Monoid b) => Monoid (a, b) where
mempty = (mempty, mempty)
(a1, b1) `mappend` (a2, b2) = (a1 `mappend` a2, b1 `mappend` b2)
| null | https://raw.githubusercontent.com/caiorss/Functional-Programming/ef3526898e3014e9c99bf495033ff36a4530503d/codes/overloading.hs | haskell | class (Monoid a, Monoid b) => Monoid (a, b) where
mempty = (mempty, mempty)
(a1, b1) `mappend` (a2, b2) = (a1 `mappend` a2, b1 `mappend` b2)
| |
310bf9a3861542116ec0111d01eae24a2ea4ea1c13d4b1b5adf9f6ca05447122 | penpot/penpot | features.cljc | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.common.files.features)
;; A set of enabled by default file features. Will be used in feature
;; negot... | null | https://raw.githubusercontent.com/penpot/penpot/f3472fcd790c2d1254b64a7d3e4510369914df9e/common/src/app/common/files/features.cljc | clojure |
Copyright (c) KALEIDOS INC
A set of enabled by default file features. Will be used in feature
negotiation on obtaining files from backend. | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.common.files.features)
(def enabled #{})
(def ^:dynamic *previous* #{})
(def ^:dynamic *current* #{})
(def ^:dynamic *wrap-with-obje... |
40240368badd0db4c87da1da1d7d0c505fdada1eb83d8eb539fed41af7930404 | goldfirere/thesis | Catchable.hs | based on implementation in 's standard library
# LANGUAGE TypeInType , TypeOperators , MultiParamTypeClasses ,
AllowAmbiguousTypes , FlexibleInstances , TypeFamilies #
AllowAmbiguousTypes, FlexibleInstances, TypeFamilies #-}
module Control.Catchable where
import Data.Singletons
import ... | null | https://raw.githubusercontent.com/goldfirere/thesis/22f066bc26b1147530525aabb3df686416b3e4aa/effects/Control/Catchable.hs | haskell | based on implementation in 's standard library
# LANGUAGE TypeInType , TypeOperators , MultiParamTypeClasses ,
AllowAmbiguousTypes , FlexibleInstances , TypeFamilies #
AllowAmbiguousTypes, FlexibleInstances, TypeFamilies #-}
module Control.Catchable where
import Data.Singletons
import ... | |
355e8810e450314d11906bad76e512440b7714a2c9e0db227c2cea22b469ee8b | simplegeo/erlang | cover.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2001 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/tools/src/cover.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2001 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(cover).
This module implements t... |
1c628f1e9329228d7bc4da83120c36e5eea5ceae555c550ec77f278d5520aabf | kindl/Hypatia | Simplifier.hs | {-# LANGUAGE OverloadedStrings #-}
module Simplifier where
import Syntax
import Control.Arrow(first)
import Data.Generics.Uniplate.Data(transformBi)
-- This module translates complicated expressions
-- to simpler equivalent expressions
-- Note that the simplifications run right to left and the order matters.
For ... | null | https://raw.githubusercontent.com/kindl/Hypatia/25f73b029e8ea0045c833cb8719ce2dd1d86d4f2/src/Simplifier.hs | haskell | # LANGUAGE OverloadedStrings #
This module translates complicated expressions
to simpler equivalent expressions
Note that the simplifications run right to left and the order matters.
Put normal declarations into groups and break on declarations with await
Transform a function declaration to expression declaration
... | module Simplifier where
import Syntax
import Control.Arrow(first)
import Data.Generics.Uniplate.Data(transformBi)
For example removeFunctionDeclaration creates lambdas that are split in splitLambdas
simplifications m =
(splitLambdas . removeAwaitDeclaration . removeFunctionDeclaration) m
splitLambdas m = tra... |
6b7877d6cdcfc5ac5108e8027673bf8b46e88d7f54083ae342dc858ca6ef1f51 | tek/polysemy-hasql | Statement.hs | # LANGUAGE UndecidableSuperClasses #
module Polysemy.Hasql.Store.Statement where
import Hasql.Statement (Statement)
import qualified Polysemy.Hasql.Data.Crud as Crud
import Polysemy.Hasql.Data.Crud (Crud (..))
import qualified Polysemy.Hasql.Data.ManagedTable as ManagedTable
import Polysemy.Hasql.Data.ManagedTable (... | null | https://raw.githubusercontent.com/tek/polysemy-hasql/1cf195590fc3c356adf042ae3b0a1f9874591a74/packages/hasql/lib/Polysemy/Hasql/Store/Statement.hs | haskell | # LANGUAGE UndecidableSuperClasses #
module Polysemy.Hasql.Store.Statement where
import Hasql.Statement (Statement)
import qualified Polysemy.Hasql.Data.Crud as Crud
import Polysemy.Hasql.Data.Crud (Crud (..))
import qualified Polysemy.Hasql.Data.ManagedTable as ManagedTable
import Polysemy.Hasql.Data.ManagedTable (... | |
b100aa1b91288ddc95d1b4ddc404ea18d5be92b0ac6599bb89ceff682416300f | dnlkrgr/hsreduce | TemplateHaskell.hs | module Reduce.Passes.TemplateHaskell where
import Control.Concurrent.STM.Lifted
import Control.Monad.Reader
import qualified Data.Text.IO as TIO
import Util.Parser
import Path
import Util.Types
import Util.Util
dumpSplices :: R IO ()
dumpSplices = do
conf <- ask
oldState <- readTVarIO $ _tState conf
when... | null | https://raw.githubusercontent.com/dnlkrgr/hsreduce/8f66fdee036f8639053067572b55d9a64359d22c/src/Reduce/Passes/TemplateHaskell.hs | haskell | parse and typecheck file
TODO: check if it is still typecheckable; maybe it's not necessary because the test won't be interesting
try new state, but: | module Reduce.Passes.TemplateHaskell where
import Control.Concurrent.STM.Lifted
import Control.Monad.Reader
import qualified Data.Text.IO as TIO
import Util.Parser
import Path
import Util.Types
import Util.Util
dumpSplices :: R IO ()
dumpSplices = do
conf <- ask
oldState <- readTVarIO $ _tState conf
when... |
f5c4485f3f29efbf92ac46d7aab47dc7727714455adb1985698d3b392e1e5694 | jeffshrager/biobike | webframes-display.lisp | -*- Package : frames ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :frames)
;;; +=========================================================================+
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
;;; | |
... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Webdefs/webframes-display.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and as... |
(in-package :frames)
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject to... |
3d4fdb5de9e57ace3d9a705cc32854bbff35a82547125e272059bb6f998e35d7 | solita/mnt-teet | asset_boq.clj | (ns teet.asset.asset-boq
"Asset Bill of Quantities Excel export."
(:require [teet.asset.asset-model :as asset-model]
[teet.asset.asset-type-library :as asset-type-library]
[dk.ative.docjure.spreadsheet :as spreadsheet]
[teet.localization :refer [tr tr-enum] :as localization]
... | null | https://raw.githubusercontent.com/solita/mnt-teet/8eb55e80dac185c06e79c1412b0d33dd6837d81a/app/backend/src/clj/teet/asset/asset_boq.clj | clojure | quantity and unit shown separately so quantity can be used in formula
Fgroup changed, output fgroup and class before
the cost group row
Only fclass changed, output fclass before
the cost group row
Add summary row
B=type
C=properties
D=status
E=amount
F=unit
G=unit price
H=total price | (ns teet.asset.asset-boq
"Asset Bill of Quantities Excel export."
(:require [teet.asset.asset-model :as asset-model]
[teet.asset.asset-type-library :as asset-type-library]
[dk.ative.docjure.spreadsheet :as spreadsheet]
[teet.localization :refer [tr tr-enum] :as localization]
... |
9be38decce56d6d0c060d80169354f6d1d5d2cc003a8a41eb9f2547c175b5093 | rd--/hsc3 | vDiskIn.help.hs | -- vDiskIn
let b = control kr "buf" 0
nc = 2
in vDiskIn nc 0 (sinOsc kr 0.25 0 * 0.25 + 1) Loop 0
---- ; allocate and read file, leave open
let fn = sfResolve "pf-c5.aif"
let nc = sfNumChannels fn
withSc3 (mapM_ async [b_alloc 0 8192 nc,b_read 0 fn 0 (-1) 0 True])
| null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/vDiskIn.help.hs | haskell | vDiskIn
-- ; allocate and read file, leave open | let b = control kr "buf" 0
nc = 2
in vDiskIn nc 0 (sinOsc kr 0.25 0 * 0.25 + 1) Loop 0
let fn = sfResolve "pf-c5.aif"
let nc = sfNumChannels fn
withSc3 (mapM_ async [b_alloc 0 8192 nc,b_read 0 fn 0 (-1) 0 True])
|
796a41425a405ae1eef6386ab9ffa018f7049d6d6044a4c80b083de407df4027 | ndmitchell/catch | Req.hs |
module Req(module PathCtor,
Scopes(..), Scope(..), Reqs(..), Req(..),
scopesAnds, newReq, newReqs,
blurScopes, blurReqs
) where
import Yhc.Core
import General
import PathCtor
import Data.Proposition
import Data.List
import Data.Maybe
import Safe
-- DATA DEFINITIONS
type Scopes = [Scope]
data Scope ... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/analyse/Req.hs | haskell | DATA DEFINITIONS |
module Req(module PathCtor,
Scopes(..), Scope(..), Reqs(..), Req(..),
scopesAnds, newReq, newReqs,
blurScopes, blurReqs
) where
import Yhc.Core
import General
import PathCtor
import Data.Proposition
import Data.List
import Data.Maybe
import Safe
type Scopes = [Scope]
data Scope = Scope CoreFuncName... |
9271522f243b475d52d2602bad74a11922b4f5266fdb09f30840187ffae49d3d | synsem/texhs | Section.hs | ----------------------------------------------------------------------
-- |
-- Module : Text.Doc.Section
Copyright : 2015 - 2017 ,
2015 - 2016 Language Science Press .
-- License : GPL-3
--
-- Maintainer :
-- Stability : experimental
Portability : GHC
--
-- Section view on... | null | https://raw.githubusercontent.com/synsem/texhs/9e2dce4ec8ae0b2c024e1883d9a93bab15f9a86f/src/Text/Doc/Section.hs | haskell | --------------------------------------------------------------------
|
Module : Text.Doc.Section
License : GPL-3
Maintainer :
Stability : experimental
Section view on document content.
--------------------------------------------------------------------
* Section-based document type
* Convers... | Copyright : 2015 - 2017 ,
2015 - 2016 Language Science Press .
Portability : GHC
module Text.Doc.Section
SectionDoc(..)
, Section(..)
, doc2secdoc
, blocks2sections
, splitRegions
) where
import Text.Doc.Types
data SectionDoc = SectionDoc Meta [Section]
deriving (Eq, S... |
5308ba8f0b5149039133f71409aedb7a1f774713a317d5d03f2da2d51355577f | janegca/htdp2e | Exercise-225-AbstractingMapFn.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-reader.ss" "lang")((modname Exercise-225-AbstractingMapFn) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack"... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/03-Abstractions/Exercise-225-AbstractingMapFn.rkt | racket | about the language level of this file in a form that our tools can easily process.
map-n, which consumes a list of numbers and a function from numbers to
numbers to produce a list of numbers.
map-s, which consumes a list of strings and a function from strings to
strings and produces a list of str... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname Exercise-225-AbstractingMapFn) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "ima... |
c24152d0aa27ab799d2e31691704179c1611e2b35f119831b93b4a8ea22e9954 | rpav/cl-freetype2 | ft2-size.lisp | (in-package :freetype2-ffi)
;; C: Size Functions
(defcfun ("FT_New_Size" ft-new-size) ft-error
(face ft-face)
(asize (:pointer ft-size)))
(export 'ft-new-size)
(defcfun ("FT_Done_Size" ft-done-size) ft-error
(size :pointer))
(export 'ft-done-size)
(defcfun ("FT_Activate_Size" ft-activate-size) ft-error
... | null | https://raw.githubusercontent.com/rpav/cl-freetype2/96058da730b4812df916c1f4ee18c99b3b15a3de/src/ffi/ft2-size.lisp | lisp | C: Size Functions | (in-package :freetype2-ffi)
(defcfun ("FT_New_Size" ft-new-size) ft-error
(face ft-face)
(asize (:pointer ft-size)))
(export 'ft-new-size)
(defcfun ("FT_Done_Size" ft-done-size) ft-error
(size :pointer))
(export 'ft-done-size)
(defcfun ("FT_Activate_Size" ft-activate-size) ft-error
(size ft-size))
(expor... |
3763c8bb0ca9f3917465ab7b7bee26637cd438cdc629198111ff2930b368ae99 | Soyn/sicp | Ex3.07.rkt | #lang racket
Ex3.07
Created by Soyn . 4/8/15 .
;; @Brief:Consider the bank account objects created by make-account, with the password
modification described in exercise 3.3 . Suppose that our banking system requires the ability to make joint
accounts . Define a procedure make - joint that accomplishes this . M... | null | https://raw.githubusercontent.com/Soyn/sicp/d2aa6e3b053f6d4c8150ab1b033a18f61fca7e1b/CH3/CH3.1/Ex3.07.rkt | racket | @Brief:Consider the bank account objects created by make-account, with the password
a new password. Make-joint is to create an additional access to the original account using the new | #lang racket
Ex3.07
Created by Soyn . 4/8/15 .
modification described in exercise 3.3 . Suppose that our banking system requires the ability to make joint
accounts . Define a procedure make - joint that accomplishes this . Make - joint should take three
arguments . The first is a password - protected account... |
3ae717144d98f022beab807e0bd26e9da71be560c24122610c2773c04424cb56 | freedesktop/bustle | Types.hs | # LANGUAGE GeneralizedNewtypeDeriving , DeriveFunctor #
Bustle . Types : defines types used by Bustle
Copyright ( C ) 2008 Collabora Ltd.
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 Foundat... | null | https://raw.githubusercontent.com/freedesktop/bustle/e506b5ca71e14af3d2ebd0a63c1b8d3ea0fb1795/Bustle/Types.hs | haskell | -core suffix.
FIXME: nothing stops someone passing in garbage
vim: sw=2 sts=2 | # LANGUAGE GeneralizedNewtypeDeriving , DeriveFunctor #
Bustle . Types : defines types used by Bustle
Copyright ( C ) 2008 Collabora Ltd.
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 Foundat... |
7088f59e7d4368a685129e4453e0b57da18e291e89878cc1ef5c617e15da133b | mikpe/pdp10-tools | sim.erl | -*- erlang - indent - level : 2 -*-
%%%
simulator for pdp10 - elf
Copyright ( C ) 2020 - 2021
%%%
This file is part of pdp10 - tools .
%%%
pdp10 - tools 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 Found... | null | https://raw.githubusercontent.com/mikpe/pdp10-tools/bd664c841d267f9f5a4e1be2a08d35231057b056/erlang/apps/sim/src/sim.erl | erlang |
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
exe
argv for exe
stack size
trace mode
Command-line interface ======================================... | -*- erlang - indent - level : 2 -*-
simulator for pdp10 - elf
Copyright ( C ) 2020 - 2021
This file is part of pdp10 - tools .
pdp10 - tools 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 , eith... |
590737285f13bc3b76694882bf24140c4ded981b9aa29e4bc83cc5c95272aebe | DavidAlphaFox/RabbitMQ | rabbit_federation_queue_link_sup_sup.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-federation/src/rabbit_federation_queue_link_sup_sup.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
Supervises the ... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ Federation .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved... |
dd50518e261154b722e83d007eff0c1330c6c4d94e72cbf22ec85db8054374c2 | RefactoringTools/wrangler | refac_swap_function_arguments2.erl | %% @hidden
@private
-module(refac_swap_function_arguments2).
-behaviour(gen_refac_2).
-compile(export_all).
%% Include files
-include("wrangler.hrl").
%%%===================================================================
%% gen_refac callbacks
-export([input_par_prompts/0,select_focus/1,
... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/97e4bfd9ea9f7a9af38945a662ee1a3078e49af3/src/gen_refacs_2/refac_swap_function_arguments2.erl | erlang | @hidden
Include files
===================================================================
gen_refac callbacks
===================================================================
gen_refac callbacks
===================================================================
-------------------------------------------... | @private
-module(refac_swap_function_arguments2).
-behaviour(gen_refac_2).
-compile(export_all).
-include("wrangler.hrl").
-export([input_par_prompts/0,select_focus/1,
check_pre_cond/1, selective/0,
rule_def/1, rule_appl/1]).
@private
input_par_prompts ( ) - > [ string ( ... |
40a6e1bc005f1c3dad823aaab2ee0730e64ab4f09be088220e0c7d73b0be6662 | fons/cl-twitter | twitter-show.lisp | (in-package :cl-twitter)
;;(defvar *seperator* "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------")
(defvar *seperator* " ")
(defgeneric show (obj &optional s ))
(defmethod show ( (ob... | null | https://raw.githubusercontent.com/fons/cl-twitter/6a72291f8c60bd07efd2a8605f18a3eb7570cc4a/api/twitter-show.lisp | lisp | (defvar *seperator* "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------")
(defmethod show ((rate-limit rate-limit) &optional (s *standard-output*))
(rate-limit-reset-time rate-limit) (c... | (in-package :cl-twitter)
(defvar *seperator* " ")
(defgeneric show (obj &optional s ))
(defmethod show ( (obj t) &optional (s *standard-output*))
(format s "~&~1t~S~%" obj))
(defmethod show ((obj cons) &optional (s *standard-output*))
(length (mapcar (lambda (el) (show el s)) obj)))
(defmethod show ((obj hash... |
71afb794f18854e00924a4c9a0ac1dd5e59f19b82f6c98cde3963dd88f7f750f | jaminalder/staticart | sketch_5.clj | (ns staticart.sketch-5
(:require [clojure.tools.trace :refer :all]
[quil.core :as q :include-macros true]
[staticart.color :as c]
[staticart.draw :as d]
[staticart.matrix :as mt]
[staticart.noise :as noise]
[staticart.settings :refer [settings]]
... | null | https://raw.githubusercontent.com/jaminalder/staticart/079ac3e526a03a7f3f95b8981d3ee3d797f2e865/src/staticart/sketch_5.clj | clojure | (ns staticart.sketch-5
(:require [clojure.tools.trace :refer :all]
[quil.core :as q :include-macros true]
[staticart.color :as c]
[staticart.draw :as d]
[staticart.matrix :as mt]
[staticart.noise :as noise]
[staticart.settings :refer [settings]]
... | |
6bb467201be67573f1081e144ddb467efc6d6a601d291d12dd748d9852282575 | anurudhp/CPHaskell | d.hs | import Control.Arrow ((>>>))
import Data.Bool (bool)
main :: IO ()
main = interact $ lines >>> drop 1
>>> map (words >>> map read >>> solve >>> bool "No" "Yes")
>>> unlines
solve :: [Int] -> Bool
solve [a, b, k]
| a == 1 && b == 1 = False
| k == 1 = a /= b && (a `mod` b == 0 || b `mod` a == 0)
... | null | https://raw.githubusercontent.com/anurudhp/CPHaskell/6504d7c0b311494feea7ff652060fb38b640171d/contests/codeforces/1538/d.hs | haskell | import Control.Arrow ((>>>))
import Data.Bool (bool)
main :: IO ()
main = interact $ lines >>> drop 1
>>> map (words >>> map read >>> solve >>> bool "No" "Yes")
>>> unlines
solve :: [Int] -> Bool
solve [a, b, k]
| a == 1 && b == 1 = False
| k == 1 = a /= b && (a `mod` b == 0 || b `mod` a == 0)
... | |
4e3854beb71f332edd2e9e13fd93dede926477b4dff165902f61b94ff339635a | Bogdanp/racket-forms | base.rkt | #lang racket/base
(define-syntax-rule (provide-all-from m ...)
(begin
(require m ...)
(provide (all-from-out m ...))))
(provide-all-from "private/formlet.rkt"
"private/form.rkt"
"private/widget.rkt")
| null | https://raw.githubusercontent.com/Bogdanp/racket-forms/80e6dee1184ab4c435678bb3c45fa11bfabf56ee/forms-lib/base.rkt | racket | #lang racket/base
(define-syntax-rule (provide-all-from m ...)
(begin
(require m ...)
(provide (all-from-out m ...))))
(provide-all-from "private/formlet.rkt"
"private/form.rkt"
"private/widget.rkt")
| |
6e2c4ea38d2bdce84098275ad662b8a4a3b615880310aad073c5953ef236edc6 | heshrobe/joshua-dist | lisp-commands.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - ENV ; Base : 10 ; Lowercase : Yes -*-
Copyright ( c ) 1994 - 2000 , .
Copyright ( c ) 2001 - 2003 , and .
;;; All rights reserved. No warranty is expressed or implied.
;;; See COPYRIGHT for full copyright and terms of use.
(in-package :cl... | null | https://raw.githubusercontent.com/heshrobe/joshua-dist/f59f06303f9fabef3e945a920cf9a26d9c2fd55e/clim-env/portable-lisp-environment/lisp-commands.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CLIM - ENV ; Base : 10 ; Lowercase : Yes -*-
All rights reserved. No warranty is expressed or implied.
See COPYRIGHT for full copyright and terms of use.
Evaluation context commands
General inspection commands
Glue that connects the various utilities together by their ob... |
Copyright ( c ) 1994 - 2000 , .
Copyright ( c ) 2001 - 2003 , and .
(in-package :clim-env)
(define-command (com-set-base :command-table lisp :name t)
((base '((integer) :base 10)
:default *read-base*))
(setq *print-base* base
*read-base* base)
(with-frame-standard-output (stream)
(fresh-l... |
366409599b4e976b26bf6a7201a4407f63039509d0fc6ac45e5eb09744936fbd | clash-lang/clash-compiler | Signal.hs | |
Copyright : ( C ) 2019 , Myrtle Software Ltd
2022 , Google Inc.
License : BSD2 ( see the file LICENSE )
Maintainer : < >
Copyright : (C) 2019, Myrtle Software Ltd
2022, Google Inc.
License : BSD2 (see the file LICENSE)
Maintainer : Christiaan Baaij <... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/ba4765139ea0728546bf934005d2d9b77e48d8c7/clash-prelude/tests/Clash/Tests/Signal.hs | haskell | # LANGUAGE RankNTypes #
See: -lang/clash-compiler/pull/655
See: -lang/clash-compiler/pull/669
Tests below should survive compilation:
| Asserts that static clocks behave the same as dynamic clocks with a static
period signal passed into it.
We construct periods in a roundabout way (i.e., using 'hzToPeriod' instea... | |
Copyright : ( C ) 2019 , Myrtle Software Ltd
2022 , Google Inc.
License : BSD2 ( see the file LICENSE )
Maintainer : < >
Copyright : (C) 2019, Myrtle Software Ltd
2022, Google Inc.
License : BSD2 (see the file LICENSE)
Maintainer : Christiaan Baaij <... |
e3f26fac3b9ef5385a2d1ed49e7d1f1277db32f2aba10df1eda16a75d7b30542 | sealchain-project/sealchain | AnalyzeSpec.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE QuasiQuotes #-}
# LANGUAGE Rank2Types #
# LANGUAGE TypeApplications #
{-# LANGUAGE View... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/pact/tests/AnalyzeSpec.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
# LANGUAGE PatternSynonyms #
# LANGUAGE QuasiQuotes #
# LANGUAGE ViewPatterns #
TODO: use ExceptT
TODO: test use of read-keyset from property once possible
TODO: test use of read-decimal from property once ... | # LANGUAGE DataKinds #
# LANGUAGE LambdaCase #
# LANGUAGE Rank2Types #
# LANGUAGE TypeApplications #
module AnalyzeSpec (spec) where
import Control.Lens (at, findOf, ix, matching, (&),
(.~), (^.), (^..), _Left)
import ... |
f93a2cabae39fdedc943128d51c088c3a7da0cdc20732f407b44d12c77ee963b | soegaard/racket-stories | view.rkt | #lang at-exp racket/base
;;;
;;; VIEW
;;;
; The view presents data from the model to the user.
; In the case of an web-app the view generates html which
; is sent to the user's browser.
; There is a choice to be made on how to represent html in the program.
; A simple approach is to use plain strings, but manipulati... | null | https://raw.githubusercontent.com/soegaard/racket-stories/78f66867f213acecd646b0b757819391cee9c261/app-racket-stories/view.rkt | racket |
VIEW
The view presents data from the model to the user.
In the case of an web-app the view generates html which
is sent to the user's browser.
There is a choice to be made on how to represent html in the program.
A simple approach is to use plain strings, but manipulating html
in string form has the potential ... | #lang at-exp racket/base
@name[attribute1 : " value1 " : " value2"]{Some text }
@name[attribute1 : " value1 " : " value2 " ]
@div[class : " score"]{42 points } ( div ' class : " score " " 42 points " ) < div class="score">42 points</div >
(provide html-about-page
html-po... |
8517881e02c134c5f283cbef8e3f8802fab1462dc79b1448d94c76c670cb72eb | pfdietz/ansi-test | search-bitvector.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Aug 25 13:06:54 2002
;;;; Contains: Tests for SEARCH on bit vectors
(in-package :cl-test)
(deftest search-bitvector.1
(let ((target *searched-bitvector*)
(pat #*0))
(loop for i from 0 to (1- (length target))
for tail = (subseq target ... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/sequences/search-bitvector.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for SEARCH on bit vectors
Order of test, test-not | Author :
Created : Sun Aug 25 13:06:54 2002
(in-package :cl-test)
(deftest search-bitvector.1
(let ((target *searched-bitvector*)
(pat #*0))
(loop for i from 0 to (1- (length target))
for tail = (subseq target i)
always
(let ((pos (search pat tail)))
... |
d683cf3508a1ca479f21dbddf7ac0dc54fd9fb7c524f6ac251588cb38cad6e35 | EFanZh/EOPL-Exercises | exercise-3.44-test.rkt | #lang racket/base
(require rackunit)
(require "../solutions/exercise-3.x-lexaddr-lang.rkt")
(check-equal? (run "let f = proc (y)
-(y, 4)
in (f 13)")
(num-val 9))
(check-equal? (run "let f = proc (y)
-(y, 2)
... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-3.44-test.rkt | racket | #lang racket/base
(require rackunit)
(require "../solutions/exercise-3.x-lexaddr-lang.rkt")
(check-equal? (run "let f = proc (y)
-(y, 4)
in (f 13)")
(num-val 9))
(check-equal? (run "let f = proc (y)
-(y, 2)
... | |
63993a9dc9c80e3b138578ff12c7fc8f455100eceb43f103d4600b3b6291bd0c | herbelin/coq-hh | pptactic.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/parsing/pptactic.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* if the boolean is false then the e... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Genarg
open Tace... |
296b4f2f8ec7f0b1a9337c1cc65b448f0a3c9f243653160e14111b9ea1be52ea | mirage/ocaml-launchd | launchd.mli |
* Copyright ( c ) 2015 Unikernel Systems
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS "... | null | https://raw.githubusercontent.com/mirage/ocaml-launchd/b605b27c9f3e4ab4223a37bb50b454c068897b28/lib/launchd.mli | ocaml | * The given name was not found
* This process is not managed by launchd
* The socket has already been activated |
* Copyright ( c ) 2015 Unikernel Systems
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS "... |
a9fb9f61215147418e366d91b0c2f073448f15aeb67995bdfb02b9568edda4f5 | AliasQli/GramHs | View.hs | # LANGUAGE OverloadedLabels #
# LANGUAGE OverloadedLists #
module Gui.View where
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import GI.Gtk (Window (..))
import GI.Gtk.Declarative
import GI.Gtk.De... | null | https://raw.githubusercontent.com/AliasQli/GramHs/b34bd59a8ccf7552513204cdccce31b25eebfdaa/src/Gui/View.hs | haskell | -----------+------------------------------+----------+ -
----------------------------+----------| |
-----------+-----------------------------------------+
------------ ------------->|
-----------+------------------------------+----------+ -
----------------------------+----------| |
-------------------------... | # LANGUAGE OverloadedLabels #
# LANGUAGE OverloadedLists #
module Gui.View where
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import GI.Gtk (Window (..))
import GI.Gtk.Declarative
import GI.Gtk.De... |
7aa44115362ae10e8c79e8814f33260d8746c12afab58486100dbd12c53c1073 | xapi-project/xen-api | memory_check.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/fa6f118fb512a2c90159368a1a0bc1cc730c895b/ocaml/xapi/memory_check.ml | ocaml | * Calculates the amounts of 'normal' and 'shadow' host memory needed
to run the given guest with the given amount of guest memory.
unused in this function
* Different users will wish to use a different VM accounting policy, depending
on how conservative or liberal they are.
* use static_max: conservative: u... |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
ced3d3f0e166e64f3a07bcbedf2167204edb2fe68f9cc57226ebec07732e2b0f | job-streamer/job-streamer-control-bus | dev.clj | (ns dev
(:refer-clojure :exclude [test])
(:require [clojure.repl :refer :all]
[clojure.pprint :refer [pprint]]
[clojure.tools.namespace.repl :refer [refresh]]
[clojure.java.io :as io]
[com.stuartsierra.component :as component]
[duct.generate :as gen]
... | null | https://raw.githubusercontent.com/job-streamer/job-streamer-control-bus/af38bc8838366c230e4f53f08b447eecc3e794b7/dev/dev.clj | clojure | (ns dev
(:refer-clojure :exclude [test])
(:require [clojure.repl :refer :all]
[clojure.pprint :refer [pprint]]
[clojure.tools.namespace.repl :refer [refresh]]
[clojure.java.io :as io]
[com.stuartsierra.component :as component]
[duct.generate :as gen]
... | |
8c16ae1e69f16ff4f8789898be9bfd02c423512e742e864d371a9a123ab0c05a | winny-/aoc | day05.rkt | #lang racket
(define (read2 ip)
(match (read-line ip)
[(? eof-object? e) e]
[(pregexp #px"(\\d+),(\\d+) -> (\\d+),(\\d+)" (list _ x1 y1 x2 y2))
(list (list (string->number x1) (string->number y1))
(list (string->number x2) (string->number y2)))]))
(define (in-range/inclusive start end)
(in... | null | https://raw.githubusercontent.com/winny-/aoc/b939c2d33e14a7b42b76057936e11d9f0f840c30/2021/day05/day05.rkt | racket | Local Variables:
compile-command: "racket day05.rkt < sample.txt"
End: | #lang racket
(define (read2 ip)
(match (read-line ip)
[(? eof-object? e) e]
[(pregexp #px"(\\d+),(\\d+) -> (\\d+),(\\d+)" (list _ x1 y1 x2 y2))
(list (list (string->number x1) (string->number y1))
(list (string->number x2) (string->number y2)))]))
(define (in-range/inclusive start end)
(in... |
b9cdb194ef1185b51d5d0e50cf4325b6ffecc3d1407d342a4e9e38a0ee7bfc63 | racket/racket7 | reader.rkt | (module reader racket/base
(require syntax/module-reader)
(provide (rename-out [-read read]
[-read-syntax read-syntax]
[-get-info get-info]))
(define-values (-read -read-syntax -get-info)
(make-meta-reader
'reader
"language path"
#:read-spec (lamb... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/reader/lang/reader.rkt | racket | (module reader racket/base
(require syntax/module-reader)
(provide (rename-out [-read read]
[-read-syntax read-syntax]
[-get-info get-info]))
(define-values (-read -read-syntax -get-info)
(make-meta-reader
'reader
"language path"
#:read-spec (lamb... | |
5df7b7d8abf561c85ab084e7719a26956e4716473373aaf11d2ad043836e8ede | PacktWorkshops/The-Clojure-Workshop | utils_test.clj | (ns coffee-app.utils-test
(:require [clojure.test :refer [are is deftest testing]]
[coffee-app.core :refer [price-menu]]
[coffee-app.utils :refer :all]))
(deftest calculate-coffee-price-test-with-single-is
(testing "Single test with is macro."
(is (= (calculat... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter10/Exercise10.01/coffee-app/test/coffee_app/utils_test.clj | clojure | (ns coffee-app.utils-test
(:require [clojure.test :refer [are is deftest testing]]
[coffee-app.core :refer [price-menu]]
[coffee-app.utils :refer :all]))
(deftest calculate-coffee-price-test-with-single-is
(testing "Single test with is macro."
(is (= (calculat... | |
c097591863ba7d69063f0d7835e944b40854b19825640eb2b3eb3bddbac44a17 | armon/bloomd_ring | br_cluster_fsm_test.erl | -module(br_cluster_fsm_test).
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
new_fsm(Op, Args) ->
ReqId = erlang:make_ref(),
From = self(),
{ok, Pid} = br_cluster_fsm:start_link(ReqId, From, Op, Args),
{ReqId, Pid}.
kill_fsm(Pid) ->
unlink(Pid),
exit(Pid, shutdown).
ignore_msg... | null | https://raw.githubusercontent.com/armon/bloomd_ring/ca51d00e2f0e1b6f12f061403df8421d7207d078/test/br_cluster_fsm_test.erl | erlang | Mock out the ring
Send various shit
Mock out the ring
Send an artificial timeout
Wait to get the error
Mock out the ring
Send results
Wait to get the error | -module(br_cluster_fsm_test).
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
new_fsm(Op, Args) ->
ReqId = erlang:make_ref(),
From = self(),
{ok, Pid} = br_cluster_fsm:start_link(ReqId, From, Op, Args),
{ReqId, Pid}.
kill_fsm(Pid) ->
unlink(Pid),
exit(Pid, shutdown).
ignore_msg... |
cbe52d50a715fa2df103defae0364c695338508c173ff1f048b87481fe525792 | iskandr/parakeet-retired | PtxCallingConventions.ml | (* pp: -parser o pa_macro.cmo *)
type data_location =
| ScalarInput
(* offset into constants table for shape *)
| GlobalInput of GpuVal.data_layout * int
| GlobalOutput of int (* offset into constant buffer *)
(* name of the texture, geometry type, and constants offset for shape *)
| TextureInput of... | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/GPU/Ptx/PtxCallingConventions.ml | ocaml | pp: -parser o pa_macro.cmo
offset into constants table for shape
offset into constant buffer
name of the texture, geometry type, and constants offset for shape
offset into constant buffer
map Imp identifiers to their realization within a Ptx kernel
what's the order values are passed? |
type data_location =
| ScalarInput
| GlobalInput of GpuVal.data_layout * int
| TextureInput of string * Ptx.geom * GpuVal.data_layout * int
type calling_conventions = {
data_locations : data_location ID.Map.t;
param_order : ID.t array;
}
let loc_to_str = function
| ScalarInput -> "scalar"
... |
e490a97c447435cc2e4c6c1e39b24f3eb2a81b128d31b71247fb1d3d813b3b41 | hunt-framework/hunt | RankingTests.hs | module Hunt.RankingTests
(rankingTests)
where
import Control.Monad.Except
import qualified Data.Map as M
import Data.Text (Text)
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit ... | null | https://raw.githubusercontent.com/hunt-framework/hunt/d692aae756b7bdfb4c99f5a3951aec12893649a8/hunt-searchengine/test/Hunt/RankingTests.hs | haskell | ----------------------------------------------------------------------------
XXX split this up into separate test cases...
----------------------------------------------------------------------------
uris of the search results
----------------------------------------------------------------------------
evaluate C... | module Hunt.RankingTests
(rankingTests)
where
import Control.Monad.Except
import qualified Data.Map as M
import Data.Text (Text)
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit ... |
431b8d60520b99747a9d19568cc7173c6a7db9e9ba3ffb329ca61a4f19eb357c | lispnik/cl-http | contexts.lisp | -*- Mode : LISP ; Package : lambda - ir ; BASE : 10 ; SYNTAX : ansi - common - lisp -*-
( C ) Copyright 1997 , ( ) .
;;; All Rights Reserved.
;;;
;;;
;;;-------------------------------------------------------------------
;;;
;;; CLASS DEFINITIONS
;;;
(in-package :lambda-ir)
(defun make-document-contex... | null | https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/lambda-ir/contexts.lisp | lisp | Package : lambda - ir ; BASE : 10 ; SYNTAX : ansi - common - lisp -*-
All Rights Reserved.
-------------------------------------------------------------------
CLASS DEFINITIONS
|
( C ) Copyright 1997 , ( ) .
(in-package :lambda-ir)
(defun make-document-context (&key in-document-universe in-tokenizer-names in-tokenizers in-lexical-features)
(initialize-document-context (%create-unnamed-object 'document-context)
:in-document-universe in-document-universe... |
59dd2d3e4cc33b8125d4a341dde9dba0db8271d4db123ab3be35527da5d03bed | ocaml-multicore/ocaml-tsan | set.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/stdlib/set.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module type OrderedType =
sig
type t
val compare: t -> t -> int
end
module type S =
sig
... |
ec5cfa9279ff0afcd7065b3373bc971ba24e66351f468b475bcfefa8738fb221 | gedge-platform/gedge-platform | rabbit_auth_mechanism_amqplain.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_auth_mechanism_amqplain).
-include... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit_auth_mechanism_amqplain.erl | erlang |
referring generically to "SASL security mechanism", i.e. the above. | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_auth_mechanism_amqplain).
-include_lib("... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.