_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 |
|---|---|---|---|---|---|---|---|---|
f3d651ab81771c5e836f3cbd32a477473f4e8ebde2c9972781909b95d1057989 | rumblesan/improviz | Loops.hs | module Tests.Language.Interpreter.Loops
( interpreterLoopTests
)
where
import Test.Framework ( Test
, testGroup
)
import Test.Framework.Providers.HUnit ( testCase )
import T... | null | https://raw.githubusercontent.com/rumblesan/improviz/90162e6dc7befec34e3b7b18b8aca275f26cd505/test/Tests/Language/Interpreter/Loops.hs | haskell | module Tests.Language.Interpreter.Loops
( interpreterLoopTests
)
where
import Test.Framework ( Test
, testGroup
)
import Test.Framework.Providers.HUnit ( testCase )
import T... | |
efe1b77f386f3d33754473705f021db9df695c6cb36a0ef9865878e6523dc01a | basho/riaknostic | riaknostic_check.erl | %% -------------------------------------------------------------------
%%
riaknostic - automated diagnostic tools for Riak
%%
Copyright ( c ) 2011 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
... | null | https://raw.githubusercontent.com/basho/riaknostic/dad8939d0ef32fbf435d13697720223293195282/src/riaknostic_check.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissi... | riaknostic - automated diagnostic tools for Riak
Copyright ( c ) 2011 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS... |
2f82bb17a5aceb171945274def6dbc34b7a1ca36fa86176587da064f0fa89f8a | roelvandijk/numerals | TestData.hs | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2@ ] -
[ @ISO639 - 3@ ] rmn
[ @Native name@ ] -
[ @English name@ ] Balkan Romani
[@ISO639-1@] -
[@ISO639-2@] -
[@ISO639-3@] rmn
[@Native name@] -
[@English name@] Balkan Romani
-}
module Text.Numeral.Langua... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src-test/Text/Numeral/Language/RMN_DZA/TestData.hs | haskell | ------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Test data
---------------------------------------------------------------... | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2@ ] -
[ @ISO639 - 3@ ] rmn
[ @Native name@ ] -
[ @English name@ ] Balkan Romani
[@ISO639-1@] -
[@ISO639-2@] -
[@ISO639-3@] rmn
[@Native name@] -
[@English name@] Balkan Romani
-}
module Text.Numeral.Langua... |
e454d1451572fc573cd298f64dacdca7535cf55f0d722ccd35f08d90de784121 | bzliu94/cs61a_fa07 | 1.scm | 2019 - 08 - 07
group # 1 -- use arbiters and alarm -- uses berkeley.scm
; advantages:
; - requires few to no changes to berkeley.scm
; disadvantages:
; - test-and-set! is flawed and our approach would be wrong
; except we do have alarm-based waking of sleeping threads;
; for this reason, we are technically... | null | https://raw.githubusercontent.com/bzliu94/cs61a_fa07/12a62689f149ef035a36b326351928928f6e7b5d/01%20-%20homework/hw10/experiments/1.scm | scheme | advantages:
- requires few to no changes to berkeley.scm
disadvantages:
- test-and-set! is flawed and our approach would be wrong
except we do have alarm-based waking of sleeping threads;
for this reason, we are technically still correct in sense
that eventually we get all threads to finish
notes:
- i... | 2019 - 08 - 07
group # 1 -- use arbiters and alarm -- uses berkeley.scm
alarm by default provides one second per process
have four sub - cases :
1 . do not use parallel - execute and perform methods one - by - one
2 . use parallel - execute with single serializer
3 . use parallel - execute with ma... |
651611083bb3f15ff4e1a5693d1836bacb55f762c7f0668cce164d5a0de59e16 | wangweihao/ProgrammingErlangAnswer | minmodule.erl | % (1).编写一些导出单个函数的小模块,以及被导出函数的类型规范。
在函数里制造一些类型错误,然后对这些程序运行 dialyzer 。
% 有时候你制造的错误无法被 dialyzer 发现,请仔细观察程序,找出没有得到预期错误的原因。
-module(minmodule).
-export([func1/3]).
%-spec func1(number(), number(), number()) -> number().
func1(X, Y, Z) when is_list(X) ->
X+Y+Z.
| null | https://raw.githubusercontent.com/wangweihao/ProgrammingErlangAnswer/b145b5e6a19cb866ce5d2ceeac116d751f6e2b3d/9/1/minmodule.erl | erlang | (1).编写一些导出单个函数的小模块,以及被导出函数的类型规范。
有时候你制造的错误无法被 dialyzer 发现,请仔细观察程序,找出没有得到预期错误的原因。
-spec func1(number(), number(), number()) -> number(). | 在函数里制造一些类型错误,然后对这些程序运行 dialyzer 。
-module(minmodule).
-export([func1/3]).
func1(X, Y, Z) when is_list(X) ->
X+Y+Z.
|
9bb00193aa8888d1f235c469f90687fa14f983b7aa2b98dec144ad79bc9b636e | mukul-rathi/bolt | bad_overloading.ml | open Core
open Print_typed_ast
let%expect_test "Function overloading different arg names" =
print_typed_ast
"
function int test(bool f) {
if f { 0} else {1}
}
function int test(bool b){
if b { 1} else {0}
}
void main() {
test(true)
}
" ;
[%expect {|
Type error - fun... | null | https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/tests/frontend/expect/typing/bad_overloading.ml | ocaml | open Core
open Print_typed_ast
let%expect_test "Function overloading different arg names" =
print_typed_ast
"
function int test(bool f) {
if f { 0} else {1}
}
function int test(bool b){
if b { 1} else {0}
}
void main() {
test(true)
}
" ;
[%expect {|
Type error - fun... | |
c83730fccb358b9763423f93451774169abca2cea2c28ffa23c4ae02c04954a9 | TyOverby/mono | or_error.mli | * Type for tracking errors in an [ Error.t ] . This is a specialization of the [ Result ]
type , where the [ Error ] constructor carries an [ Error.t ] .
A common idiom is to wrap a function that is not implemented on all platforms , e.g. ,
{ [ do_something_linux_specific : ( unit - > unit ) ] }
... | null | https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-base/src/or_error.mli | ocaml | * Serialization and comparison of an [Error] force the error's lazy message.
* [Applicative] functions don't have quite the same semantics as
[Applicative.Of_Monad(Or_error)] would give -- [apply (Error e1) (Error e2)] returns
the combination of [e1] and [e2], whereas it would only return [e1] if it were defin... | * Type for tracking errors in an [ Error.t ] . This is a specialization of the [ Result ]
type , where the [ Error ] constructor carries an [ Error.t ] .
A common idiom is to wrap a function that is not implemented on all platforms , e.g. ,
{ [ do_something_linux_specific : ( unit - > unit ) ] }
... |
80e5f2d5f6404a6dace44b0b74ef6e6bfd144058a7d21f89409340485b28d18a | s-cerevisiae/leetcode-racket | 2-add-two-numbers.rkt | #lang racket
(require "list-node.rkt")
(define/contract (add-two-numbers l1 l2)
(-> (or/c list-node? #f) (or/c list-node? #f) (or/c list-node? #f))
(define (carry x) (quotient/remainder x 10))
(let loop ([l1 l1] [l2 l2] [rem 0])
(match* (l1 l2)
[(#f #f) (if (zero? rem) #f (make-list-node rem))]
... | null | https://raw.githubusercontent.com/s-cerevisiae/leetcode-racket/cd7936ecd5e37b92ee92c32fad0d83adfda54f15/2-add-two-numbers.rkt | racket | #lang racket
(require "list-node.rkt")
(define/contract (add-two-numbers l1 l2)
(-> (or/c list-node? #f) (or/c list-node? #f) (or/c list-node? #f))
(define (carry x) (quotient/remainder x 10))
(let loop ([l1 l1] [l2 l2] [rem 0])
(match* (l1 l2)
[(#f #f) (if (zero? rem) #f (make-list-node rem))]
... | |
78bce646e1332a9a0227cd2f8d6a0137f90beb05f2a7546594245fafbb9369b7 | huangjs/cl | our-match.lisp | (defpackage :our-match
(:use :common-lisp)
(:export #:our-match)
)
(in-package :our-match)
(defparameter *extensions* (make-hash-table :test 'equal))
(defparameter *segment-extensions*
(make-hash-table :test 'equal))
(defun our-match (pat input &optional (blists (list nil)))
(cond ((null blists) nil)
... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/other-code/cs325/www.cs.northwestern.edu/academics/courses/325/programs/our-match.lisp | lisp |
Extensions
(?is function) matches if (function input) is true
((?* var) . more-pats)
(our-match '((?* l1) (?* l2)) '(a b c))
(?not pattern) matches if pattern does not match | (defpackage :our-match
(:use :common-lisp)
(:export #:our-match)
)
(in-package :our-match)
(defparameter *extensions* (make-hash-table :test 'equal))
(defparameter *segment-extensions*
(make-hash-table :test 'equal))
(defun our-match (pat input &optional (blists (list nil)))
(cond ((null blists) nil)
... |
03084a5d161184fadac0747b70bd4e5eae9bd71aee07fd71517b9c37d478f0ea | ericfinster/catt.io | catt.ml | (*****************************************************************************)
(* *)
(* Main *)
(* *)
... | null | https://raw.githubusercontent.com/ericfinster/catt.io/0f2446860b7daba8ac2c343f933056195151a819/bin/catt.ml | ocaml | ***************************************************************************
Main
****************... |
open Format
open Catt.Io
open Catt.Typecheck
open Catt.Rawcheck
let () =
let file_in = ref [] in
pp_set_margin std_formatter 200;
Arg.parse spec_list (fun s -> file_in := s::!file_in) usage;
let files = List.rev (!file_in) in
let tenv = { empty_env with config = !global_config } in
match r... |
8786acaa61cdf639d5fe0016469897db6d26ef74e2e9fdf8cf47f177990103e1 | grafi-tt/tatsuki | Main.hs | -- this file is based on the internally distributed sample implementation
{-# OPTIONS -XBangPatterns #-}
module Main where
import Reversi.Client
import Network
import System.Console.GetOpt
import System.Environment (getArgs)
import System.IO
import MainClient
data Config = Config { host :: HostName
... | null | https://raw.githubusercontent.com/grafi-tt/tatsuki/2f85835c5aab83c3c60999a37a51fa4794c84285/Main.hs | haskell | this file is based on the internally distributed sample implementation
# OPTIONS -XBangPatterns # |
module Main where
import Reversi.Client
import Network
import System.Console.GetOpt
import System.Environment (getArgs)
import System.IO
import MainClient
data Config = Config { host :: HostName
, port :: PortNumber
, playerName :: String
, verbose :: ... |
e1769d80e77322b63ac016a894af5ee21d63403b8a64d7c2fce534a31c120f11 | aeternity/mnesia_rocksdb | mrdb_bench.erl | -module(mrdb_bench).
-compile([export_all, nowarn_export_all]).
init() ->
mnesia:delete_schema([node()]),
mnesia_rocksdb:create_schema([node()]),
mnesia:start(),
[mnesia:create_table(Name, [{Type, [node()]}, {record_name, r}])
|| {Name, Type} <- tabs()],
ok.
tabs() ->
[{rc, ram_copies},
... | null | https://raw.githubusercontent.com/aeternity/mnesia_rocksdb/0aecf5ef0192c9d130b9b0aabd8656d27d278815/test/mrdb_bench.erl | erlang | tx_(T, N) -> | -module(mrdb_bench).
-compile([export_all, nowarn_export_all]).
init() ->
mnesia:delete_schema([node()]),
mnesia_rocksdb:create_schema([node()]),
mnesia:start(),
[mnesia:create_table(Name, [{Type, [node()]}, {record_name, r}])
|| {Name, Type} <- tabs()],
ok.
tabs() ->
[{rc, ram_copies},
... |
5dad69fc376a6b43571cc94859ab2487e28456dae7c6d8f2fc99ad489d29db2c | rabeckett/Temporal-NetKAT | reindex.mli | Provide a 2 - way renaming maps .
Elements of type ' a are mapped to unique positive integer names .
Useful for converting automata over arbitrary types to be
over ints during construction .
Elements of type 'a are mapped to unique positive integer names.
Useful for converting automata over arb... | null | https://raw.githubusercontent.com/rabeckett/Temporal-NetKAT/829d1847c18d77f40501fe4d988eec6e7867c94d/src/reindex.mli | ocaml | Provide a 2 - way renaming maps .
Elements of type ' a are mapped to unique positive integer names .
Useful for converting automata over arbitrary types to be
over ints during construction .
Elements of type 'a are mapped to unique positive integer names.
Useful for converting automata over arb... | |
d7b5e714a76299c3e9673acfc20a9549b8b87fcb3c2aa7fa290ceb1b9356429e | haskellweekly/haskellweekly | Caption.hs | -- | This module defines a data type for audio captions, along with functions
-- for converting from various common formats. Even though there are some
libraries for these things , the captions that Haskell Weekly uses do n't use
-- very many of the features. It felt better to write simple parsers and
-- renderers ra... | null | https://raw.githubusercontent.com/haskellweekly/haskellweekly/615526de6f1e590fff3bac5a7911aaaacf149b09/source/library/HW/Type/Caption.hs | haskell | | This module defines a data type for audio captions, along with functions
for converting from various common formats. Even though there are some
very many of the features. It felt better to write simple parsers and
renderers rather than relying on a fully fledged library.
parsing fails, this returns nothing. It w... | libraries for these things , the captions that Haskell Weekly uses do n't use
module HW.Type.Caption
( Caption,
parseVtt,
renderTranscript,
)
where
import qualified Control.Monad as Monad
import qualified Data.Char as Char
import qualified Data.List.NonEmpty as NonEmpty
import qualified Data.Maybe as May... |
c90c1343ef8686ffb9cbd584c9d6d6ab07b3ed920d3c0040777057f4fb779256 | andrewMacmurray/haskell-book-solutions | equalityData.hs | data TisAnInteger =
TisAnInteger Integer
instance Eq TisAnInteger where
(==) (TisAnInteger a) (TisAnInteger a') = a == a'
data TwoIntegers =
Two Integer Integer
instance Eq TwoIntegers where
(==) (Two a b)
(Two a' b') =
a == a' && b == b'
data StringOrInt
= TisAString String
| TisAnInt In... | null | https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch6/equalityData.hs | haskell | data TisAnInteger =
TisAnInteger Integer
instance Eq TisAnInteger where
(==) (TisAnInteger a) (TisAnInteger a') = a == a'
data TwoIntegers =
Two Integer Integer
instance Eq TwoIntegers where
(==) (Two a b)
(Two a' b') =
a == a' && b == b'
data StringOrInt
= TisAString String
| TisAnInt In... | |
964f16f7c275625c1da7797400eb034e4c99d6548567004d72d394624769d07b | hatsugai/Guedra | test_vsplitter2.ml | open Csp
open Guedra
let init () =
let (wch, pch) = create_toplevel_window "Guedra" 0 0 768 512 in
let rch0 = make_chan () in
let rch1 = make_chan () in
let cch0 = make_chan () in
let cch1 = make_chan () in
let nch = make_chan () in
let cwch0 = make_chan () in
let cwch1 = make_chan () in
let cwch2 = ... | null | https://raw.githubusercontent.com/hatsugai/Guedra/592e9b4cff151228735d2c61c337154cde8b5329/test/test_vsplitter2.ml | ocaml | open Csp
open Guedra
let init () =
let (wch, pch) = create_toplevel_window "Guedra" 0 0 768 512 in
let rch0 = make_chan () in
let rch1 = make_chan () in
let cch0 = make_chan () in
let cch1 = make_chan () in
let nch = make_chan () in
let cwch0 = make_chan () in
let cwch1 = make_chan () in
let cwch2 = ... | |
77966f950b34e1873213259acb3765250a0e8abd9ef1c35ccca0e647d15b3aec | urbanslug/graphite | test-fm-search.rkt | #lang racket
(require rackunit)
(require math/array)
(require "../../graphite/algorithms/fm-search.rkt")
(require "../../graphite/algorithms/fm-index.rkt")
(require "../../graphite/algorithms/suffix-array.rkt")
(require "../../graphite/algorithms/bwt.rkt")
(define s "abaaba")
(define fl-list (fl-map s))
(check-eq... | null | https://raw.githubusercontent.com/urbanslug/graphite/bcac6bd61172c52d1cc89c0bd0abe8ad3c6a6576/tests/algorithms/test-fm-search.rkt | racket | #lang racket
(require rackunit)
(require math/array)
(require "../../graphite/algorithms/fm-search.rkt")
(require "../../graphite/algorithms/fm-index.rkt")
(require "../../graphite/algorithms/suffix-array.rkt")
(require "../../graphite/algorithms/bwt.rkt")
(define s "abaaba")
(define fl-list (fl-map s))
(check-eq... | |
4558168247d7afa3f790197302e211f2a7cd96cc8e048058ff4eca9f10d524a1 | massung/racket-raylib | info.rkt | #lang setup/infotab
(define install-platform "win32\\x86_64")
(define copy-foreign-libs '("raylib.dll"))
| null | https://raw.githubusercontent.com/massung/racket-raylib/1f7882076e0f7614ce1c955e5bb8a67de5aa18bb/win64-x86_64/info.rkt | racket | #lang setup/infotab
(define install-platform "win32\\x86_64")
(define copy-foreign-libs '("raylib.dll"))
| |
6a4855444bdb2e076052436862ea6b3118a2ab8865f6de6ef9d72f3a08974879 | mwotton/squealgen | Public.hs | | This code was originally created by squealgen . Edit if you know how it got made and are willing to own it now .
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedLabels #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PolyKinds #
# LANGUAGE TypeApplications #
# LAN... | null | https://raw.githubusercontent.com/mwotton/squealgen/72ebca82f75534e806851b8336fc3e2400f801f6/test/InetArrays/Public.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE GADTs #
enums
decls
schema
VIEWS
functions | | This code was originally created by squealgen . Edit if you know how it got made and are willing to own it now .
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedLabels #
# LANGUAGE FlexibleContexts #
# LANGUAGE PolyKinds #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# OPTIONS_GHC... |
3ff6591642079fd3a8aee6148814b62f82ffef4bf1ce31005bb8e90786248941 | rabbitmq/ra | ra_flru.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2017 - 2022 VMware , Inc. or its affiliates . All rights reserved .
%%
%% @hidden
-module(ra_flru).
%% small fixed size ... | null | https://raw.githubusercontent.com/rabbitmq/ra/72439a5c25f6cf9e8d2a26b21fe456f94df516d4/src/ra_flru.erl | erlang |
@hidden
small fixed size simple lru cache
inefficient on larger sizes
head optimisation
cache is full, discard last item
call the handler
else just append it
k2 should still be readable here
k3 should have been evicted | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2017 - 2022 VMware , Inc. or its affiliates . All rights reserved .
-module(ra_flru).
-export([
new/2,
f... |
b2ac305233da2351a2fe3b5fdd51a527c9b597b7e66fea4166ff0298e928505a | zoka/webREPLdemo | admin.clj | (ns noirmon.views.admin
(:use noir.core
hiccup.core
hiccup.page
hiccup.element
hiccup.form)
(:require [noir.session :as session]
[noir.validation :as vali]
[noir.response :as resp]
[clojure.string :as string]
[noirmon.models.post :as po... | null | https://raw.githubusercontent.com/zoka/webREPLdemo/fc2dfe13ce141e47fad51396a97edcbe610211e9/src/noirmon/views/admin.clj | clojure | Links
Partials
Admin pages
force you to be an admin to get to the admin section
User pages | (ns noirmon.views.admin
(:use noir.core
hiccup.core
hiccup.page
hiccup.element
hiccup.form)
(:require [noir.session :as session]
[noir.validation :as vali]
[noir.response :as resp]
[clojure.string :as string]
[noirmon.models.post :as po... |
1a5a44b47fc7d6ad21a86546a63e3fb51fcf524a200a7d5dfe4ca27312b4db67 | GillianPlatform/Gillian | wislSHeap.mli | open Gillian.Symbolic
open Gil_syntax
open Gillian.Debugger.Utils
type t [@@deriving yojson]
type err =
| MissingResource of (WislLActions.ga * string * Expr.t option)
| DoubleFree of string
| UseAfterFree of string
| MemoryLeak
| OutOfBounds of (int option * string * Expr.t)
| InvalidLocation
[@@deriving... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/04d142e38f5fd622705a71ce3a3daed1ac7630a0/wisl/lib/semantics/wislSHeap.mli | ocaml | open Gillian.Symbolic
open Gil_syntax
open Gillian.Debugger.Utils
type t [@@deriving yojson]
type err =
| MissingResource of (WislLActions.ga * string * Expr.t option)
| DoubleFree of string
| UseAfterFree of string
| MemoryLeak
| OutOfBounds of (int option * string * Expr.t)
| InvalidLocation
[@@deriving... | |
298169c6c2e4346b9c69dbb546e6711a481086185795a8bf23647419b0ecd7e1 | achirkin/qua-kit | UserManager.hs | {-# OPTIONS_HADDOCK hide, prune #-}
module Handler.Mooc.Admin.UserManager
( getAdminUserManagerR
, postSetUserRoleR
, postAdminCreateUserR
) where
import Import hiding ((==.), on)
import qualified Data.Text as T
import Text.Read
import Database.Persist.Sql
import Yesod.Auth.Email
import Handler.Moo... | null | https://raw.githubusercontent.com/achirkin/qua-kit/9f859e2078d5f059fb87b2f6baabcde7170d4e95/apps/hs/qua-server/src/Handler/Mooc/Admin/UserManager.hs | haskell | # OPTIONS_HADDOCK hide, prune # | module Handler.Mooc.Admin.UserManager
( getAdminUserManagerR
, postSetUserRoleR
, postAdminCreateUserR
) where
import Import hiding ((==.), on)
import qualified Data.Text as T
import Text.Read
import Database.Persist.Sql
import Yesod.Auth.Email
import Handler.Mooc.Admin
getAdminUserManagerR :: Han... |
54180f41f14bc93ac27c782c7cfac2f02e323e42987fa16a58c830b759e6cd67 | maxlibin/ParentalJobs | jobs_t.ml | (* Auto-generated from "jobs.atd" *)
[@@@ocaml.warning "-27-32-35-39"]
type salary = { salaryFrom: string; salaryTo: string; salaryType: string }
type jobOverview = {
_id: string;
company: string;
jobTitle: string;
employmentType: string;
seniority: string;
minExperience: string;
jobCatego... | null | https://raw.githubusercontent.com/maxlibin/ParentalJobs/0657b405051aa4d5112760eff769f75f2e4c40dd/packages/frontend/src/types/jobs_t.ml | ocaml | Auto-generated from "jobs.atd" | [@@@ocaml.warning "-27-32-35-39"]
type salary = { salaryFrom: string; salaryTo: string; salaryType: string }
type jobOverview = {
_id: string;
company: string;
jobTitle: string;
employmentType: string;
seniority: string;
minExperience: string;
jobCategories: string;
salary: salary;
pos... |
ede69a88b251221e225e32bfaee36bd4d702bf49ca7706d53ec2c6903ca5caa5 | ArulselvanMadhavan/haskell-first-principles | ReaderPractice.hs | module ReaderPractice where
import Control.Applicative
import Data.Maybe
x = [1, 2, 3]
y = [4, 5, 6]
z = [7, 8, 9]
findVal :: (Eq a) => a -> (a, b) -> Maybe b -> Maybe b
findVal k ab b =
if (k == fst ab) then Just (snd ab) else b
lookup' :: Eq a => a -> [(a, b)] -> Maybe b
lookup' k =
fo... | null | https://raw.githubusercontent.com/ArulselvanMadhavan/haskell-first-principles/06e0c71c502848c8e75c8109dd49c0954d815bba/chapter22/src/ReaderPractice.hs | haskell | module ReaderPractice where
import Control.Applicative
import Data.Maybe
x = [1, 2, 3]
y = [4, 5, 6]
z = [7, 8, 9]
findVal :: (Eq a) => a -> (a, b) -> Maybe b -> Maybe b
findVal k ab b =
if (k == fst ab) then Just (snd ab) else b
lookup' :: Eq a => a -> [(a, b)] -> Maybe b
lookup' k =
fo... | |
9142c897b00b5a80537f047da2b8333a527f08a22f745c3d48954b9acc420454 | tweag/lagoon | Security.hs | Copyright 2020 Pfizer Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
-- -2.0
-- Unless required by applicable law or agreed to in writing, software
distributed under th... | null | https://raw.githubusercontent.com/tweag/lagoon/2ef0440db810f4f45dbed160b369daf41d92bfa4/src/interface/src/Lagoon/Interface/Security.hs | haskell | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permiss... | Copyright 2020 Pfizer Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# LANGUAGE GeneralizedNewtypeDeriving #
module Lagoon.Interface.Security (
PlaintextPassword(..)
, GroupIx(..)
, GroupName
, AuthToken(... |
a41f9eec788dfb3120c1e67121a0cd76a0086af128962b36455968ea1e29566c | korya/efuns | instruct.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/ocamlsrc/compat/3.00%2B22/include/instruct.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : instruct.mli , v 1.1 2001/02/... |
26fba60aec0359efd600b89292e21b1bf5268c1d3a03f5d011f741a0098f8656 | 7c6f434c/lang-os | safe-read.lisp | (defpackage :lisp-os-helpers/safe-read
(:use :common-lisp :lisp-os-helpers/util)
(:export
#:safe-read
#:check-safety
#:stringify-atoms))
(in-package :lisp-os-helpers/safe-read)
(define-condition unacceptable-symbol (simple-error)
((symbol :initarg :symbol :reader unacceptable-symbol-content)
(pack... | null | https://raw.githubusercontent.com/7c6f434c/lang-os/be4331d225629bff322facf603a89ac707acea83/lisp-os-helpers/safe-read.lisp | lisp | (defpackage :lisp-os-helpers/safe-read
(:use :common-lisp :lisp-os-helpers/util)
(:export
#:safe-read
#:check-safety
#:stringify-atoms))
(in-package :lisp-os-helpers/safe-read)
(define-condition unacceptable-symbol (simple-error)
((symbol :initarg :symbol :reader unacceptable-symbol-content)
(pack... | |
390999ea1ca7aecdac9fbece00b47cebedddb13e9630b6d807aecb39b697511e | codelion/SpinR | expression.ml | _ $ I d : expression.ml 4527 2012 - 10 - 17 13:08:20Z weissmam $
Copyright ( c ) 2010 - 2012 Technische Universitaet Muenchen , TUM
Copyright ( c ) 2010 - 2012 < >
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the fol... | null | https://raw.githubusercontent.com/codelion/SpinR/8d3a3d99cf3192a4ede3f326eff0c07c22906dee/expression.ml | ocaml | simplify expression by computing recursive fixpoint of rewriting rules | _ $ I d : expression.ml 4527 2012 - 10 - 17 13:08:20Z weissmam $
Copyright ( c ) 2010 - 2012 Technische Universitaet Muenchen , TUM
Copyright ( c ) 2010 - 2012 < >
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the fol... |
154c1e5351eda8fa0f6c3f3c019890bff53077df7f5dba6c2833343099749c12 | xvw/planet | applicative.mli | (** This module describes a structure intermediate between a functor and a
monad.
This implementation is widely inspired by the {{:
/} Haskell}'s implementation *)
* Build a new Applicative Functor 's module using [ REQUIREMENT ] .
module Make (F : Sigs.Applicative.REQUIREMENT) :
Sigs.Applicative.API wi... | null | https://raw.githubusercontent.com/xvw/planet/c2a77ea66f61cc76df78b9c2ad06d114795f3053/src/bedrock/applicative.mli | ocaml | * This module describes a structure intermediate between a functor and a
monad.
This implementation is widely inspired by the {{:
/} Haskell}'s implementation |
* Build a new Applicative Functor 's module using [ REQUIREMENT ] .
module Make (F : Sigs.Applicative.REQUIREMENT) :
Sigs.Applicative.API with type 'a t = 'a F.t
* Build a new Applicative Functor 's module using a [ Monad ] .
module Make_from_monad (M : Sigs.Monad.REQUIREMENT_BIND) :
Sigs.Applicative.API with typ... |
eb93f83373a85323a0e20e732a475da459a73fddff23c8a65d2cfcc5f274a706 | bvaugon/ocapic | lcd.mli | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/lib/spiclibs/lcd.mli | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
* Possible sizes of data connection between the PIC and the LCD display
type bus_size = Four | Eight
type direction = Left | Right
type mode = Cursor_left | Cursor_right | Display_l... |
dcc6584bb6a57b30b946a47c5342f42a1d3c9d6c2a600964a54652460301ee42 | cobaweel/piffle | Path.hs | Piffle , Copyright ( C ) 2007 , . This program is free
software ; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software
Foundation ; either version 2 of the License , or ( at your option )
any later version . This program i... | null | https://raw.githubusercontent.com/cobaweel/piffle/7c4cfb5301c5c55c229098d3938d3b023d69cde4/src/Path.hs | haskell | SEARCH PATHS ------------------------------------------------------
Retrieve an environment variable and parse it as a search
path. Empty elements are interpreted as referring to the current
working directory. All elements are delivered with trailing
slash.
This parses a standard UNIXy search path of direc... | Piffle , Copyright ( C ) 2007 , . This program is free
software ; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software
Foundation ; either version 2 of the License , or ( at your option )
any later version . This program i... |
5970d5d16b694dc259d15e2b28a7b92af83ed8d54fa88bb6dc596e276f7e8751 | gafiatulin/codewars | Manhattan.hs | Manhattan Distance
-- /
module Manhattan where
manhattanDistance :: (Int, Int) -> (Int, Int) -> Int
manhattanDistance (x1, y1) (x2, y2) = abs (x1-x2) + abs (y1-y2)
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/Manhattan.hs | haskell | / | Manhattan Distance
module Manhattan where
manhattanDistance :: (Int, Int) -> (Int, Int) -> Int
manhattanDistance (x1, y1) (x2, y2) = abs (x1-x2) + abs (y1-y2)
|
4d11bb290071761aedc7fd65bb996c9447233d5505ed5c6e753be8b39c3945de | avsm/platform | usegtrip.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/uuseg.12.0.0%2Bdune/test/usegtrip.ml | ocaml | Output
Trip
guess encoding if needed.
Version
Cmd
Cmdline interface | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... |
2f7da16c839c5380e63817ac6148d0c8b3b781c68822aebca1a4fc9f0e2a2b54 | emaphis/HtDP2e-solutions | 10_01_163_FTC.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 10_01_163_FTC) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-dec... | null | https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/2-Arbitrarily-Large-Data/10-More-on-Lists/10_01_163_FTC.rkt | racket | about the language level of this file in a form that our tools can easily process.
to a list of Celsius measurements.
List-of-Temps -> List-of-Temps
Number -> Number | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 10_01_163_FTC) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
HtDP 2e - 10 More on Lists
10.1 Functions that Produce... |
0ae11772f3b77551bcd75618ad36241337b49ad5708f9a0ef6a25848ae3cff0c | dschrempf/elynx | PointProcess.hs | {-# LANGUAGE BangPatterns #-}
-- |
Module : ELynx . Tree . Simulate . PointProcess
Description : Point process and functions
Copyright : 2021
License : GPL-3.0 - or - later
--
-- Maintainer :
-- Stability : unstable
-- Portability : portable
--
Creation date : Tue... | null | https://raw.githubusercontent.com/dschrempf/elynx/bf5f0b353b5e2f74d29058fc86ea6723133cab5c/elynx-tree/src/ELynx/Tree/Simulate/PointProcess.hs | haskell | # LANGUAGE BangPatterns #
|
Maintainer :
Stability : unstable
Portability : portable
The point process can be used to simulate reconstructed trees under the birth
and death process.
Require near critical process if birth and death rates are closer than this value.
Also the distribution of origi... |
Module : ELynx . Tree . Simulate . PointProcess
Description : Point process and functions
Copyright : 2021
License : GPL-3.0 - or - later
Creation date : Tue Feb 13 13:16:18 2018 .
See Gernhard , T. ( 2008 ) . The conditioned reconstructed process . Journal of
Theoretical ... |
6b3ac8ba826420ed5e6bab2f9a553d09a71f800f6613d49fe13d57261c55e9be | ghc/ghc | T13871.hs | {-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE TypeFamilies #
# LANGUAGE DataKinds , PolyKinds #
# LANGUAGE TypeOperators #
module Foo where
import Data.Kind
data Foo (a :: Type) (b :: Type) where
MkFoo :: (a ~ Int, b ~ Char) => Foo a b
data family Sing (a :: k)
dat... | null | https://raw.githubusercontent.com/ghc/ghc/3c3060e4645b12595b187e7dbaa758e8adda15e0/testsuite/tests/typecheck/should_fail/T13871.hs | haskell | # LANGUAGE Haskell2010 #
# LANGUAGE ConstraintKinds #
# LANGUAGE GADTs # | # LANGUAGE TypeFamilies #
# LANGUAGE DataKinds , PolyKinds #
# LANGUAGE TypeOperators #
module Foo where
import Data.Kind
data Foo (a :: Type) (b :: Type) where
MkFoo :: (a ~ Int, b ~ Char) => Foo a b
data family Sing (a :: k)
data SFoo (z :: Foo a b) where
SMkFoo :: SFoo MkFoo
|
273d6b02b5fccbdb9b307af020ff0897246788ce039c92b568dac7a31b0c77dc | brendanhay/amazonka | Main.hs | # OPTIONS_GHC -fno - warn - unused - imports #
-- |
-- Module : Main
Copyright : ( c ) 2013 - 2023
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
-- Stability : auto-generated
Portability : non - portable ( GHC extensions )
module Main (main) where
import Test... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-wisdom/test/Main.hs | haskell | |
Module : Main
Stability : auto-generated | # OPTIONS_GHC -fno - warn - unused - imports #
Copyright : ( c ) 2013 - 2023
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
Portability : non - portable ( GHC extensions )
module Main (main) where
import Test.Amazonka.Wisdom
import Test.Amazonka.Wisdom.Internal
impor... |
ea353caee8733e62aa67749f526e17177bd448abdae09b5b22879f1b3255a43c | mirage/ocaml-qcow | qcow_rwlock.mli |
* Copyright ( C ) 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/ocaml-qcow/2418c66627dcce8420bcb06d7547db171528060a/lib/qcow_rwlock.mli | ocaml | * A lock which permits multiple concurrent threads to acquire it for reading
but demands exclusivity for writing
* [make describe_fn] creates a new lock, where [describe_fn ()] returns a
human-readable description string suitable for debug output.
* A value which represents holding a lock
* [unlock locked] r... |
* Copyright ( C ) 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
135f1e0b48cfaa160be0319feb3eb2b30d08f735ceff53f5066199c6ceb52aa9 | rudymatela/speculate | binarytree.hs | import QuickSpec hiding (insert)
import Test.QuickCheck hiding (insert,(==>))
import Data.Function (on)
import Data.List (isSubsequenceOf)
data BT a = Null | Fork (BT a) a (BT a)
deriving (Show)
instance (Eq a, Ord a) => Eq (BT a) where
(==) = (==) `on` toList
instance (Eq a, Ord a) => Ord (BT a) where... | null | https://raw.githubusercontent.com/rudymatela/speculate/8ec39747d03033db4349d554467d4b78bb72935d/bench/qs2/binarytree.hs | haskell |
truncateT [[x,y],[z,w],[],[],[],...] == [[x,y],[z,w]]
otherwise the law `isIn x t1 ==> isIn x (insert y t1) = True`
does not appear in the output (which is mainly what I want with this
, constant "<=" ((<=) :: Item -> Item -> Bool)
, constant "/=" ((/=) :: Item -> Item -> Bool)
, constant "ordered" (o... | import QuickSpec hiding (insert)
import Test.QuickCheck hiding (insert,(==>))
import Data.Function (on)
import Data.List (isSubsequenceOf)
data BT a = Null | Fork (BT a) a (BT a)
deriving (Show)
instance (Eq a, Ord a) => Eq (BT a) where
(==) = (==) `on` toList
instance (Eq a, Ord a) => Ord (BT a) where... |
660d0ed78a893c83da7cf6ab587350450816c83cfcc1781e442a1c0ac9c1f9c3 | SquidDev/urn | escape.lisp | (import urn/logger/format format)
(import urn/resolve/builtins (builtin builtin-var?))
(import urn/resolve/scope scope)
(define keywords
"A set of all builtin Lua variables"
:hidden
(create-lookup '("and" "break" "do" "else" "elseif" "end" "false" "for" "function"
"if" "in" "local" "nil" "not"... | null | https://raw.githubusercontent.com/SquidDev/urn/6e6717cf1376b0950e569e3771cb7e287aed291d/urn/backend/lua/escape.lisp | lisp | Keywords are trivial to escape
Syntactically valid Lua variables. We exclude _ as they mess with "symbol" quoting.
If we're surrounded by ident characters then convert the next one to upper case | (import urn/logger/format format)
(import urn/resolve/builtins (builtin builtin-var?))
(import urn/resolve/scope scope)
(define keywords
"A set of all builtin Lua variables"
:hidden
(create-lookup '("and" "break" "do" "else" "elseif" "end" "false" "for" "function"
"if" "in" "local" "nil" "not"... |
b6cdb50db28d8a8dc9cd129869ce0ab7cbeea6205555d11c149205fadf89a545 | zotonic/zotonic | m_identity_tests.erl | @author < >
%% @hidden
-module(m_identity_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("zotonic.hrl").
hash_test() ->
?assertMatch({bcrypt, <<"$2a$12$", _/binary>>}, m_identity:hash("1234")),
?assertMatch({bcrypt, <<"$2a$12$", _/binary>>}, m_identity:hash(<<"1234">>)),
?assertMatc... | null | https://raw.githubusercontent.com/zotonic/zotonic/ad2759e8d5f0f4b7c7caabce3acaac628ea2cae7/apps/zotonic_core/test/m_identity_tests.erl | erlang | @hidden
Validating stored old password hashes should still work.
Make sure stored hashes don't need to be upgraded.
update the hash value in the database and set the old hash algorithm.
Logging in with the wrong password still does not work.
And with the correct password you can login.
But now hash of the user h... | @author < >
-module(m_identity_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib("zotonic.hrl").
hash_test() ->
?assertMatch({bcrypt, <<"$2a$12$", _/binary>>}, m_identity:hash("1234")),
?assertMatch({bcrypt, <<"$2a$12$", _/binary>>}, m_identity:hash(<<"1234">>)),
?assertMatch({bcrypt, ... |
8646db96034e3b9861e7d89fb98798de06469db57294952b512ecf7399961947 | zkat/sheeple | messages.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*-
;;;; This file is part of Sheeple
messages.lisp
;;;;
Message , message definition and management
;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package :sh... | null | https://raw.githubusercontent.com/zkat/sheeple/5393c74737ccf22c3fd5f390076b75c38453cb04/src/messages.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*-
This file is part of Sheeple
Funcallable Messages!
Note the multiple evaluation of ,message
FIXME: Now would be a nice time to chat about what a message is
Arg info
A lot of duplicated code here... FIXME!
The defmessage macro b... |
messages.lisp
Message , message definition and management
(in-package :sheeple)
(defstruct (arg-info (:constructor make-arg-info ()))
(lambda-list nil :type list)
(number-required 0 :type fixnum)
(number-optional 0 :type fixnum)
(key/rest-p nil :type boolean)
(keys nil :type li... |
c8230a2be9005757ce7298a3b41b93141cb196b81a240e181f4969b8be3c75ae | fakedata-haskell/fakedata | DrWho.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Faker.Provider.DrWho where
import Config
import Control.Monad.IO.Class
import Data.Map.Strict (Map)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Yaml
import Faker
import Faker.Internal
import Faker.Prov... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/src/Faker/Provider/DrWho.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Faker.Provider.DrWho where
import Config
import Control.Monad.IO.Class
import Data.Map.Strict (Map)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Yaml
import Faker
import Faker.Internal
import Faker.Provider.TH
import Language.Haskell.TH
... |
04df8bd05204acf305dd1d893d70dc914951f3cef3e3d3f7a29bd41382835d71 | tokenmill/docx-utils | listing.clj | (ns docx-utils.elements.listing
(:require [docx-utils.constants :refer [cTAbstractNumBulletXML cTAbstractNumDecimalXML]]
[docx-utils.elements.paragraph :as paragraph]
[docx-utils.elements.run :refer [set-run]])
(:import (org.apache.poi.xwpf.usermodel XWPFDocument XWPFParagraph XWPFAbstractNu... | null | https://raw.githubusercontent.com/tokenmill/docx-utils/f9cb077df2360c11376e0f2d9c8daf8b5062179a/src/docx_utils/elements/listing.clj | clojure | (ns docx-utils.elements.listing
(:require [docx-utils.constants :refer [cTAbstractNumBulletXML cTAbstractNumDecimalXML]]
[docx-utils.elements.paragraph :as paragraph]
[docx-utils.elements.run :refer [set-run]])
(:import (org.apache.poi.xwpf.usermodel XWPFDocument XWPFParagraph XWPFAbstractNu... | |
e2b8367f1200cea02a252e8b3503310495caf70d1bf7aebdfde5009872febbc0 | bjpop/blip | Main.hs | -----------------------------------------------------------------------------
-- |
-- Module : Main
Copyright : ( c ) 2012 , 2013
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
Portability : ghc
--
The Main module of Blip . Contains the entry point of the compiler and
-- the ... | null | https://raw.githubusercontent.com/bjpop/blip/3d9105a44d1afb7bd007da3742fb19dc69372e10/blip/src/Main.hs | haskell | ---------------------------------------------------------------------------
|
Module : Main
License : BSD-style
Maintainer :
Stability : experimental
the interpreter and handles command line argument parsing.
---------------------------------------------------------------------------
XXX maybe we ... | Copyright : ( c ) 2012 , 2013
Portability : ghc
The Main module of Blip . Contains the entry point of the compiler and
module Main where
import System.Exit (exitSuccess)
import Control.Exception (try)
import Control.Monad (when, unless)
import System.Console.ParseArgs
( Argtype (..), argDataOptional, Ar... |
fc897652120055a5c80946cfbd14ea0b523cc869a446957593d1199fd4612518 | zadean/xqerl | prod_FunctionCall_SUITE.erl | -module('prod_FunctionCall_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['FunctionCall-001'/1]).
-export(['FunctionCall-002'/1]).
-export(['FunctionCa... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/prod/prod_FunctionCall_SUITE.erl | erlang | -module('prod_FunctionCall_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['FunctionCall-001'/1]).
-export(['FunctionCall-002'/1]).
-export(['FunctionCa... | |
f6b29cc75190c21e875caaad205c12c26b6245720bd95fa6bf5f69ec710a75d4 | lucasvreis/org-mode-hs | Processing.hs | module Org.Exporters.Processing
( module Org.Exporters.Processing,
module Org.Exporters.Processing.OrgData,
module Org.Exporters.Processing.InternalLinks,
module Org.Exporters.Processing.Prune,
module Org.Exporters.Processing.SpecialStrings,
module Org.Exporters.Processing.GatherKeywords,
)
wher... | null | https://raw.githubusercontent.com/lucasvreis/org-mode-hs/8eed3910638f379d55114995e0bc75a5915c4e98/org-exporters/src/Org/Exporters/Processing.hs | haskell | module Org.Exporters.Processing
( module Org.Exporters.Processing,
module Org.Exporters.Processing.OrgData,
module Org.Exporters.Processing.InternalLinks,
module Org.Exporters.Processing.Prune,
module Org.Exporters.Processing.SpecialStrings,
module Org.Exporters.Processing.GatherKeywords,
)
wher... | |
1f54eb6932b23cb985f3468e2e3fb0dde4b16f16fc8a74935867436716587d2b | cedlemo/OCaml-GI-ctypes-bindings-generator | Widget_accessible_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Widget_accessible_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Widget_accessible_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Widget_accessible_private"
| |
7987126c05f57233d5b285c256211b130dc92a99a4a25b39500c68d705171cc3 | synrc/rest | serviceTask.erl | -module(serviceTask).
-include_lib("bpe/include/bpe.hrl").
-compile({parse_transform, rest}).
-compile(export_all).
-rest_record(serviceTask).
new() -> #serviceTask{}.
| null | https://raw.githubusercontent.com/synrc/rest/d981292a6eb66ae02da5d5d9d8717c25d74a1d0b/src/bpe/serviceTask.erl | erlang | -module(serviceTask).
-include_lib("bpe/include/bpe.hrl").
-compile({parse_transform, rest}).
-compile(export_all).
-rest_record(serviceTask).
new() -> #serviceTask{}.
| |
2749f389d1ab539854daf1785817b6d69a8020cfbf2f6a822d27a18acdb504cd | qnikst/okasaki | BatchedQueue.hs | module Data.BatchedQueue
where
import Data.Queue.Class
data BatchedQueue a = BatchedQueue [a] [a]
instance Queue BatchedQueue where
empty = BatchedQueue [] []
isEmpty (BatchedQueue f r) = null r
snoc (BatchedQueue f r) a = checkf f (a:r)
head (BatchedQueue [] _) = error "empty"
head (Batche... | null | https://raw.githubusercontent.com/qnikst/okasaki/f6f3c4211df16e4dde3a5cb4d6aaf19a68b99b0e/ch05/Data/BatchedQueue.hs | haskell | module Data.BatchedQueue
where
import Data.Queue.Class
data BatchedQueue a = BatchedQueue [a] [a]
instance Queue BatchedQueue where
empty = BatchedQueue [] []
isEmpty (BatchedQueue f r) = null r
snoc (BatchedQueue f r) a = checkf f (a:r)
head (BatchedQueue [] _) = error "empty"
head (Batche... | |
69ee31e4fc822d8a49e9854f3012b31466f48f357d06cac3daacda0791f422d2 | basho/riak_test | pipe_verify_basics.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2012 Basho Technologies , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/pipe_verify_basics.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2012 Basho Technologies , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
Important : this test loads th... |
4c595965cf0e82ad88aa270190e60b7113e23f1fc240edb2436025cc4deca15a | re-ops/re-core | repl.clj | (ns re-core.repl
"Repl Driven re-core"
(:refer-clojure :exclude [list update sync])
(:require
[re-core.model :refer (figure-virt)]
[re-core.repl.terminal :refer (launch-ssh)]
[clojure.core.strint :refer (<<)]
[re-core.repl.base :refer (refer-base)]
[re-core.repl.systems :refer (refer-systems)]
... | null | https://raw.githubusercontent.com/re-ops/re-core/e13490aedd6d34ff01f11b28adf359beb5c0bb5b/src/re_core/repl.clj | clojure | Filtering functions
management
reload all running instances
reload all redis instances"
clear all systems (both runnging and non running)
clear systems with redis type
clear all types
clear the redis type
remove all instances (both running and non running)
remove running instances only
remove running instanc... | (ns re-core.repl
"Repl Driven re-core"
(:refer-clojure :exclude [list update sync])
(:require
[re-core.model :refer (figure-virt)]
[re-core.repl.terminal :refer (launch-ssh)]
[clojure.core.strint :refer (<<)]
[re-core.repl.base :refer (refer-base)]
[re-core.repl.systems :refer (refer-systems)]
... |
c63fba0b3a97de2b5c46b24bfd27cc6992adce1c2ba21320e6acb49c166d42af | msantos/tunctl | tunctl_freebsd.erl | Copyright ( c ) 2011 - 2022 < > . All
%%% rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions
%%% are met:
%%%
1 . Redistributions of source code must retain the above copyright notice ,
%%% this list o... | null | https://raw.githubusercontent.com/msantos/tunctl/26c42df28a1734750c992c3a8d954335b57088ac/src/tunctl_freebsd.erl | erlang | rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
documentation and/or other m... | Copyright ( c ) 2011 - 2022 < > . All
1 . Redistributions of source code must retain the above copyright notice ,
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of the copyright holder nor the names of its
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDI... |
c452ad428fc6dcca6e656e020c8413dd09ce67b7981424a959228d9e13874807 | dbuenzli/hyperbib | user_service.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2021 University of Bern . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/dbuenzli/hyperbib/bea0ee2c35fac11fdb856c914edd846fb4a8f709/src/service/user_service.mli | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2021 University of Bern . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | |
a2861c011ad5d53ca0cf74ae411ec267be2a357af9543a58062bfbefd2d67174 | emaphis/HtDP2e-solutions | 04_Ufo.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 04_Ufo) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f... | null | https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/1-Fixed-Size-Data/04-Intervals/04_Ufo.rkt | racket | about the language level of this file in a form that our tools can easily process.
ufo example
interperatation: number of pixels between the top and the UFO
– between 0 and CLOSE
– between CLOSE and HEIGHT
– below HEIGHT
template
constants:
visual constants:
functions
run program
WorldState -> WorldStat... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 04_Ufo) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
HtDP 2e - 4 Enumerations and Intervals
4.4 Intervals
(requir... |
9e44f3af77c950ab27032a85f88931e0ad3fb79db3fdb124ea275c4898516f27 | sadiqj/ocaml-esp32 | exec_tests.ml | let values =
[
" верблюды "
"\xE9\xAA\x86\xE9\xA9\xBC"; (* "骆驼" *)
" "
"\216\167\217\136\217\134\217\185"; (* "اونٹ" *)
]
let env0 =
List.sort compare (List.mapi (fun i v -> Printf.sprintf "OCAML_UTF8_VAR%d=%s" i v) values)
let split sep s =
match String.index s sep with
| i ->
String.sub... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/testsuite/tests/win-unicode/exec_tests.ml | ocaml | "骆驼"
"اونٹ" | let values =
[
" верблюды "
" "
]
let env0 =
List.sort compare (List.mapi (fun i v -> Printf.sprintf "OCAML_UTF8_VAR%d=%s" i v) values)
let split sep s =
match String.index s sep with
| i ->
String.sub s 0 i, String.sub s (i + 1) (String.length s - i - 1)
| exception Not_found ->
s, ""
l... |
391913d67a495c5a7615535ae1b6563d485368ab726894fddecbd1fe88bcf3ba | postgres-haskell/postgres-wire | QuickCheck.hs | module Codecs.QuickCheck where
import Data.Monoid ((<>))
import Test.Tasty
import Test.QuickCheck
import Test.QuickCheck.Arbitrary
import Test.QuickCheck.Monadic
import Data.Scientific as S
import Data.Time
import Text.Printf
import Data.List as L
import Data.UUID (UUID, fromWords)
import Data.String (IsString)
impor... | null | https://raw.githubusercontent.com/postgres-haskell/postgres-wire/fda5e3b70c3cc0bab8365b4b872991d50da0348c/tests/Codecs/QuickCheck.hs | haskell | | Makes property that if here is a value then encoding and sending it
to PostgreSQL, and receiving back returns the same value.
| Makes a property that encoded value is correctly parsed and printed
by PostgreSQL.
| Makes Tasty test tree.
Orphan instances
Helper to generate valid json strings | module Codecs.QuickCheck where
import Data.Monoid ((<>))
import Test.Tasty
import Test.QuickCheck
import Test.QuickCheck.Arbitrary
import Test.QuickCheck.Monadic
import Data.Scientific as S
import Data.Time
import Text.Printf
import Data.List as L
import Data.UUID (UUID, fromWords)
import Data.String (IsString)
impor... |
731f07b413e0c74302c34e543d8007d378a6b30621e6a108ae28fb897b3fbc50 | AndrasKovacs/ELTE-func-lang | Lesson01.hs | -- {-# options_ghc -Wincomplete-patterns #-}
-- {-# LANGUAGE NoImplicitPrelude #-}
ghci commands :
- : l(oad ) file
- : r(eload )
- : bro(wse )
- : t(ype ) expression
- : i(nfo ) definition
examples :
- : load - : t foo
- : i ( + )
ghci commands:
- :l(oad) f... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2020-21-2/gyak_2/Lesson01.hs | haskell | {-# options_ghc -Wincomplete-patterns #-}
{-# LANGUAGE NoImplicitPrelude #-}
Bool
a = undefined
data Color = ?
c :: Color
c = undefined
Pair
data Pair a b = MakePair a b
p :: Pair Color Bool
p = undefined
List
data List a = ?
l = undefined
l' = undefined
Tree
data Tree = _
·
/ \
· ·
/ ... |
ghci commands :
- : l(oad ) file
- : r(eload )
- : bro(wse )
- : t(ype ) expression
- : i(nfo ) definition
examples :
- : load - : t foo
- : i ( + )
ghci commands:
- :l(oad) file
- :r(eload)
- :bro(wse)
- :t(ype) expression
- :i(nfo) definiti... |
532360c81f9970499e7f22684c155c63cda4c5a78d1aa2a5ef76422b9be14015 | exclipy/pdata | HamtMap.hs | -----------------------------------------------------------------------------
-- |
Module : Data .
Copyright : ( c ) 2011
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
-- An implementation of maps from keys to values (dictionaries) based... | null | https://raw.githubusercontent.com/exclipy/pdata/b03682176f506c3484f4dcb39af82149c72772d0/Data/HamtMap.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
An implementation of maps from keys to values (dictionaries) based on the
hash array mapped trie.
Since many function names (but not the ty... | Module : Data .
Copyright : ( c ) 2011
" Prelude " names , this module is usually imported @qualified@ , e.g.
> import qualified Data . as HM
This data structure is based on hash array mapped trie ,
module Data.HamtMap (
HamtMap
, (Data.HamtMap.!)
, member
, notMember... |
2628a9c3604886f35fd9e6db5136945e8237af86be52ee75e3b3086c621212c0 | pdarragh/parsing-with-zippers-paper-artifact | types.ml | type pos = int ref (* Using ref makes it easy to create values that are not pointer equal *)
let p_bottom = ref (-1)
type sym = string
let s_bottom = "<s_bottom>"
type tag = int
type tok = tag * sym
let t_eof = (-1, "<t_eof>")
type exp = exp_ Lazy.t
and exp_ = { mutable m : mem; e' : exp'; }
and exp' = Tok of tok
... | null | https://raw.githubusercontent.com/pdarragh/parsing-with-zippers-paper-artifact/c5c08306cfe4eec588237c7fa45b794649ccb68a/interact/lazy/types.ml | ocaml | Using ref makes it easy to create values that are not pointer equal | let p_bottom = ref (-1)
type sym = string
let s_bottom = "<s_bottom>"
type tag = int
type tok = tag * sym
let t_eof = (-1, "<t_eof>")
type exp = exp_ Lazy.t
and exp_ = { mutable m : mem; e' : exp'; }
and exp' = Tok of tok
| Seq of sym * exp list
| Alt of (exp list) ref
and cxt = TopC
| S... |
0b977e457c6e74f68bba72d8f308c3b7dfee19a61758493dc6e9ac8ca7bb493e | seancorfield/honeysql | build.clj | (ns build
"HoneySQL's build script.
clojure -T:build ci
clojure -T:build run-doc-tests :aliases '[:cljs]'
Run tests:
clojure -X:test
clojure -X:test:master
For more information, run:
clojure -A:deps -T:build help/doc"
(:refer-clojure :exclude [test])
(:require [clojure.string :as str]
... | null | https://raw.githubusercontent.com/seancorfield/honeysql/bfc8ad6821ee3bfc0cc4b9f0db02c39057d46db1/build.clj | clojure | (ns build
"HoneySQL's build script.
clojure -T:build ci
clojure -T:build run-doc-tests :aliases '[:cljs]'
Run tests:
clojure -X:test
clojure -X:test:master
For more information, run:
clojure -A:deps -T:build help/doc"
(:refer-clojure :exclude [test])
(:require [clojure.string :as str]
... | |
c084c09fbaa35332d4b2f6aac35197465b6019b448f086df4f1b7148d40993fb | braidchat/braid | core.cljc | (ns braid.notices.core
(:require
[braid.base.api :as base]
#?@(:cljs
[[clojure.spec.alpha :as s]
[garden.units :refer [rem em]]
[re-frame.core :refer [subscribe dispatch]]
[braid.core.client.ui.styles.mixins :as mixins]])))
#?(:cljs
(do
(def ErrorSpec
{:k... | null | https://raw.githubusercontent.com/braidchat/braid/2e44eb6e77f1d203115f9b9c529bd865fa3d7302/src/braid/notices/core.cljc | clojure | (ns braid.notices.core
(:require
[braid.base.api :as base]
#?@(:cljs
[[clojure.spec.alpha :as s]
[garden.units :refer [rem em]]
[re-frame.core :refer [subscribe dispatch]]
[braid.core.client.ui.styles.mixins :as mixins]])))
#?(:cljs
(do
(def ErrorSpec
{:k... | |
a92a4265d990f3d279a80d411ce8802ccbbf73e939dc77bad1a47c51258d49fb | gstew5/snarkl | Common.hs | module Common where
import qualified Data.IntMap.Lazy as Map
type Var = Int
type Assgn a = Map.IntMap a
data UnOp = ZEq
deriving Eq
instance Show UnOp where
show ZEq = "(== 0)"
data Op = Add | Sub | Mult | Div
| And | Or | XOr | Eq | BEq
deriving Eq
ins... | null | https://raw.githubusercontent.com/gstew5/snarkl/d6ce72b13e370d2965bb226f28a1135269e7c198/src/Common.hs | haskell | module Common where
import qualified Data.IntMap.Lazy as Map
type Var = Int
type Assgn a = Map.IntMap a
data UnOp = ZEq
deriving Eq
instance Show UnOp where
show ZEq = "(== 0)"
data Op = Add | Sub | Mult | Div
| And | Or | XOr | Eq | BEq
deriving Eq
ins... | |
70cf12d748ecaf2da7254c9fbb72af677e5b3fdfb094139faa674e48679f0f22 | composewell/bench-show | Tutorial.hs | # OPTIONS_GHC -fno - warn - unused - imports #
-- |
Module : . Tutorial
Copyright : ( c ) 2018 Composewell Technologies
--
-- License : BSD3
-- Maintainer :
--
BenchShow generates text reports and graphs from benchmarking results . It
-- allows you to manipulate the format of the report and the be... | null | https://raw.githubusercontent.com/composewell/bench-show/46313526b5c0135dd6a976abdc0b8918668378d2/lib/BenchShow/Tutorial.hs | haskell | |
License : BSD3
Maintainer :
allows you to manipulate the format of the report and the benchmarking data
run-to-run comparison of benchmark results as possible. For stable results,
make sure that you are not executing any other tasks on the benchmark host
while benhmarking is going on. For even more s... | # OPTIONS_GHC -fno - warn - unused - imports #
Module : . Tutorial
Copyright : ( c ) 2018 Composewell Technologies
BenchShow generates text reports and graphs from benchmarking results . It
to present it in many useful ways . uses robust statistical
analysis using three different statistical estima... |
ad8384ce6ec08277ffaf2fd4105e5877905feafade60ef45835bc6197502ba7e | brendanhay/amazonka | ChoiceContent.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived fr... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-wellarchitected/gen/Amazonka/WellArchitected/Types/ChoiceContent.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Amazonka.WellArchitected.Types.ChoiceContent
Stability : auto-generated
| The choice content.
/See:/ 'newChoiceContent' smart constructor.
| The display text for the choice content.
| The URL for the choice content.
|
The following rec... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived from AWS service descriptions , licensed under Apache 2.0 .
Co... |
e5c08fc9f06018c7ab31cd9b92c91fe0723722c37ee8bfbc383913aa49112e4c | caolan/chicken-leveldb | run.scm | (use level leveldb posix test lazy-seq test-generative srfi-69 srfi-4)
; attempting to open db that doesn't exist
(if (directory? "testdb")
(delete-directory "testdb" #t))
(test-group "basic operation"
(test "opening missing db should error when create_if_missing: #f"
'does-not-exist
(condition-c... | null | https://raw.githubusercontent.com/caolan/chicken-leveldb/26a9d5fbaa82e710292c391f03e5dee033ade886/tests/run.scm | scheme | attempting to open db that doesn't exist
delete previously added keys
run with valgrind to check call-with-db cleans up | (use level leveldb posix test lazy-seq test-generative srfi-69 srfi-4)
(if (directory? "testdb")
(delete-directory "testdb" #t))
(test-group "basic operation"
(test "opening missing db should error when create_if_missing: #f"
'does-not-exist
(condition-case (open-db "testdb" create: #f)
... |
2e55b2533c4ec803c64504b690007edffbd26040789712ef52f5bb3e619ea3be | bcc32/projecteuler-ocaml | sol_016.ml | open! Core
open! Import
let sum_digits n base =
let open Bigint in
let rec iter n acc = if n = zero then acc else iter (n / base) ((n % base) + acc) in
iter n zero
;;
let main () =
let open Bigint in
let base = of_int 2 in
let expt = of_int 1000 in
let num = pow base expt in
sum_digits num (of_int 10)... | null | https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/712f85902c70adc1ec13dcbbee456c8bfa8450b2/sol/sol_016.ml | ocaml | open! Core
open! Import
let sum_digits n base =
let open Bigint in
let rec iter n acc = if n = zero then acc else iter (n / base) ((n % base) + acc) in
iter n zero
;;
let main () =
let open Bigint in
let base = of_int 2 in
let expt = of_int 1000 in
let num = pow base expt in
sum_digits num (of_int 10)... | |
82b1ceca6794fd78c5da925573b4796bc5ad09e75910e129200f0baf45845a43 | yaxu/hstexture | Types.hs | module Texture.Types where
import Data.Maybe
import Control.Applicative
import Data.Tuple (swap)
import Debug.Trace (trace)
import Data.List (intercalate, intersectBy, nub)
import Texture.Utils
--type Id = Int
--type Proximity = Float
data Type =
F Type Type
| String
| Float
| Int
| Osc
| OscStream
|... | null | https://raw.githubusercontent.com/yaxu/hstexture/ba2c23009376528d5163b62c91aec1b716d31704/Texture/Types.hs | haskell | type Id = Int
type Proximity = Float
Type signature
[ :: List a -> Pattern a
] :: a -> List a
bd :: List a -> List a
childId :: Maybe Int,
++ " :: " ++ (show $ applied_as d) ++ " parent " ++ (show $ parentId d)
Look for a function from pattern to pattern, and try to find and
return a compatible pattern appli... | module Texture.Types where
import Data.Maybe
import Control.Applicative
import Data.Tuple (swap)
import Debug.Trace (trace)
import Data.List (intercalate, intersectBy, nub)
import Texture.Utils
data Type =
F Type Type
| String
| Float
| Int
| Osc
| OscStream
| OneOf [Type]
| Pattern Type
| WildCa... |
2e9dead4d3e995b6c45cf0ad48f9b9b5ed513d8903216b7ccd739c0bc1c9ba58 | mbj/stratosphere | RegexPatternSetReferenceStatementProperty.hs | module Stratosphere.WAFv2.WebACL.RegexPatternSetReferenceStatementProperty (
module Exports, RegexPatternSetReferenceStatementProperty(..),
mkRegexPatternSetReferenceStatementProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Pro... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/wafv2/gen/Stratosphere/WAFv2/WebACL/RegexPatternSetReferenceStatementProperty.hs | haskell | # SOURCE #
# SOURCE # | module Stratosphere.WAFv2.WebACL.RegexPatternSetReferenceStatementProperty (
module Exports, RegexPatternSetReferenceStatementProperty(..),
mkRegexPatternSetReferenceStatementProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Pro... |
95ba8e0c69366e9f3811a9f7e0fb76e6c6b27a6ad294ce251a51e8a151397260 | fukamachi/clozure-cl | swink.lisp | Copyright ( C ) 2011 Clozure Associates
This file is part of Clozure CL .
;;;
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
;;; file "LICENSE". The LLGPL consists of a preamble and the LGPL,
which is dist... | null | https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/lib/swink.lisp | lisp |
file "LICENSE". The LLGPL consists of a preamble and the LGPL,
conflict, the preamble takes precedence.
Clozure CL is referenced in the preamble as the "LIBRARY."
The LLGPL is also available online at
Implement a protocol (originally based on swank) for communication between
a lisp and an e... | Copyright ( C ) 2011 Clozure Associates
This file is part of Clozure CL .
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
which is distributed with Clozure CL as the file " LGPL " . Where these
(eval-when (... |
6c800b2c211e14a4506713fe152967effee5727f795846a67f3672c3ae4bad03 | practicalli/four-clojure | 017_sequences_map.clj | (ns four-clojure.017-sequences-map)
;; #17 Sequences: map
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Difficulty: Elementary
;; Topics:
The map function takes two arguments : a function ( f ) and a sequence ( s ) . Map returns a new sequence consisting of the result of applying f to each item of s. Do not confus... | null | https://raw.githubusercontent.com/practicalli/four-clojure/9812b63769a06f9b0bfd63e5ffce380b67e5468b/src/four_clojure/017_sequences_map.clj | clojure | #17 Sequences: map
Difficulty: Elementary
Topics:
Discovering how to use the map function to process all the elements of a collection, using a given function.
REPL experiments
map will work on a single collection, assuming that the function we use with `map` works with a single argument.
each element of the c... | (ns four-clojure.017-sequences-map)
The map function takes two arguments : a function ( f ) and a sequence ( s ) . Map returns a new sequence consisting of the result of applying f to each item of s. Do not confuse the map function with the map data structure .
(= _ _ ( map # ( + % 5 ) ' ( 1 2 3 ) ) )
Decon... |
a5711891f7a3c95ac021bf109fc406844ff582af4eb11ca9d0f59752c0c8941d | lambdamikel/PetriNets-CLIM-Demo | petri3.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : clim - user -*-
;;;
Very simple petri net editor in Common LISP ( CLIM / CLOS - Demo )
;;; Lets you create token nets and play with them
Demonstrates some basic CLIM and CLOS programming techniques
( C ) 2003 by
;;;
#-:mswindows
(error "This version if ... | null | https://raw.githubusercontent.com/lambdamikel/PetriNets-CLIM-Demo/86db6608c52fe7cfeffc81a11f6f2ba120ec42c6/src/old/petri3.lisp | lisp | Syntax : Common - Lisp ; Package : clim - user -*-
Lets you create token nets and play with them
"View" Classes
Define the application frame
Use inheritance to get a petri net editor
(instead of, e.g., using association)
Draw t... |
Very simple petri net editor in Common LISP ( CLIM / CLOS - Demo )
Demonstrates some basic CLIM and CLOS programming techniques
( C ) 2003 by
#-:mswindows
(error "This version if for LispWorks CLIM Windows only!")
#-:lispworks
(error "This version if for LispWorks CLIM Windows only!")
(require "clim")
(... |
eb439495721468201a4d0a8cf21e397250492291f5b47fa0298783ae1b7ba180 | emina/rosette | graph.rkt | #lang racket
(require racket/hash racket/struct
"data.rkt" "record.rkt" "reporter.rkt" "feature.rkt")
(provide (all-defined-out))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Profile graph data structures
;; A profile node is an entry in the dynamic control flow graph ... | null | https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/rosette/lib/profile/graph.rkt | racket |
Profile graph data structures
A profile node is an entry in the dynamic control flow graph of the
profiled code. It contains a pointer to its parent node,
a list of children nodes, and a profile-data struct that contains the
actual data for the profile.
Profile data for a single procedure invocation.
* The loca... | #lang racket
(require racket/hash racket/struct
"data.rkt" "record.rkt" "reporter.rkt" "feature.rkt")
(provide (all-defined-out))
(struct profile-node (id parent children data) #:mutable
#:methods gen:custom-write
[(define write-proc
(make-constructor-style-printer
(lambda (obj) 'profile-node... |
9bcf52657cd31fe09165729574af88c15db3c4d54c147b60d3ad7793e6c4cf7f | albertoruiz/easyVision | loop.hs | {-# LANGUAGE Arrows #-}
import Vision.GUI
import Image.Processing
main = run $ observe "source" rgb
>>> f
>>> observe "result" (5.*)
f = proc img -> do
let x = (toFloat . grayscale) img
p <- delay' -< x
returnA -< x |-| p
| null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/tour/loop.hs | haskell | # LANGUAGE Arrows # |
import Vision.GUI
import Image.Processing
main = run $ observe "source" rgb
>>> f
>>> observe "result" (5.*)
f = proc img -> do
let x = (toFloat . grayscale) img
p <- delay' -< x
returnA -< x |-| p
|
e0c7b535032beb4274e9b633094d01ba7757c9cb260a8f7c9b115eefd9cf2483 | eudoxia0/cl-yaml | emitter2.lisp | (in-package :cl-user)
(defpackage cl-yaml-test.emitter2
(:use :cl :fiveam)
(:export :emitter2)
(:documentation "Emitter tests - libyaml-based emitter."))
(in-package :cl-yaml-test.emitter2)
(defmacro define-test-cases ((name) &rest pairs)
`(test ,name
,@(loop for (form string) in pairs collecting
... | null | https://raw.githubusercontent.com/eudoxia0/cl-yaml/c3202be9a753c51f3bc79538a5a498a8865192aa/t/emitter2.lisp | lisp | Document end marker
is libyaml behavior | (in-package :cl-user)
(defpackage cl-yaml-test.emitter2
(:use :cl :fiveam)
(:export :emitter2)
(:documentation "Emitter tests - libyaml-based emitter."))
(in-package :cl-yaml-test.emitter2)
(defmacro define-test-cases ((name) &rest pairs)
`(test ,name
,@(loop for (form string) in pairs collecting
... |
dc0034b317089523f1b57800983b04a0f3e1d69a395fcb4b23908cd284e86fa8 | mstone/soutei | soutei-pipelined.hs | Soutei Policy Decision Service
It is intended to communice with a pep - auth - filter , an authorization
-- filter for a web server.
--
The interface is straightforward , via stdin / stdout . The filter
-- writes all attributes as name-value-pairs:
name1 \n value1 \n name2 \n ...
Two \n in a row signify... | null | https://raw.githubusercontent.com/mstone/soutei/4d00e12180361561dab948f211bbcf9e75bfb1de/soutei-pipelined.hs | haskell | filter for a web server.
writes all attributes as name-value-pairs:
All attribute names and values are opaque to us, except one.
If there is an attribute named 'resource', the corresponding value
The part is optional. We add a sequence of attributes:
resource-below =
resource-below =
the connection ... | Soutei Policy Decision Service
It is intended to communice with a pep - auth - filter , an authorization
The interface is straightforward , via stdin / stdout . The filter
name1 \n value1 \n name2 \n ...
Two \n in a row signify the end of input .
must be a URL , such as / a / b /
We reply with eith... |
463f31fff1bfefd351b051eb97170fba213ac034bff2816aff8c7a68f59ba199 | degree9/uikit-hl | totop.cljs | (ns uikit-hl.totop
(:require [hoplon.core :as h]))
(defmulti uk-totop! h/kw-dispatcher :default ::default)
(defmethod h/do! ::default
[elem key val]
(uk-totop! elem key val))
(defmethod uk-totop! ::default
[elem kw v]
(h/do! elem :uk-totop (clj->js v)))
(h/defelem totop [attr kids]
(h/a attr ::uk-totop ... | null | https://raw.githubusercontent.com/degree9/uikit-hl/b226b1429ea50f8e9a6c1d12c082a3be504dda33/src/uikit_hl/totop.cljs | clojure | (ns uikit-hl.totop
(:require [hoplon.core :as h]))
(defmulti uk-totop! h/kw-dispatcher :default ::default)
(defmethod h/do! ::default
[elem key val]
(uk-totop! elem key val))
(defmethod uk-totop! ::default
[elem kw v]
(h/do! elem :uk-totop (clj->js v)))
(h/defelem totop [attr kids]
(h/a attr ::uk-totop ... | |
aabb71a6e176744f860bbeb664a1a1cd28b7a450bf5a24b1c5804bfe31dc93cd | wincent/docvim | ReadDir.hs | -- | Recursively read the paths in a directory.
--
Based on ` RecursiveContents ` example in chapter 9 of " Real World Haskell " .
module Text.Docvim.ReadDir (readDir) where
import Control.Monad
import System.Directory
import System.FilePath
readDir :: FilePath -> IO [FilePath]
readDir dir = do
names <- getDirect... | null | https://raw.githubusercontent.com/wincent/docvim/621a4d30f17a9fda64cf6b37d4608cbe08bc72e3/lib/Text/Docvim/ReadDir.hs | haskell | | Recursively read the paths in a directory.
| Based on ` RecursiveContents ` example in chapter 9 of " Real World Haskell " .
module Text.Docvim.ReadDir (readDir) where
import Control.Monad
import System.Directory
import System.FilePath
readDir :: FilePath -> IO [FilePath]
readDir dir = do
names <- getDirectoryContents dir
let properNames = filter (`notEle... |
706394b4b5bc543e91a01c4e7aa68ba91f99bab5f4d4a82852e73d4fc865ed3c | ghollisjr/cl-ana | package.lisp | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
;;;;
This file is part of cl - ana .
;;;;
;;;; cl-ana is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the ... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/memoization/package.lisp | lisp |
cl-ana is free software: you can redistribute it and/or modify it
(at your option) any later version.
cl-ana is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public Lice... | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
This file is part of cl - ana .
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
... |
4877b3a127bff6b0fba07afa2e9e4469883ab8ecfb887ca347522e1e809dc28a | ruhler/smten | SymbolicOf.hs |
# LANGUAGE MultiParamTypeClasses #
module Smten.Runtime.SymbolicOf (
SymbolicOf(..), ($$), symapp2,
) where
import Smten.Runtime.SmtenHS
infixr 0 $$
class SymbolicOf c s where
tosym :: c -> s
symapp :: (SmtenHS0 a) => (c -> a) -> s -> a
($$) :: (SymbolicOf c s, SmtenHS0 a) => (c -> a) -> s -> a
($$)... | null | https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-base/Smten/Runtime/SymbolicOf.hs | haskell | # INLINEABLE symapp2 # |
# LANGUAGE MultiParamTypeClasses #
module Smten.Runtime.SymbolicOf (
SymbolicOf(..), ($$), symapp2,
) where
import Smten.Runtime.SmtenHS
infixr 0 $$
class SymbolicOf c s where
tosym :: c -> s
symapp :: (SmtenHS0 a) => (c -> a) -> s -> a
($$) :: (SymbolicOf c s, SmtenHS0 a) => (c -> a) -> s -> a
($$)... |
4435bd7b4f8eb77d942f6cd536c3787b92a86d3140f00ea03515acee2802a6eb | adventuring/tootsville.net | players.lisp | ;;;; -*- lisp -*-
;;;
src / players.lisp is part of
;;;
Copyright © 2008 - 2017 Bruce - Robert Pocock ; © 2018 - 2021 The
Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) .
;;;
This program is Free Software : you can redistribute it and/or
modify it under the te... | null | https://raw.githubusercontent.com/adventuring/tootsville.net/985c11a91dd1a21b77d7378362d86cf1c031b22c/src/players.lisp | lisp | -*- lisp -*-
© 2018 - 2021 The
either version 3 of
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more det... | src / players.lisp is part of
Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) .
This program is Free Software : you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
the License , or ( at your option ) any later version .
You sho... |
47df6f01c58346f33210c40502d2d9dbfb5e75eeed693b4beb668b701b6b7dba | fourmolu/fourmolu | multiline-four-out.hs | {-# LANGUAGE ExplicitForAll #-}
module Main where
-- | Here goes a comment.
data Foo a where
-- | 'Foo' is wonderful.
Foo ::
forall a b.
(Show a, Eq b) => -- foo
-- bar
a ->
b ->
Foo 'Int
-- | But 'Bar' is also not too bad.
Bar ::
Int -> Maybe Te... | null | https://raw.githubusercontent.com/fourmolu/fourmolu/7334f6de7abd2aa3f493ac617264ca0540cd6ea2/data/examples/declaration/data/gadt/multiline-four-out.hs | haskell | # LANGUAGE ExplicitForAll #
| Here goes a comment.
| 'Foo' is wonderful.
foo
bar
| But 'Bar' is also not too bad. |
module Main where
data Foo a where
Foo ::
forall a b.
a ->
b ->
Foo 'Int
Bar ::
Int -> Maybe Text -> Foo 'Bool
| So is ' ' .
Baz ::
forall a. a -> Foo 'String
(:~>) :: Foo a -> Foo a -> Foo a
|
f08f1d61e79cd0e7ed30f1013c55791cea71cd193da6dbcf203c1bea53cc35c1 | pfdietz/ansi-test | subtypep.lsp | ;-*- Mode: Lisp -*-
Author :
Created : We d Jan 29 17:28:19 2003
Contains : Tests of SUBTYPEP
(in-package :cl-test)
More subtypep tests are in types-and-class.lsp
(deftest subtypep.order.1
(let ((i 0) x y)
(values
(notnot (subtypep (progn (setf x (incf i)) t)
(p... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/types-and-classes/subtypep.lsp | lisp | -*- Mode: Lisp -*-
Extended characters
Some and, or combinations
Check that types that are supposed to be nonempty are
not subtypes of NIL | Author :
Created : We d Jan 29 17:28:19 2003
Contains : Tests of SUBTYPEP
(in-package :cl-test)
More subtypep tests are in types-and-class.lsp
(deftest subtypep.order.1
(let ((i 0) x y)
(values
(notnot (subtypep (progn (setf x (incf i)) t)
(progn (setf y (incf i)) t... |
d39c137de83a78bb0a8e6f44e6c52ad04b47273e610956b55fc31a66f932f2bf | xapi-project/xcp-rrdd | rrdd_ha_stats.ml |
* Copyright ( C ) 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 described in file LI... | null | https://raw.githubusercontent.com/xapi-project/xcp-rrdd/f810004ae88d308043b73365a959562302b1d4b5/bin/rrdd/rrdd_ha_stats.ml | ocaml |
* Copyright ( C ) 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 described in file LI... | |
10ca374886f9a6903248b573c59f8c5e4381c20206b4c493812aa5eb4f38aaec | anik545/OwlPPL | inference.ml | include Common
include Pc
include Enum
include Importance
include Smc
include Mh
open Dist
type infer_strat =
| MH of int
| SMC of int
| PC of int
| PIMH of int
| Importance of int
| Rejection of int * rejection_type
| Prior
| Enum
| Forward (* forward sampling in webppl, no sampling *)
[@@deriving s... | null | https://raw.githubusercontent.com/anik545/OwlPPL/ad650219769d5f32564cc771d63c9a52289043a5/ppl/lib/inference.ml | ocaml | forward sampling in webppl, no sampling | include Common
include Pc
include Enum
include Importance
include Smc
include Mh
open Dist
type infer_strat =
| MH of int
| SMC of int
| PC of int
| PIMH of int
| Importance of int
| Rejection of int * rejection_type
| Prior
| Enum
[@@deriving show]
let print_infer_strat = function
| MH _ -> "Metrop... |
8f34fed5758cb5aaaf209afe0982189b8573dce8a888310c3f31ec80dcbc7541 | input-output-hk/project-icarus-importer | InDb.hs | module Cardano.Wallet.Kernel.DB.InDb (
InDb(..)
, fromDb
) where
import Universum
import Control.Lens.TH (makeLenses)
import Data.SafeCopy (SafeCopy (..))
import qualified Pos.Core as Core
import qualified Pos.Crypto as Core
import qualified Pos.Txp as Core
{--------------... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/src/Cardano/Wallet/Kernel/DB/InDb.hs | haskell | ------------------------------------------------------------------------------
Wrap core types so that we can make independent serialization decisions
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Specifi... | module Cardano.Wallet.Kernel.DB.InDb (
InDb(..)
, fromDb
) where
import Universum
import Control.Lens.TH (makeLenses)
import Data.SafeCopy (SafeCopy (..))
import qualified Pos.Core as Core
import qualified Pos.Crypto as Core
import qualified Pos.Txp as Core
| Wrapped ty... |
83b114a4cfc472195705ed56fac2e9f8bac940af0ad11d3f7d4d21888303f8ee | robrix/sequoia | Sequent.hs | module Sequoia.Print.Sequent
( -- * Printable sequents
Seq(..)
-- * Elimination
, appSeq
, printSeq
) where
import Control.Monad (ap)
import Data.Profunctor
import Prelude hiding (print)
import Sequoia.Calculus.Core
import Sequoia.Conjunction
import Sequoia.Disjunction
import Sequoia.Print.Doc
import Sequoia.Print... | null | https://raw.githubusercontent.com/robrix/sequoia/a07ff5fafb199079c8c6159ff010a0699546da96/src/Sequoia/Print/Sequent.hs | haskell | * Printable sequents
* Elimination
Printable sequents
Elimination
> \ a -> lmap (a >--<) r | module Sequoia.Print.Sequent
Seq(..)
, appSeq
, printSeq
) where
import Control.Monad (ap)
import Data.Profunctor
import Prelude hiding (print)
import Sequoia.Calculus.Core
import Sequoia.Conjunction
import Sequoia.Disjunction
import Sequoia.Print.Doc
import Sequoia.Print.Printer
newtype Seq e r _Γ _Δ = Seq { runS... |
fcf0fe5b7e9b77c86d471624852f03ab12a6a9901183a2530ac63892c5f6a8a2 | Lisp-Stat/special-functions | erfc-inverse-data.lisp | -*- Mode : LISP ; Base : 10 ; Syntax : ANSI - Common - Lisp ; Package : SPECIAL - FUNCTIONS - TESTS -*-
Copyright ( c ) 2020 by Symbolics Pte . Ltd. All rights reserved .
(in-package #:special-functions-tests)
Original ( C ) Copyright 2006 .
;;; Use, modification and distribution are subject to the Boost
Sof... | null | https://raw.githubusercontent.com/Lisp-Stat/special-functions/ff284b69e83708ed5e1a0d20f421122f9bf64909/tests/data/erfc-inverse-data.lisp | lisp | Base : 10 ; Syntax : ANSI - Common - Lisp ; Package : SPECIAL - FUNCTIONS - TESTS -*-
Use, modification and distribution are subject to the Boost
Source:
Also see how the data is called by tests at:
From the Boost testing pages:
we can see that the tolerances need to be relatively high on certain intervals.
... | Copyright ( c ) 2020 by Symbolics Pte . Ltd. All rights reserved .
(in-package #:special-functions-tests)
Original ( C ) Copyright 2006 .
Software License , Version 1.0 . ( See
)
(defparameter erfc-inverse-data
#2A((0.00956696830689907073974609375 1.832184391051582711731256541599359331735)
(0.063... |
d33fde7ae65f42794b5ac42080785a85bdb7972cb54ff622bdab96f0be5a5273 | mirage/mirage-time | mirage_time.ml |
* Copyright ( c ) 2011 - 2015 Anil Madhavapeddy < >
* Copyright ( c ) 2013 - 2015 < >
* Copyright ( c ) 2013 Citrix Systems Inc
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyrigh... | null | https://raw.githubusercontent.com/mirage/mirage-time/5eaf7267d8e52622d9888b3cd756d6def8a5c277/src/mirage_time.ml | ocaml | * Sleep operations. |
* Copyright ( c ) 2011 - 2015 Anil Madhavapeddy < >
* Copyright ( c ) 2013 - 2015 < >
* Copyright ( c ) 2013 Citrix Systems Inc
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyrigh... |
7d4ebc374e1f3726bde3972b497f17219f5f326ee73a1695828423ddd5bd2200 | GaloisInc/saw-script | BuiltinsJVM.hs | |
Module : SAWScript . Crucible . JVM.BuiltinsJVM
Description : crucible - jvm specific code
Maintainer :
Stability : provisional
Module : SAWScript.Crucible.JVM.BuiltinsJVM
Description : crucible-jvm specific code
Maintainer :
Stability : provisional
-}
{-# LANGUAGE GADTs #-}
{-# LAN... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/7f1a012b01f2f9dccdb3874e37e98a340fc3bbef/src/SAWScript/Crucible/JVM/BuiltinsJVM.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE NoMonoLocalBinds #
# LANGUAGE PackageImports #
java_load_class: reads a class from the codebase
parameterized-utils
crucible/crucible
crucible/what4
saw-core
saw-core-what4
saw-script
crucible-jvm
---------------------------------------------------------------------
| Make sure t... | |
Module : SAWScript . Crucible . JVM.BuiltinsJVM
Description : crucible - jvm specific code
Maintainer :
Stability : provisional
Module : SAWScript.Crucible.JVM.BuiltinsJVM
Description : crucible-jvm specific code
Maintainer :
Stability : provisional
-}
# LANGUAGE TemplateHaskell #
#... |
45826fcf0fed9f54e9c94e1ab2e5df43b2c149d15ffc78308f852caba9eaf2d3 | BranchTaken/Hemlock | test_nbU_wX.ml | open! Basis.Rudiments
open! Basis
let test () =
File.Fmt.stdout
|> (fun formatter ->
List.fold U8.([kv 0L; kv 1L; kv 127L; kv 128L; kv 255L]) ~init:formatter ~f:(fun formatter u ->
formatter
|> Fmt.fmt "extend_to_i512 "
|> U8.pp u
|> Fmt.fmt " -> "
|> I512.pp (U8.extend_to_i512 u)... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/convert/test_nbU_wX.ml | ocaml | open! Basis.Rudiments
open! Basis
let test () =
File.Fmt.stdout
|> (fun formatter ->
List.fold U8.([kv 0L; kv 1L; kv 127L; kv 128L; kv 255L]) ~init:formatter ~f:(fun formatter u ->
formatter
|> Fmt.fmt "extend_to_i512 "
|> U8.pp u
|> Fmt.fmt " -> "
|> I512.pp (U8.extend_to_i512 u)... | |
298cb712a45ea52e4f78c73a40fbe91003c2fa02a4c84af3dad7008dc1d03749 | dmitryvk/sbcl-win32-threads | defun-load-or-cload-xcompiler.lisp | This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
;;;; provided with absolutely no wa... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/cold/defun-load-or-cload-xcompiler.lisp | lisp | more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
Either load or compile-then-load the cross-compiler into the
The running-in-the-host-Lisp Python cross-compiler defines its
own versions of a... | 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-COLD")
cross - compilation host Common Lisp .
(defun load-or-cload-xcompiler (load-or-cload-stem)
(decla... |
03969bd595879e9021483ac32743e0448dabe8f54b0dcd469e8d317e723abff8 | lukeg101/lplzoo | Tests.hs | |
Module : Tests
Description : The Testing for ULC .
Copyright : ( c ) , 2018
License : GPL-3
Maintainer :
Stability : stable
Portability : POSIX
The " Tests " module provides the Unit tests for various aspects of ULC
including expected reductions , pretty printing , and useful ... | null | https://raw.githubusercontent.com/lukeg101/lplzoo/463ca93f22f018ee07bdc18d84b3b0c966d51766/ULC/Tests.hs | haskell | Tool Imports.
| Type encapsulating test pass, expected value, actual value
| Type Denoting set of tests
| Function that constructs a unit test from an input term, expected output,
and actual value
| Test pretty printing for id (\x.x x)
| Test pretty printing for id
| Test pretty printing for true
| Test pretty... | |
Module : Tests
Description : The Testing for ULC .
Copyright : ( c ) , 2018
License : GPL-3
Maintainer :
Stability : stable
Portability : POSIX
The " Tests " module provides the Unit tests for various aspects of ULC
including expected reductions , pretty printing , and useful ... |
61509257cc5768c90bc30d546fb108fbd523080c9909c2b8474d6b97d90720be | psilord/option-9 | passive-step-once.lisp | (in-package :option-9)
#+option-9-debug (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3)))
;; Usually nothing has a passive step
(defmethod passive-step-once (object)
nil)
;; If the ship has a passive gun, then simulate it with the ship as
;; the source charge and other brains as the charges
(defmethod ... | null | https://raw.githubusercontent.com/psilord/option-9/44d96cbc5543ee2acbdcf45d300207ef175462bc/passive-step-once.lisp | lisp | Usually nothing has a passive step
If the ship has a passive gun, then simulate it with the ship as
the source charge and other brains as the charges | (in-package :option-9)
#+option-9-debug (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3)))
(defmethod passive-step-once (object)
nil)
(defmethod passive-step-once :after ((ent ship))
(let ((payload (payload (turret ent :passive-weapon-port))))
(when payload
(let ((ents
(all-enti... |
2e39717df6878ed381fc2e9dce878f92396fb799faef3946da53cff9300d1a12 | emotiq/emotiq | codes-in-use.lisp | ((1 SDLE-STORE::REFERRER)
(2 SDLE-STORE::SPECIAL-FLOAT)
(3 SDLE-STORE::UNICODE-STRING)
(4 SDLE-STORE::POSITIVE-INTEGER)
(5 SDLE-STORE::NEGATIVE-INTEGER)
(6 SIMPLE-STRING)
(7 FLOAT)
(8 RATIO)
(9 CHARACTER)
(10 COMPLEX)
(11 SYMBOL)
(12 CONS)
(13 PATHNAME)
(14 HASH-TABLE)
(15 STANDARD-OBJECT)
(16 CONDITION)... | null | https://raw.githubusercontent.com/emotiq/emotiq/9af78023f670777895a3dac29a2bbe98e19b6249/src/sdle-store/codes-in-use.lisp | lisp | ((1 SDLE-STORE::REFERRER)
(2 SDLE-STORE::SPECIAL-FLOAT)
(3 SDLE-STORE::UNICODE-STRING)
(4 SDLE-STORE::POSITIVE-INTEGER)
(5 SDLE-STORE::NEGATIVE-INTEGER)
(6 SIMPLE-STRING)
(7 FLOAT)
(8 RATIO)
(9 CHARACTER)
(10 COMPLEX)
(11 SYMBOL)
(12 CONS)
(13 PATHNAME)
(14 HASH-TABLE)
(15 STANDARD-OBJECT)
(16 CONDITION)... | |
213ccb5077f2b4836b8780e9037ea797f386be9e3eba566f7ac89598137feb82 | Clojure2D/clojure2d-examples | ex14_metaballs.clj | ;;
(ns ex14-metaballs
(:require [clojure2d.core :as c2d]
[fastmath.core :as m]
[fastmath.random :as r]
[fastmath.vector :as v])
(:import [fastmath.vector Vec3]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(def ^:const ^... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/ex14_metaballs.clj | clojure |
[[../results/ex14/metaballs.jpg]] |
(ns ex14-metaballs
(:require [clojure2d.core :as c2d]
[fastmath.core :as m]
[fastmath.random :as r]
[fastmath.vector :as v])
(:import [fastmath.vector Vec3]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(def ^:const ^long... |
3c8c983cec8d61b2290cba5259edf6b20e9b50afce5187f2992be98a5c05270f | phadej/staged | ByteString.hs | # LANGUAGE TemplateHaskell #
module Staged.Stream.ByteString (
readByteString,
) where
import Control.Monad.IO.Class (MonadIO (..))
import qualified Data.ByteString as BS
import qualified Control.Monad.Trans.Resource as R
import Staged.Commons
import Staged.Stream.Type
import Staged.Stream.Combi... | null | https://raw.githubusercontent.com/phadej/staged/b51c8c508af71ddb2aca4a75030da9b2c4f9e3dd/staged-streams-resourcet/src/Staged/Stream/ByteString.hs | haskell | writeByteString
sinkLazy
-----------------------------------------------------------------------------
Streams
-----------------------------------------------------------------------------
TODO: stdout
TODO: stderr | # LANGUAGE TemplateHaskell #
module Staged.Stream.ByteString (
readByteString,
) where
import Control.Monad.IO.Class (MonadIO (..))
import qualified Data.ByteString as BS
import qualified Control.Monad.Trans.Resource as R
import Staged.Commons
import Staged.Stream.Type
import Staged.Stream.Combi... |
5f5eced2f977f522ce7bbe0835f5f81128ea69be092a045bc194ef34dee1517f | ragkousism/Guix-on-Hurd | smalltalk.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/smalltalk.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2016 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages smallta... |
e8effb4de1a2cfa830c8763946687d9f7ae30a7fdccd4b674710a01f1c6f816d | kunik/sorting-algorithms | Merge.hs | module Sorting.Merge
(
sort
) where
sort :: (Ord a) => [a] -> [a]
sort [] = []
sort [x] = [x]
sort xs = sortBoth $ splitAt ((length xs) `div` 2) xs
where
sortBoth (x,y) = joinOrdered (sort x, sort y)
joinOrdered ([], y) = y
joinOrdered (x, []) = x
joinOrdered (x:xs, y:ys)
... | null | https://raw.githubusercontent.com/kunik/sorting-algorithms/0ada50e08fff8a420a55d912acf084f21616082f/Sorting/Merge.hs | haskell | module Sorting.Merge
(
sort
) where
sort :: (Ord a) => [a] -> [a]
sort [] = []
sort [x] = [x]
sort xs = sortBoth $ splitAt ((length xs) `div` 2) xs
where
sortBoth (x,y) = joinOrdered (sort x, sort y)
joinOrdered ([], y) = y
joinOrdered (x, []) = x
joinOrdered (x:xs, y:ys)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.