_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 |
|---|---|---|---|---|---|---|---|---|
5f01a24c8e6b86cf3962cc6dcc0a5add73c73a9560283616cda8563d7313e68e | TrustInSoft/tis-kernel | alt_ergo_realize.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/share/src/alt_ergo_realize.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2013 -- ... |
995e11af411399742c0355632bad66ba7b2bb713c031a9a99a71c842e3fc86c0 | dbuenzli/cmdliner | test_opt_req.ml | open Cmdliner
let opt o = print_endline o
let test_opt =
let req =
Arg.(required & opt (some string) None & info ["r"; "req"] ~docv:"ARG")
in
let info =
let doc = "Test optional required arguments (don't do this)" in
Cmd.info "test_opt_req"~doc
in
Cmd.v info Term.(const opt $ req)
let () = exit... | null | https://raw.githubusercontent.com/dbuenzli/cmdliner/1c5eff9f94ed8660a52d5190155aeca3b39558ec/test/test_opt_req.ml | ocaml | open Cmdliner
let opt o = print_endline o
let test_opt =
let req =
Arg.(required & opt (some string) None & info ["r"; "req"] ~docv:"ARG")
in
let info =
let doc = "Test optional required arguments (don't do this)" in
Cmd.info "test_opt_req"~doc
in
Cmd.v info Term.(const opt $ req)
let () = exit... | |
035d4dbac888cda709ccb22ff962305ce0312c3a69a9ab2dd2e1fd667e64fa62 | modular-macros/ocaml-macros | main.ml | let () =
Api.add_cb (fun () -> print_endline "Callback from main")
let () =
Dynlink.init ();
Dynlink.allow_unsafe_modules true;
for i = 1 to Array.length Sys.argv - 1 do
let name = Sys.argv.(i) in
Printf.printf "Loading %s\n" name; flush stdout;
try
if name.[0] = '-'
then Dynlink.loadf... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/lib-dynlink-native/main.ml | ocaml | let () =
Api.add_cb (fun () -> print_endline "Callback from main")
let () =
Dynlink.init ();
Dynlink.allow_unsafe_modules true;
for i = 1 to Array.length Sys.argv - 1 do
let name = Sys.argv.(i) in
Printf.printf "Loading %s\n" name; flush stdout;
try
if name.[0] = '-'
then Dynlink.loadf... | |
c7f595f1290760b229aceda78783dacc90facb4b5987e44b2cd02de5c56a26c5 | stain/owl2jsonld | project.clj | (defproject owl2jsonld "0.2.2-SNAPSHOT"
:description "Convert RDFS/OWL ontology to JSON-LD context"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[clj-owlapi "0.3.0"]
[cheshire "5.3.1"]
... | null | https://raw.githubusercontent.com/stain/owl2jsonld/eceecba017f4c7256b3f1c77d263c00cc99f6b16/project.clj | clojure | (defproject owl2jsonld "0.2.2-SNAPSHOT"
:description "Convert RDFS/OWL ontology to JSON-LD context"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[clj-owlapi "0.3.0"]
[cheshire "5.3.1"]
... | |
5fbc18ae746a0ebdb39a50f9f5ae4d86aed713f8880a08470d55e6b1e35388ee | CLowcay/hgbc | Color.hs | module Machine.GBC.Color
( Correction,
CorrectionMode (..),
correction,
)
where
import Data.Word (Word16, Word32)
type Correction = (Word16, Word16, Word16) -> (Word32, Word32, Word32)
data CorrectionMode
= NoCorrection
| DefaultCorrection
deriving (Eq, Ord, Show)
correction :: CorrectionMode -> C... | null | https://raw.githubusercontent.com/CLowcay/hgbc/76a8cf91f3c3b160eadf019bc8fc75ef07601c2f/core/src/Machine/GBC/Color.hs | haskell | module Machine.GBC.Color
( Correction,
CorrectionMode (..),
correction,
)
where
import Data.Word (Word16, Word32)
type Correction = (Word16, Word16, Word16) -> (Word32, Word32, Word32)
data CorrectionMode
= NoCorrection
| DefaultCorrection
deriving (Eq, Ord, Show)
correction :: CorrectionMode -> C... | |
948c81cb8e069836cfb1940af7a5658af175bc9e0b4258c2ad1a91d94c873766 | inaka/sumo_rest | sr_meta_SUITE.erl | -module(sr_meta_SUITE).
-include_lib("mixer/include/mixer.hrl").
-mixin([{ ktn_meta_SUITE
, [ all/0
, dialyzer/1
, xref/1
, elvis/1
]
}]).
-export([init_per_suite/1, end_per_suite/1]).
init_per_suite(Config) -> [{application, sumo_rest} | Config].
end_per_suite(Confi... | null | https://raw.githubusercontent.com/inaka/sumo_rest/19a3685ab477222738ac27b72e39346cbad9463d/test/sr_meta_SUITE.erl | erlang | -module(sr_meta_SUITE).
-include_lib("mixer/include/mixer.hrl").
-mixin([{ ktn_meta_SUITE
, [ all/0
, dialyzer/1
, xref/1
, elvis/1
]
}]).
-export([init_per_suite/1, end_per_suite/1]).
init_per_suite(Config) -> [{application, sumo_rest} | Config].
end_per_suite(Confi... | |
451c971822d369e7b3f9fdc5f31872dedc98cc5b6d98c014409c19e2ec2a5045 | rametta/retros | Teams.hs | module Web.Controller.Teams where
import Web.Controller.Prelude
import Web.View.Teams.Index
import Web.View.Teams.New
import Web.View.Teams.Edit
import Web.View.Teams.Show
import qualified Web.View.Retros.New as NewRetroView
import qualified Web.View.TeamMembers.New as NewTeamMemberView
instance Controller TeamsContr... | null | https://raw.githubusercontent.com/rametta/retros/08fb3e4d1246a3cd5bf3b119568aa5fec04b67b5/Web/Controller/Teams.hs | haskell | module Web.Controller.Teams where
import Web.Controller.Prelude
import Web.View.Teams.Index
import Web.View.Teams.New
import Web.View.Teams.Edit
import Web.View.Teams.Show
import qualified Web.View.Retros.New as NewRetroView
import qualified Web.View.TeamMembers.New as NewTeamMemberView
instance Controller TeamsContr... | |
e5b66dbe0c8b80134c9583b50b44a8c9a2483e41ff58992946979b37040b5dc3 | NorfairKing/easyspec | Fifteen.hs | # LANGUAGE NoImplicitPrelude #
module Fifteen where
import Prelude
(Bool(..), (&&), (+), (-), (||), concat, const, drop, map, not,
take)
{-# ANN module "HLint: ignore Use foldr" #-}
myId :: a -> a
myId a = a
myPlusPlus :: [a] -> [a] -> [a]
myPlusPlus (a:as) bs = a : myPlusPlus as bs
myPlusPlus [] bs... | null | https://raw.githubusercontent.com/NorfairKing/easyspec/b038b45a375cc0bed2b00c255b508bc06419c986/examples/runtime/Fifteen.hs | haskell | # ANN module "HLint: ignore Use foldr" # | # LANGUAGE NoImplicitPrelude #
module Fifteen where
import Prelude
(Bool(..), (&&), (+), (-), (||), concat, const, drop, map, not,
take)
myId :: a -> a
myId a = a
myPlusPlus :: [a] -> [a] -> [a]
myPlusPlus (a:as) bs = a : myPlusPlus as bs
myPlusPlus [] bs = bs
myReverse :: [a] -> [a]
myReverse [] =... |
bf01e8f331c0c77e7356b7c9c829cf102653bd8c7bcc3ed3a6d26ef95724ea8f | bradparker/servant-beam-realworld-example-app | API.hs | module RealWorld.Conduit.Web.API
( API
, server
) where
import RealWorld.Conduit.Articles.Web (Articles)
import qualified RealWorld.Conduit.Articles.Web as Articles
import RealWorld.Conduit.Comments.Web (Comments)
import qualified RealWorld.Conduit.Comments.Web as Comments
import RealWorld.Conduit.Environment (E... | null | https://raw.githubusercontent.com/bradparker/servant-beam-realworld-example-app/d4a0d79d9dbc7e5b8987b367ac32f99ac3cc20e7/src/RealWorld/Conduit/Web/API.hs | haskell | module RealWorld.Conduit.Web.API
( API
, server
) where
import RealWorld.Conduit.Articles.Web (Articles)
import qualified RealWorld.Conduit.Articles.Web as Articles
import RealWorld.Conduit.Comments.Web (Comments)
import qualified RealWorld.Conduit.Comments.Web as Comments
import RealWorld.Conduit.Environment (E... | |
33c74ae77edaafa0eb600969ece32afdf78ff19f270380539c1b0e4c2a297aa6 | blindglobe/clocc | virtual.lisp | -*- mode : lisp ; Package : CLUEI ; Syntax : COMMON - LISP ; ; Lowercase : T -*-
;;;
TEXAS INSTRUMENTS INCORPORATED
P.O. BOX 149149
AUSTIN , TEXAS 78714 - 9149
;;;
Copyright ( C)1987,1988,1989,1990 Texas Instruments Incorporated .
;;;
;;; Permission is granted to any individual or instituti... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/gui/clue/clue/virtual.lisp | lisp | Package : CLUEI ; Syntax : COMMON - LISP ; ; Lowercase : T -*-
Permission is granted to any individual or institution to use, copy, modify,
and distribute this software, provided that this complete copyright and
permission notice is maintained, intact, in all copies and supporting
documentation.
express or i... |
TEXAS INSTRUMENTS INCORPORATED
P.O. BOX 149149
AUSTIN , TEXAS 78714 - 9149
Copyright ( C)1987,1988,1989,1990 Texas Instruments Incorporated .
Texas Instruments Incorporated provides this software " as is " without
10/14/87 LGO Created
(in-package "CLUEI")
(export '( virtual
virtu... |
1614f4698a5855efba5aeb17cfb7c37fcac26a8530a22470c1bc5508289560dd | erlang/otp | diameter_info.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2010 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/diameter/src/info/diameter_info.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2010 - 2023 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Generic functions for formatting table listings and more . Used by
-module(diameter_info).
-export([usage/1,
... |
1326a7119a972f13ab2b67a6b0abe210e01782ba9aef3d09d9818612d8da6e2c | jimcrayne/jhc | case_in_stacking.hs | module Module where
foo = let obj = 2 in
let b = obj; c = obj in
let x = case b of
3 -> 2
5 -> 6 in
let y = c in
3
| null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/0_parse/2_pass/fixed_bugs/case_in_stacking.hs | haskell | module Module where
foo = let obj = 2 in
let b = obj; c = obj in
let x = case b of
3 -> 2
5 -> 6 in
let y = c in
3
| |
7c4a474655257b42b3735d83eaa97e3c2f428a2e38c8efd1254e7d0ff036916a | KestrelInstitute/Specware | Tests.lisp | (test-directories ".")
(test
("Bug 0111 : Capture of translated ops by var bindings [Once]"
:show "Capture#T"
:output '(";;; Elaborating spec-translation at $TESTDIR/Capture#T"
";;; Elaborating spec at $TESTDIR/Capture#S"
(:optional "")
"spec"
(:optional "")
"op xx: Nat"
(:option... | null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/TestSuite/Bugs/Bug_0111/Tests.lisp | lisp | (test-directories ".")
(test
("Bug 0111 : Capture of translated ops by var bindings [Once]"
:show "Capture#T"
:output '(";;; Elaborating spec-translation at $TESTDIR/Capture#T"
";;; Elaborating spec at $TESTDIR/Capture#S"
(:optional "")
"spec"
(:optional "")
"op xx: Nat"
(:option... | |
610c72bccf1ae25b9491827e11c7e4676a286d9f02025ba200a000bfc394afcf | haskell-numerics/hmatrix-sundials | test.hs | # LANGUAGE RecordWildCards , ScopedTypeVariables , OverloadedStrings ,
ViewPatterns , ImplicitParams , OverloadedLists , RankNTypes ,
ExistentialQuantification , LambdaCase , NumDecimals , NamedFieldPuns ,
TypeApplications , DeriveGeneric , StandaloneDeriving , FlexibleInsta... | null | https://raw.githubusercontent.com/haskell-numerics/hmatrix-sundials/8333309c82b737247d3c14e66ae245febb1a6ab0/tests/test.hs | haskell | --------------------------------------------------------------------
Helpers
--------------------------------------------------------------------
name
| Show list without brackets, so that it's more suitable for file names
derive JSON instances for all sundials types for testing
^ same m... | # LANGUAGE RecordWildCards , ScopedTypeVariables , OverloadedStrings ,
ViewPatterns , ImplicitParams , OverloadedLists , RankNTypes ,
ExistentialQuantification , LambdaCase , NumDecimals , NamedFieldPuns ,
TypeApplications , DeriveGeneric , StandaloneDeriving , FlexibleInsta... |
59efc1c1551acf5e0eef3780ef63219f49535231087824f3d0a4935b755509e4 | OCamlPro/ocp-build | fileString.mli | (**************************************************************************)
(* *)
(* Typerex Libraries *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/libs/ocplib-file/fileString.mli | ocaml | ************************************************************************
Typerex Libraries
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU Lesser General Public License version 2.1 , with the
This module implements operations on filenames represented as strings ,
as in the Filename module of the Standard Library .
as in the Filename module of the ... |
19c00691690c47b61d66413fc3c92983a2db7f40f250ca9beba6957fdd7e8fa8 | ppaml-op3/insomnia | ModuleType.hs | # LANGUAGE OverloadedStrings , ViewPatterns #
| " module type " and " module type " expressions .
module Insomnia.Typecheck.ModuleType where
import Control.Applicative ((<$>))
import qualified Unbound.Generics.LocallyNameless as U
import Insomnia.Common.ModuleKind
import Insomnia.Common.Telescope
import Insomnia.... | null | https://raw.githubusercontent.com/ppaml-op3/insomnia/5fc6eb1d554e8853d2fc929a957c7edce9e8867d/src/Insomnia/Typecheck/ModuleType.hs | haskell | | Check that the given module type expression is well-formed, and
return both the module type expression and the signature that it
"evaluates" to.
| Given a telescope of functor arguments (id : Mt1, ..., id : Mtn)
extend the context of the continuation with the corresponding
identifiers.
TODO: actually check tha... | # LANGUAGE OverloadedStrings , ViewPatterns #
| " module type " and " module type " expressions .
module Insomnia.Typecheck.ModuleType where
import Control.Applicative ((<$>))
import qualified Unbound.Generics.LocallyNameless as U
import Insomnia.Common.ModuleKind
import Insomnia.Common.Telescope
import Insomnia.... |
71735f1ae0342d836acd7dbea4dc51e444df7942edc4b1b4781e47079f3f6d19 | McCLIM/McCLIM | fontconfig.lisp | ;;; ---------------------------------------------------------------------------
;;; License: LGPL-2.1+ (See file 'Copyright' for details).
;;; ---------------------------------------------------------------------------
;;;
( c ) Copyright 2008 by < >
( c ) Copyright 2016 - 2021 by < >
;;;
;;; ------------... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/1dd5bf7364af330615de0912d1d285abd9636fb5/Extensions/fonts/fontconfig.lisp | lisp | ---------------------------------------------------------------------------
License: LGPL-2.1+ (See file 'Copyright' for details).
---------------------------------------------------------------------------
---------------------------------------------------------------------------
This path may be used by c... | ( c ) Copyright 2008 by < >
( c ) Copyright 2016 - 2021 by < >
This file configures TTF paths and maps them to the standard text styles .
(in-package #:mcclim-truetype)
(defparameter *truetype-font-path*
(find-if #'probe-file
'(#p"/usr/share/fonts/truetype/ttf-dejavu/"
#p"/usr/... |
84b965b85f2ba7162e8cd8223e52c077ca819e0ab294577e6c9e7e87537daf64 | pariyatti/kosa | handler.clj | (ns kosa.api.handler
(:require [kuti.support.time :as time]
[kuti.support.digest :refer [uuid]]
[kuti.dispatch.routing :refer [url-for]]
[kosa.library.artefacts.image.db :as image-db]
[kosa.mobile.today.pali-word.db :as pali-word-db]
[kosa.mobile.today.words... | null | https://raw.githubusercontent.com/pariyatti/kosa/7f2bb4be38bd088a86868feb2dc8f29f14b43a82/src/kosa/api/handler.clj | clojure | mobile app demands an id
NOTE: for the time-being, pali word cards do not have an audio
file encoded. we can add this feature later, but we should
be aware that :looped-pali-word never has an audio file. -sd
TODO: seed data?
mobile app demands an id | (ns kosa.api.handler
(:require [kuti.support.time :as time]
[kuti.support.digest :refer [uuid]]
[kuti.dispatch.routing :refer [url-for]]
[kosa.library.artefacts.image.db :as image-db]
[kosa.mobile.today.pali-word.db :as pali-word-db]
[kosa.mobile.today.words... |
bd0e5207559365034047751e96940411085f5cbd6b3030f70dbbef50bb4b3fab | ktakashi/json-tools | select.scm | #!r6rs
(import (rnrs)
(text json select)
(text json tools)
(srfi :64))
(test-begin "JSONSelect")
(define json1 '#(("name" . #(("first" . "Lloyd") ("last" . "Hilaiel")))
("favoriteColor" . "yellow")
("languagesSpoken"
#(("lang" . "Bulgarian") ("level" . "advanced"))
#(("lang" . "English")
("lev... | null | https://raw.githubusercontent.com/ktakashi/json-tools/502f63bd1b5acf4792451aa814107377cd04be79/tests/select.scm | scheme | root
empty array
or
combinations
has
val
contains
expr | #!r6rs
(import (rnrs)
(text json select)
(text json tools)
(srfi :64))
(test-begin "JSONSelect")
(define json1 '#(("name" . #(("first" . "Lloyd") ("last" . "Hilaiel")))
("favoriteColor" . "yellow")
("languagesSpoken"
#(("lang" . "Bulgarian") ("level" . "advanced"))
#(("lang" . "English")
("lev... |
4e8d9b42f09f7f33f25c8dfd27e2901835a3732b787bc74d1a6b149ed13be63f | racket/math | modular-arithmetic.rkt | #lang racket/base
(require "modular-arithmetic-base.rkt")
(provide with-modulus
current-modulus
modular-inverse
modular-expt
mod+
mod-
mod*
mod/
modsqr
modexpt
mod
mod=
mod<
mod<=
mod>
... | null | https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-lib/math/private/number-theory/modular-arithmetic.rkt | racket | It's ridiculous that `cs' has to be split here
begin-encourage-inline | #lang racket/base
(require "modular-arithmetic-base.rkt")
(provide with-modulus
current-modulus
modular-inverse
modular-expt
mod+
mod-
mod*
mod/
modsqr
modexpt
mod
mod=
mod<
mod<=
mod>
... |
185ce72d52212961332812f3dd7760f76759f5eca19e5f821078eba198133378 | Opetushallitus/aipal | kyselypohja.clj | Copyright ( c ) 2014 The Finnish National Board of Education - Opetushallitus
;;
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
of the EUPL ( the " Licence " ) ;
;;
;; You may not use this work except... | null | https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/e2e/src/aipal_e2e/arkisto/kyselypohja.clj | clojure |
You may not use this work except in compliance with the Licence.
You may obtain a copy of the Licence at: /
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 | Copyright ( c ) 2014 The Finnish National Board of Education - Opetushallitus
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
European Union Public Licence for more details .
(ns aipal-e2e.arkisto.kys... |
86349aa531aff899b1d26e3532c7c9112619551ec2bd1b7f6578bffb40dfba66 | goldfirere/thesis | ByteArray.hs | # LANGUAGE CPP , MagicHash , UnboxedTuples , UnliftedFFITypes , DeriveDataTypeable #
-- |
Module : Data . Primitive .
Copyright : ( c ) Roman Leshchinskiy 2009 - 2012
-- License : BSD-style
--
Maintainer : < >
-- Portability : non-portable
--
Primitive operations on ByteArrays
--
module Dat... | null | https://raw.githubusercontent.com/goldfirere/thesis/22f066bc26b1147530525aabb3df686416b3e4aa/cab/primitive-0.6/Data/Primitive/ByteArray.hs | haskell | |
License : BSD-style
Portability : non-portable
* Types
* Allocation
* Element access
* Block operations
* Information
| Mutable byte arrays associated with a primitive state token
| Create a new mutable byte array of the specified size.
| Create a /pinned/ byte array of the specified size. The garba... | # LANGUAGE CPP , MagicHash , UnboxedTuples , UnliftedFFITypes , DeriveDataTypeable #
Module : Data . Primitive .
Copyright : ( c ) Roman Leshchinskiy 2009 - 2012
Maintainer : < >
Primitive operations on ByteArrays
module Data.Primitive.ByteArray (
ByteArray(..), MutableByteArray(..), ByteArra... |
eb032da0359e78949d48a39887c8a90ce1439c4c1c282ae8e07d28a010511a18 | babashka/neil | git.clj | (ns babashka.neil.git
{:no-doc true}
(:require [babashka.fs :as fs]
[babashka.neil.curl :refer [curl-get-json]]
[babashka.process :refer [sh]]
[clojure.string :as str]))
(defn default-branch [lib]
(get (curl-get-json (format ""
(namespace lib) (na... | null | https://raw.githubusercontent.com/babashka/neil/26e115fae4bf52648bd2154f03337fa824d2121c/src/babashka/neil/git.clj | clojure | (ns babashka.neil.git
{:no-doc true}
(:require [babashka.fs :as fs]
[babashka.neil.curl :refer [curl-get-json]]
[babashka.process :refer [sh]]
[clojure.string :as str]))
(defn default-branch [lib]
(get (curl-get-json (format ""
(namespace lib) (na... | |
4dcb5188bcc76eec6ebb3fdb87db631a20aece987a08ad677a30c030e5430f50 | plapadoo/matrix-bot | Spec.hs | {-# LANGUAGE DeriveFunctor #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE TemplateHaskell #-}
import Control.Applicative (Applicative, pure, (*>),
(<*>))
import ... | null | https://raw.githubusercontent.com/plapadoo/matrix-bot/01ea062116200d407632b93743ef0dbc11a63715/test/Spec.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE TemplateHaskell #
Not really arbitrary yet
Not applicable anymore since parsing results in text, not HTML
prop_coparseParseAreInverse message = do
(parseIncomingMessage . coparseIncomingMessage) message == message
prop_parseCoparseAreInverse message... | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
import Control.Applicative (Applicative, pure, (*>),
(<*>))
import Control.Lens (has, makeLenses,
... |
3bf5e27af0aa9806c0b2c4496765427226bdaa288f169fdbd20ed98111b6f921 | bufferswap/pngload | datastream.lisp | (in-package #:pngload)
(defstruct datastream
signature
chunks)
(defun parse-datastream (png)
(let ((datastream (make-datastream)))
(setf (datastream-signature datastream) (parse-signature png)
(datastream-chunks datastream) (parse-all-chunks png))
(when (state-decode-data (state png))
(d... | null | https://raw.githubusercontent.com/bufferswap/pngload/5e25f0beadd4ee118098b3e88b77b7c465c25190/src/datastream.lisp | lisp | (in-package #:pngload)
(defstruct datastream
signature
chunks)
(defun parse-datastream (png)
(let ((datastream (make-datastream)))
(setf (datastream-signature datastream) (parse-signature png)
(datastream-chunks datastream) (parse-all-chunks png))
(when (state-decode-data (state png))
(d... | |
172e067dc10b71d5072f64dde09249fdd5ae2ca70acab157c65b37b93cd78c0e | yuce/pot | hotp_generation_tests.erl | -module(hotp_generation_tests).
-author("Yuce Tekol").
-include_lib("eunit/include/eunit.hrl").
all_test_() ->
{foreach,
fun start/0,
fun stop/1,
[fun hotp_generation_from_secret/1,
fun hotp_generation_for_different_intervals/1,
fun hotp_generation_with_padding/1,
fun hotp_generat... | null | https://raw.githubusercontent.com/yuce/pot/9882973ee3982c3a2063b422c660474e95809a65/test/hotp_generation_tests.erl | erlang | -module(hotp_generation_tests).
-author("Yuce Tekol").
-include_lib("eunit/include/eunit.hrl").
all_test_() ->
{foreach,
fun start/0,
fun stop/1,
[fun hotp_generation_from_secret/1,
fun hotp_generation_for_different_intervals/1,
fun hotp_generation_with_padding/1,
fun hotp_generat... | |
7e99b4d92581a8b0cedfef4b2222f5deb2383c3f50c4e9085788cdeb496b3a9a | intermine/bluegenes-old | api.cljs | (ns bluegenes.timeline.api
(:require [re-frame.core :as re-frame])
(:use [cljs-uuid-utils.core :only [make-random-uuid]]))
(defn rid []
(str (make-random-uuid)))
(defn get-id [tool]
"Returns the ID of a tool or starts a new history and returns the ID if it's not part of a history yet"
(if (some? (:_id t... | null | https://raw.githubusercontent.com/intermine/bluegenes-old/5b719c7ac83a7340e0ff65790cf42413c15fb7e9/src/cljs/bluegenes/timeline/api.cljs | clojure | (ns bluegenes.timeline.api
(:require [re-frame.core :as re-frame])
(:use [cljs-uuid-utils.core :only [make-random-uuid]]))
(defn rid []
(str (make-random-uuid)))
(defn get-id [tool]
"Returns the ID of a tool or starts a new history and returns the ID if it's not part of a history yet"
(if (some? (:_id t... | |
9fbdafacde010a886a351d060c90e2cc91e2756463244f1903134647c4de6005 | maxsnew/modal-scheme | main.rkt | #lang racket/base
(require (rename-in "cbpv.rkt"
[bind core-bind])
(for-syntax racket/base
syntax/parse
racket/match))
(provide (all-from-out "cbpv.rkt")
bind define
(rename-out [module-begin #%module-begin])
#%top-inter... | null | https://raw.githubusercontent.com/maxsnew/modal-scheme/3bcda7f40e7b878049d23ed553767988d6a83324/cbpv/main.rkt | racket | #lang racket/base
(require (rename-in "cbpv.rkt"
[bind core-bind])
(for-syntax racket/base
syntax/parse
racket/match))
(provide (all-from-out "cbpv.rkt")
bind define
(rename-out [module-begin #%module-begin])
#%top-inter... | |
b5ceb34d39553f37529863e82be0586f4d83ae75de30498bbfce6b73c1b0470e | Apress/haskell-quick-syntax-reference | ch16.hs | qs :: (Ord a) => [a] -> [a]
qs (y:ys) = qs [x | x <- ys, x<= y] ++ [y] ++ qs [x | x <- ys, x > y]
qs :: (Ord a) => [a] -> [a]
qs [] = []
qs (y:ys) = qs [x | x <- ys, x<= y] ++ [y] ++ -qs[x | x <- ys, x > y]
ms`splitinhalf :: [a] -> ([a], [a])
ms`splitinhalf ys = (take m ys, drop m ys)
where m = (length ys) `div` 2... | null | https://raw.githubusercontent.com/Apress/haskell-quick-syntax-reference/8bcb2773532de752d6297a91a3aaf49fd92ed03b/ch16.hs | haskell | qs :: (Ord a) => [a] -> [a]
qs (y:ys) = qs [x | x <- ys, x<= y] ++ [y] ++ qs [x | x <- ys, x > y]
qs :: (Ord a) => [a] -> [a]
qs [] = []
qs (y:ys) = qs [x | x <- ys, x<= y] ++ [y] ++ -qs[x | x <- ys, x > y]
ms`splitinhalf :: [a] -> ([a], [a])
ms`splitinhalf ys = (take m ys, drop m ys)
where m = (length ys) `div` 2... | |
d4a977e705a3e33073ea945105f939ef337c1bf14bfb621d725b5941d292ad38 | input-output-hk/cardano-wallet-legacy | Ed25519Bip44.hs | {-------------------------------------------------------------------------------
This module provides utils to perform child key derivation for bip44:
extended private key -> extended public key
account extended public key -> address extended public key
account extended private key -> address extended p... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/src/Cardano/Wallet/Kernel/Ed25519Bip44.hs | haskell | ------------------------------------------------------------------------------
This module provides utils to perform child key derivation for bip44:
extended private key -> extended public key
account extended public key -> address extended public key
account extended private key -> address extended pri... |
module Cardano.Wallet.Kernel.Ed25519Bip44
( ChangeChain(..)
, purposeIndex
, coinTypeIndex
, genEncryptedSecretKey
, deriveAddressPublicKey
, deriveAddressPrivateKey
, derivePublicKey
, deriveAccountPrivateKey
, deriveAddressKeyPair
, isInternalChange
) where
import ... |
80046dca9c72d6733a5c22f42c63716e545dc17846416a1a6091a7cde5290d2c | facebookarchive/lex-pass | Ast.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Lang.Php.Ast (
module Lang.Php.Ast.Common,
module Lang.Php.Ast.Lex,
module Lang.Php.Ast.Stmt,
Ast
) where
import Control.Applicative hiding ((<|>), many)
import Control.Arrow
import Control.Monad
import Data.Binary.Generic
import Data.Char
import Common
import qua... | null | https://raw.githubusercontent.com/facebookarchive/lex-pass/dcfa9560a95f2c1344e15493dabcc1645b1ca5e8/src/Lang/Php/Ast.hs | haskell | # LANGUAGE DeriveDataTypeable # |
module Lang.Php.Ast (
module Lang.Php.Ast.Common,
module Lang.Php.Ast.Lex,
module Lang.Php.Ast.Stmt,
Ast
) where
import Control.Applicative hiding ((<|>), many)
import Control.Arrow
import Control.Monad
import Data.Binary.Generic
import Data.Char
import Common
import qualified Data.ByteString as BS
import ... |
29fae5d5c6968d7ce3ef9579c0e4e262597345eb5f3db08a80da974c8c62ca64 | hiroshi-unno/coar | loopDetector.ml | TODO : Functorize this module and implemente configurations of
loop detection including verbose , whether use Jhonson 's algorithms , and so on .
loop detection including verbose, whether use Jhonson's algorithms, and so on. *)
open Core
let find_cycle graph vertiecs = (* graph must be strongly connected *)... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/PCSat/labeling/loopDetector.ml | ocaml | graph must be strongly connected
size of examples is more than 0
Debug.print ~id @@ lazy "find a cycle:[";
Debug.print ~id @@ lazy "]\n"; | TODO : Functorize this module and implemente configurations of
loop detection including verbose , whether use Jhonson 's algorithms , and so on .
loop detection including verbose, whether use Jhonson's algorithms, and so on. *)
open Core
let open Graph in
let open Pack.Digraph in
let rec inner stack ... |
4991510192426ecbe777ae147dd160a86a4372121dc36bd1a8ce39c34352151e | Taoensso/faraday | utils.clj | (ns taoensso.faraday.utils
{:author "Peter Taoussanis"}
(:require [clojure.string :as str])
(:import (java.util HashMap)))
(defn map-kvs [kf vf m]
(let [m (if (instance? HashMap m) (into {} m) m)]
(persistent! (reduce-kv (fn [m k v] (assoc! m (if kf (kf k) k)
... | null | https://raw.githubusercontent.com/Taoensso/faraday/53c3ae3864e3c0d93ef8810892e67871c0d9a1cc/src/taoensso/faraday/utils.clj | clojure | (ns taoensso.faraday.utils
{:author "Peter Taoussanis"}
(:require [clojure.string :as str])
(:import (java.util HashMap)))
(defn map-kvs [kf vf m]
(let [m (if (instance? HashMap m) (into {} m) m)]
(persistent! (reduce-kv (fn [m k v] (assoc! m (if kf (kf k) k)
... | |
63cecb81059947237048d4070559b66408ef3f037a7be4cfecab93f59e47bc7c | aiya000/haskell-examples | MyException.hs | # LANGUAGE ScopedTypeVariables #
import Control.Exception
data Status = Fine deriving (Show)
data MyException = MyException Status
instance Exception MyException
instance Show MyException where
show (MyException s) = "ahoge: MyException (" ++ (show s) ++ ")"
main :: IO ()
main = do
throw (MyException Fine) ... | null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Control/Exception/MyException.hs | haskell | # LANGUAGE ScopedTypeVariables #
import Control.Exception
data Status = Fine deriving (Show)
data MyException = MyException Status
instance Exception MyException
instance Show MyException where
show (MyException s) = "ahoge: MyException (" ++ (show s) ++ ")"
main :: IO ()
main = do
throw (MyException Fine) ... | |
7d99ce126032fdff6a868079a27fc9ab1e8dfa7df8397e0ec9577a1396294261 | caiorss/Functional-Programming | AlgebraicVector.hs |
-- x and y coordinates or lengths.
data Cartesian2D = Cartesian2D Double Double
deriving (Eq, Show)
--- Angle and distance (magnitude)
data Polar2D = Polar2D Double Double
deriving (Eq, Show)
| null | https://raw.githubusercontent.com/caiorss/Functional-Programming/ef3526898e3014e9c99bf495033ff36a4530503d/haskell/rwh/ch03/AlgebraicVector.hs | haskell | x and y coordinates or lengths.
- Angle and distance (magnitude) |
data Cartesian2D = Cartesian2D Double Double
deriving (Eq, Show)
data Polar2D = Polar2D Double Double
deriving (Eq, Show)
|
8f5df820ac8b14cba1c43e1328498dcb632fb3e79eac75aa2b30b5e58cc3fc78 | thoughtpolice/clash-playground | build.hs | #!/usr/bin/env runghc
# OPTIONS_GHC -Wall #
module Main
( main -- :: IO ()
) where
import Data.Monoid
import qualified Data.Text.Lazy as T
import Text.Read (readMaybe)
import Development.Shake
import Development.Shake.FilePath
import Clash.Driver.Types... | null | https://raw.githubusercontent.com/thoughtpolice/clash-playground/d5215da20f698e8c423334f99e725ecf1ce7e4b7/src/warmboot/build.hs | haskell | :: IO ()
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
target config.bin by default unless otherwise told not to
primary buil... | #!/usr/bin/env runghc
# OPTIONS_GHC -Wall #
module Main
) where
import Data.Monoid
import qualified Data.Text.Lazy as T
import Text.Read (readMaybe)
import Development.Shake
import Development.Shake.FilePath
import Clash.Driver.Types (Manifest(..))
bdi... |
c205f0abb84d67abb28dd76f94df3beddbab0489f667cf19f310d99551b9138b | justinethier/cyclone | test-find-loop.scm | Temporary test program , find loops in original CPS , before optimizations
(import (scheme base) (scheme write)
(scheme cyclone cps-optimizations)
(scheme cyclone util)
(scheme cyclone ast))
(define (trace:error exp)
(write exp)
(newline))
(define (analyze:find-named-lets exp)
(define (scan exp lp)
;(w... | null | https://raw.githubusercontent.com/justinethier/cyclone/a1c2a8f282f37ce180a5921ae26a5deb04768269/tests/debug/test-find-loop.scm | scheme | (write `(scan ,exp)) (newline)
(with-var! a (lambda (var)
(adbv:set-def-in-loop! var #t)))
(with-var! exp (lambda (var)
(adbv:set-ref-in-loop! var #t)))
Find lambda with initial #f assignment
Get information for continuation
Check the set's continuation
(unused2 (begin (newline) (newline) (write (ast:... | Temporary test program , find loops in original CPS , before optimizations
(import (scheme base) (scheme write)
(scheme cyclone cps-optimizations)
(scheme cyclone util)
(scheme cyclone ast))
(define (trace:error exp)
(write exp)
(newline))
(define (analyze:find-named-lets exp)
(define (scan exp lp)
(co... |
4b067b5db6a6698d88e5cf0798f652185714272bd56652dabd997cceffd0fde1 | jtod/Hydra | RTL.hs | module HDL.Hydra.Core.RTL where
import Data.Word
import Data.Bits
------------------------------------------------------------------------
-- Abstract Addressable Memory
------------------------------------------------------------------------
-- Represent memory as a binary tree of locations. The e... | null | https://raw.githubusercontent.com/jtod/Hydra/6fa939f719741ccc323d94a333e88f356e5d8486/src/HDL/Hydra/Core/RTL.hs | haskell | ----------------------------------------------------------------------
Abstract Addressable Memory
----------------------------------------------------------------------
Represent memory as a binary tree of locations. The entire address
| module HDL.Hydra.Core.RTL where
import Data.Word
import Data.Bits
space is 2^s locations . Each location holds a polymorphic value .
data MemTree a
= MemLocation a
| MemNode (MemTree a) (MemTree a)
deriving Show
initMemTree :: Integral a => a -> b -> MemTree b
initMemTree k x =
if k==... |
06bee08eaa507a22c639b7275a6c0eac0ea8827311669e5968bca5e640a4e49d | Clozure/ccl-tests | numerator-denominator.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Sep 7 08:24:57 2003
;;;; Contains: Tests of NUMERATOR, DENOMINATOR
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
(deftest numerator.error.1
(signals-error (numerator) program-error)
t)
(deftest numerator.error.2
(signals-error (numerator... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/numerator-denominator.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of NUMERATOR, DENOMINATOR | Author :
Created : Sun Sep 7 08:24:57 2003
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
(deftest numerator.error.1
(signals-error (numerator) program-error)
t)
(deftest numerator.error.2
(signals-error (numerator 1/2 nil) program-error)
t)
(deftest denominator.error.1
(signals-... |
58b8cbfc32b740a336dcd765213af13b94d21da6aaf48b93564142689eb45e9f | alanzplus/EOPL | nth-element-test.rkt | #lang eopl
(require rackunit "nth-element.rkt")
(require rackunit/text-ui)
(define nth-element-test
(test-suite
"Tests for nth-element.rkt"
(check-equal? (nth-element '(a b c) 0) 'a)
(check-equal? (nth-element '(a b c) 1) 'b)
(check-equal? (nth-element '(a b c) 2) 'c)))
(run-tests nth-element-test)... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch1/nth-element-test.rkt | racket | #lang eopl
(require rackunit "nth-element.rkt")
(require rackunit/text-ui)
(define nth-element-test
(test-suite
"Tests for nth-element.rkt"
(check-equal? (nth-element '(a b c) 0) 'a)
(check-equal? (nth-element '(a b c) 1) 'b)
(check-equal? (nth-element '(a b c) 2) 'c)))
(run-tests nth-element-test)... | |
25de89f693765c501fb9f856e6e838179b25113ead759f672530231f67782822 | dmitryvk/sbcl-win32-threads | osf1-os.lisp | OS interface functions for CMU CL under OSF/1
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 ... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/osf1-os.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.
Check that target machine features are set up consistently with
this file.
Return system time, user time and number of page faults.
Return t... | OS interface functions for CMU CL under OSF/1
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!SYS")
#!-osf1 (error "missing :OSF1 feature")
(defun softwa... |
397b443c8ed868ec4d0eb8e3435f116e00e1c1c00412deee8cb8dc912625676e | anuyts/menkar | DoUntilFail.hs | module Control.Monad.DoUntilFail where
import Control.Monad
{-| Repeats 'action' until it returns 'False' -}
doUntilFail :: Monad m => m Bool -> m ()
doUntilFail action = do
succes <- action
when succes $ doUntilFail action
| null | https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/src/Control/Monad/DoUntilFail.hs | haskell | | Repeats 'action' until it returns 'False' | module Control.Monad.DoUntilFail where
import Control.Monad
doUntilFail :: Monad m => m Bool -> m ()
doUntilFail action = do
succes <- action
when succes $ doUntilFail action
|
71a22a22f8e378ed07923275bca1cb52be1e9be1caf196c1d461d9890e0f06b1 | oscoin/oscoin | Tests.hs | module Integration.Tests
( tests
) where
import Test.Tasty
import qualified Integration.Test.Executable as Executable
tests :: TestTree
tests = testGroup "Integration" [ Executable.tests ]
| null | https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/test/Integration/Tests.hs | haskell | module Integration.Tests
( tests
) where
import Test.Tasty
import qualified Integration.Test.Executable as Executable
tests :: TestTree
tests = testGroup "Integration" [ Executable.tests ]
| |
c15b48edcd2c4dbdfe37b7d07a9edd2c4a554408e7b1e94f74b09f782a866020 | rickbutton/loki | test-runner.body.scm | Copyright ( c ) 2005 , 2006 , 2007 , 2012 , 2013 Per Bothner
Added " full " support for Chicken , Gauche , and SISC .
, Copyright ( c ) 2005 .
Modified for Scheme Spheres by , Copyright ( c ) 2012 .
Support for Guile 2 by < > , Copyright ( c ) 2014 .
Refactored by , Copyright ( c ) 2014 , ... | null | https://raw.githubusercontent.com/rickbutton/loki/a6d032eac53be95a3feeea8c9a49bb250a02d589/src/srfi/64/test-runner.body.scm | scheme |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to do so, subject to the following conditions:
... | Copyright ( c ) 2005 , 2006 , 2007 , 2012 , 2013 Per Bothner
Added " full " support for Chicken , Gauche , and SISC .
, Copyright ( c ) 2005 .
Modified for Scheme Spheres by , Copyright ( c ) 2012 .
Support for Guile 2 by < > , Copyright ( c ) 2014 .
Refactored by , Copyright ( c ) 2014 , ... |
0398569a508ec46a42f72c7de597e52acb1b891508cb583ac4ffa0d60fc43b94 | cardmagic/lucash | thread.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
; Threads.
This is inspired by Haynes et al 's engines .
;
; The fundamental operation is (RUN <thread> <time>), which runs the thread
; for the given amount of time.
;
; Each thread has:
; saved continuation
; saved interrupt mask
scheduler , ... | null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scheme/rts/thread.scm | scheme | Threads.
The fundamental operation is (RUN <thread> <time>), which runs the thread
for the given amount of time.
Each thread has:
saved continuation
saved interrupt mask
remaining time in clock ticks ('waiting = waiting for events)
cell that is holding this thread, if any
arguments waiting to be pa... | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
This is inspired by Haynes et al 's engines .
scheduler , which is the thread that RUNs this one
also have :
into a tree by the THREAD - SCHEDULER field , with the pointers pointing from
(define-record-type thread :thread
(really-make-threa... |
bc1871aac1e17498f029dca048f66561d297850e88e76eaf31f1a333f1f952d3 | Enecuum/Node | Database.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DuplicateRecordFields #
module Enecuum.Core.Types.Database where
import Enecuum.Prelude
import Data.Aeson.Extra (noLensPrefix)
import qualified Data.Aeson as A
import qualified Data.ByteString.Lazy as LBS
type DBKeyRaw = ByteString... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Core/Types/Database.hs | haskell | TODO: this doesn't work by some strange reason. | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DuplicateRecordFields #
module Enecuum.Core.Types.Database where
import Enecuum.Prelude
import Data.Aeson.Extra (noLensPrefix)
import qualified Data.Aeson as A
import qualified Data.ByteString.Lazy as LBS
type DBKeyRaw = ByteString... |
c33728e0b06a822626f51c097fc255f2b807170e079696ddfe391f6a4b5272e6 | fjvallarino/monomer | Tutorial08_Themes.hs | |
Module : Tutorial08_Themes
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Main module for the ' 08 - Themes ' tutorial .
Module : Tutorial08_Themes
Copyright : (c) 2018 Francisco ... | null | https://raw.githubusercontent.com/fjvallarino/monomer/51ce06f613eeb5a7e1172ae1a17cf099e053c9cb/examples/tutorial/Tutorial08_Themes.hs | haskell | # LANGUAGE OverloadedStrings # | |
Module : Tutorial08_Themes
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Main module for the ' 08 - Themes ' tutorial .
Module : Tutorial08_Themes
Copyright : (c) 2018 Francisco ... |
ef79ebc16eed578c50afb672c62f375b14f2f66a9dd637d9069914bcacc5b29e | ucsd-progsys/liquidhaskell | LazyZip.hs | {-@ LIQUID "--maxparams=4" @-}
{-@ LIQUID "--pruneunsorted" @-}
# OPTIONS_GHC -cpp - orphans -fno - warn - incomplete - patterns -Wno - partial - type - signatures #
# LANGUAGE PartialTypeSignatures #
-- #prune
-- |
-- Module : Data.ByteString.Lazy
Copyright : ( c ) 2006
( c ) 20... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f8c203f8f1d4c328b24f5be456e4b9ea514bc77e/tests/benchmarks/bytestring-0.9.2.1/Data/ByteString/LazyZip.hs | haskell | @ LIQUID "--maxparams=4" @
@ LIQUID "--pruneunsorted" @
#prune
|
Module : Data.ByteString.Lazy
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
A time and space-efficient implementation of lazy byte vectors
using lists of packed 'Word8' arrays, suitable for high ... |
# OPTIONS_GHC -cpp - orphans -fno - warn - incomplete - patterns -Wno - partial - type - signatures #
# LANGUAGE PartialTypeSignatures #
Copyright : ( c ) 2006
( c ) 2006
requirements . Byte vectors are encoded as lazy lists of strict ' Word8 '
better complexity than their " Data ... |
5f73ce95fcd7553ca10124e34eb74c0fd08a4064bd6d8c3f1539031d893b2fe1 | cruxlang/crux | Tokens.hs | module Crux.Tokens where
import Crux.Prelude
data TokenType
= TInteger Integer
| TString Text
| TUpperIdentifier Text
| TLowerIdentifier Text
-- symbols
| TOpenBrace
| TCloseBrace
| TOpenParen
| TCloseParen
| TOpenBracket
| TCloseBracket
| TQuestionMark
| TSemicolon... | null | https://raw.githubusercontent.com/cruxlang/crux/883f642d15fb85ce17d9c485ee91158d9e826a2f/Crux/Tokens.hs | haskell | symbols
_
Keywords
TODO: merge this into a standard set of lists? | module Crux.Tokens where
import Crux.Prelude
data TokenType
= TInteger Integer
| TString Text
| TUpperIdentifier Text
| TLowerIdentifier Text
| TOpenBrace
| TCloseBrace
| TOpenParen
| TCloseParen
| TOpenBracket
| TCloseBracket
| TQuestionMark
| TSemicolon
| TColonCo... |
f751ff9901b66223cd83b69374e7a96155d9c544936f1f20b1fce9219d6e7ae1 | besport/ocsigen-i18n | i18n_ppx_rewriter.ml |
* Copyright ( C ) 2015 BeSport ,
*
* 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 , with linking exception ;
* either version 2.1 of the License , or ( at your option... | null | https://raw.githubusercontent.com/besport/ocsigen-i18n/426a4b70934ed12f91ec95309b968408837642c7/i18n_ppx_rewriter.ml | ocaml | CASE 1: [%i18n ident ... ]
CASE 2: [%i18n S.ident ... ]
CASE 4 : [%i18n OtherMod.S.ident ...]
CASE X : [%i18n OtherModA.OtherModB.ident ...]. Illegal. |
* Copyright ( C ) 2015 BeSport ,
*
* 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 , with linking exception ;
* either version 2.1 of the License , or ( at your option... |
ffa6aa9e97d9bd33ca8b9f61215d89901b046c30b802b525277c3fddf9533b5b | wilkerlucio/pathom | main.cljs | (ns com.wsscode.pathom.book.main
(:require [com.wsscode.pathom.book.app-types :as app-types]
[com.wsscode.pathom.book.async.demos]
[com.wsscode.pathom.book.interactive-parser]
[com.wsscode.pathom.book.index-explorer]
[com.wsscode.pathom.book.graphql.edn-converter]
... | null | https://raw.githubusercontent.com/wilkerlucio/pathom/4ec25055d3d156241e9174d68ec438c93c971b9b/docs-src/modules/ROOT/examples/com/wsscode/pathom/book/main.cljs | clojure | (ns com.wsscode.pathom.book.main
(:require [com.wsscode.pathom.book.app-types :as app-types]
[com.wsscode.pathom.book.async.demos]
[com.wsscode.pathom.book.interactive-parser]
[com.wsscode.pathom.book.index-explorer]
[com.wsscode.pathom.book.graphql.edn-converter]
... | |
c4094d7dcadb452c09b79940eaec58e1c8715377ed363322b431079558c9df6e | mfoemmel/erlang-otp | wxDirPickerCtrl.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxDirPickerCtrl.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxDirPickerCtrl).
-include("wxe.h... |
bec73aa842a6044745672192f70e70d24c7f2caf6d659befe5cb22d1691ec3be | shonfeder/nomad | common.ml | type t =
{ debug : bool
; config : Config.t
}
| null | https://raw.githubusercontent.com/shonfeder/nomad/1562a812b36952f507002266754c4d7f98a698a4/lib/common.ml | ocaml | type t =
{ debug : bool
; config : Config.t
}
| |
feb0afdc34cb8979d83acfa3e83f9ace893422f7fb7d6461a370dacbdf5dcca5 | patricoferris/ocaml-multicore-monorepo | test_ec_wycheproof.ml | open Wycheproof
open Mirage_crypto_ec
let hex = Alcotest.testable Wycheproof.pp_hex Wycheproof.equal_hex
let parse_asn1 curve s =
let cs = Cstruct.of_string s in
let seq2 a b = Asn.S.(sequence2 (required a) (required b)) in
let term = Asn.S.(seq2 (seq2 oid oid) bit_string_cs) in
let ec_public_key = Asn.OID.(... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/mirage-crypto/tests/test_ec_wycheproof.ml | ocaml | open Wycheproof
open Mirage_crypto_ec
let hex = Alcotest.testable Wycheproof.pp_hex Wycheproof.equal_hex
let parse_asn1 curve s =
let cs = Cstruct.of_string s in
let seq2 a b = Asn.S.(sequence2 (required a) (required b)) in
let term = Asn.S.(seq2 (seq2 oid oid) bit_string_cs) in
let ec_public_key = Asn.OID.(... | |
80dea806113e3c3c1b8b68fb6aa459d24a6b9ab8af4ffc1ee0daf39302200ef5 | stil4m/project-typo | core_test.clj | (ns server.core-test
(:require [clojure.test :refer :all]
[project-typo.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/stil4m/project-typo/4e343934175f429c8b7870814d569f776203d461/server/test/server/core_test.clj | clojure | (ns server.core-test
(:require [clojure.test :refer :all]
[project-typo.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
357a47b7950d220eeabd6f36966ae46e999ffb8b38d9c9944bb41c730926420d | nikodemus/SBCL | room.lisp | ;;;; heap-grovelling memory usage stuff
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 a... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/code/room.lisp | lisp | heap-grovelling memory usage stuff
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.
type format database
the name of this type
kind of type (how we determine length)
FIXME: This looks rath... |
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!VM")
(declaim (special sb!vm:*read-only-space-free-pointer*
sb!vm:*static-space-free-point... |
e31198ef1c7a96b72219323378dbe40c742d6205f9e52304c44e1b9c3d43f749 | janestreet/merlin-jst | env.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/9c3b60c98d80b56af18ea95c27a0902f0244659a/upstream/ocaml_414/typing/env.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Cmi_format
open Misc
open Asttypes
open Longident
open Path
open Types
open Local_store
module St... |
73bc95ff6cf5fd7a87c7d85b870fc3fdfe442ab1d48904fd94b5461d9f1ba353 | xtdb/xtdb | collapsible.cljs | (ns xtdb.ui.collapsible
(:require [xtdb.ui.common :as common]
[re-frame.core :as rf]))
(rf/reg-event-db
::toggle
(fn [db [_ db-path open?]]
(update-in db (into db-path [::open?]) (if (some? open?) (constantly open?) not))))
(rf/reg-sub
::open?
(fn [db [_ db-path default-open?]]
(get-in db (int... | null | https://raw.githubusercontent.com/xtdb/xtdb/e2f51ed99fc2716faa8ad254c0b18166c937b134/modules/http-server/src-cljs/xtdb/ui/collapsible.cljs | clojure | (ns xtdb.ui.collapsible
(:require [xtdb.ui.common :as common]
[re-frame.core :as rf]))
(rf/reg-event-db
::toggle
(fn [db [_ db-path open?]]
(update-in db (into db-path [::open?]) (if (some? open?) (constantly open?) not))))
(rf/reg-sub
::open?
(fn [db [_ db-path default-open?]]
(get-in db (int... | |
2076af9d08b69078e64d5f3e281a5e90540f7536e421e1f22c899188fbee75f0 | tmfg/mmtis-national-access-point | gtfs_test.clj | (ns ote.integration.import.gtfs-test
(:require [amazonica.aws.s3 :as s3]
[clojure.test :refer :all]
[clojure.string :as str]
[clj-http.client :as http-client]
[ote.integration.import.gtfs :as gtfs]
[ote.services.transit-changes :as transit-changes]
... | null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/db99f277d0984ba664f08e31a9eb606b701a4674/ote/test/clj/ote/integration/import/gtfs_test.clj | clojure | keys are strings instead of keywords to get around unnecessary spec validation in http client
`nil` is returned as result because missing files is considered a fatal error
I'd like to change this but because of legacy creep I don't have enough domain knowledge to change this.
So please heed my warning, if you see t... | (ns ote.integration.import.gtfs-test
(:require [amazonica.aws.s3 :as s3]
[clojure.test :refer :all]
[clojure.string :as str]
[clj-http.client :as http-client]
[ote.integration.import.gtfs :as gtfs]
[ote.services.transit-changes :as transit-changes]
... |
e5636a40e3eb42dcc9233e634210fca130de8a9e11ad95352dcf85bc8df94857 | lspitzner/multistate | Lazy.hs | # LANGUAGE CPP #
| The multi - valued version of mtl 's State / StateT
module Control.Monad.Trans.MultiState.Lazy
(
-- * MultiStateT
MultiStateT(..)
, MultiStateTNull
, MultiState
-- * MonadMultiState class
, MonadMultiGet(..)
, MonadMultiState(..)
-- * run-functions
, runMultiStateT
, runMul... | null | https://raw.githubusercontent.com/lspitzner/multistate/5f49eff342443ef719158b00e329c860f2e2f54e/src/Control/Monad/Trans/MultiState/Lazy.hs | haskell | * MultiStateT
* MonadMultiState class
* run-functions
* with-functions (single state)
* with-functions (multiple states)
* without-function (single state)
* inflate-functions (run single state in multiple states)
* other functions
* x - The list of types constituting the state,
* m - The inner monad.
a het... | # LANGUAGE CPP #
| The multi - valued version of mtl 's State / StateT
module Control.Monad.Trans.MultiState.Lazy
(
MultiStateT(..)
, MultiStateTNull
, MultiState
, MonadMultiGet(..)
, MonadMultiState(..)
, runMultiStateT
, runMultiStateTAS
, runMultiStateTSA
, runMultiStateTA
, runMultiState... |
7bf10735a694f6329b6e22d25871e449a742d0165327b89388983ea523f33fd2 | theoremprover-museum/LCF77 | ol3.lsp | (PUTPROP (QUOTE eqtype) 2 (QUOTE NUMARGS))
(PUTPROP (QUOTE eqtype) (MKTIDY (QUOTE ((term # term) /-> bool))) (QUOTE MLTYPE))
(PUTPROP (QUOTE genvar) 1 (QUOTE NUMARGS))
(PUTPROP (QUOTE genvar) (MKTIDY (QUOTE (type /-> term))) (QUOTE MLTYPE))
(PUTPROP (QUOTE equivpair) 1 (QUOTE NUMARGS))
(PUTPROP (QUOTE equivpair) (MKTID... | null | https://raw.githubusercontent.com/theoremprover-museum/LCF77/7a43e95deee18ae37389d98e184b38fdfb3df923/src/ol3.lsp | lisp | (PUTPROP (QUOTE eqtype) 2 (QUOTE NUMARGS))
(PUTPROP (QUOTE eqtype) (MKTIDY (QUOTE ((term # term) /-> bool))) (QUOTE MLTYPE))
(PUTPROP (QUOTE genvar) 1 (QUOTE NUMARGS))
(PUTPROP (QUOTE genvar) (MKTIDY (QUOTE (type /-> term))) (QUOTE MLTYPE))
(PUTPROP (QUOTE equivpair) 1 (QUOTE NUMARGS))
(PUTPROP (QUOTE equivpair) (MKTID... | |
0602fa830a6b3600f7ba3aa4afea39f4e53a674dc4dfbb70f3d406a9fa78a7d8 | sKabYY/palestra | p56.scm | ; deriv
(define (variable? x) (symbol? x))
(define (same-variable? v1 v2)
(and (variable? v1) (variable? v2) (eq? v1 v2)))
(define (=number? x n)
(and (number? x) (= x n)))
(define (sum? x) (and (pair? x) (eq? (car x) '+)))
(define (addend s) (cadr s))
(define (augend s) (caddr s))
(define (make-sum a1 a2)
(co... | null | https://raw.githubusercontent.com/sKabYY/palestra/0906cc3a1fb786093a388d5ae7d59120f5aae16c/old1/sicp/2/p56.scm | scheme | deriv
| (define (variable? x) (symbol? x))
(define (same-variable? v1 v2)
(and (variable? v1) (variable? v2) (eq? v1 v2)))
(define (=number? x n)
(and (number? x) (= x n)))
(define (sum? x) (and (pair? x) (eq? (car x) '+)))
(define (addend s) (cadr s))
(define (augend s) (caddr s))
(define (make-sum a1 a2)
(cond ((=nu... |
9833df9ee1f4db670575994f2b039eebd1e14033eebf7eaa074f18a51f294702 | votinginfoproject/data-processor | checksum.clj | (ns vip.data-processor.validation.v6.checksum
(:require [korma.core :as korma]
[vip.data-processor.db.postgres :as postgres]
[vip.data-processor.validation.v5.util :as util]
[vip.data-processor.errors :as errors]
[clojure.tools.logging :as log]))
(def validate-no-missi... | null | https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/src/vip/data_processor/validation/v6/checksum.clj | clojure | (ns vip.data-processor.validation.v6.checksum
(:require [korma.core :as korma]
[vip.data-processor.db.postgres :as postgres]
[vip.data-processor.validation.v5.util :as util]
[vip.data-processor.errors :as errors]
[clojure.tools.logging :as log]))
(def validate-no-missi... | |
0ae61dadcafc045cd0fba1b57ed75978ef8ff6d00a5e88fddfd761ba4f4eb237 | ocurrent/ocaml-ci | variant.mli | (** Variants of builds to perform.
A build variant covers the OCaml version, opam version, hardware [arch] and
operating system distribution. *)
type t [@@deriving eq, ord, yojson]
val v :
arch:Ocaml_version.arch ->
distro:string ->
ocaml_version:Ocaml_version.t ->
opam_version:Opam_version.t ->
(t... | null | https://raw.githubusercontent.com/ocurrent/ocaml-ci/bac90619e2404a4761e8dcd95fe87b64489f7739/lib/variant.mli | ocaml | * Variants of builds to perform.
A build variant covers the OCaml version, opam version, hardware [arch] and
operating system distribution.
* Print [t] as a docker tag. |
type t [@@deriving eq, ord, yojson]
val v :
arch:Ocaml_version.arch ->
distro:string ->
ocaml_version:Ocaml_version.t ->
opam_version:Opam_version.t ->
(t, [> `Msg of string ]) result
val arch : t -> Ocaml_version.arch
val distro : t -> string
val ocaml_version : t -> Ocaml_version.t
val with_ocaml_version... |
40330b56ca44d5b5c96583278fe8c735c32abc9feb4c1e09472bb590c35d0369 | input-output-hk/ouroboros-network | Direct.hs | # LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
module Ouroboros.Network.Protocol.LocalStateQuery.Direct (direct) where
import Ouroboros.Network.Protocol.LocalStateQuery.Client
import Ouroboros.Network.Protocol.LocalStateQuery.Server
direct
:: forall block point query m a b.
... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/2793b6993c8f6ed158f432055fa4ef581acdb661/ouroboros-network-protocols/testlib/Ouroboros/Network/Protocol/LocalStateQuery/Direct.hs | haskell | # LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
module Ouroboros.Network.Protocol.LocalStateQuery.Direct (direct) where
import Ouroboros.Network.Protocol.LocalStateQuery.Client
import Ouroboros.Network.Protocol.LocalStateQuery.Server
direct
:: forall block point query m a b.
... | |
02a05f82a67f6ffc77870c2dda7474eacff01e13dabc4fd22d13d03806bc1abf | pallet/pallet | actions.clj | (ns pallet.actions
"Pallet's action primitives."
(:require
[clj-schema.schema
:refer [constraints def-map-schema map-schema optional-path sequence-of]]
[clojure.java.io :as io]
[clojure.set :refer [intersection]]
[clojure.string :refer [trim]]
[clojure.tools.logging :as logging]
[pallet.action... | null | https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/src/pallet/actions.clj | clojure | # Direct Script Execution
Sometimes pallet's other actions will not suffice for what you would like to
achieve, so the exec-script actions allow you to execute arbitrary script.
# Wrap arbitrary code
# Flow Control
# Simple File Management
# Simple Directory Management
# Remote File Content
`remote-file` has m... | (ns pallet.actions
"Pallet's action primitives."
(:require
[clj-schema.schema
:refer [constraints def-map-schema map-schema optional-path sequence-of]]
[clojure.java.io :as io]
[clojure.set :refer [intersection]]
[clojure.string :refer [trim]]
[clojure.tools.logging :as logging]
[pallet.action... |
f2488c8330a674102c821c873ab359964a207b7c6cf030f66bd93e75c8593303 | RunOrg/RunOrg | store.ml | (* © 2014 RunOrg *)
open Std
include Cqrs.Stream(struct
include Events
let name = "group"
end)
| null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/groupLib/store.ml | ocaml | © 2014 RunOrg |
open Std
include Cqrs.Stream(struct
include Events
let name = "group"
end)
|
eeb4544bfc55ebcc55fe61c2347c4af8df1ddee4d03109ad0db380bff3435a6a | bufferswap/ViralityEngine | data-defs.lisp | (in-package #:virality)
(defclass input-data ()
((%gamepad-instances :reader gamepad-instances
:initform (u:dict #'eq))
(%gamepad-ids :accessor gamepad-ids
:initform (u:dict #'eq))
(%detached-gamepads :accessor detached-gamepads
:initform nil)
(... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/datatype/data-defs.lisp | lisp | (in-package #:virality)
(defclass input-data ()
((%gamepad-instances :reader gamepad-instances
:initform (u:dict #'eq))
(%gamepad-ids :accessor gamepad-ids
:initform (u:dict #'eq))
(%detached-gamepads :accessor detached-gamepads
:initform nil)
(... | |
d7ce04802fdd2b06f3cfe805dcec9ce470491fb38eac33d9b8268833b0f822fd | wavewave/hxournal | Hook.hs | -----------------------------------------------------------------------------
-- |
-- Module : Application.HXournal.Script.Hook
Copyright : ( c ) 2012
--
-- License : BSD3
Maintainer : < >
-- Stability : experimental
Portability : GHC
--
---------------------------------------------------... | null | https://raw.githubusercontent.com/wavewave/hxournal/b8eb538a2d1a474cc74bc0b5f5c7f251dafe75b9/lib/Application/HXournal/Script/Hook.hs | haskell | ---------------------------------------------------------------------------
|
Module : Application.HXournal.Script.Hook
License : BSD3
Stability : experimental
---------------------------------------------------------------------------
| | Copyright : ( c ) 2012
Maintainer : < >
Portability : GHC
module Application.HXournal.Script.Hook where
import Data.Xournal.Simple
data Hook = Hook { saveAsHook :: Maybe (Xournal -> IO ())
, afterSaveHook :: Maybe (Xournal -> IO ())
}
|
190bc576cae0040a3fd6caa6ec025866bb6182ba6ea83c5b551bc9e3646e9460 | kayceesrk/Quelea | TPCCDefs.hs | {-# LANGUAGE ScopedTypeVariables, TemplateHaskell #-}
module TPCCDefs (
WarehouseID(..),
DistrictID(..),
OrderID(..),
CustomerID(..),
Operation(..),
createTables,
dropTables,
Warehouse
addYtd, addYtdCtrt,
getYtd, getYtdCtrt,
-- District
getandIncNextOID, getandIncNextOIDCtrt,
getNextOID , get... | null | https://raw.githubusercontent.com/kayceesrk/Quelea/73db79a5d5513b9aeeb475867a67bacb6a5313d0/tests/TPCC/TPCCDefs.hs | haskell | # LANGUAGE ScopedTypeVariables, TemplateHaskell #
District
getCustomer, getCustomerCtrt,
History
Order
Warehouse Table : key (WarehouseID)
Ytd
If set then increment
Amt
Amt
o_ol_cnt
o_ol_cnt
------------------------------------------------------------------------------
--------------------------------------... |
module TPCCDefs (
WarehouseID(..),
DistrictID(..),
OrderID(..),
CustomerID(..),
Operation(..),
createTables,
dropTables,
Warehouse
addYtd, addYtdCtrt,
getYtd, getYtdCtrt,
getandIncNextOID, getandIncNextOIDCtrt,
getNextOID , getNextOIDCtrt ,
Customer
addCustomerBal, addCustomerBalCtrt,
a... |
27cdd028eae1a02455a13ccc8ab59bb24dbe6840c267fba18b3ec43e2c530795 | GrammaTech/sel | compilation-database-project.lisp | clang-project.lisp --- Project tests .
(defpackage :software-evolution-library/test/compilation-database-project
(:nicknames :sel/test/compilation-database-project)
(:use
:gt/full
#+gt :testbot
:software-evolution-library/test/util
:software-evolution-library/test/util-clang
:stefil+
:soft... | null | https://raw.githubusercontent.com/GrammaTech/sel/556b9665312aec31586937b3c5a3c422a0d96393/test/compilation-database-project.lisp | lisp | If you put a space before the arguments to a macro, it treats the
arguments as part of the definition. Try it for yourself: | clang-project.lisp --- Project tests .
(defpackage :software-evolution-library/test/compilation-database-project
(:nicknames :sel/test/compilation-database-project)
(:use
:gt/full
#+gt :testbot
:software-evolution-library/test/util
:software-evolution-library/test/util-clang
:stefil+
:soft... |
6b64cae8f196c292d8701e17b138191b9ebe72625372f307baaa69d4f025e7fb | DimaSamoz/mezzo | Harmony.hs | # LANGUAGE TemplateHaskell , ScopedTypeVariables #
-----------------------------------------------------------------------------
-- |
-- Module : Mezzo.Compose.Harmony
Description : Harmony composition units
Copyright : ( c )
License : MIT
--
-- Maintainer :
-- Stability : experimenta... | null | https://raw.githubusercontent.com/DimaSamoz/mezzo/13365da8907a714e34540f7a1d99898b67816cc9/src/Mezzo/Compose/Harmony.hs | haskell | ---------------------------------------------------------------------------
|
Module : Mezzo.Compose.Harmony
Maintainer :
Stability : experimental
Portability : portable
Literals for chords and progressions.
---------------------------------------------------------------------------
* Functional ... | # LANGUAGE TemplateHaskell , ScopedTypeVariables #
Description : Harmony composition units
Copyright : ( c )
License : MIT
module Mezzo.Compose.Harmony where
import Mezzo.Model
import Mezzo.Compose.Types
import Mezzo.Compose.Builder
import Mezzo.Compose.Templates
import Mezzo.Compose.Basic
imp... |
2f03668eca6eaf1747be335a7e13efb9ecf34c6b51c3ea858f0f1df7988b82b1 | anuyts/menkar | Codes.hs | # LANGUAGE MultiParamTypeClasses , PolyKinds , DataKinds , TypeFamilies , RankNTypes , ConstraintKinds , GADTs ,
FlexibleInstances , TypeInType , TypeOperators #
FlexibleInstances, TypeInType, TypeOperators #-}
module Menkar.Syntax.Codes where
import Data.Kind
import Data.Type.Natural (Nat(..))
import Data.Maybe
im... | null | https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/obsolete/Menkar/Syntax/Codes.hs | haskell | -----------------------------------------
-----------------------------------------
-----------------------------------------
-----------------------------------------
-----------------------------------------
-----------------------------------------
----------------------------------------- | # LANGUAGE MultiParamTypeClasses , PolyKinds , DataKinds , TypeFamilies , RankNTypes , ConstraintKinds , GADTs ,
FlexibleInstances , TypeInType , TypeOperators #
FlexibleInstances, TypeInType, TypeOperators #-}
module Menkar.Syntax.Codes where
import Data.Kind
import Data.Type.Natural (Nat(..))
import Data.Maybe
im... |
f240cdde1ff231e4fe3ce5ff1a3c9efe3726e7303a201b694d3404b13e1d8041 | Helium4Haskell/helium | LotsOfDuplicates.hs | module LotsOfDuplicates where
infixr 5 +++
infixr 5 +++
infixr 5 +++
data A = B
data A = B
showA :: Int
showA = undefined
showA :: ()
showA = undefined
a :: A
a = B
(+++) = undefined
f :: Int
f :: Int
map = 3
map = 5
data B = C
data B = D
f :: B Int
f = C
g (C 3) = 5
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticerrors/LotsOfDuplicates.hs | haskell | module LotsOfDuplicates where
infixr 5 +++
infixr 5 +++
infixr 5 +++
data A = B
data A = B
showA :: Int
showA = undefined
showA :: ()
showA = undefined
a :: A
a = B
(+++) = undefined
f :: Int
f :: Int
map = 3
map = 5
data B = C
data B = D
f :: B Int
f = C
g (C 3) = 5
| |
ed657f7d08b3770e3ff95089266a1180541c0eb096d1c94ed4df21e462ba64e3 | ygrek/mldonkey | xml_types.ml | (* moved from xml.ml *)
type xml =
| Element of (string * (string * string) list * xml list)
| PCData of string
type error_pos = {
eline : int;
eline_start : int;
emin : int;
emax : int;
}
type error_msg =
| UnterminatedComment
| UnterminatedString
... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/utils/xml-light/xml_types.ml | ocaml | moved from xml.ml
moved from xml_lexer.mll |
type xml =
| Element of (string * (string * string) list * xml list)
| PCData of string
type error_pos = {
eline : int;
eline_start : int;
emin : int;
emax : int;
}
type error_msg =
| UnterminatedComment
| UnterminatedString
| UnterminatedEnt... |
d61e2f04531c99c6772155c2b4d6703d44a8bdce986bbcdad0ff7bf1ee811279 | neel-krishnaswami/adjs | js.ml | Abstract Syntax for a fragment of Javascript
Our goal is to translate terms of our lambda - calculus into Javascript .
This is slightly complicated since Javascript has a statement / expression
distinction , and the lambda calculus does n't . Furthermore , it would be
nice if we could generate re... | null | https://raw.githubusercontent.com/neel-krishnaswami/adjs/8c892658d56461e0ee7135d6776db13c8d80c72d/js.ml | ocaml | prec is the current precedence | Abstract Syntax for a fragment of Javascript
Our goal is to translate terms of our lambda - calculus into Javascript .
This is slightly complicated since Javascript has a statement / expression
distinction , and the lambda calculus does n't . Furthermore , it would be
nice if we could generate re... |
c53df76dc0f4dda485abda5da89417f8b2300082cc7f16a585444626c171e62a | jgoerzen/twidge | Setup.hs | # LANGUAGE CPP #
Copyright ( C ) 2010 - 2013 < >
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 pro... | null | https://raw.githubusercontent.com/jgoerzen/twidge/1efa65da2c2c21fbed05590f4a22b34c9085244f/Commands/Setup.hs | haskell | ------------------------------------------------
setup
------------------------------------------------ | # LANGUAGE CPP #
Copyright ( C ) 2010 - 2013 < >
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 pro... |
e90bb5c5519b56ed1989632a209fa0db5eccbe7196edb37632dc327672a00c5f | chetmurthy/ensemble | mexchange.ml | (**************************************************************)
MEXCHANGE.ML : Utilities for the Exchange protocol
Author : Ohad Rodeh , 6/2000
(*************************************************************************)
open Shared
open Util
open Trans
(************************************************************... | null | https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/util/mexchange.ml | ocaml | ************************************************************
***********************************************************************
***********************************************************************
***********************************************************************
Endpt.id
Endpt.id
Shared.DH.pub_key
The me... | MEXCHANGE.ML : Utilities for the Exchange protocol
Author : Ohad Rodeh , 6/2000
open Shared
open Util
open Trans
let name = Trace.filel "MEXCHANGE"
let failwith s = Trace.make_failwith name s
let log = Trace.log name
type key = string
type nonce = int * string
type inner_msg =
| Piece of src * Addr.set * no... |
0d770a01ac6d5cc649f27b15642c6145c67ab00e25e8d76e391d28795dc220d4 | rmloveland/scheme48-0.53 | command.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
; Interpreting commands.
; Commands begin with a comma because it's an unshifted key and because
; someone else (I can't remember who) was already using it as a command
; prefix.
(define command-prefix #\,)
; Fire up the processor.
;
; The double-paren a... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/env/command.scm | scheme | Interpreting commands.
Commands begin with a comma because it's an unshifted key and because
someone else (I can't remember who) was already using it as a command
prefix.
Fire up the processor.
The double-paren around the WITH-HANDLER is because it returns a
thunk which is the thing to do after the command-proc... | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
(define command-prefix #\,)
There are two version , one for an initial start and the other for restarting
(define (start-command-processor resume-args start-thunk)
(restart-command-processor resume-args #f start-thunk))
(define (restart-command-pro... |
8840b8debe70dab96200cf187f16d72e4ed9b7bad710b0a121a4acd96c3b1547 | coord-e/ad-hoc-poly | Kind.hs | {-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeFamilies #-}
module AST.Kind where
import Reporting.Report
import Data.Functor.Foldable
import Data.Functor.Foldable.TH
data Ki... | null | https://raw.githubusercontent.com/coord-e/ad-hoc-poly/cb436ede2ac4f564cddd96fcab879c1ebc7a379e/src/AST/Kind.hs | haskell | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveTraversable #
# LANGUAGE TypeFamilies #
Report instances | # LANGUAGE TemplateHaskell #
module AST.Kind where
import Reporting.Report
import Data.Functor.Foldable
import Data.Functor.Foldable.TH
data Kind
= Star
| Constraint
| Arrow Kind Kind
deriving Show
makeBaseFunctor ''Kind
instance Report Kind where
report = cata go
w... |
59a2d004af30134656e624f8214de7c23fa7655b9d9cf9e15fed3eb5c95b73f6 | ocurrent/ocaml-multicore-ci | local.ml | (* Utility program for testing the CI pipeline on a local repository. *)
let solver = Ocaml_multicore_ci.Backend_solver.local ()
let () =
Unix.putenv "DOCKER_BUILDKIT" "1";
Unix.putenv "PROGRESS_NO_TRUNC" "1";
Prometheus_unix.Logging.init ()
let make_pipeline repos =
let repos =
repos |> List.map (fun re... | null | https://raw.githubusercontent.com/ocurrent/ocaml-multicore-ci/d46eecaf7269283a4b95ee40d2a9d6c7ec34a7bf/service/local.ml | ocaml | Utility program for testing the CI pipeline on a local repository.
Command-line parsing |
let solver = Ocaml_multicore_ci.Backend_solver.local ()
let () =
Unix.putenv "DOCKER_BUILDKIT" "1";
Unix.putenv "PROGRESS_NO_TRUNC" "1";
Prometheus_unix.Logging.init ()
let make_pipeline repos =
let repos =
repos |> List.map (fun repo -> Current_git.Local.v (Fpath.v repo))
in
match repos with
| [] ... |
74f094a06c6d5c84b8fb954a195378333c9c6dd010517ec00c7a20ad7292fd7d | haskell-tools/haskell-tools | TH.hs | # LANGUAGE ScopedTypeVariables , TypeApplications , TypeFamilies #
| Functions that convert the Template - Haskell - related elements of the GHC AST to corresponding elements in the - tools AST representation
module Language.Haskell.Tools.BackendGHC.TH where
import Control.Monad.Reader (asks)
import ApiAnnotation ... | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/backend-ghc/Language/Haskell/Tools/BackendGHC/TH.hs | haskell | the lexer does not provide us with tokens '[', '|' and '|]'
assume that there are no white spaces ain the head and the end of the quasi quote
| TODO: easier with splice decoration | # LANGUAGE ScopedTypeVariables , TypeApplications , TypeFamilies #
| Functions that convert the Template - Haskell - related elements of the GHC AST to corresponding elements in the - tools AST representation
module Language.Haskell.Tools.BackendGHC.TH where
import Control.Monad.Reader (asks)
import ApiAnnotation ... |
d483a3488ab27708b9b8dfa9d05fa16eacbc4bb37464f4311f1967304afcca12 | nvim-treesitter/nvim-treesitter | indents.scm | [
(pool)
(rule)
(build)
] @indent
| null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/a7c0c1764b0b583d0597108dd7d48bc5c0f98c81/queries/ninja/indents.scm | scheme | [
(pool)
(rule)
(build)
] @indent
| |
bf4af2bcb4b814cac41c945d318f31e8c66be28cdf3a4476ea62da7509685836 | mdunnio/coinbase-pro | API.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module CoinbasePro.Authenticated.API
( accounts
, singleAccount
, accountHistory
, accountHolds
, listOrders
, getOrder
, getClientOrder
, placeOrder
, cancelOrder
, cancelAll
, fills
, fe... | null | https://raw.githubusercontent.com/mdunnio/coinbase-pro/5d5fa95e66481a974786ef362a4ea55ba94c63a9/src/lib/CoinbasePro/Authenticated/API.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module CoinbasePro.Authenticated.API
( accounts
, singleAccount
, accountHistory
, accountHolds
, listOrders
, getOrder
, getClientOrder
, placeOrder
, cancelOrder
, cancelAll
, fills
, fe... | |
a40fed8049e398df7c5a9c2f4e69716241c77858f2cf839d932c4b182271840c | foxhound-systems/eved | Options.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
module Web.Eved.Options
where
import qualified Data.ByteString as B
import Data.Coe... | null | https://raw.githubusercontent.com/foxhound-systems/eved/95116c4bdcff0b81f4c79fb550cddd3f525ed09a/src/Web/Eved/Options.hs | haskell | # LANGUAGE LambdaCase # | # LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
module Web.Eved.Options
where
import qualified Data.ByteString as B
import Data.Coerce (coerce)
import qualified Da... |
e9346808967ffeffd9ab29fb9462c01ce201ae22ce149b0aea492af9bc3288f8 | janestreet/universe | ppx_xml_conv.mli | open Ppxlib
val xml : Deriving.t
| null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_xml_conv/src/ppx_xml_conv.mli | ocaml | open Ppxlib
val xml : Deriving.t
| |
5e2bce3ef7ebbd36cf59f744aaa2ecedd9a10d290fab23ba376fda7226050076 | cmahon/interactive-brokers | IBBench.hs | module API.IBBench (benchmarks) where
import Criterion
import API.IB ()
benchmarks :: [Benchmark]
benchmarks = []
| null | https://raw.githubusercontent.com/cmahon/interactive-brokers/cf6c1128b3f44559b868bc346e76354f8ca4add6/benchmark/API/IBBench.hs | haskell | module API.IBBench (benchmarks) where
import Criterion
import API.IB ()
benchmarks :: [Benchmark]
benchmarks = []
| |
47d08e31db17ada664bf7d1371fa1639a5477c8670f4b9f70cfb04edf9c676ea | stabilized/clojurescript | node.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the t... | null | https://raw.githubusercontent.com/stabilized/clojurescript/f38f141525576b2a89cde190f25f9cf2fc4c418a/src/clj/cljs/repl/node.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
ter... | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns cljs.repl.node
(:require [clojure.string :as string]
[clojure.java.io :as io]
[cljs.util :as util]
[cljs.analyzer :as ana]
[cljs.compiler :as comp]
[cljs.repl :as repl... |
85b1c6c7aa1910541b4e728432a0ce603a387cf7ea7b96040c9369d5f6c258e1 | daypack-dev/daypack-lib | int64_utils.ml | let ( +^ ) = Int64.add
let ( -^ ) = Int64.sub
let ( /^ ) = Int64.div
let ( *^ ) = Int64.mul
let div_round_up a b = (a +^ b -^ 1L) /^ b
| null | https://raw.githubusercontent.com/daypack-dev/daypack-lib/63fa5d85007eca73aa6c51874a839636dd0403d3/src/int64_utils.ml | ocaml | let ( +^ ) = Int64.add
let ( -^ ) = Int64.sub
let ( /^ ) = Int64.div
let ( *^ ) = Int64.mul
let div_round_up a b = (a +^ b -^ 1L) /^ b
| |
2e1eaf993a44087510a27a47a6a671dd749b901565c9705338ad503e84f452a4 | rowangithub/DOrder | fil1.ml | let rec loop i x =
if (Random.bool ()) then
(assert (x = 0);
loop (i+1) x)
else
assert (x = 0)
let main n =
let x = 0 in
if n > 0 then
let i = 0 in
loop i x
else ()
let _ = main 2
let _ = main (-2) | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/mcmc/fil1.ml | ocaml | let rec loop i x =
if (Random.bool ()) then
(assert (x = 0);
loop (i+1) x)
else
assert (x = 0)
let main n =
let x = 0 in
if n > 0 then
let i = 0 in
loop i x
else ()
let _ = main 2
let _ = main (-2) | |
da6af3cbdaea4b35666b9da135436d28cc85709652af6ffb696b5d89b1b7d0d2 | realworldocaml/examples | thread_experiments.ml | open Core.Std
open Async.Std
let log_delays thunk =
let start = Time.now () in
let print_time () =
let diff = Time.diff (Time.now ()) start in
Caml.Printf.printf ".%!";
printf "%s, " (Time.Span.to_string diff)
in
let d = thunk () in
Clock.every (sec 0.1) ~stop:d print_time;
d >>| fun () -> prin... | null | https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/async/thread_experiments.ml | ocaml | open Core.Std
open Async.Std
let log_delays thunk =
let start = Time.now () in
let print_time () =
let diff = Time.diff (Time.now ()) start in
Caml.Printf.printf ".%!";
printf "%s, " (Time.Span.to_string diff)
in
let d = thunk () in
Clock.every (sec 0.1) ~stop:d print_time;
d >>| fun () -> prin... | |
c3eb694505bb188edf5e1758e8fe01183fdb29dc29267d4d8d8382059a89a425 | fortytools/holumbus | Client.hs | module Main
(
main
)
where
-- the mr facade
import Holumbus.MapReduce.Examples.MandelbrotSet.SimpleDMapReduceIO
-- mandel libs
import Holumbus.MapReduce.Examples.MandelbrotSet.DMandel
import Holumbus.MapReduce.Examples.MandelbrotSet.ImageTypes hiding (Image)
holumbus libs
import Holumbus.Common.Logging
syste... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/mapreduce/Examples2/Mandelbrot-set/Mandelbrot-set_Presi/Client.hs | haskell | the mr facade
mandel libs
read command line arguments
call map reduce
debugM localLogger $ show image
make the image
generate the pixlist
| module Main
(
main
)
where
import Holumbus.MapReduce.Examples.MandelbrotSet.SimpleDMapReduceIO
import Holumbus.MapReduce.Examples.MandelbrotSet.DMandel
import Holumbus.MapReduce.Examples.MandelbrotSet.ImageTypes hiding (Image)
holumbus libs
import Holumbus.Common.Logging
system libs
import System.Environment... |
caf2eca9eebd86f09a025f172d34df1a001a8efb958e8a5a6936869f19109fd3 | tomhanika/conexp-clj | widgets.clj | ;; Copyright ⓒ the conexp-clj developers; all rights reserved.
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bou... | null | https://raw.githubusercontent.com/tomhanika/conexp-clj/5e4c15697f06446f925f53d1d143528155d7dd3a/src/main/clojure/conexp/gui/editors/context_editor/widgets.clj | clojure | Copyright ⓒ the conexp-clj developers; all rights reserved.
The use and distribution terms for this software are covered by the
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not re... | Eclipse Public License 1.0 ( -1.0.php )
This code has been written by
(ns conexp.gui.editors.context-editor.widgets
(:require [clojure.string :as string]
[conexp.base :refer :all]
[conexp.gui.util :refer :all])
(:import [java.awt Dimension FlowLayout Insets Toolkit]
[java.... |
205f11aa38fec4096467afdb8088e1e0d9418521c090849fe1683ab9a45f4dd1 | denisidoro/beavr | seq.cljs | (ns quark.collection.seq)
(defn mmapcat
[f coll]
(mapcat #(map f %) coll))
| null | https://raw.githubusercontent.com/denisidoro/beavr/dad257d8eb8a29bd51ef928a8c1f09984ab3fc30/src/quark/collection/seq.cljs | clojure | (ns quark.collection.seq)
(defn mmapcat
[f coll]
(mapcat #(map f %) coll))
| |
1ba4a3e3f63ac8d31a6d2d389291960d0dc5170542985fa30494112558f13989 | Bwooce/open-cgf | test_udp_client.erl | %%%-------------------------------------------------------------------
%%% File : test_udp_client.erl
%%% Author : root <>
%%% Description : Minimal UDP client.
%%%
Created : 13 May 2008 by root < >
%%%-------------------------------------------------------------------
-module(test_udp_client).
-behaviour(gen_s... | null | https://raw.githubusercontent.com/Bwooce/open-cgf/929f7e280493ca4bc47be05bb931044ee1321594/test/test_udp_client.erl | erlang | -------------------------------------------------------------------
File : test_udp_client.erl
Author : root <>
Description : Minimal UDP client.
-------------------------------------------------------------------
API
gen_server callbacks
====================================================================
A... | Created : 13 May 2008 by root < >
-module(test_udp_client).
-behaviour(gen_server).
-include("open-cgf.hrl").
-export([start_link/2, send/2, register/1, close/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-record(state, {socket, owner_pid}).
-define(SERVER, ... |
4b3061c5ab93a54b21c9c4783432f282e074187bdc02322a1091f3c5c185286e | FreeProving/free-compiler | Frontend.hs | # LANGUAGE ExistentialQuantification #
# LANGUAGE TypeApplications #
-- | This module contains the 'Frontend' data type and all available frontends.
module FreeC.Frontend
( Frontend(..)
, FrontendParser
, FrontendSimplifier
, frontends
, showFrontends
, defaultFrontend
) where
import Control.M... | null | https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/exe/FreeC/Frontend.hs | haskell | | This module contains the 'Frontend' data type and all available frontends.
| Type synonym for a parsing function of a 'Frontend'.
| Type synonym for a simplification function of a 'Frontend'.
| Data type that represents a frontend.
^ The name of the frontend.
^ The parsing function that parses the contents of a... | # LANGUAGE ExistentialQuantification #
# LANGUAGE TypeApplications #
module FreeC.Frontend
( Frontend(..)
, FrontendParser
, FrontendSimplifier
, frontends
, showFrontends
, defaultFrontend
) where
import Control.Monad.Extra ( ifM )
import Control.Monad.IO.Class
im... |
9c816012a89088aede6ad94fe84b55392328b39d1e703159b0c518c9e8e47ad9 | whamtet/dogfort | response.cljs | (ns dogfort.util.response)
(def status-codes
{100 "Continue"
101 "Switching Protocols"
200 "OK"
201 "Created"
202 "Accepted"
203 "Non-Authoritative Information"
204 "No Content"
205 "Reset Content"
206 "Partial Content"
300 "Multiple Choices"
301 "Moved Permanently"
302 "Found"
30... | null | https://raw.githubusercontent.com/whamtet/dogfort/75c2908355cc18bf350a5b761d2906e013ee9f94/src/dogfort/util/response.cljs | clojure | (ns dogfort.util.response)
(def status-codes
{100 "Continue"
101 "Switching Protocols"
200 "OK"
201 "Created"
202 "Accepted"
203 "Non-Authoritative Information"
204 "No Content"
205 "Reset Content"
206 "Partial Content"
300 "Multiple Choices"
301 "Moved Permanently"
302 "Found"
30... | |
b985cffe899307a8bbac2f9c35250528cb164506663eae22339e9be628f4a3df | distrap/lambdadrive | ADC.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE RecordWildCards #
module LDrive.ADC where
import Ivory.Language
import Ivory.Stdlib
import Ivory.HW
import Ivory.Tower
import Ivory.BSP.STM32.Interrupt
import Ivory.... | null | https://raw.githubusercontent.com/distrap/lambdadrive/2bbf6b173fbc1c6d1f809ee4f95ec0bf737d7064/src/LDrive/ADC.hs | haskell | ADC2 phase B
ADC3 phase C
ADC readings (adc struct)
isr source
adc_src_t1cc4 M0 c
store raw values for debugging
handle transaction safety manually, might be removed
as it seems to hold that ADC2 isr comes before ADC3
both phases are read at the same time
flip between t1cc4 and t1trgo for adc2 and 3, toggli... | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE RecordWildCards #
module LDrive.ADC where
import Ivory.Language
import Ivory.Stdlib
import Ivory.HW
import Ivory.Tower
import Ivory.BSP.STM32.Interrupt
import Ivory.... |
bd3309c05f16e3a281d87f7f9b14083cab6e577d704087081a85444f0d425910 | vehicle-lang/vehicle | Compile.hs | module Vehicle.Backend.LossFunction.Compile
( LDecl,
DifferentiableLogic,
compile,
)
where
import Control.Monad.Except (MonadError (..))
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.Reader (MonadReader (..), ReaderT (..))
import Data.List.NonEmpty (NonEmpty (..))
import Data.List.NonEmpty q... | null | https://raw.githubusercontent.com/vehicle-lang/vehicle/8db54819fdfd79e4b2b5d77019560a207192a23a/vehicle/src/Vehicle/Backend/LossFunction/Compile.hs | haskell | ------------------------------------------------------------------------------
Compilation
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Main compilation pass
| Compile entire specification (calls compileD... | module Vehicle.Backend.LossFunction.Compile
( LDecl,
DifferentiableLogic,
compile,
)
where
import Control.Monad.Except (MonadError (..))
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.Reader (MonadReader (..), ReaderT (..))
import Data.List.NonEmpty (NonEmpty (..))
import Data.List.NonEmpty q... |
40ddd7a366b44690388de5bdce23c6655c2e5d9f50b8c81566c9766c7915ad4d | blarney-lang/actora | Module.hs | module Module where
-- Standard imports
import Data.List
import Data.Maybe
import System.Directory
import System.Environment
import qualified Data.Set as S
import qualified Data.Map as M
-- Local imports
import Syntax
import Parser
import Descend
-- A simple module system, with a slow implementation
loadModule :: St... | null | https://raw.githubusercontent.com/blarney-lang/actora/a5380662a55952c19f82e08c4dce25ad98390bdf/compiler/Module.hs | haskell | Standard imports
Local imports
A simple module system, with a slow implementation
Determine filename
Add import of prelude
Perform name resolution
Module search paths
Determine module location
Name resolution
Determine imports
Remove duplicate definitions
Resolve names and remove unused definitions
Name re... | module Module where
import Data.List
import Data.Maybe
import System.Directory
import System.Environment
import qualified Data.Set as S
import qualified Data.Map as M
import Syntax
import Parser
import Descend
loadModule :: String -> String -> IO [Decl]
loadModule prefix modName = do
fileName <- searchPaths >>= ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.