_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 |
|---|---|---|---|---|---|---|---|---|
cc0d1dccc9d936e0cf537400dd56b4d84b8af53fe5d07890261403e111e4cfbe | ocaml-multicore/lockfree | qcheck_mpsc_queue.ml | module Mpsc_queue = Lockfree.Mpsc_queue
(* Mpsc_queue is a multiple producers, single consumer queue. *)
(* Producers can use the functions
- [push],
- [is_empty],
- [close] *)
Consumer can use the functions
- [ pop ] ,
- [ push_head ] ,
- [ is_empty ] ,
- [ close ]
- [pop],
- [pus... | null | https://raw.githubusercontent.com/ocaml-multicore/lockfree/6e686d5dfa9fe8278e9380a6e0e68b2e9d20288b/test/mpsc_queue/qcheck_mpsc_queue.ml | ocaml | Mpsc_queue is a multiple producers, single consumer queue.
Producers can use the functions
- [push],
- [is_empty],
- [close]
Building a random queue
Testing property
Building a random queue
Popping until [is_empty q] is true
Testing property
Building a random queue
Testing property
Building a... | module Mpsc_queue = Lockfree.Mpsc_queue
Consumer can use the functions
- [ pop ] ,
- [ push_head ] ,
- [ is_empty ] ,
- [ close ]
- [pop],
- [push_head],
- [is_empty],
- [close] *)
let extract_n q n close =
let rec loop acc = function
| 0 -> acc
| m ->
if m = n - cl... |
1cce5e770aae04e950de82aa79af27037d0a41db2036fbde7be8d60653ce3d94 | well-typed-lightbulbs/ocaml-esp32 | predef.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/typing/predef.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
open Path
open Types
open Btype
let builtin_idents = ref []
let wrap create s =
let id = create s in... |
5f6b077cd91c124d1baaef9103348cb9c3c78b680c5691ec7a8311af4edc189c | morphismtech/squeal | Logic.hs | |
Module : Squeal . PostgreSQL.Expression . Logic
Description : logical expressions and operators
Copyright : ( c ) , 2019
Maintainer :
Stability : experimental
logical expressions and operators
Module: Squeal.PostgreSQL.Expression.Logic
Description: logical expressions and operators
Copyright: (c) Ei... | null | https://raw.githubusercontent.com/morphismtech/squeal/f25c3052bcecebe5e88ee95143c4ae446c24ca85/squeal-postgresql/src/Squeal/PostgreSQL/Expression/Logic.hs | haskell | * Condition
* Logic
* Conditional
to `true`, `false` or `Squeal.PostgreSQL.Null.null_`. This is because SQL uses
| >>> printSQL true
TRUE
| >>> printSQL false
FALSE
| >>> printSQL $ not_ true
(NOT TRUE)
> null 'PGbool
| >>> printSQL $ true .&& false
(TRUE AND FALSE)
| >>> printSQL $ true .|| false
(TRUE O... | |
Module : Squeal . PostgreSQL.Expression . Logic
Description : logical expressions and operators
Copyright : ( c ) , 2019
Maintainer :
Stability : experimental
logical expressions and operators
Module: Squeal.PostgreSQL.Expression.Logic
Description: logical expressions and operators
Copyright: (c) Ei... |
5c5346bd12acfeb363e3fdfafa2f81c84ed39d1fb3a50c4783df8ab0f9631a0a | xapi-project/xen-api | vhd_tool_wrapper.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/48cc1489fff0e344246ecf19fc1ebed6f09c7471/ocaml/xapi/vhd_tool_wrapper.ml | ocaml | * [find_backend_device path] returns [Some path'] where [path'] is the backend path in
the driver domain corresponding to the frontend device [path] in this domain.
If we're looking at a xen frontend device, see if the backend
is in the same domain. If so check if it looks like a .vhd |
* 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... |
903078a68f5be3ca6c0dbb3e8c4cc5153e6736aa5ac9dde3a5eb3172f14e4cba | nikivazou/verified_string_matching | mapShiftZero.hs | #define IncludedmapShiftZero
@ automatic - instances mapShiftZero @
mapShiftZero :: RString -> RString -> List Integer -> Proof
@ mapShiftZero : : target : RString - > i : RString - > is : List ( GoodIndex i target )
- > { map ( shiftStringRight target stringEmp i ) is = = is }
/ [ llen is ] @
-> {map (shif... | null | https://raw.githubusercontent.com/nikivazou/verified_string_matching/abdd611a0758467f776c59c3d6c9e4705d36a3a0/src/AutoProofs/mapShiftZero.hs | haskell | #define IncludedmapShiftZero
@ automatic - instances mapShiftZero @
mapShiftZero :: RString -> RString -> List Integer -> Proof
@ mapShiftZero : : target : RString - > i : RString - > is : List ( GoodIndex i target )
- > { map ( shiftStringRight target stringEmp i ) is = = is }
/ [ llen is ] @
-> {map (shif... | |
c32959d7fdba0c0b591f07d528e7a9b162336fa3df82c569ca58c810ea12a857 | NoRedInk/haskell-libraries | QueryParserSpec.hs | module QueryParserSpec (tests) where
import qualified Expect
import qualified Postgres.QueryParser as Parser
import Test (Test, describe, test)
import qualified Text
-- The tests below pull from real queries used in this repo. If a particular
-- query not listed here doesn't show up correctly in traces please add it ... | null | https://raw.githubusercontent.com/NoRedInk/haskell-libraries/7af1e05549e09d519b08ab49dff956b5a97d4f7e/nri-postgresql/test/QueryParserSpec.hs | haskell | The tests below pull from real queries used in this repo. If a particular
query not listed here doesn't show up correctly in traces please add it as
test case. | module QueryParserSpec (tests) where
import qualified Expect
import qualified Postgres.QueryParser as Parser
import Test (Test, describe, test)
import qualified Text
tests :: Test
tests =
describe
"Postgres.QueryParser"
[ describe
"parse SQL"
[ test "simple select" <| \_ ->
parse... |
4680d5e34821b80663ee4746e0e14a540089519d622914c5558a03bafa8d3b1f | exoscale/clojure-kubernetes-client | v1_weighted_pod_affinity_term.clj | (ns clojure-kubernetes-client.specs.v1-weighted-pod-affinity-term
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-pod-affinity-term :refer :all]
)
(:import (java.io File)))
(declare v1-weighted-pod-affinity-term-data v1-wei... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_weighted_pod_affinity_term.clj | clojure | (ns clojure-kubernetes-client.specs.v1-weighted-pod-affinity-term
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-pod-affinity-term :refer :all]
)
(:import (java.io File)))
(declare v1-weighted-pod-affinity-term-data v1-wei... | |
c675d0d01775c2a4344ba4410230690a9c84cbf7cb3ecb80f88bad5bd6490a58 | TerrorJack/ghc-alter | UTF8.hs | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude
, BangPatterns
, NondecreasingIndentation
, MagicHash
#
, BangPatterns
, NondecreasingIndentation
, MagicHash
#-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
-------------------------------... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/GHC/IO/Encoding/UTF8.hs | haskell | # OPTIONS_GHC -funbox-strict-fields #
---------------------------------------------------------------------------
|
Module : GHC.IO.Encoding.UTF8
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
Portability : non-portable
-----------------------------------------------... | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude
, BangPatterns
, NondecreasingIndentation
, MagicHash
#
, BangPatterns
, NondecreasingIndentation
, MagicHash
#-}
Copyright : ( c ) The University of Glasgow , 2009
UTF-8 Codec f... |
22c0008f5b9b8cfdcb5acc791e76be5dd3287d039a96b0e3d9360db590bde93b | hadolint/hadolint | DL3030Spec.hs | module Hadolint.Rule.DL3030Spec (spec) where
import Data.Default
import Helpers
import Test.Hspec
spec :: SpecWith ()
spec = do
let ?config = def
describe "DL3030 - Use the `-y` switch to avoid manual input `yum install -y <package>`" $ do
it "not ok when not using `-y` switch" $ do
ruleCatches "DL3030... | null | https://raw.githubusercontent.com/hadolint/hadolint/bf7e48ea735db423a349fb2d7a83fe7a77091cc2/test/Hadolint/Rule/DL3030Spec.hs | haskell | module Hadolint.Rule.DL3030Spec (spec) where
import Data.Default
import Helpers
import Test.Hspec
spec :: SpecWith ()
spec = do
let ?config = def
describe "DL3030 - Use the `-y` switch to avoid manual input `yum install -y <package>`" $ do
it "not ok when not using `-y` switch" $ do
ruleCatches "DL3030... | |
bb7ffc9d623484af3ae4d336212492126b4a981437c9281d77d12d5196c71765 | simingwang/emqx-plugin-kafkav5 | jsx.erl | %% The MIT License
Copyright ( c ) 2010 - 2013 < >
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
%% to use, copy, modi... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/plugins/jsx/src/jsx.erl | erlang | The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above co... |
Copyright ( c ) 2010 - 2013 < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E... |
db0acbe155335870f405ef66201cb92f35e8758d39ad0238a426c6b9830d7b2d | mlcfp/zenacy-html | Query.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE GeneralizedNewtypeDeriving #
-- | A basic query facility.
module Zenacy.HTML.Internal.Query
( HTMLQuery
, htmlQueryRun
, ht... | null | https://raw.githubusercontent.com/mlcfp/zenacy-html/b4af86fecc6fbbe1c7501e2fa75e6aa28206ebcb/src/Zenacy/HTML/Internal/Query.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| A basic query facility.
| Defines the query state.
| Defines the type for a query.
| Runs a query and returns a result.
| Same as run with the arguments flipped.
| Same as run with the arguments flipped.
| Wraps a value as a query... | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE GeneralizedNewtypeDeriving #
module Zenacy.HTML.Internal.Query
( HTMLQuery
, htmlQueryRun
, htmlQueryExec
, htmlQueryTry
, htmlQueryStop
, htmlQueryCont
, htmlQuerySucc
, htmlQueryZipper
, htmlQueryNode
... |
b769efac68919c10a42ecbc9a899971e03c03309dd49694365bf785868f74c62 | Ptival/yugioh | Utils.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
{-# LANGUAGE RankNTypes #-}
-- | This module contains general purpose functions that are not provided by
-- | other libraries, or only provided by libraries we do not desire to depend
-- | on.
module YuGiOh.Utils
( ... | null | https://raw.githubusercontent.com/Ptival/yugioh/855e8f22c3ff322c7ca1d0a1fa96c50a54724aeb/lib/YuGiOh/Utils.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| This module contains general purpose functions that are not provided by
| other libraries, or only provided by libraries we do not desire to depend
| on.
| Given a `prompt` to display, and a (non-empty) list of `options` to choose
| index of the chosen one. | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
module YuGiOh.Utils
( EmptyList (..),
(<*^>),
askLensed,
compose,
displayList,
getALensed,
getLensed,
YuGiOh.Utils.log,
mapWithIndex,
overLensed,
promptForOption,
setLensed,
)
where
import Co... |
807c03bba3b2599e537d6ac788c4243f5ca4cafe988be0126823c87d31a5e893 | RefactoringTools/HaRe | A3.hs | module AddOneParameter.A3 where
import AddOneParameter.D3
main = sumSquares [1..4]
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/AddOneParameter/A3.hs | haskell | module AddOneParameter.A3 where
import AddOneParameter.D3
main = sumSquares [1..4]
| |
11ebd614a478a8f1612e27cf94cc2d811936a4d74c89ad55f0d747776b8c9d2b | bjorng/wings | jsone_encode.erl | %%% @doc JSON encoding module
@private
%%% @end
%%%
Copyright ( c ) 2013 - 2016 , < >
%%%
%%% The MIT License
%%%
%%% Permission is hereby granted, free of charge, to any person obtaining a copy
%%% of this software and associated documentation files (the "Software"), to deal
in the Software without restrictio... | null | https://raw.githubusercontent.com/bjorng/wings/dec64a500220359dbc552600af486be47c45d301/src/jsone_encode.erl | erlang | @doc JSON encoding module
@end
The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the... | @private
Copyright ( c ) 2013 - 2016 , < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY... |
d6dd1fc3d94ab4c8e46abd4b08a7e43d31ebe957a392e3b72e5bf80206f93968 | erlang/corba | ic_cclient.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2002 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/ic/src/ic_cclient.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2002 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ic_cclient).
client acts as an Erlang C - node , and where the communication thus
is according to the Er... |
cb57066876c4db8c019589db4861c01e7ddf256e3053f4c93ca8d03081c21999 | jaredly/reason-language-server | compenv.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
Fabr... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/407/compenv.ml | ocaml | ************************************************************************
OCaml
... | Fabrice Le Fessant , EPI Gallium , INRIA Paris - Rocquencourt
Copyright 2013 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Clflags
let output_prefix name =
let oname =
match !output_name with
| None ... |
b996328c3f67809e1af3ca5d46db39117ddb505106250746e9933ef2ea4585f8 | tip-org/tools | List.hs | module Data.List (
elemIndex, elemIndices,
find, findIndex, findIndices,
nub, nubBy, delete, deleteBy, (\\), deleteFirstsBy,
union, unionBy, intersect, intersectBy,
intersperse, transpose, partition, group, groupBy,
inits, tails, isPrefixOf, isSuffixOf,
mapAccumL, mapAccumR,
sort, sortB... | null | https://raw.githubusercontent.com/tip-org/tools/34350072587bd29157d18331eb895a1b2819555f/tip-prelude/src/Data/List.hs | haskell | ...and what the Prelude exports
[]((:), []), -- This is built-in syntax
transpose is lazy in both rows and columns,
and works for non-rectangular 'matrices'
For example, transpose [[1,2],[3,4,5],[]] = [[1,3],[2,4],[5]]
Note that [h | (h:t) <- xss] is not the same as (map head xss)
group splits its list a... | module Data.List (
elemIndex, elemIndices,
find, findIndex, findIndices,
nub, nubBy, delete, deleteBy, (\\), deleteFirstsBy,
union, unionBy, intersect, intersectBy,
intersperse, transpose, partition, group, groupBy,
inits, tails, isPrefixOf, isSuffixOf,
mapAccumL, mapAccumR,
sort, sortB... |
d6a502823e71bd08037a0f15d371c9a629d86d547d4dd81a352bfccc3689b078 | ryukinix/discrete-mathematics | list-comprehension.hs | - List Comprehension
List comprehension is is very similar to set comprehension
in Mathematics . A list comprehension has this form :
[ expression | generator ]
The generator specifies a sequence of values that a variable takes on .
This is written in the form var < - list , and it means that the variable... | null | https://raw.githubusercontent.com/ryukinix/discrete-mathematics/1f779e05822c094af33745e2dd3c9a35c6dfb388/src/01-introduction-to-haskell/list-comprehension.hs | haskell | }
destructuring bind
multiples generators acting combinators or nested loops
=> [(1,'a'),(1,'b'),(2,'a'),(2,'b'),(3,'a'),(3,'b')]
specifying conditions to filter
=> []
=> [True, True, True, False]
=> [True, True]
=> [[3,4,5],[4,3,5],[5,12,13],[6,8,10],[7,24,25],[8,6,10],[8,15,17],...] | - List Comprehension
List comprehension is is very similar to set comprehension
in Mathematics . A list comprehension has this form :
[ expression | generator ]
The generator specifies a sequence of values that a variable takes on .
This is written in the form var < - list , and it means that the variable... |
0af41131ec3d66cc5ed7cc701bf2e80e85cf4006e57a2f87210ca52a39961668 | takikawa/racket-ppa | datum.rkt | #lang racket/base
(require racket/private/stxcase-scheme
racket/private/qqstx
(for-syntax racket/base
racket/private/sc))
(provide datum datum-case with-datum define/with-datum
quasidatum undatum undatum-splicing)
(define-syntax (define/with-datum stx)
(syntax-case s... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/d336bb10e3e0ec3a20020e9ade9e77d2f6f80b6d/collects/syntax/datum.rkt | racket | auxiliary macro | #lang racket/base
(require racket/private/stxcase-scheme
racket/private/qqstx
(for-syntax racket/base
racket/private/sc))
(provide datum datum-case with-datum define/with-datum
quasidatum undatum undatum-splicing)
(define-syntax (define/with-datum stx)
(syntax-case s... |
e8e1dcf08a81b460689185cd2be9cb7f942421180e4d5f683fd956dddcd4fd06 | cicakhq/potato | package.lisp | (defpackage :state-server
(:use :cl :potato.common)
(:documentation "Server tracking users in the channels")
(:export #:start-state-server
#:decode-name
#:encode-name
#:add-user
#:remove-user))
| null | https://raw.githubusercontent.com/cicakhq/potato/88b6c92dbbc80a6c9552435604f7b1ae6f2a4026/src/state-server/package.lisp | lisp | (defpackage :state-server
(:use :cl :potato.common)
(:documentation "Server tracking users in the channels")
(:export #:start-state-server
#:decode-name
#:encode-name
#:add-user
#:remove-user))
| |
c7ffaf5a254be86830ef78a511ab835e4f666c151e4c11e126b35f7ff3b1ab88 | nobsun/oi | echo.hs | # LANGUAGE TypeOperators #
module Main where
import Data.OI hiding (isEOF)
import Data.Maybe
import System.IO
import qualified System.Environment as Sys (getArgs)
main :: IO ()
main = runInteraction pmain
pmain :: ([String], Either [(Maybe Char, Maybe ())] ([Maybe Char], [Maybe ()])) :-> ()
pmain = null . getArgs... | null | https://raw.githubusercontent.com/nobsun/oi/3a99630a01debeb3266620580d0e8ffbc0b8042b/sample/echo.hs | haskell | # LANGUAGE TypeOperators #
module Main where
import Data.OI hiding (isEOF)
import Data.Maybe
import System.IO
import qualified System.Environment as Sys (getArgs)
main :: IO ()
main = runInteraction pmain
pmain :: ([String], Either [(Maybe Char, Maybe ())] ([Maybe Char], [Maybe ()])) :-> ()
pmain = null . getArgs... | |
34bd1a2b06d588b4c69ddf0fd3282df68025cb55fd6269f97ca53d1e95024fe8 | patricoferris/ocaml-multicore-monorepo | baijiu_sha224.ml | module By = Digestif_by
module Bi = Digestif_bi
module type S = sig
type ctx
type kind = [ `SHA224 ]
val init : unit -> ctx
val unsafe_feed_bytes : ctx -> By.t -> int -> int -> unit
val unsafe_feed_bigstring : ctx -> Bi.t -> int -> int -> unit
val unsafe_get : ctx -> By.t
val dup : ctx -> ctx
end
... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/digestif/src-ocaml/baijiu_sha224.ml | ocaml | module By = Digestif_by
module Bi = Digestif_bi
module type S = sig
type ctx
type kind = [ `SHA224 ]
val init : unit -> ctx
val unsafe_feed_bytes : ctx -> By.t -> int -> int -> unit
val unsafe_feed_bigstring : ctx -> Bi.t -> int -> int -> unit
val unsafe_get : ctx -> By.t
val dup : ctx -> ctx
end
... | |
031047891f2f2e6b6659f50b742c41ad0219cc2096bcaa5420e77656a5e575ce | 8c6794b6/guile-tjit | bitwise.scm | ;;; bitwise.scm --- The R6RS bitwise arithmetic operations library
Copyright ( C ) 2010 , 2013 Free Software Foundation , Inc.
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/rnrs/arithmetic/bitwise.scm | scheme | bitwise.scm --- The R6RS bitwise arithmetic operations library
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warra... |
Copyright ( C ) 2010 , 2013 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
(library (rnrs arithmetic bitwise (6)... |
833eec429782f49912f9551813d13248b53af5b39a0e09dd4f0df26c662bdc18 | mauny/the-functional-approach-to-programming | load.ml | #directory "../Util";;
load_object "prelude";;
#infix "o";;
#open "prelude";;
load_object "defs";;
#open "defs";;
| null | https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/Expr/load.ml | ocaml | #directory "../Util";;
load_object "prelude";;
#infix "o";;
#open "prelude";;
load_object "defs";;
#open "defs";;
| |
50d439347aaae276d7c135aba24d67ea79800c743d6f5e1ca4648ec50d342cf6 | pirapira/coq2rust | errors.mli | (***********************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - Rocquencourt & LRI - CNRS - Orsay
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/lib/errors.mli | ocaml | *********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
*********************************************************************
* Create an anomaly.
* Raise an anomaly... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - Rocquencourt & LRI - CNRS - Orsay
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
* This modules imp... |
cba650f3032c3c2f73e996557b489ff2f0e5cecd4c185a9f8e083b520ff07483 | reactiveml/rml | rmltop_directives.ml | (**********************************************************************)
(* *)
(* ReactiveML *)
(* *)
(* ... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel/rmltop_directives.ml | ocaml | ********************************************************************
ReactiveML
... | Copyright 2002 , 2007 . All rights reserved .
version 1.0 .
- theme SPI , Laboratoire d'Informatique de Paris 6 ( 2002 - 2005 )
- Verimag , CNRS Grenoble ( 2005 - 2006 )
- projet , ( 2006 - 2007 ) ... |
d70765b60f81f0305566a22e3a9e675e27410801d1082fabcc5dc004af71b59e | ekmett/algebra | Class.hs | # LANGUAGE FlexibleInstances , UndecidableInstances #
module Numeric.Rng.Class
( Rng
) where
import Numeric.Additive.Group
import Numeric.Algebra.Class
-- | A Ring without an /i/dentity.
class (Group r, Semiring r) => Rng r
instance (Group r, Semiring r) => Rng r
| null | https://raw.githubusercontent.com/ekmett/algebra/12dd33e848f406dd53d19b69b4f14c93ba6e352b/src/Numeric/Rng/Class.hs | haskell | | A Ring without an /i/dentity. | # LANGUAGE FlexibleInstances , UndecidableInstances #
module Numeric.Rng.Class
( Rng
) where
import Numeric.Additive.Group
import Numeric.Algebra.Class
class (Group r, Semiring r) => Rng r
instance (Group r, Semiring r) => Rng r
|
704e360726595869e341a632dbf5116b639183cca1d0e39d0941675ab19616a6 | clojure-interop/aws-api | WaiterTimedOutException.clj | (ns com.amazonaws.waiters.WaiterTimedOutException
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.waiters WaiterTimedOutException]))
(defn ->waiter-timed-out-exception
"Constructor.
Constructs a new WaiterTimedOutException with the specified error
message.
message - Describes th... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.waiters/src/com/amazonaws/waiters/WaiterTimedOutException.clj | clojure | (ns com.amazonaws.waiters.WaiterTimedOutException
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.waiters WaiterTimedOutException]))
(defn ->waiter-timed-out-exception
"Constructor.
Constructs a new WaiterTimedOutException with the specified error
message.
message - Describes th... | |
794584ccc72c467b39e3d48fb19ffb1f3eb799c4ccc7b0c433937ddfd1698d78 | emqx/emqx | emqx_rule_engine_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_rule_engine/test/emqx_rule_engine_SUITE.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_rule_engine_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-include_l... |
a7dfa80739962f0a20d2b83c8c730236b824f4b5b4d5ff2284934d97273f290f | ha-mo-we/Racer | lin-int-inequations.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : RACER ; Base : 10 -*-
Copyright ( c ) 1998 - 2014 ,
, , .
;;; All rights reserved.
Racer is distributed under the following BSD 3 - clause license
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are p... | null | https://raw.githubusercontent.com/ha-mo-we/Racer/d690841d10015c7a75b1ded393fcf0a33092c4de/source/lin-int-inequations.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : RACER ; Base : 10 -*-
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright notice,
this list of c... |
Copyright ( c ) 1998 - 2014 ,
, , .
Racer is distributed under the following BSD 3 - clause license
Neither the name Racer nor the names of its contributors may be used
CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING ,
VOLKER HAARSLEV , RALF MOELLER , NOR FOR ANY
... |
89cd705bfeaaac78d7c267f5e31a8b7f4b7780092792cb469d202e07d4590947 | magnolia-lang/magnolia-lang | magnoliac.hs | import Control.Monad (join)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.State
import Data.Foldable (toList)
import qualified Data.List as L
import qualified Data.Map as M
import qualified Data.Set as S
import Debug.Trace (trace)
import Options.Applicative hi... | null | https://raw.githubusercontent.com/magnolia-lang/magnolia-lang/b4e4f884046affdbbba96f7c206071164bee64b5/src/magnoliac.hs | haskell | === parsing utils ===
=== repl-related utils ===
TODO: handle better package names that don't fit
TODO: what to do with other packages? | import Control.Monad (join)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.State
import Data.Foldable (toList)
import qualified Data.List as L
import qualified Data.Map as M
import qualified Data.Set as S
import Debug.Trace (trace)
import Options.Applicative hi... |
e9be597c2242bd5df25a2b232d8167f0d8dd038dc70607310088587d9a7da90b | athensresearch/athens | block_remove_test.clj | (ns athens.common-events.atomic-ops.block-remove-test
(:require
[athens.common-db :as common-db]
[athens.common-events.fixture :as fixture]
[athens.common-events.graph.atomic :as atomic-graph-ops]
[athens.common-events.graph.ops :as graph-ops]
[athens.common.lo... | null | https://raw.githubusercontent.com/athensresearch/athens/73cb4fa8f88f0730e2fe7a0d38505493b96f4d4b/test/athens/common_events/atomic_ops/block_remove_test.clj | clojure | The string displays as:
"yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
This is a quine: (computing)
It's interesting in and of itself but it's also especially relevant
for this test, as it's an example of a reference in plain text.
Undoing a remove must restor... | (ns athens.common-events.atomic-ops.block-remove-test
(:require
[athens.common-db :as common-db]
[athens.common-events.fixture :as fixture]
[athens.common-events.graph.atomic :as atomic-graph-ops]
[athens.common-events.graph.ops :as graph-ops]
[athens.common.lo... |
3237c8bb1cb99249769ca8dd451b83e7e22065cd6b5088ffb92d9ecf440dc3e0 | asdr/easyweb | epoll-taskmaster.lisp | (in-package :hunchentoot)
(defclass epoll-taskmaster (taskmaster)
(#+:easyweb
(acceptor-process :accessor acceptor-process
:documentation "A process that accepts incoming
connections and hands them off for epoll system calls."))
(:documentation "A taskmaster that starts one thread for listening
to incomi... | null | https://raw.githubusercontent.com/asdr/easyweb/b259358a5f5e146b233b38d5e5df5b85a5a479cd/epoll/epoll-taskmaster.lisp | lisp | (in-package :hunchentoot)
(defclass epoll-taskmaster (taskmaster)
(#+:easyweb
(acceptor-process :accessor acceptor-process
:documentation "A process that accepts incoming
connections and hands them off for epoll system calls."))
(:documentation "A taskmaster that starts one thread for listening
to incomi... | |
cb76fb17b0fabed9b46af94e18537c3583db115bfc7e7a6b539570a89ca97ab9 | erlyvideo/udpts | udpts_stats.erl | -module(udpts_stats).
-author('Max Lapshin <>').
-include("udpts.hrl").
-export([html/0, json/0]).
html() ->
{ok, Bin} = file:read_file("index.html"),
Bin.
json() ->
Now = os:timestamp(),
Streams1 = [begin
[{memory, Memory},{message_queue_len, Messages}] = process_info(Pid, [memory, message_queue_len])... | null | https://raw.githubusercontent.com/erlyvideo/udpts/70ed6c43969369d6f094cca031c422264fb4d72c/src/udpts_stats.erl | erlang | -module(udpts_stats).
-author('Max Lapshin <>').
-include("udpts.hrl").
-export([html/0, json/0]).
html() ->
{ok, Bin} = file:read_file("index.html"),
Bin.
json() ->
Now = os:timestamp(),
Streams1 = [begin
[{memory, Memory},{message_queue_len, Messages}] = process_info(Pid, [memory, message_queue_len])... | |
22c4fa1bcb082def59821de28b08ce368bd4f70fd376803f233cad45d0b7971a | simmone/racket-simple-qr | exclude-version-information.rkt | #lang racket
(require "../../../../share/func.rkt")
(require "../../../../share/draw/draw.rkt")
(provide (contract-out
[write-report-exclude-version-information (-> natural? hash? hash? path-string? void?)]
))
(define (write-report-exclude-version-information modules points_map exclude_map expres... | null | https://raw.githubusercontent.com/simmone/racket-simple-qr/904f1491bc521badeafeabd0d7d7e97e3d0ee958/simple-qr/read/lib/express/exclude-version-information/exclude-version-information.rkt | racket | #lang racket
(require "../../../../share/func.rkt")
(require "../../../../share/draw/draw.rkt")
(provide (contract-out
[write-report-exclude-version-information (-> natural? hash? hash? path-string? void?)]
))
(define (write-report-exclude-version-information modules points_map exclude_map expres... | |
53d9d6b8bb2b9dc34363c4939261f4fde4b015b966e21d0e481ef61dda46d31a | shirok/Gauche | info.scm | ;;;
;;; info.scm - parse info file
;;;
Copyright ( c ) 2000 - 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of source code must retain the above copyrig... | null | https://raw.githubusercontent.com/shirok/Gauche/e97efb5e54f9ab97746369b8ac748f338224c746/lib/text/info.scm | scheme |
info.scm - parse info file
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.... | Copyright ( c ) 2000 - 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(define-module text.info
(use srfi.13)
(... |
0381f712418e2fd56c2b6b069515670d53bf542ac1a9f3363c82ee1cdca7827c | mukul-rathi/bolt | good_constructor.ml | open Core
open Print_typed_ast
let%expect_test "Constructor with multiple args" =
print_typed_ast
"
class Foo {
capability linear Bar;
const int f : Bar;
const int g : Bar;
const int h : Bar;
}
void main(){
let x = new Foo(f:4, g:5, h:6);
x
}
" ;
[%expe... | null | https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/tests/frontend/expect/typing/good_constructor.ml | ocaml | open Core
open Print_typed_ast
let%expect_test "Constructor with multiple args" =
print_typed_ast
"
class Foo {
capability linear Bar;
const int f : Bar;
const int g : Bar;
const int h : Bar;
}
void main(){
let x = new Foo(f:4, g:5, h:6);
x
}
" ;
[%expe... | |
d47b6dfb219f2594156a494b6ef8bd4c8d54f2c286c154e501cc76cd645a8405 | larcenists/larceny | lazy.sps | (import (scheme base)
(scheme write)
(tests scheme lazy)
(tests scheme test))
(display "Running tests for (scheme lazy)\n")
(run-lazy-tests)
(report-test-results)
| null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/R7RS/Lib/tests/scheme/run/lazy.sps | scheme | (import (scheme base)
(scheme write)
(tests scheme lazy)
(tests scheme test))
(display "Running tests for (scheme lazy)\n")
(run-lazy-tests)
(report-test-results)
| |
f04af8df0e7637893dc58105b40c7ab7328c054a840f3699328ba5473c6d8fc2 | kakaranet/white_rabbit | nsm_mq_app.erl | -module(nsm_mq_app).
-behaviour(application).
%% Application callbacks
-export([start/0, start/2, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
start() ->
application:st... | null | https://raw.githubusercontent.com/kakaranet/white_rabbit/7cb50b6cda93a95981c6a680cfd4462a426ccc54/src/nsm_mq_app.erl | erlang | Application callbacks
===================================================================
Application callbacks
===================================================================
| -module(nsm_mq_app).
-behaviour(application).
-export([start/0, start/2, stop/1]).
start() ->
application:start(nsm_mq).
start(_StartType, _StartArgs) ->
nsm_mq_sup:start_link().
stop(_State) ->
ok.
|
f49fc26d0735d2eb1d018c2654a1a5c60ea632a22a06bf0beb42be3059c51bbe | bobeff/playground | 014.rkt | Exercise 14 . Define the function string - last , which extracts the last 1String
; from a non-empty string.
#lang racket
(require rackunit)
(define (string-last s)
(let ((lng (string-length s)))
(substring s (- lng 1) lng)))
(check-exn exn:fail? (thunk (string-last "")))
(check-equal? (string-last "1") "1"... | null | https://raw.githubusercontent.com/bobeff/playground/7072dbd7e0acd690749abe1498dd5f247cc21637/htdp-second-edition/exercises/014.rkt | racket | from a non-empty string. | Exercise 14 . Define the function string - last , which extracts the last 1String
#lang racket
(require rackunit)
(define (string-last s)
(let ((lng (string-length s)))
(substring s (- lng 1) lng)))
(check-exn exn:fail? (thunk (string-last "")))
(check-equal? (string-last "1") "1")
(check-equal? (string-las... |
6af01456b0f84005e4030fba0bbc87bf2388bb40c9684cc2a1c478090f328f4c | mitchellwrosen/planet-mitchell | IORef.hs | module Concurrency.IORef
( -- * IORef
IORef
, newIORef
, readIORef
, writeIORef
, writeIORef'
, modifyIORef
, modifyIORef'
, atomicModifyIORef
, atomicModifyIORef'
, atomicWriteIORef
, atomicWriteIORef'
, mkWeakIORef
) where
import Data.IORef.Extra (atomicWriteIORef', writeIORef')
import ... | null | https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Concurrency/IORef.hs | haskell | * IORef | module Concurrency.IORef
IORef
, newIORef
, readIORef
, writeIORef
, writeIORef'
, modifyIORef
, modifyIORef'
, atomicModifyIORef
, atomicModifyIORef'
, atomicWriteIORef
, atomicWriteIORef'
, mkWeakIORef
) where
import Data.IORef.Extra (atomicWriteIORef', writeIORef')
import UnliftIO.IORef
|
218474d3d2c61642d33b162dc72d939bb72eea0cbf29b3ccc90ee8eb3ce54b3e | ucsd-progsys/nate | selection_handle_set.ml | ##ifdef CAMLTK
The function * must * use
let handle_set opts w cmd =
tkCommand [|
TkToken"selection";
TkToken"handle";
TkTokenList
(List.map
(function x -> cCAMLtoTKicccm w icccm_selection_handle_table x)
opts);
cCAMLtoTKwidget widget_any_table w;
let id = register_ca... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/builtin/selection_handle_set.ml | ocaml | ##ifdef CAMLTK
The function * must * use
let handle_set opts w cmd =
tkCommand [|
TkToken"selection";
TkToken"handle";
TkTokenList
(List.map
(function x -> cCAMLtoTKicccm w icccm_selection_handle_table x)
opts);
cCAMLtoTKwidget widget_any_table w;
let id = register_ca... | |
b85356aeb22b2eefcbadba8976d29c4dff62fcc4d983b4e841ba0efb3cc5c989 | ghc/ghc | T22623.hs | # LANGUAGE GHC2021 #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE ScopedTypeVariables #
module T22623 where
import T22623a
type BindNonEmptyList :: NonEmpty -> NonEmpty -> [Q]
type family BindNonEmptyList (x :: NonEmpty) (y :: NonEmpty) :: [Q] where
BindNonEmptyList... | null | https://raw.githubusercontent.com/ghc/ghc/3d55d8ab51ece43c51055c43c9e7aba77cce46c0/testsuite/tests/simplCore/should_compile/T22623.hs | haskell | # LANGUAGE GHC2021 #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE ScopedTypeVariables #
module T22623 where
import T22623a
type BindNonEmptyList :: NonEmpty -> NonEmpty -> [Q]
type family BindNonEmptyList (x :: NonEmpty) (y :: NonEmpty) :: [Q] where
BindNonEmptyList... | |
f70267a5ed0128080a62732ff0ae4d3e52b237e93adf0047894492d6a356235f | irpap/Write-yourself-a-Scheme-in-48-hours | Test.hs | module Main where
import Data.Char
import Data.Complex
import SchemeParser
import Test.HUnit
main = runTestTT $ test tests
tests :: Test
tests = TestList $ map TestCase [
assertEqual
"Parsing a number"
(Right (Number 33))
(readExpr "33" >>=eval)
,
assertEqu... | null | https://raw.githubusercontent.com/irpap/Write-yourself-a-Scheme-in-48-hours/ea283dbed42e3a359de7d91f1343c7e14ec986bc/chapter04-error-checking/Test.hs | haskell | module Main where
import Data.Char
import Data.Complex
import SchemeParser
import Test.HUnit
main = runTestTT $ test tests
tests :: Test
tests = TestList $ map TestCase [
assertEqual
"Parsing a number"
(Right (Number 33))
(readExpr "33" >>=eval)
,
assertEqu... | |
ec04a0898767ba50f6e22faad0058ffa20dd6c8937f1dd8121a6cc18df47b8f7 | Bogdanp/racket-binfmt | info.rkt | #lang info
(define license 'BSD-3-Clause)
(define version "0.4")
(define collection "binfmt")
(define deps '("base"))
(define build-deps '("racket-doc" "scribble-lib"))
(define scribblings '(("binfmt-manual.scrbl")))
| null | https://raw.githubusercontent.com/Bogdanp/racket-binfmt/812e535190d1d06617edf76ad3c8309ebea08fcc/binfmt/info.rkt | racket | #lang info
(define license 'BSD-3-Clause)
(define version "0.4")
(define collection "binfmt")
(define deps '("base"))
(define build-deps '("racket-doc" "scribble-lib"))
(define scribblings '(("binfmt-manual.scrbl")))
| |
46bc0d6056d32a7203b797da08dc192d4e33a692ea8353d3b9149fd601c3bd72 | atgreen/lisp-openshift | package.lisp | (cl:defpackage :ironclad
(:use :cl)
(:nicknames :crypto)
(:shadow null)
(:import-from #:nibbles
#:ub16ref/le #:ub16ref/be
#:ub32ref/le #:ub32ref/be
#:ub64ref/le #:ub64ref/be)
(:export
referencing multiple - octet values in an octet vector ( SETF - able )
#:ub16ref/be #:ub16ref/le #:ub32ref/be #:ub... | null | https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/ironclad_0.30/src/package.lisp | lisp | hash functions
HMACs
CMACs
introspection
high-level block cipher operators
arguments to (MAKE-CIPHER ... :MODE X)
public-key encryption operations
signatures
public-key slot readers
conditions
utilities
streams | (cl:defpackage :ironclad
(:use :cl)
(:nicknames :crypto)
(:shadow null)
(:import-from #:nibbles
#:ub16ref/le #:ub16ref/be
#:ub32ref/le #:ub32ref/be
#:ub64ref/le #:ub64ref/be)
(:export
referencing multiple - octet values in an octet vector ( SETF - able )
#:ub16ref/be #:ub16ref/le #:ub32ref/be #:ub... |
6ab72d4443646d844e3c385aa289302c90605dc59be904a4169f3e63a119caaa | crategus/cl-cffi-gtk | scrolled-window.lisp | ( 2021 - 3 - 19 )
(in-package #:gtk-example)
(defun example-scrolled-window ()
(within-main-loop
(let ((window (make-instance 'gtk-window
:type :toplevel
:title "Example Scrolled Window"
:width-request 350
... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/b613a266a5f8e7f477b66a33d4df84fbed3dc7bc/demo/gtk-example/scrolled-window.lisp | lisp | Pack and show the widgets | ( 2021 - 3 - 19 )
(in-package #:gtk-example)
(defun example-scrolled-window ()
(within-main-loop
(let ((window (make-instance 'gtk-window
:type :toplevel
:title "Example Scrolled Window"
:width-request 350
... |
4ffde2a3f52fd86e48af4a3283504112f80e847d255c55fd1eea74c96d03f8d8 | release-project/benchmarks | client.erl | %%%--------------------------------------------------------------------
%%% CLIENT MODULE
%%%
@author : upon a design by
( C ) 2014 , RELEASE project
%%% @doc
%%% Client module for the Distributed Erlang instant messenger (IM)
application developed as a real benchmark for the Scalable
Distributed Erlang e... | null | https://raw.githubusercontent.com/release-project/benchmarks/55f042dca3a2c680e2967c59edc9636456047bd5/IM/RD-IM/client.erl | erlang | --------------------------------------------------------------------
CLIENT MODULE
@doc
Client module for the Distributed Erlang instant messenger (IM)
This module implementes the functionality for client processes
@end
--------------------------------------------------------------------
-----------------------... | @author : upon a design by
( C ) 2014 , RELEASE project
application developed as a real benchmark for the Scalable
Distributed Erlang extension of the Erlang / OTP language .
in a system similar to the system described in the Section 2 of
the document " Instant Messenger Architectures Design P... |
4171d286bc02dec3614189ffbb04a2cdddb59d2577809906465b17067af2ed1f | gnuvince/ocaml-tiger | utils.ml | let join sep conv elems =
String.concat sep (List.map conv elems)
| null | https://raw.githubusercontent.com/gnuvince/ocaml-tiger/42e39cb0d48cf3100fbfb7e51aa88a71e04ec6a4/utils.ml | ocaml | let join sep conv elems =
String.concat sep (List.map conv elems)
| |
196e7d7f9d1e0974239df7b60ad667585c6d2831b68d677ac217f8ba58fde25c | froggey/Mezzano | load.lisp | ;;;; Loads compiled files into an cold-generator environment
(defpackage :mezzano.cold-generator.load
(:use :cl)
(:local-nicknames (#:env #:mezzano.cold-generator.environment)
(#:util #:mezzano.cold-generator.util)
(#:sys.int #:mezzano.internals))
(:export #:load-compiled-... | null | https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/tools/cold-generator2/load.lisp | lisp | Loads compiled files into an cold-generator environment
Check the header.
Read remaining bytes. They must all be continuation bytes.
n constants on stack.
+llf-function+
tag. (byte)
mc size in bytes. (integer)
number of constants. (integer)
gc-info-length in bytes. (integer)
mc
gc-info
Pull n constants off ... |
(defpackage :mezzano.cold-generator.load
(:use :cl)
(:local-nicknames (#:env #:mezzano.cold-generator.environment)
(#:util #:mezzano.cold-generator.util)
(#:sys.int #:mezzano.internals))
(:export #:load-compiled-file
#:invalid-llf
#:validate-llf-heade... |
8fb542deb11f66179fde960f6419cac53060a937b30a359a13306815b8f76b65 | mfoemmel/erlang-otp | xmerl_xml.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2003 - 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/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/xmerl/src/xmerl_xml.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 2003 - 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(xmerl_xml).
-export(['#xml-inher... |
85241eb95efd9dae1fdbea1b02a0552b4a9e2400d7696c0fcad52eaa2cb53d9a | bhk/scam | math1.scm | ;;----------------------------------------------------------------
math1 : FP encoding and operations
;;----------------------------------------------------------------
(require "core.scm")
(require "math0.scm" &private)
Construct an FP number
;;
(define `(make-fp exp sgn frac)
(._. exp sgn frac))
(define `(... | null | https://raw.githubusercontent.com/bhk/scam/59d7c02e673f1faebd0b7625d8c595daaa5efc51/math1.scm | scheme | ----------------------------------------------------------------
----------------------------------------------------------------
In math.scm this is exported as &public
they have been converted to " 011 " .
If U ends with "E"+EN, then remove it cleanly.
Otherwise, leave behind clearly invalid characters.
Retur... | math1 : FP encoding and operations
(require "core.scm")
(require "math0.scm" &private)
Construct an FP number
(define `(make-fp exp sgn frac)
(._. exp sgn frac))
(define `(fp.xpo n) (word 1 n))
(define `(fp.sign n) (word 2 n))
(define `(fp.uf n) (nth-rest 3 n))
(define `NaN "NaN")
(define `(abs x)
(pats... |
05c80353e2e983aa7ceaac0e886181ad2cfcf74a94731b5f628f4b9b361fc58a | brownplt/lambda-py | lambdapy-context-test.rkt | #lang racket
(require "lambdapy-test-util.rkt")
(define basic-store (term
{(1 (pointer-val 2))
(2 (obj-val %function (meta-closure (λ () (no-var)
(alloc
(obj-val BaseException (no-meta)
... | null | https://raw.githubusercontent.com/brownplt/lambda-py/c3ee39502c8953d36b886e5a203f2eb51d2f495b/redex/lambdapy-context-test.rkt | racket | #lang racket
(require "lambdapy-test-util.rkt")
(define basic-store (term
{(1 (pointer-val 2))
(2 (obj-val %function (meta-closure (λ () (no-var)
(alloc
(obj-val BaseException (no-meta)
... | |
f6de1150165a2f94611571334437155a6158ae23550d4fd7783036769252d5be | nuprl/gradual-typing-performance | fig-root.rkt | #lang racket
(provide
;; Plot
poly plotted on [ -1,5 ] to visualize the roots and the flatness at 3
poly-root
;; Plot
;; a function with a root between labeled interval [a,b] with midpoint
f+interval)
(require plot)
(define (f x) (- (expt x 2) (* -10 (expt x 1)) 50))
(define f-plot (functi... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/htdp/base/Images/fig-root.rkt | racket | Plot
Plot
a function with a root between labeled interval [a,b] with midpoint
(+ y-low Δ)) "m")
y-low) "a")
y-low) "b"))
f+interval
Number -> Number
poly-root | #lang racket
(provide
poly plotted on [ -1,5 ] to visualize the roots and the flatness at 3
poly-root
f+interval)
(require plot)
(define (f x) (- (expt x 2) (* -10 (expt x 1)) 50))
(define f-plot (function f))
(define ax 2)
(define y-low -50)
(define y-hi +120)
(define a
(lines
(list ... |
38b7199169633e6fb1e5da68442370d0e17c5a02d5b4d514852b8de47248fad2 | k0001/exinst | Main.hs | # LANGUAGE CPP #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Main where
import qualified Data.Binary as Bin
import qualifi... | null | https://raw.githubusercontent.com/k0001/exinst/7ea28e5de5afc27c18757ad65650be53df488862/exinst-cereal/tests/Main.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE RankNTypes #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
A... | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Main where
import qualified Data.Binary as Bin
import qualified Data.ByteString.Lazy as BSL
import Data.Int (Int32)
import Data.Kind (Type)
import qualifi... |
c87408a822d25884abd273c9896793c024f1aa66044ca040383bca337a9ebdf2 | michiakig/LispInSmallPieces | chap2e.scm | $ I d : , v 4.2 2006/11/09 18:58:18 queinnec Exp $
;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is part of the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
;;; Newest version may ... | null | https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/src/chap2e.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is part of the files that accompany the book:
Newest version may be retrieved from:
Check the README file before using this file.
(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
Variants around chap2c.scm a... | $ I d : , v 4.2 2006/11/09 18:58:18 queinnec Exp $
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz
(define (df.evaluate e env fenv denv)
(if (atom? e)
(cond ((symb... |
ee363a747ec99a77bfdaddc0d6ed5a8e87f9ed7f3737799bae4aa84a9c5803f4 | nikodemus/SBCL | typetran.lisp | ;;;; This file contains stuff that implements the portable IR1
;;;; semantics of type tests and coercion. The main thing we do is
;;;; convert complex type operations into simpler code that can be
;;;; compiled inline.
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
T... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/compiler/typetran.lisp | lisp | This file contains stuff that implements the portable IR1
semantics of type tests and coercion. The main thing we do is
convert complex type operations into simpler code that can be
compiled inline.
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!C")
Some standard types ( such as ATOM ) are best tested by letting the
TYPEP source transform do its t... |
1b66fb58759bbed994e3432ecf26c17137709939979e9a9d935ba56cef3fcbe6 | 3b/3b-ovr | library.lisp | (in-package #:3b-ovr-bindings)
(define-foreign-library libovr
(:unix #+x86-64 (:or "libOVRRT64_0.so.5"
"libOVRRT64_0.so.5.0.1")
#-x86-64 (:or "LibOVRRT32_0.so.5"
"LibOVRRT32_0.so.5.0.1"))
(:windows #+x86-64 (:or "LibOVRRT64_0_5.dll")
#-x86-64 (:or ... | null | https://raw.githubusercontent.com/3b/3b-ovr/0e65d50d7a2331e1e07bd0cf16bcb4e2cdba1ed9/library.lisp | lisp | (in-package #:3b-ovr-bindings)
(define-foreign-library libovr
(:unix #+x86-64 (:or "libOVRRT64_0.so.5"
"libOVRRT64_0.so.5.0.1")
#-x86-64 (:or "LibOVRRT32_0.so.5"
"LibOVRRT32_0.so.5.0.1"))
(:windows #+x86-64 (:or "LibOVRRT64_0_5.dll")
#-x86-64 (:or ... | |
03b4d5cedb7c317c74704cb919915eeeed7f93c465f8a38dc6abfc44e130004c | 5HT/ant | Lexer.ml |
open XNum;
open Unicode.Types;
open Types;
open Runtime;
open Unicode.SymbolTable;
we can not open Unicode because of the name clash with Types
module UChar = Unicode.UChar;
type assoc = [ Left | NonA | Right ];
type token_class =
[ EOF
| LID of symbol
| UID of symbol
| NUMBER of num
| CHARACTER of int
| STRING... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/VM/Private/Lexer.ml | ocaml | .
/
b
o
x
_
\
b
e
f
n
r
t
u
x
'\'', '\"', \, decimal digits, or an invalid sequence
'\''
'\"'
;]
[;
;;
[;
vim:set foldmarker=[\|,\|] foldmethod=marker: |
open XNum;
open Unicode.Types;
open Types;
open Runtime;
open Unicode.SymbolTable;
we can not open Unicode because of the name clash with Types
module UChar = Unicode.UChar;
type assoc = [ Left | NonA | Right ];
type token_class =
[ EOF
| LID of symbol
| UID of symbol
| NUMBER of num
| CHARACTER of int
| STRING... |
43ea33d9c22d57d271f07ec8d1d3b53a3d45dacfe3ed44e192cad76f799826e2 | facebook/pyre-check | handle.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/10c375bea52db5d10b71cb5206fac7da9549eb0c/source/hack_parallel/hack_parallel/utils/handle.ml | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
34f2757185c2c8adbc976eaf1e12313920b3f150b18dece94c47af16c682e5a9 | patrikja/AFPcourse | RWMonad.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
module RWMonad where
import Control.Applicative
import Data.Monoid
import Test.QuickCheck
-- import qualified Test.QuickCheck.Property as QC
-- import qualified Test.QuickCheck.Arbitrary as QC
Fake exam question :
A. Implement a " Read - Wri... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L16/before/src/RWMonad.hs | haskell | import qualified Test.QuickCheck.Property as QC
import qualified Test.QuickCheck.Arbitrary as QC
= pureRW
e2e :: e -> e
e2aw :: e -> (a, w)
localRW f (RW e2aw) = RW $ \e -> e2aw (f e)
expr.)
Monad instance for RW
Monad instance for RW
def. returnRW
inlining
beta-red.
inlining a, w1
Monoid law
inli... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
module RWMonad where
import Control.Applicative
import Data.Monoid
import Test.QuickCheck
Fake exam question :
A. Implement a " Read - Write " monad |m = RW e w| ( for any type |e|
and and monoid |w| ) with the following operations :
\b... |
3c1ccf65839b4031455d961615c021a1f0b2a60218fa71345914b6a04767f176 | poscat0x04/telegram-types | DeleteChatPhoto.hs | module Web.Telegram.Types.Internal.API.DeleteChatPhoto where
import Common
import Web.Telegram.Types.Internal.API.ChatId
newtype DeleteChatPhoto = DeleteChatPhoto
{chatId :: ChatId}
deriving stock (Show, Eq)
mkLabel ''DeleteChatPhoto
deriveToJSON snake ''DeleteChatPhoto
makeMethod ''DeleteChatPhoto
| null | https://raw.githubusercontent.com/poscat0x04/telegram-types/3de0710640f5303638a83e409001b0342299aeb8/src/Web/Telegram/Types/Internal/API/DeleteChatPhoto.hs | haskell | module Web.Telegram.Types.Internal.API.DeleteChatPhoto where
import Common
import Web.Telegram.Types.Internal.API.ChatId
newtype DeleteChatPhoto = DeleteChatPhoto
{chatId :: ChatId}
deriving stock (Show, Eq)
mkLabel ''DeleteChatPhoto
deriveToJSON snake ''DeleteChatPhoto
makeMethod ''DeleteChatPhoto
| |
020cd02052b1d5888a3fafdc0b25f49cf975926eb58d5769b98becd22e3b3d59 | clj-commons/vizdeps | project.clj | (defproject sample/delta "0.1.0-SNAPSHOT"
:plugins [[lein-parent "0.3.1"]]
:parent-project {:path "../project.clj"
:inherit [:managed-dependencies]}
:dependencies [[sample/archie "0.1.0-SNAPSHOT"]
[sample/bravo "0.1.0-SNAPSHOT"]
[ring/ring-core "1.5.1"]]) | null | https://raw.githubusercontent.com/clj-commons/vizdeps/dadf0b8f69926c20df9472c4313056917bdd17b6/sample-multiproject/delta/project.clj | clojure | (defproject sample/delta "0.1.0-SNAPSHOT"
:plugins [[lein-parent "0.3.1"]]
:parent-project {:path "../project.clj"
:inherit [:managed-dependencies]}
:dependencies [[sample/archie "0.1.0-SNAPSHOT"]
[sample/bravo "0.1.0-SNAPSHOT"]
[ring/ring-core "1.5.1"]]) | |
4e713cd00d99589df6529dc9f00815f0d0e63488f14d1fb2b458eab54b734562 | semilin/layoup | fiend.lisp |
(MAKE-LAYOUT :NAME "fiend" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL
:KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/fiend.lisp | lisp |
(MAKE-LAYOUT :NAME "fiend" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL
:KEYBOARD NIL) | |
6404ff0f13cc7173c2e6e329ec94708cad339336806b514305ed1de617fbeef6 | AshleyYakeley/Truth | Image.hs | module Graphics.Cairo.Image
( R.Format(..)
, renderToByteString
, renderToImage
) where
import Codec.Picture.Types
import Data.Vector.Storable.ByteString
import qualified GI.Cairo.Render as R
import Shapes hiding (rotate)
import Shapes.Unsafe
renderToByteString :: R.Format -> (Int, Int) -> R.Render ()... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/e39ecefbcddaf38bc4c946def835650d11f5ac5e/Changes/cairo-functional/lib/Graphics/Cairo/Image.hs | haskell | module Graphics.Cairo.Image
( R.Format(..)
, renderToByteString
, renderToImage
) where
import Codec.Picture.Types
import Data.Vector.Storable.ByteString
import qualified GI.Cairo.Render as R
import Shapes hiding (rotate)
import Shapes.Unsafe
renderToByteString :: R.Format -> (Int, Int) -> R.Render ()... | |
cf0e399bf0fe528ea815b4c343b247843da49470ee0cda794ddc8833c5ec8ac6 | jrm-code-project/LISP-Machine | dcopy.lisp | -*- Mode : LISP ; Package : SYSTEM - INTERNALS ; : ZL ; ; Fonts:(CPTFONTB ) -*-
(defmacro with-decoded-disk-unit ((decoded encoded use . options) &body body)
(let ((u (gentemp "unit"))
(d (gentemp "dont-dispose")))
`(let (,u ,d)
(unwind-protect
(let ((,decoded (multiple-value-setq (... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/gjc/dcopy.lisp | lisp | Package : SYSTEM - INTERNALS ; : ZL ; ; Fonts:(CPTFONTB ) -*-
PROTOCOL KLUDGE. WE ALREADY KNOW THE SIZE IS CORRECT FROM FIND-DISK-PARTITION-FOR-READ
I-MEM
D--MEM obsolete
MAIN MEMORY
This is the magtape unit which is sequential
This next-volume crap is implementated as gross violation of modularity.
working like... |
(defmacro with-decoded-disk-unit ((decoded encoded use . options) &body body)
(let ((u (gentemp "unit"))
(d (gentemp "dont-dispose")))
`(let (,u ,d)
(unwind-protect
(let ((,decoded (multiple-value-setq (,u ,d) (decode-unit-argument ,encoded ,use ,@options))))
,@body)
... |
5f3d4fb150608354b8598d7130de1715492a3ffd76cc099523f968a8be6c8906 | Airini/FEECa | Quadrature.hs | module FEECa.Utility.Quadrature where
import Math.Combinatorics.Exact.Factorial
import Numeric.LinearAlgebra.HMatrix
import Numeric . LinearAlgebra . Data
import FEECa.Utility.Utility (pairM)
-- | Type synomnym to represent a quadrature as a list pairs
| of nodes and corresponding weights , the first element bein... | null | https://raw.githubusercontent.com/Airini/FEECa/3ffae7177fca159d965b70e3763a20ab84cd8a8b/src/FEECa/Utility/Quadrature.hs | haskell | | Type synomnym to represent a quadrature as a list pairs
| a given est of orthogonal polynomials.
| and beta = b.
scale2 y = y
TODO: why is scale defined but not used?
alpha' = fromIntegral alpha
scale = map ((2.0**(1.0+ alpha') / (1 + alpha')) *)
| its recurrence relation.
Iterative implementation of the rec... | module FEECa.Utility.Quadrature where
import Math.Combinatorics.Exact.Factorial
import Numeric.LinearAlgebra.HMatrix
import Numeric . LinearAlgebra . Data
import FEECa.Utility.Utility (pairM)
| of nodes and corresponding weights , the first element being the node
| and the second the weight .
type Quadrature = ... |
2a8a7938c339ea6541c90aaa2bb0d269ddb62c463f29dc5b1caf885c03dd9872 | bgusach/exercises-htdp2e | ex-288.rkt | #lang htdp/isl+
(require test-engine/racket-tests)
# # # Data Definitions
; Natural -> [List-of Natural]
Returns a list 0 , 1 , ... ( - n 1 )
(check-expect (build-series-1 0) '())
(check-expect (build-series-1 3) '(0 1 2))
(check-expect (build-series-1 5) '(0 1 2 3 4))
(define (build-series-1 n)
(build-list n ... | null | https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/3-abstraction/ex-288.rkt | racket | Natural -> [List-of Natural]
Natural -> [List-of Natural]
Natural -> [List-of Number]
Natural -> [List-of Number]
Returns a list with the n first even numbers
NOTE: the diagonal square exercise was already
solved in ex-262.rkt with build-list.
NOTE: tabulate was not defined with a local function
and I guess us... | #lang htdp/isl+
(require test-engine/racket-tests)
# # # Data Definitions
Returns a list 0 , 1 , ... ( - n 1 )
(check-expect (build-series-1 0) '())
(check-expect (build-series-1 3) '(0 1 2))
(check-expect (build-series-1 5) '(0 1 2 3 4))
(define (build-series-1 n)
(build-list n (λ (n) n))
)
Returns a li... |
60ce7354aca5ab0a8d77620ae3b56112764db89b2b65f397e152e79cb47636d0 | CodyReichert/qi | in-memory.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : FLEXI - STREAMS ; Base : 10 -*-
$ Header : /usr / local / cvsrep / flexi - streams / in - memory.lisp , v 1.31 2008/05/19 07:57:07 edi Exp $
Copyright ( c ) 2005 - 2008 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, w... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/flexi-streams-master/in-memory.lisp | lisp | Syntax : COMMON - LISP ; Package : FLEXI - STREAMS ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions a... | $ Header : /usr / local / cvsrep / flexi - streams / in - memory.lisp , v 1.31 2008/05/19 07:57:07 edi Exp $
Copyright ( c ) 2005 - 2008 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
... |
f561de5868fef1d54f3b9b116bb86b720971eb39ef423ae43290697832b432ce | gotthardp/lorawan-server | lorawan_mac.erl | %
Copyright ( c ) 2016 - 2019 < >
% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%
-module(lorawan_mac).
-export([ingest_frame/2, handle_accept/4, load_profile/1, encode_unicast/4, encode_multicast/2]).
% for unit testing
-export([cipher/5, b0/4]).
-import(lorawan... | null | https://raw.githubusercontent.com/gotthardp/lorawan-server/d6435935e4c27e8704742e5fe0361c93905ef87a/src/lorawan_mac.erl | erlang |
All rights reserved.
for unit testing
assert uniqueness
FIXME: do not crash when Attempts == 0
report errors for devices from own network only
somebody might be constantly resetting the device
checks disabled
retransmission
backwards compatibility
end of file | Copyright ( c ) 2016 - 2019 < >
Distributed under the terms of the MIT License . See the LICENSE file .
-module(lorawan_mac).
-export([ingest_frame/2, handle_accept/4, load_profile/1, encode_unicast/4, encode_multicast/2]).
-export([cipher/5, b0/4]).
-import(lorawan_utils, [binary_to_hex/1, hex_to_binary/1, rev... |
907d2d38b450a2baebe5a89b256e4e6525f0b024b5ca3e0ded0fb9df5282a20d | ekmett/thrists | Mini.hs | # LANGUAGE GADTs , BangPatterns #
# OPTIONS_GHC -Wall #
import Control.Category.Free.View
data P r a c where
P :: r b c -> r a b -> P r a c
data D r a b where
D0 :: D r a a
D1 :: r a b -> D r a b
D2 :: r b c -> r a b -> D r a c
data L l m a c where
L :: l b c -> !(L (P l) m a b) -> L l m a c
NL :: L r r... | null | https://raw.githubusercontent.com/ekmett/thrists/49c4a0a86712a91bb435c938147173676b8c005c/wip/Mini.hs | haskell | regularity:
*
D1 under D1 at bottom
extract from a non-0-exposed queue | # LANGUAGE GADTs , BangPatterns #
# OPTIONS_GHC -Wall #
import Control.Category.Free.View
data P r a c where
P :: r b c -> r a b -> P r a c
data D r a b where
D0 :: D r a a
D1 :: r a b -> D r a b
D2 :: r b c -> r a b -> D r a c
data L l m a c where
L :: l b c -> !(L (P l) m a b) -> L l m a c
NL :: L r r... |
18e6a334d41db231b6f20b5d0ab9a3b6a9944993b63585868b960bf845548b1c | phantomics/seed | package.lisp | package.lisp
(defpackage #:seed.ui-spec.stage.base
(:export #:simple-stage #:simple-branch-layout #:simple-sub-navigation-layout)
(:use #:cl #:seed.generate #:symbol-munger))
| null | https://raw.githubusercontent.com/phantomics/seed/f128969c671c078543574395d6b23a1a5f2723f8/seed.ui-spec.stage.base/package.lisp | lisp | package.lisp
(defpackage #:seed.ui-spec.stage.base
(:export #:simple-stage #:simple-branch-layout #:simple-sub-navigation-layout)
(:use #:cl #:seed.generate #:symbol-munger))
| |
82a92e88d6d76ecdd03cb1a29a525f6fd3ba6aac872377030b9329d1befd24b3 | samanthadoran/effective-guacamole | cop0.lisp | (defpackage #:psx-coprocessor0
(:nicknames #:cop0)
(:use :cl)
(:export #:cop0 #:make-cop0
#:cop0-status-register
#:cop0-cause-register
#:cop0-epc-register
#:cop0-bad-virtual-address-register
#:cop0-processor-id-register
#:cop0-jump-destination-regi... | null | https://raw.githubusercontent.com/samanthadoran/effective-guacamole/68b9a446a885593bb37553944bb30003c2ad7b48/cop0.lisp | lisp | (defpackage #:psx-coprocessor0
(:nicknames #:cop0)
(:use :cl)
(:export #:cop0 #:make-cop0
#:cop0-status-register
#:cop0-cause-register
#:cop0-epc-register
#:cop0-bad-virtual-address-register
#:cop0-processor-id-register
#:cop0-jump-destination-regi... | |
2f5594cd87a4f6b778458bb8f8cde2f772323dc41a633dec71bc5778205c184e | ijvcms/chuanqi_dev | rank_lib.erl | %%%-------------------------------------------------------------------
%%% @author tuhujia
( C ) 2016 , < COMPANY >
%%% @doc 排行榜
%%%
%%% @end
Created : 07 . 四月 2016 11:42
%%%-------------------------------------------------------------------
-module(rank_lib).
-include("common.hrl").
-include("rank.hrl").
-includ... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/rank/rank_lib.erl | erlang | -------------------------------------------------------------------
@author tuhujia
@doc 排行榜
@end
-------------------------------------------------------------------
====================================================================
API functions
================================================================... | ( C ) 2016 , < COMPANY >
Created : 07 . 四月 2016 11:42
-module(rank_lib).
-include("common.hrl").
-include("rank.hrl").
-include("proto.hrl").
-include("cache.hrl").
-include("config.hrl").
-export([
init_rank/0,
init_single_rank/1,
init_single_rank_active/1,
get_rank_refuse_time/1,
get_rank_list_data/2,
ge... |
6d9d2370209056c274597d23e78f77b73fe75c17fd682626894395196130a407 | manuel-serrano/hop | scheme-call.scm | ;*=====================================================================*/
* serrano / prgm / project / hop/3.5.x / js2scheme / scheme - call.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/cbb98da5c9ea8e6e3836f0a5908e5bf782419683/js2scheme/scheme-call.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*=====================================================================*/
*---------------------------... | * serrano / prgm / project / hop/3.5.x / js2scheme / scheme - call.scm * /
* Author : * /
* Creation : Sun Mar 25 07:00:50 2018 * /
* Last change : We d Feb 2 16:34:17 2022 ( serrano ) * /
* Co... |
1daeafebc0759bd9eff0bbe25e8646f43732896958d3fa2db4065a9dc39853c7 | ryanpbrewster/haskell | P053Test.hs | module Problems.P053Test
( case_053_main
) where
import Problems.P053
import Test.Tasty.Discover (Assertion, (@?=))
case_053_main :: Assertion
case_053_main = solve @?= "4075"
| null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/tests/Problems/P053Test.hs | haskell | module Problems.P053Test
( case_053_main
) where
import Problems.P053
import Test.Tasty.Discover (Assertion, (@?=))
case_053_main :: Assertion
case_053_main = solve @?= "4075"
| |
8329d49968ac590ed2760167570a8ff63e0c5852bece0c3abb0553220154d559 | RichiH/git-annex | Pushes.hs | git - annex assistant push tracking
-
- Copyright 2012 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2012 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Assistant.Pushes where
import Assistant.Common
import Assistant.Types.Pushes
import Co... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Assistant/Pushes.hs | haskell | Blocks until there are failed pushes.
- Returns Remotes whose pushes failed a given time duration or more ago.
- (This may be an empty list.)
Modifies the map. | git - annex assistant push tracking
-
- Copyright 2012 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2012 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Assistant.Pushes where
import Assistant.Common
import Assistant.Types.Pushes
import Co... |
a92b6ef1f68cddf2da44d97b28417c0931386d36fd3df1ee7aaf9a74c2eab68f | nextjournal/clerk | screenshots.cljs | (ns screenshots
"Playwright script to Generate open graph preview images from a notebook's results.
Run this via:
cd ui_tests; yarn nbb -m screenshots --url :7777 --out-dir screenshots
For a REPL development workflow start a nbb nrepl server via:
yarn nbb nrepl - server : port 1337 "
{:clj-kondo/co... | null | https://raw.githubusercontent.com/nextjournal/clerk/6bf3e6282c59cdffaaa21dea0724bda9121fa0ed/ui_tests/screenshots.cljs | clojure | yarn nbb -m screenshots --url :7777 --out-dir screenshots | (ns screenshots
"Playwright script to Generate open graph preview images from a notebook's results.
Run this via:
For a REPL development workflow start a nbb nrepl server via:
yarn nbb nrepl - server : port 1337 "
{:clj-kondo/config '{:lint-as {promesa.core/let clojure.core/let}}}
(:require ["playwrigh... |
cd0930a769577879439fba748986991eaeaeb864790db78240e785f293945bff | ocaml-multicore/ocaml-tsan | filename.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/stdlib/filename.mli | 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
val current_dir_name : string
val parent_dir_name : string
val dir_sep : string
* The directory separa... |
c166e158bfc667cfe1841f956b86453677fe27a655f8677210616a1fc88d9784 | Mzk-Levi/texts | Lambda.hs | # LANGUAGE TemplateHaskell , TypeOperators , MultiParamTypeClasses ,
FlexibleInstances , FlexibleContexts , UndecidableInstances ,
OverlappingInstances , Rank2Types , GADTs #
FlexibleInstances, FlexibleContexts, UndecidableInstances,
OverlappingInstances, Rank2Types, GADTs #-}
------------------------------... | null | https://raw.githubusercontent.com/Mzk-Levi/texts/34916d6531af9bc39e50b596247ac2017d8cfdc3/compdata-param-master/examples/Examples/Lambda.hs | haskell | ------------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
Lambda calculus examples
We define a pretty printer, a desugaring transformation, constant folding,
and call-by-value interpreter for an extended variant of the simply typed
lambda c... | # LANGUAGE TemplateHaskell , TypeOperators , MultiParamTypeClasses ,
FlexibleInstances , FlexibleContexts , UndecidableInstances ,
OverlappingInstances , Rank2Types , GADTs #
FlexibleInstances, FlexibleContexts, UndecidableInstances,
OverlappingInstances, Rank2Types, GADTs #-}
Module : Examples . ... |
450190ac6e284206aee013c87cb0224f0d0cd8d3890926dabc2daf34ed593f2d | bazqux/bazqux-urweb | Log.hs | # LANGUAGE BangPatterns , ScopedTypeVariables , ViewPatterns ,
OverloadedStrings #
OverloadedStrings #-}
module Lib.Log
( nullLogger, directLogger, Logger, withLogger, logS, logBS, logLS
, logTime, logTime'
, getTime, logT, logTL, logLT, logLTL, showSecs, showMSecs, loggerFlush, ... | null | https://raw.githubusercontent.com/bazqux/bazqux-urweb/bf2d5a65b5b286348c131e91b6e57df9e8045c3f/crawler/Lib/Log.hs | haskell | | Строка в utf8
---------------------------------------------------------------------------- | # LANGUAGE BangPatterns , ScopedTypeVariables , ViewPatterns ,
OverloadedStrings #
OverloadedStrings #-}
module Lib.Log
( nullLogger, directLogger, Logger, withLogger, logS, logBS, logLS
, logTime, logTime'
, getTime, logT, logTL, logLT, logLTL, showSecs, showMSecs, loggerFlush, ... |
9aaa6ee19a5b7cc865b89bf9b4bdcc520a376b0bfe090f68038256d967c0f990 | utahstreetlabs/risingtide | serializers.clj | (ns risingtide.test.serializers
(:require
[risingtide.model.story :refer [->TagLikedStory ->ListingLikedStory ->ListingCommentedStory
->ListingActivatedStory ->ListingSoldStory ->ListingSharedStory
->ListingSavedStory
... | null | https://raw.githubusercontent.com/utahstreetlabs/risingtide/bc5b798396679739469b1bd8ee1b03db76178cde/test/risingtide/test/serializers.clj | clojure | (ns risingtide.test.serializers
(:require
[risingtide.model.story :refer [->TagLikedStory ->ListingLikedStory ->ListingCommentedStory
->ListingActivatedStory ->ListingSoldStory ->ListingSharedStory
->ListingSavedStory
... | |
e488dd7cc1eff3a17bf178e1c269d29b7a24beadb4a8265aeb37af77c31df410 | theodormoroianu/SecondYearCourses | lab2.hs | import Data.Maybe
import Data.List
type Name = String
data Pgm = Pgm [Name] Stmt
deriving (Read, Show)
data Stmt = Skip | Stmt ::: Stmt | If BExp Stmt Stmt | While BExp Stmt | Name := AExp
deriving (Read, Show)
data AExp = Lit Integer | AExp :+: AExp | AExp :*: AExp | Var Name
deriving (Re... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%202/lab2.hs | haskell | import Data.Maybe
import Data.List
type Name = String
data Pgm = Pgm [Name] Stmt
deriving (Read, Show)
data Stmt = Skip | Stmt ::: Stmt | If BExp Stmt Stmt | While BExp Stmt | Name := AExp
deriving (Read, Show)
data AExp = Lit Integer | AExp :+: AExp | AExp :*: AExp | Var Name
deriving (Re... | |
2ce8ddcd6f5fd67eadda2fec3ff9d42b69dd7ce11369e545cabc348634730011 | markandrus/twilio-haskell | Conference.hs | {-#LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
{-#LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
-------------------------------------------------------------------------------
-- |
Module : Twilio . Conference
Copyright : ( C ) 2017-
-- Li... | null | https://raw.githubusercontent.com/markandrus/twilio-haskell/00704dc86dbf2117b855b1e2dcf8b6c0eff5bfbe/src/Twilio/Conference.hs | haskell | #LANGUAGE DeriveDataTypeable #
#LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : provisional
-----------------------------------------------------------------------------
* Resource
* Types
T... | # LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ViewPatterns #
Module : Twilio . Conference
Copyright : ( C ) 2017-
Maintainer : < >
module Twilio.Conference
Conference(..)
, ConferenceStatus(..)
) where
import Control.Monad
import Data.Aeson
import Data.D... |
233e829d59b83534d4189cb419e1c5163b7151713beb6dbd56825c4b6162eece | agda/agda | Internal.hs | # LANGUAGE CPP #
{-# LANGUAGE PatternSynonyms #-}
module Agda.Syntax.Internal
( module Agda.Syntax.Internal
, module Agda.Syntax.Internal.Blockers
, module Agda.Syntax.Internal.Elim
, module Agda.Syntax.Abstract.Name
, MetaId(..), ProblemId(..)
) where
import... | null | https://raw.githubusercontent.com/agda/agda/4f3899c597792fa4455e0f8134dfd63bc89b1c07/src/full/Agda/Syntax/Internal.hs | haskell | # LANGUAGE PatternSynonyms #
-------------------------------------------------------------------------
* Function type domain
-------------------------------------------------------------------------
| Similar to 'Arg', but we need to distinguish
an irrelevance annotation in a function domain
(the do... | # LANGUAGE CPP #
module Agda.Syntax.Internal
( module Agda.Syntax.Internal
, module Agda.Syntax.Internal.Blockers
, module Agda.Syntax.Internal.Elim
, module Agda.Syntax.Abstract.Name
, MetaId(..), ProblemId(..)
) where
import Prelude hiding (null)
import Control.Monad... |
91b7ebcc06087f596d6b4ed8faf85fcdcb01a9de0081378516cd940340c37a45 | samply/blaze | comparison_operators.clj | (ns blaze.elm.compiler.comparison-operators
"12. Comparison Operators
Section numbers are according to
-logicalspecification.html."
(:require
[blaze.elm.compiler.core :as core]
[blaze.elm.compiler.macros :refer [defbinop]]
[blaze.elm.protocols :as p]))
12.1 . Equal
(defbinop equal [operand-1 op... | null | https://raw.githubusercontent.com/samply/blaze/c7793cfb7e38b496f11f29079db2f7f98c0371d4/modules/cql/src/blaze/elm/compiler/comparison_operators.clj | clojure | (ns blaze.elm.compiler.comparison-operators
"12. Comparison Operators
Section numbers are according to
-logicalspecification.html."
(:require
[blaze.elm.compiler.core :as core]
[blaze.elm.compiler.macros :refer [defbinop]]
[blaze.elm.protocols :as p]))
12.1 . Equal
(defbinop equal [operand-1 op... | |
86c0a4f965cadbe9d9b66565bfcf88dc8c325c23429e18b47bf6bc247ddba014 | jacekschae/learn-reitit-course-files | handlers.clj | (ns cheffy.recipe.handlers
(:require [cheffy.recipe.db :as recipe-db]
[ring.util.response :as rr]
[cheffy.responses :as responses])
(:import (java.util UUID)))
(defn list-all-recipes
[db]
(fn [request]
(let [uid (-> request :claims :sub)
recipes (recipe-db/find-all-recipes... | null | https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/36-step/src/cheffy/recipe/handlers.clj | clojure | (ns cheffy.recipe.handlers
(:require [cheffy.recipe.db :as recipe-db]
[ring.util.response :as rr]
[cheffy.responses :as responses])
(:import (java.util UUID)))
(defn list-all-recipes
[db]
(fn [request]
(let [uid (-> request :claims :sub)
recipes (recipe-db/find-all-recipes... | |
b2776301121a71297e1a78da293e006a49a1586796a8453c2887bcf224f3069e | LPCIC/matita | helm_registry.ml | Copyright ( C ) 2004 - 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of ... | null | https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/registry/helm_registry.ml | ocaml | * <helpers>
* </helpers>
expected type, value, msg
file, line, col, msg
trailing blanks are removed per default by split
escapes for xml configuration file
internal value
environment value
resulting value
"$(var)" -> "var"
since ocaml hash table are crazy...
<section> elements entered so far
have... | Copyright ( C ) 2004 - 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of ... |
c6adeec991c3fb8d43e8d63b2d776a566fca2acdf62606c12cab6969cead9624 | matsubara0507/yaml-to-dhall | Dhall.hs | # LANGUAGE OverloadedLabels #
module YamlToDhall.Dhall
( toDhall
) where
import RIO
import qualified RIO.HashMap as HM
import qualified RIO.Text as Text
import qualified RIO.Vector as V
import Data.Yaml (Value (..))
toDhall :: Value -> Text
toDhall (Object hash) = hashToDhall hash
... | null | https://raw.githubusercontent.com/matsubara0507/yaml-to-dhall/09478b9feb3cff4a1ffc096f6bf4019963285218/src/YamlToDhall/Dhall.hs | haskell | # LANGUAGE OverloadedLabels #
module YamlToDhall.Dhall
( toDhall
) where
import RIO
import qualified RIO.HashMap as HM
import qualified RIO.Text as Text
import qualified RIO.Vector as V
import Data.Yaml (Value (..))
toDhall :: Value -> Text
toDhall (Object hash) = hashToDhall hash
... | |
80eceed429697dfbc50a69b077a2464f3906aba93525d41e94a9b3098467833b | informatimago/lisp | yin-yang.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : yin-yang.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Example taken from
;;;;
This program... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/pgl/examples/yin-yang.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Example taken from
the graphics window. The height and width of the entire figure
are both specified by the constant FIGURE_SIZE.
LEG... | FILE : yin-yang.lisp
USER - INTERFACE :
This program draws the Taoist yin - yang symbol at the center of
< PJB > < >
MODIFICATIONS
2015 - 11 - 13 < PJB > Created .
AGPL3
Copyright 2015 - 2016
it under the terms of the GNU Affero General Public License as publi... |
f46eb86676519790f91b70ed6c949a4b10f37728d698a12711eb200c504d39f0 | zchn/ethereum-analyzer | SoliditySpec.hs | module Ethereum.Analyzer.SoliditySpec
( spec
) where
import Protolude hiding (show)
import Ckev.In.Text
import Ethereum.Analyzer.Solidity
import Ethereum.Analyzer.TestData.StorageJson (storageJson)
import Test.Hspec
import Text.PrettyPrint.Leijen.Text (Doc, pretty, renderPretty)
spec :: Spec
spec =
describe "e... | null | https://raw.githubusercontent.com/zchn/ethereum-analyzer/f2a60d8b451358971f1e3b1a61658f5741c4c099/ethereum-analyzer/test/Ethereum/Analyzer/SoliditySpec.hs | haskell | putStrLn $ fromRight "" prettySol | module Ethereum.Analyzer.SoliditySpec
( spec
) where
import Protolude hiding (show)
import Ckev.In.Text
import Ethereum.Analyzer.Solidity
import Ethereum.Analyzer.TestData.StorageJson (storageJson)
import Test.Hspec
import Text.PrettyPrint.Leijen.Text (Doc, pretty, renderPretty)
spec :: Spec
spec =
describe "e... |
e6f98a3d76fa1d4cb69f481c59ba197e6232cef09e2e4e2c9c6d4c600ac3c63e | Verites/verigraph | XMLUtilities.hs | # LANGUAGE NoMonomorphismRestriction #
module XML.XMLUtilities
( atTag
, text
, textAtTag
, parseXML
, writeXML
)
where
import Data.Tree.NTree.TypeDefs
import Text.XML.HXT.Core
atTag :: ArrowXml cat => String -> cat (NTree XNode) XmlTree
atTag tag = deep (isElem >>> hasName tag)
text :: ArrowXm... | null | https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/src/library/XML/XMLUtilities.hs | haskell | # LANGUAGE NoMonomorphismRestriction #
module XML.XMLUtilities
( atTag
, text
, textAtTag
, parseXML
, writeXML
)
where
import Data.Tree.NTree.TypeDefs
import Text.XML.HXT.Core
atTag :: ArrowXml cat => String -> cat (NTree XNode) XmlTree
atTag tag = deep (isElem >>> hasName tag)
text :: ArrowXm... | |
1668a6ff6a376cd9cff79c89b9114df97346249fdc205602aec940aaf2e1fce1 | kevinwortman/Scheme-immutable-data-structures | iset-test.scm |
(import
(chibi test)
(scheme comparator)
(scheme generator)
(immutable set)
(scheme base)
(scheme write)
(srfi 1)
(srfi 26))
(define number-comparator
(make-comparator real? = < (lambda (x . o) (exact (abs (round x))))))
(let* ((cmp number-comparator)
(s0 (iset cmp))
(l3 '(2 4 6))
(s3... | null | https://raw.githubusercontent.com/kevinwortman/Scheme-immutable-data-structures/861327ef70638508a9f2024949e7ef2dba9c081e/iset-test.scm | scheme | iset
iset-tabulate
iset-unfold
iset?
iset-empty?
iset-member?
iset-min
iset-comparator
iset-predecessor
iset-successor
iset-adjoin
iset-adjoin-all
iset-replace
effectual
ineffectual
iset-delete
effectual
ineffectual
iset-delete-elements
effectual
ineffectual
iset-find
success
failure
iset-count... |
(import
(chibi test)
(scheme comparator)
(scheme generator)
(immutable set)
(scheme base)
(scheme write)
(srfi 1)
(srfi 26))
(define number-comparator
(make-comparator real? = < (lambda (x . o) (exact (abs (round x))))))
(let* ((cmp number-comparator)
(s0 (iset cmp))
(l3 '(2 4 6))
(s3... |
f08dc35a292051e028f964dbd251209bfb7f0c7891460ef582e54afde7778c9c | haskell-mafia/boris | Version.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Boris.Http.Version (
ApiVersion (..)
) where
import Boris.Http.Airship
import P
data ApiVersion =
V1
deriving (Bounded, Enum, Eq, Show)
instance Versioned ApiVersion where
versionToMedia V1 = "application/v... | null | https://raw.githubusercontent.com/haskell-mafia/boris/fb670071600e8b2d8dbb9191fcf6bf8488f83f5a/boris-http/src/Boris/Http/Version.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
module Boris.Http.Version (
ApiVersion (..)
) where
import Boris.Http.Airship
import P
data ApiVersion =
V1
deriving (Bounded, Enum, Eq, Show)
instance Versioned ApiVersion where
versionToMedia V1 = "application/vnd.ambiata.boris.v1+json"
|
c68562fdd9963a4c34a54f05284f03ff8ab0ab5bf708f6dd943e2e1c842fde26 | benzap/fif | math_test.cljc | (ns fif.stdlib.math-test
(:require
[clojure.test :refer [deftest testing is are] :include-macros true]
[fif.stdlib.math]
[fif.stack-machine :as stack]
[fif.core :as fif]
[fif-test.utils :refer [teval are-eq*] :include-macros true]))
(deftest test-PI-op
(are-eq*
(teval PI)
=> #?(:clj (list Ma... | null | https://raw.githubusercontent.com/benzap/fif/972adab8b86c016b04babea49d52198585172fe3/test/fif/stdlib/math_test.cljc | clojure | (ns fif.stdlib.math-test
(:require
[clojure.test :refer [deftest testing is are] :include-macros true]
[fif.stdlib.math]
[fif.stack-machine :as stack]
[fif.core :as fif]
[fif-test.utils :refer [teval are-eq*] :include-macros true]))
(deftest test-PI-op
(are-eq*
(teval PI)
=> #?(:clj (list Ma... | |
ab84deb04a2cef775816ff4bb3752283566f74c5a0057ae97fa98f0b7b1da3ff | mathematical-systems/clml | dlasrt.lisp | ;;; Compiled by f2cl version:
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:0... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/lapack/dlasrt.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t)
(:relaxed-array-decls t) (:coerce-assigns :as-needed)
(:array-type ':array) (:array-slicing t)
(:declare-common nil) (:float-format double-float)) | ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ "
" $ I d :... |
3ff6e564a599608d2f54e8c4a9669161ded34dc1591969785b9abd6a0cb1f128 | rtoy/ansi-cl-tests | define-condition-aux.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Mar 9 05:40:13 2003
;;;; Contains: Auxiliary functions for testing DEFINE-CONDITION
(in-package :cl-test)
(defun make-def-cond-name (name &rest suffixes)
(intern (apply #'concatenate 'string (string name) "/"
(mapcar #'string suffixes))
... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/define-condition-aux.lsp | lisp | -*- Mode: Lisp -*-
Contains: Auxiliary functions for testing DEFINE-CONDITION | Author :
Created : Sun Mar 9 05:40:13 2003
(in-package :cl-test)
(defun make-def-cond-name (name &rest suffixes)
(intern (apply #'concatenate 'string (string name) "/"
(mapcar #'string suffixes))
:cl-test))
(defmacro define-condition-with-tests (name-symbol
... |
f3f66146d608845dbe5cb008163fc91a9d27818fdf78d53a77ff204d72421a5a | ibotty/iban | Core.hs | # LANGUAGE DeriveGeneric #
module Finance.IBAN.Germany.Core
( BLZRecord (..),
BLZ,
BIC,
AccountNr,
ChecksumType,
)
where
import Data.Text (Text)
import GHC.Generics (Generic)
type BIC = Text
type BLZ = Text
type AccountNr = Text
type ChecksumType = Text
data BLZRecord = BLZRecord
{ blz :: B... | null | https://raw.githubusercontent.com/ibotty/iban/6f37fd52b2b5e1eb9880b1c8def0c4c777cd1be5/src/Finance/IBAN/Germany/Core.hs | haskell | # LANGUAGE DeriveGeneric #
module Finance.IBAN.Germany.Core
( BLZRecord (..),
BLZ,
BIC,
AccountNr,
ChecksumType,
)
where
import Data.Text (Text)
import GHC.Generics (Generic)
type BIC = Text
type BLZ = Text
type AccountNr = Text
type ChecksumType = Text
data BLZRecord = BLZRecord
{ blz :: B... | |
0ffed3fe8f3960caf85b25ed5c0ff39a7c9393753352f44af749841b884110c8 | thoughtbot/carnival | Request.hs | module Helper.Request
( allowCrossOrigin
, fromMaybe404
) where
import Import
lookupUtf8Header :: HeaderName -> Handler (Maybe Text)
lookupUtf8Header headerName = return . fmap decodeUtf8 =<< lookupHeader headerName
allowCrossOrigin :: Handler ()
allowCrossOrigin = do
mo <- lookupUtf8Header "Origin"
... | null | https://raw.githubusercontent.com/thoughtbot/carnival/1cd4bd02ea6884b86020029257ab69ec3892a168/Helper/Request.hs | haskell | module Helper.Request
( allowCrossOrigin
, fromMaybe404
) where
import Import
lookupUtf8Header :: HeaderName -> Handler (Maybe Text)
lookupUtf8Header headerName = return . fmap decodeUtf8 =<< lookupHeader headerName
allowCrossOrigin :: Handler ()
allowCrossOrigin = do
mo <- lookupUtf8Header "Origin"
... | |
a50ae28810c9b31b5a6d3185dc4ef3a85f68b2f5f0a29715abc24be3576fd749 | mejgun/haskell-tdlib | InputThumbnail.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.InputThumbnail where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.InputFile as InputFile
import qualified Utils as U
-- |
| A thumbnail to be sent along with a file ; must be in JPEG or WEBP format for sticke... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/ddcb47043c7a339b4e5995355e5d5a228e21ccb0/src/TD/Data/InputThumbnail.hs | haskell | # LANGUAGE OverloadedStrings #
|
| |
module TD.Data.InputThumbnail where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.InputFile as InputFile
import qualified Utils as U
| A thumbnail to be sent along with a file ; must be in JPEG or WEBP format for stickers , and less than 200 KB in size
InputThum... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.