_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 |
|---|---|---|---|---|---|---|---|---|
5942f414236232f42895c82a555e6716db1a1c86907267f3da68777ea5b8c459 | feeley/etos | rt-gambit.scm | ; File: "rt-gambit.scm"
Copyright ( C ) 1999 , , , All Rights Reserved .
RunTime library for EtoS - Gambit version
(declare
(standard-bindings)
(extended-bindings)
(block)
(not safe)
(inlining-limit 900)
( inlining - limit 300 )
)
(##define-macro (gensymbol . rest)
`(string->symbol (string-append "... | null | https://raw.githubusercontent.com/feeley/etos/da9f089c1a7232d97827f8aa4f4b0862b7c5551f/compiler/rt-gambit.scm | scheme | File: "rt-gambit.scm"
We can assume here that (erl-sub? x) is true...
Full type tests
Longer arithmetic macros
(let* ((a ,x) (res (fix.u- a ,y)))
(if (and (fix.< res a) (erl-fix? a))
res
(,general-case a ,y)))
chars
integer arithmetic
floating-point arithmetic
abs/1 (Guard BIF)
app... |
Copyright ( C ) 1999 , , , All Rights Reserved .
RunTime library for EtoS - Gambit version
(declare
(standard-bindings)
(extended-bindings)
(block)
(not safe)
(inlining-limit 900)
( inlining - limit 300 )
)
(##define-macro (gensymbol . rest)
`(string->symbol (string-append "$" (symbol->string (gens... |
d5a29d5c1a51ef6eba534babf2f41f71b0a5d7c84a5fd23398039cd3544a0ad9 | biocaml/phylogenetics | newick.mli | include module type of Newick_ast
val from_file : string -> (t, [> error]) result
val from_file_exn : string -> t
val from_string : string -> (t, [> error]) result
val from_string_exn : string -> t
val of_tree :
?node_id:('a -> string option) ->
?node_tags:('a -> tag list) ->
?leaf_id:('b -> string option) -... | null | https://raw.githubusercontent.com/biocaml/phylogenetics/6250d5edcf0930698473c64911e74a300c94e11c/lib/newick.mli | ocaml | include module type of Newick_ast
val from_file : string -> (t, [> error]) result
val from_file_exn : string -> t
val from_string : string -> (t, [> error]) result
val from_string_exn : string -> t
val of_tree :
?node_id:('a -> string option) ->
?node_tags:('a -> tag list) ->
?leaf_id:('b -> string option) -... | |
f5b2138c186c194eeb715db1794804cc454b1924b6d00429e0e3234843d4994c | nikivazou/verified_string_matching | castConcat.hs | #define IncludedcastConcat
@ automatic - instances castConcat @
castConcat :: RString -> RString -> RString -> RString -> List Integer -> Proof
@ : : tg : RString - > xi : RString - > yi : RString - > zi : RString
- > xis : List ( GoodIndex xi tg )
- > { map ( castGoodIndexRight tg xi ( yi... | null | https://raw.githubusercontent.com/nikivazou/verified_string_matching/abdd611a0758467f776c59c3d6c9e4705d36a3a0/src/AutoProofs/castConcat.hs | haskell | #define IncludedcastConcat
@ automatic - instances castConcat @
castConcat :: RString -> RString -> RString -> RString -> List Integer -> Proof
@ : : tg : RString - > xi : RString - > yi : RString - > zi : RString
- > xis : List ( GoodIndex xi tg )
- > { map ( castGoodIndexRight tg xi ( yi... | |
e9c5a9caf15819c5e2ade8fef52e386dbfe2cc602b170e9e3f5b3216a781dc7e | JunSuzukiJapan/cl-reex | default-if-empty.lisp | (in-package :cl-user)
(defpackage cl-reex.operator.default-if-empty
(:use :cl)
(:import-from :cl-reex.observer
:observer
:on-next
:on-error
:on-completed)
(:import-from :cl-reex.observable
:observable
:dispose
:is-active
:set-error
:set-compl... | null | https://raw.githubusercontent.com/JunSuzukiJapan/cl-reex/94928c7949c235b41902138d9e4a5654b92d67eb/src/operator/default-if-empty.lisp | lisp | (in-package :cl-user)
(defpackage cl-reex.operator.default-if-empty
(:use :cl)
(:import-from :cl-reex.observer
:observer
:on-next
:on-error
:on-completed)
(:import-from :cl-reex.observable
:observable
:dispose
:is-active
:set-error
:set-compl... | |
2e842ec14c0058630079794eaf64e552c2a62c02d7fd8d12d10f046785bdd9ab | fulcrologic/statecharts | history_spec.cljc | (ns com.fulcrologic.statecharts.algorithms.v20150901.history-spec
(:require [com.fulcrologic.statecharts.elements :refer
[state initial parallel final transition raise on-entry on-exit
data-model assign script history log]]
[com.fulcrologic.statecharts :as sc]
[com.f... | null | https://raw.githubusercontent.com/fulcrologic/statecharts/9a081be7da28ba9f9e2f7cdca75d1be4c030e3e0/src/test/com/fulcrologic/statecharts/algorithms/v20150901/history_spec.cljc | clojure | (ns com.fulcrologic.statecharts.algorithms.v20150901.history-spec
(:require [com.fulcrologic.statecharts.elements :refer
[state initial parallel final transition raise on-entry on-exit
data-model assign script history log]]
[com.fulcrologic.statecharts :as sc]
[com.f... | |
bfabf815c8cc5a583cccdbb862e58e7f82298332ed4acbc2403c27b7a819135f | chaoxu/fancy-walks | B.hs | {-# OPTIONS_GHC -O2 #-}
import Data.List
import Data.Maybe
import Data.Char
import Data.Array
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (ByteString)
import qualified Dat... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/code.google.com/codejam/Code%20Jam%20Africa%20and%20Arabia%202011/Qualification%20Round/B.hs | haskell | # OPTIONS_GHC -O2 # |
import Data.List
import Data.Maybe
import Data.Char
import Data.Array
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as BS... |
08e26f27336f2ac5ac78f067448a90af1dc323302cb397cb26b3834a583e6a0b | TaylanUB/scheme-srfis | primitive.body.scm | Copyright ( C ) ( 2007 ) . All Rights Reserved .
Made an R7RS library by , Copyright ( C ) 2014 .
;;; Permission is hereby granted, free of charge, to any person obtaining a copy
;;; of this software and associated documentation files (the "Software"), to
deal in the Software without restriction , inclu... | null | https://raw.githubusercontent.com/TaylanUB/scheme-srfis/2d2b306e7a20a7155f639001a02b0870d5a3d3f7/srfi/41/primitive.body.scm | scheme | Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
furnished to do so, subject to the following conditions:
The above copyright notice and t... | Copyright ( C ) ( 2007 ) . All Rights Reserved .
Made an R7RS library by , Copyright ( C ) 2014 .
deal in the Software without restriction , including without limitation the
sell copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Softwar... |
a5024fd9dc1474b37069a6b8dc727a6ca34f975402e1e5edcbc9987c6efd0f17 | fetburner/Coq2SML | ccalgo.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/plugins/cc/ccalgo.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
inductive type
# args
# project... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
open Term
open Name... |
47387a15fe516fede5d424f841224c1bf1293e7b539e0ea3ab7d7a99f715529e | softwarelanguageslab/maf | R5RS_scp1_flip2-5.scm | ; Changes:
* removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((make-flip (lambda ()
(let ((state 0))
(lambda ()
(if (= state 0) (set! state 1) (set! state 0))
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_flip2-5.scm | scheme | Changes:
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
(letrec ((make-flip (lambda ()
(let ((state 0))
(lambda ()
(if (= state 0) (set! state 1) (set! state 0))
state))))
(flip (make-flip)))
... |
4de58734220aebd52373bd36aa7745248ff67e8954319f240418cfb26f41cc84 | aryx/fork-efuns | ebuffer.ml | (*s: core/ebuffer.ml *)
(*s: copyright header2 *)
(***********************************************************************)
(* *)
xlib for
(* *)
F... | null | https://raw.githubusercontent.com/aryx/fork-efuns/4db191f47ae35590725a7ba82b911fd94ff12040/core/ebuffer.ml | ocaml | s: core/ebuffer.ml
s: copyright header2
*********************************************************************
... | xlib for
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Common
open Efuns
type t = Efuns.buffer
let create_bu... |
f3e29132319835ba6d66d1c0f3499d4655dab4a8e7470f06cadb7bdad2dfe44e | haskell/time | TimeZone.hs | module Main where
import Data.Time
main :: IO ()
main = do
zone <- getCurrentTimeZone
putStrLn (timeZoneOffsetString zone)
| null | https://raw.githubusercontent.com/haskell/time/ab2c0c28b8b7a12bce12eedd357a73e39b00afc2/test/TimeZone.hs | haskell | module Main where
import Data.Time
main :: IO ()
main = do
zone <- getCurrentTimeZone
putStrLn (timeZoneOffsetString zone)
| |
e5c28fd041038b24bcf471ff81925849bc54041c95bccbe36290311453b9c880 | glebec/haskell-programming-allen-moronuki | Debug.hs | module Main where
import Control.Monad (forever)
import Network.Socket hiding (recv)
import Network.Socket.ByteString (recv, sendAll)
logAndEcho :: Socket -> IO ()
logAndEcho sock = forever $ do
(soc, _) <- accept sock
NB : blocking
close soc
where
printAndKickback conn = do
msg <- recv conn 1... | null | https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/31-final-project/fingerd/src/Debug.hs | haskell | port | module Main where
import Control.Monad (forever)
import Network.Socket hiding (recv)
import Network.Socket.ByteString (recv, sendAll)
logAndEcho :: Socket -> IO ()
logAndEcho sock = forever $ do
(soc, _) <- accept sock
NB : blocking
close soc
where
printAndKickback conn = do
msg <- recv conn 1... |
4a3ad3981fb28430cefd65c2e4ec8b71afea53d601df6c5ef5fa94b1680722ed | aws-beam/aws-erlang | aws_auditmanager.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
%% @doc Welcome to the Audit Manager API reference.
%%
%% This guide is for developers who need detailed information about the Audit
%% Manager API operations, data types, and errors.
%%
%% Audit Manager is a service that provides... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_auditmanager.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
@doc Welcome to the Audit Manager API reference.
This guide is for developers who need detailed information about the Audit
Manager API operations, data types, and errors.
Audit Manager is a service that provides automated evidence collection so
it to assess the effect... | See -beam/aws-codegen for more details .
that you can continually audit your Amazon Web Services usage . You can use
-module(aws_auditmanager).
-export([associate_assessment_report_evidence_folder/3,
associate_assessment_report_evidence_folder/4,
batch_associate_assessment_report_evidence/3,
... |
db5202dd2786ea3f4d37edba3de25fe84369a947e5863924018c13b79f4c356b | zack-bitcoin/chalang | fractions.erl | -module(fractions).
-export([new/2,negate/1,add/2,sub/2,mul/2,divide/2,to_int/1,test/0, exponent/2, lt/2, gt/2, equal/2, is_fraction/1,sqrt/1]).
-record(f, {top = 0, bottom = 0}).
is_fraction(X) when not is_record(X, f) ->
false;
is_fraction({f, _, Y}) when not is_integer(Y) -> false;
is_fraction({f, Y, _}) when no... | null | https://raw.githubusercontent.com/zack-bitcoin/chalang/a728e6bb9a60ac6eca189ee7d6873a891825fa9a/src/fractions.erl | erlang | this is higher than the highest value we can store in top or bottom.
X = F#f.bottom div IC, | -module(fractions).
-export([new/2,negate/1,add/2,sub/2,mul/2,divide/2,to_int/1,test/0, exponent/2, lt/2, gt/2, equal/2, is_fraction/1,sqrt/1]).
-record(f, {top = 0, bottom = 0}).
is_fraction(X) when not is_record(X, f) ->
false;
is_fraction({f, _, Y}) when not is_integer(Y) -> false;
is_fraction({f, Y, _}) when no... |
edd910a84bd2d07fdf42142c56c6f8ac617ca6c3405b0b2033908664e794d94e | darach/jch-erl | jch.erl | %% -------------------------------------------------------------------
Copyright ( c ) 2014 < darach at gmail dot com >
%%
%% Permission is hereby granted, free of charge, to any person obtaining a
%% copy of this software and associated documentation files (the
" Software " ) , to deal in the Software without re... | null | https://raw.githubusercontent.com/darach/jch-erl/4a6f9d35258f1ed5555792ffd4a3463ea835d1f2/src/jch.erl | erlang | -------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
following conditions:
The above copyright ... | Copyright ( c ) 2014 < darach at gmail dot com >
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to permit
persons to whom the Software is furnished to do so , subject to the
in all copies or substantial portions of ... |
778b0926e1deee5e69b2612a420742fc7c6f88b5d5f288defe8718754c9645aa | rems-project/extract | BinRep.ml | type position = int * int
type field =
Opcode of int * position
| Ifield of string * position
| SplitIfield of string * position * position
| Reserved of position
type t = field list
let pos_to_string (x, y) =
if y = 1
then Printf.sprintf "[%d]" x
else Printf.sprintf "[%d:%d]" x (x+y-1)
(* Opcode are... | null | https://raw.githubusercontent.com/rems-project/extract/5d544e996f9ca7bb0b937d16f7739b0452654d24/src/BinRep.ml | ocaml | Opcode are represented by their integer value, reserved bits by a
* series of '/' and ifields by their name. | type position = int * int
type field =
Opcode of int * position
| Ifield of string * position
| SplitIfield of string * position * position
| Reserved of position
type t = field list
let pos_to_string (x, y) =
if y = 1
then Printf.sprintf "[%d]" x
else Printf.sprintf "[%d:%d]" x (x+y-1)
let parse_fie... |
fdebb155952584246a2cf61fd0a9a635df0b7873381c274998b3f4aea97b3f45 | garycrawford/lein-life | core.clj | (ns {{ns-name}}.controllers.home.core
(:require [{{ns-name}}.views.home :refer [home-view]]
[{{ns-name}}.responses :refer [model-view-200 model-view-404]]
[{{ns-name}}.platform.people-api.core :refer [get-people create-person get-person update-person delete-person]]
[ring.util.anti... | null | https://raw.githubusercontent.com/garycrawford/lein-life/d55f3636950b58b02399ab32eb1f6d81ecfce823/src/leiningen/new/life/site/api/src/controllers/home/core.clj | clojure | (ns {{ns-name}}.controllers.home.core
(:require [{{ns-name}}.views.home :refer [home-view]]
[{{ns-name}}.responses :refer [model-view-200 model-view-404]]
[{{ns-name}}.platform.people-api.core :refer [get-people create-person get-person update-person delete-person]]
[ring.util.anti... | |
b99c422ab62b12125b3b3aa400cf499d13c4b86077a96b15e85acc710075b978 | onyx-platform/onyx | grouping.cljc | (ns onyx.peer.grouping
(:require [onyx.peer.operation :refer [resolve-fn]]
#?(:clj [clj-tuple :as t])))
(defn task-map->grouping-fn [task-map]
(if-let [group-key (:onyx/group-by-key task-map)]
(cond (keyword? group-key)
group-key
(sequential? group-key)
#(select-keys %... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/peer/grouping.cljc | clojure | (ns onyx.peer.grouping
(:require [onyx.peer.operation :refer [resolve-fn]]
#?(:clj [clj-tuple :as t])))
(defn task-map->grouping-fn [task-map]
(if-let [group-key (:onyx/group-by-key task-map)]
(cond (keyword? group-key)
group-key
(sequential? group-key)
#(select-keys %... | |
5e3e4aaf4606edb5a146e0aab32ab3da0c738ddb56dbd46b8c0dda0d46776ee1 | c-cube/qcheck | QCheck_alcotest.mli |
* { 1 Alcotest backend for QCheck }
We use environment variables for controlling QCheck here , since alcotest
does n't seem to provide a lot of flexibility .
- [ QCHECK_VERBOSE ] if " 1 " or " true " , will make tests verbose
- [ QCHECK_SEED ] if an integer , will fix the seed
- [ QCHEC... | null | https://raw.githubusercontent.com/c-cube/qcheck/063c1d74795a24eb77fa661d218c4715382df566/src/alcotest/QCheck_alcotest.mli | ocaml |
* { 1 Alcotest backend for QCheck }
We use environment variables for controlling QCheck here , since alcotest
does n't seem to provide a lot of flexibility .
- [ QCHECK_VERBOSE ] if " 1 " or " true " , will make tests verbose
- [ QCHECK_SEED ] if an integer , will fix the seed
- [ QCHEC... | |
739c5350469aacfa370fcb8103d92ab5eda20532affc28cf849b9c5a5940d9f1 | karamellpelle/grid | PlatformObject.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/MEnv/Env/PlatformObject.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid 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
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
module MEnv.Env.PlatformObject
(
module MEn... |
c0e7cd826f186c73a26b2956df24d33488e806af443e6d7d391c0a050ba28fc2 | standardsemiconductor/lion | Com.hs |
import Control.Concurrent.Async ( concurrently_ )
import Control.Monad ( forever )
import Data.Functor ( (<&>) )
import System.Environment ( getArgs )
import System.Hardware.Serialport
import System.IO
main :: IO ()
main = com =<< portPath
where
portPath = getArgs <&> \case
... | null | https://raw.githubusercontent.com/standardsemiconductor/lion/7f00f6122f95986f46a5e1c25e4db6ca08709741/lion-soc/app/Com.hs | haskell |
import Control.Concurrent.Async ( concurrently_ )
import Control.Monad ( forever )
import Data.Functor ( (<&>) )
import System.Environment ( getArgs )
import System.Hardware.Serialport
import System.IO
main :: IO ()
main = com =<< portPath
where
portPath = getArgs <&> \case
... | |
013e03eef0d0faed13eadca286dfdb9c7fa04ace49d51b11ce356eea72de2a6c | alexandergunnarson/quantum | dom.cljc | (ns quantum.untyped.ui.style.css.dom
(:require
[clojure.string :as str]
[quantum.untyped.core.fn
:refer [fn->]]
[quantum.untyped.core.spec :as us]
[quantum.untyped.core.type.predicates
:refer [val?]]
[quantum.untyped.ui.dom :as udom]))
#?(:cljs
(defn add-link! [link #_hr... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src-untyped/quantum/untyped/ui/style/css/dom.cljc | clojure | (ns quantum.untyped.ui.style.css.dom
(:require
[clojure.string :as str]
[quantum.untyped.core.fn
:refer [fn->]]
[quantum.untyped.core.spec :as us]
[quantum.untyped.core.type.predicates
:refer [val?]]
[quantum.untyped.ui.dom :as udom]))
#?(:cljs
(defn add-link! [link #_hr... | |
3c22397ad1fbca5ea20459caee11d69c912b2901a778fe7638632dc4db2773ef | Drup/LILiS | calc.mli | (** Small library to evaluate simple arithmetic expressions. *)
*
This library evaluates simple arithmetic expression over floats .
Regular operators ( + , -,*,/,^ ) and some regular functions ( sin , cos , tan , asin , acos , atan , log , log10 , exp , sqrt ) are implemented .
Arithmetic expressions ca... | null | https://raw.githubusercontent.com/Drup/LILiS/df63fbc3ee77b3378ae1ef27715828c3ad892475/calc/calc.mli | ocaml | * Small library to evaluate simple arithmetic expressions.
* Type of binary operators
* Type of unary operators
* Type of tree which represent an arithmetic expression
* Variable environment.
{! Env.usual } contains [ pi ] and [ e ] .
* Evaluate a tree in the given environment.
@raise Unkown_variable if a... |
*
This library evaluates simple arithmetic expression over floats .
Regular operators ( + , -,*,/,^ ) and some regular functions ( sin , cos , tan , asin , acos , atan , log , log10 , exp , sqrt ) are implemented .
Arithmetic expressions can contain variables .
Here is an example of expression : [... |
4cb3d3f924e19ab0982d1f98097de0536dcb82e97c2bb644d243d3d1a9b42704 | kowainik/github-graphql | GitHub.hs | |
Copyright : ( c ) 2020 - 2021 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
GraphQL bindings to GitHub API .
Copyright: (c) 2020-2021 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <>
GraphQL bindings to GitHub API.
-}
module GitHub
* Querying GitHub
module G... | null | https://raw.githubusercontent.com/kowainik/github-graphql/8400190ad443a0454d10efa417b9bef9d434e893/src/GitHub.hs | haskell | * Top-level queries
* Queries connections
** Issues
** Milestones
** Issue or PR labels
* Connection
* Connections fields
** Interfaces
* Low-level AST fields
* General tools to work with API
** Using lenses to change fields
* General types
* General utils | |
Copyright : ( c ) 2020 - 2021 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
GraphQL bindings to GitHub API .
Copyright: (c) 2020-2021 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <>
GraphQL bindings to GitHub API.
-}
module GitHub
* Querying GitHub
module G... |
922d0639c96955492d5f839b9aee6f31165decd942eb34e4e5c45b492e26f28f | smallhadroncollider/brok | Attoparsec.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Brok.Parser.Attoparsec where
import ClassyPrelude
import Data.Attoparsec.Text
lexeme :: Parser a -> Parser a
lexeme p = skipSpace *> p <* skipSpace
tchar :: Char -> Parser Text
tchar ch = singleton <$> char ch
chopt :: Char -> Parser Text
ch... | null | https://raw.githubusercontent.com/smallhadroncollider/brok/bf62288d913af5fc694e683cc247f66426025400/src/Brok/Parser/Attoparsec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
module Brok.Parser.Attoparsec where
import ClassyPrelude
import Data.Attoparsec.Text
lexeme :: Parser a -> Parser a
lexeme p = skipSpace *> p <* skipSpace
tchar :: Char -> Parser Text
tchar ch = singleton <$> char ch
chopt :: Char -> Parser Text
chopt ch = option "" (tchar ch)
many... |
f601a96c4d0092e38c9ab03d25e8f49b18a8bb17193788399ce4a0e6344fc188 | fishcakez/sbroker | sbroker_queue.erl | %%-------------------------------------------------------------------
%%
Copyright ( c ) 2015 , < >
%%
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 License at
%%
%% -2.0
... | null | https://raw.githubusercontent.com/fishcakez/sbroker/10f7e3970d0a296fbf08b1d1a94c88979a7deb5e/src/sbroker_queue.erl | erlang | -------------------------------------------------------------------
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,
KIND, either express or implied. See the Lic... | Copyright ( c ) 2015 , < >
This file is provided to you under the Apache License ,
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
A custom queue must implement the ` sbroker_queue ' behaviour . The first
-callback init(InternalQueue :... |
0e4ee768c9daafa8cbe0483d73eb039f1858d0ea002673979dca6a19417cead2 | brendanhay/amazonka | GeoMatchStatement.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-wafv2/gen/Amazonka/WAFV2/Types/GeoMatchStatement.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Amazonka.WAFV2.Types.GeoMatchStatement
Stability : auto-generated
| A rule statement that labels web requests by country and region and that
matches against web requests based on country code. A geo match rule
labels every request that it in... | # 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... |
02fc8f16ce48da8feb198de5d8cd8c8fef546eec91fc7faa3a5ff93e1301afa7 | acieroid/scala-am | unfringe.scm | (define (unfringe-1 l)
(cond ((null? l) '())
((null? (cdr l)) (list (car l)))
(else (list (car l)
(unfringe-1 (cdr l))))))
(define (unfringe-2 l)
(define (pair l)
(cond ((null? l) '())
((null? (cdr l)) (list l))
(else (cons (list (car l) (cadr l))
... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/scp1/unfringe.scm | scheme | (define (unfringe-1 l)
(cond ((null? l) '())
((null? (cdr l)) (list (car l)))
(else (list (car l)
(unfringe-1 (cdr l))))))
(define (unfringe-2 l)
(define (pair l)
(cond ((null? l) '())
((null? (cdr l)) (list l))
(else (cons (list (car l) (cadr l))
... | |
9c5a6c8b1edc4286df33403941d0fbef243f50e65971178e100ff26af5757cfe | alex-hhh/data-frame | csv.rkt | #lang racket/base
csv.rkt -- read and write data frames to CVS files
;;
;; This file is part of data-frame -- -hhh/data-frame
Copyright ( c ) 2018 , 2021 < >
;;
;; 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
... | null | https://raw.githubusercontent.com/alex-hhh/data-frame/b32142ae8ccd206262f1968cfb141926b2c9d8e7/private/csv.rkt | racket |
This file is part of data-frame -- -hhh/data-frame
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
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
without even... | #lang racket/base
csv.rkt -- read and write data frames to CVS files
Copyright ( c ) 2018 , 2021 < >
the Free Software Foundation , either version 3 of the License , or ( at your
You should have received a copy of the GNU Lesser General Public License
(require racket/contract
racket/format
... |
b5f1e13d6ef1e7d15f1fdbabe2d4c93ae9a779baaf7ab48a2fee8c7b0a4fb3e1 | Kappa-Dev/KappaTools | widget_export.mli | module Html = Tyxml_js.Html5
type handler =
{ suffix : string;
label: string;
export : string -> unit }
type configuration =
{ id : string ;
handlers : handler list;
show : bool React.signal }
val content:
configuration ->
[< Html_types.div_content_fun > `Form `Table ] Html.elt
val export_... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/fbbfb3e62f9b80b0fb95675a4c1c28c1bd658bfd/gui/widget_export.mli | ocaml | module Html = Tyxml_js.Html5
type handler =
{ suffix : string;
label: string;
export : string -> unit }
type configuration =
{ id : string ;
handlers : handler list;
show : bool React.signal }
val content:
configuration ->
[< Html_types.div_content_fun > `Form `Table ] Html.elt
val export_... | |
322f73faeff204d37e54aa7e5b1636fd21d7bbade2838ae37ceaffeb256014ae | hasufell/hsfm | MyPrelude.hs | -
HSFM , a written in Haskell .
Copyright ( C ) 2016
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation .
This program is distributed in the hope that it will be useful ,
but... | null | https://raw.githubusercontent.com/hasufell/hsfm/322c766ae534fb21e3427d2845011123ddb90952/src/HSFM/Utils/MyPrelude.hs | haskell | }
|Turns any list into a list of the same length with the values
being the indices. | -
HSFM , a written in Haskell .
Copyright ( C ) 2016
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation .
This program is distributed in the hope that it will be useful ,
but... |
9d26ff47a3cf6c9dbf76e03ed480b2d7a5f8eca82cf6e7957c4fb7458f603838 | ocaml-ppx/ocamlformat | variants.ml | type t =
[ (* xx *) `(* yy *) A (* zz *)
| (* xx *) `B (* zz *)
| `(* yy *) C (* zz *) ]
let (* xx *) `(* yy *) A (* zz *) = x
let (* xx *) `B (* zz *) = x
let `(* yy *) C (* zz *) = x
let _ = (* xx *) `(* yy *) A (* zz *)
let _ = (* xx *) `B (* zz *)
let _ = `(* yy *) C (* zz *)
| null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/11e124aac33d74762d6f76fe466708b7be504e92/test/passing/tests/variants.ml | ocaml | xx
yy
zz
xx
zz
yy
zz
xx
yy
zz
xx
zz
yy
zz
xx
yy
zz
xx
zz
yy
zz | type t =
|
955091f082804ec9432ad9ab230ac5f29181b316b0e3709893805d4975e6f041 | dbuenzli/remat | api_gen_repo.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2015 . All rights reserved .
Distributed under the BSD3 license , see license at the end of the file .
% % NAME%% release % % ---------------------------------------------------------------------------
Cop... | null | https://raw.githubusercontent.com/dbuenzli/remat/28d572e77bbd1ad46bbfde87c0ba8bd0ab99ed28/src-remat/api_gen_repo.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2015 . All rights reserved .
Distributed under the BSD3 license , see license at the end of the file .
% % NAME%% release % % ---------------------------------------------------------------------------
Cop... | |
b12b8c3e51109f2388881a05f79eb6eaef861e70247e69b2b696c72bc995b834 | meh/clj-sockets | unix.clj | ;; Copyleft (ɔ) meh. -
;;
;; This file is part of clj-sockets - -sockets
;;
;; clj-sockets is free software: you can redistribute it and/or modify it under
the terms of the Lesser GNU General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option )
;; an... | null | https://raw.githubusercontent.com/meh/clj-sockets/ad83aa4af10118fd77981a20e219f7539001c185/src/sockets/unix.clj | clojure | Copyleft (ɔ) meh. -
This file is part of clj-sockets - -sockets
clj-sockets is free software: you can redistribute it and/or modify it under
any later version.
clj-sockets is distributed in the hope that it will be useful, but WITHOUT
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PART... | the terms of the Lesser GNU General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option )
You should have received a copy of the Lesser GNU General Public License
(ns sockets.unix
(:refer-clojure :exclude [send set get])
(:require [sockets
... |
b261c8a8af6009e9e8698030b77a3e775d8150be110bb6b8dad1fbdd11eca4b3 | tiensonqin/lymchat | ring.clj | (ns api.middlewares.ring
"A standard set of commonly used ring middleware"
(:require [api.middlewares.auth :refer [wrap-jwt-auth wrap-authorization]]
[api.schema.human :refer [human-explain]]
[api.services.slack :refer [error]]
[api.util :refer [doc app-key-exists? get-platform-b... | null | https://raw.githubusercontent.com/tiensonqin/lymchat/824026607d30c12bc50afb06f677d1fa95ff1f2f/api/src/api/middlewares/ring.clj | clojure | (ns api.middlewares.ring
"A standard set of commonly used ring middleware"
(:require [api.middlewares.auth :refer [wrap-jwt-auth wrap-authorization]]
[api.schema.human :refer [human-explain]]
[api.services.slack :refer [error]]
[api.util :refer [doc app-key-exists? get-platform-b... | |
816971adf3dcaa7ddd254af7f2f65efd660a5cbbd6a2dac9d63884664df5b299 | FdelMazo/cl-aristid | cl-aristid.lisp | (in-package #:cl-aristid)
(setq *random-state* (make-random-state t))
(defun -> (old new &optional prob)
#'(lambda (seq)
(if (<= (random 1.00) prob)
(substitute new old seq)
seq)))
(defmacro defrule (sym -> replace &key (prob 1.00))
`(-> ',sym ',replace ,prob))
(defun aristid (&key (an... | null | https://raw.githubusercontent.com/FdelMazo/cl-aristid/d26c642212548165a4ab4aee39644b231ff6e797/cl-aristid.lisp | lisp | (in-package #:cl-aristid)
(setq *random-state* (make-random-state t))
(defun -> (old new &optional prob)
#'(lambda (seq)
(if (<= (random 1.00) prob)
(substitute new old seq)
seq)))
(defmacro defrule (sym -> replace &key (prob 1.00))
`(-> ',sym ',replace ,prob))
(defun aristid (&key (an... | |
a8fa5895e361476acc69fb2ae974d866e96f5107e1564fd905c6613106e08904 | shortishly/tansu | tansu_api.erl | Copyright ( c ) 2016 < >
%%
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... | null | https://raw.githubusercontent.com/shortishly/tansu/154811fff81855419de9af380c81c7ae14e435d0/src/tansu_api.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissi... | Copyright ( c ) 2016 < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(tansu_api).
-export([info/0]).
-export([kv_delete/1]).
-export([kv_get/1]).
-export([kv_get_children_of/1]).
-export([kv_set/2]).
-export... |
b9158da971c703eec2e5a200119a9d0925a453d6ead09b9d7247c18383f02d11 | OCamlPro/typerex-lldb | LLDBOCamlCode.ml | (**************************************************************************)
(* *)
(* OCamlPro TypeRex *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/typerex-lldb/3be12b69f30127bbf8a5dd483a6bfbbd6045ba0e/tools/ocp-lldb/LLDBOCamlCode.ml | ocaml | ************************************************************************
OCamlPro TypeRex
This file is distributed ... | Copyright OCamlPro 2011 - 2016 . All rights reserved .
( GNU Public Licence version 3.0 ) .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE... |
ce4d8214e2ca5e97c8343468e414bd60e17f0461d4c3ac933104b417624646ae | hemmi/coq2scala | topconstr.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/interp/topconstr.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
********************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Util
open Names
... |
fe30dcb623dbe995c1905f16bc7eaba2491229814aaab8cfb57d1a521d4889be | ilya-klyuchnikov/lambdapi | Parser.hs | module LambdaPi.Parser where
import Data.List
import Text.ParserCombinators.Parsec hiding (parse, State)
import qualified Text.ParserCombinators.Parsec as P
import Text.ParserCombinators.Parsec.Token
import Text.ParserCombinators.Parsec.Language
import Common
import LambdaPi.AST
lambdaPi = makeTokenParser (haskellSt... | null | https://raw.githubusercontent.com/ilya-klyuchnikov/lambdapi/79ddf21581e03ea34a94cc00ffd5c8684d845ed9/src/LambdaPi/Parser.hs | haskell | reserved lambdaPi "." | module LambdaPi.Parser where
import Data.List
import Text.ParserCombinators.Parsec hiding (parse, State)
import qualified Text.ParserCombinators.Parsec as P
import Text.ParserCombinators.Parsec.Token
import Text.ParserCombinators.Parsec.Language
import Common
import LambdaPi.AST
lambdaPi = makeTokenParser (haskellSt... |
8ddc811f0a25492dc70386bcf72cc53e2365ca65fa53543d9318ec6e3837caa7 | GaloisInc/cryptol | TypeCheck.hs | -- |
Module : Cryptol .
Copyright : ( c ) 2013 - 2016 Galois , Inc.
-- License : BSD3
-- Maintainer :
-- Stability : provisional
-- Portability : portable
# LANGUAGE PatternGuards , OverloadedStrings #
module Cryptol.TypeCheck
( tcModule
, tcModuleInst
, tcExpr
, tcDecls
, Infer... | null | https://raw.githubusercontent.com/GaloisInc/cryptol/8cca24568ad499f06032c2e4eaa7dfd4c542efb6/src/Cryptol/TypeCheck.hs | haskell | |
License : BSD3
Maintainer :
Stability : provisional
Portability : portable
| Check a module instantiation, assuming that the functor has already
been checked.
XXX: This will change
^ renaming environment of functor
^ functor
^ params
^ TC settings
^ new version of instance | Module : Cryptol .
Copyright : ( c ) 2013 - 2016 Galois , Inc.
# LANGUAGE PatternGuards , OverloadedStrings #
module Cryptol.TypeCheck
( tcModule
, tcModuleInst
, tcExpr
, tcDecls
, InferInput(..)
, InferOutput(..)
, SolverConfig(..)
, defaultSolverConfig
, NameSeeds
, nameSeeds
... |
f365f443ac4588bf6dda863d5ab94b1dc03f69497466ad98d25972f25f830d1b | reflectionalist/S9fES | sublist.scm | Scheme 9 from Empty Space , Function Library
By , 2010
; Placed in the Public Domain
;
( sublist list ) = = > list
;
; Return a fresh list formed from the members of LIST beginning with
index INTEGER1 ( inclusive ) and ending with index INTEGER2 ( exclusive ) .
;
Example : ( sublist ' ( a b c d e ... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/sublist.scm | scheme | Placed in the Public Domain
Return a fresh list formed from the members of LIST beginning with
| Scheme 9 from Empty Space , Function Library
By , 2010
( sublist list ) = = > list
index INTEGER1 ( inclusive ) and ending with index INTEGER2 ( exclusive ) .
Example : ( sublist ' ( a b c d e ) 2 4 ) = = > ( c d )
( sublist ' ( a b c d e ) 2 2 ) = = > ( )
(define (sublist x ... |
51978aca2f6af0ef2659b2be271f1332165a7d7ce6715b5511f6de0858ef813e | mfoemmel/erlang-otp | wxAuiDockArt.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/wxAuiDockArt.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(wxAuiDockArt).
-include("wxe.hrl"... |
5a4f57e8c062821b03c9c703e3e8351cec2543dce3c04bcc3af20f9e94278209 | racket/racket7 | for-body.rkt | #lang racket/base
(require (for-template racket/private/for))
(provide split-for-body)
| null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/syntax/for-body.rkt | racket | #lang racket/base
(require (for-template racket/private/for))
(provide split-for-body)
| |
eaff29fac1bfe336070f912d99753df4006bd86994dc584ec2f029617b633a13 | scalaris-team/scalaris | l_on_cseq_SUITE.erl | 2012 - 2016 Zuse Institute Berlin
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
di... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/test/l_on_cseq_SUITE.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2012 - 2016 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@doc Unit tests for l_on_cseq
-module(l_on_cseq_SUITE).
-author('').
-compile(export_all).
-include("scalaris... |
d43dcbca4ccabfa0abc6ba667f63995308c0326beff0036e0744d01e4b51561a | snoyberg/why-you-should-use-stm | solution.hs | #!/usr/bin/env stack
-- stack --resolver lts-13.21 script
import Control.Concurrent.STM
import System.IO.Unsafe -- yeah baby!
counter :: TVar Int
counter = unsafePerformIO $ newTVarIO 0
# NOINLINE counter #
main :: IO ()
main = do
atomically $ modifyTVar' counter (+ 1)
atomically $ modifyTVar' counter (+ 1)
ato... | null | https://raw.githubusercontent.com/snoyberg/why-you-should-use-stm/adf3366aebd6daf1dd702ed4cad1c2303d296afc/exercises/09-global-variables/solution.hs | haskell | stack --resolver lts-13.21 script
yeah baby! | #!/usr/bin/env stack
import Control.Concurrent.STM
counter :: TVar Int
counter = unsafePerformIO $ newTVarIO 0
# NOINLINE counter #
main :: IO ()
main = do
atomically $ modifyTVar' counter (+ 1)
atomically $ modifyTVar' counter (+ 1)
atomically $ modifyTVar' counter (+ 1)
count <- atomically $ readTVar counte... |
bbdf3e640bc925e8655dd574e98bfd922dd724339679df439d4581b2942a8bd7 | openvstorage/alba | range_query_args2.ml |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
module RangeQueryArgs =
struct
include Range_query_args.RangeQueryArg... | null | https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/range_query_args2.ml | ocaml | these serialization functions eventually depend on
* ctypes, and can't be loaded in the arakoon plugin,
* hence the separate file... |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
module RangeQueryArgs =
struct
include Range_query_args.RangeQueryArg... |
615301d1da437f7e479d4128a259ea355cdd71974395bcc5c4d43063a3f3740e | spell-music/csound-expression | Utilities.hs | module Csound.Typed.Plugins.Utilities(
delay1k
) where
import Csound.Dynamic
import Csound.Typed.Types.Prim
import Csound.Typed.GlobalState
import qualified Csound.Typed.GlobalState.Elements as E(delay1kPlugin)
-------------------------------------------------------------------------------
-- | Delay a control s... | null | https://raw.githubusercontent.com/spell-music/csound-expression/29c1611172153347b16d0b6b133e4db61a7218d5/csound-expression-typed/src/Csound/Typed/Plugins/Utilities.hs | haskell | -----------------------------------------------------------------------------
| Delay a control signal by single sample. | module Csound.Typed.Plugins.Utilities(
delay1k
) where
import Csound.Dynamic
import Csound.Typed.Types.Prim
import Csound.Typed.GlobalState
import qualified Csound.Typed.GlobalState.Elements as E(delay1kPlugin)
delay1k :: Sig -> Sig
delay1k ain = fromGE $ do
addUdoPlugin E.delay1kPlugin
f <$> toGE ain
... |
d5541ecb4c1c8c92e33c38786276aa90657098ba049e58426ab59439d6422dfc | gonimo/gonimo | Random.hs | module Utils.System.Random where
import System.Random
import Control.Monad.State
-- Warning: an empty list leads to a crash.
-- TODO: make more failsafe randomL/randomLs functions.
randomL :: RandomGen g => [a] -> g -> (a, g)
randomL [] _ = error "randomL: empty list"
randomL lst gen =
let len = length l... | null | https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/back/src/Utils/System/Random.hs | haskell | Warning: an empty list leads to a crash.
TODO: make more failsafe randomL/randomLs functions. | module Utils.System.Random where
import System.Random
import Control.Monad.State
randomL :: RandomGen g => [a] -> g -> (a, g)
randomL [] _ = error "randomL: empty list"
randomL lst gen =
let len = length lst
(idx, gen') = randomR (0, len-1) gen
in (lst !! idx, gen')
randomLs :: RandomGen g => ... |
e6c19a6f84fb44b3dab7d48249b6bb3bb81794303f528d2cad868cfaece61364 | haskell-repa/repa | Maybe.hs |
-- | Conversions for "Data.Maybe" wrapped formats.
module Data.Repa.Convert.Format.Maybe
( MaybeChars (..)
, MaybeBytes (..))
where
import Data.Repa.Convert.Internal.Format
import Data.Repa.Convert.Internal.Packable
import Data.Repa.Convert.Format.Bytes
import Data.Word
import GHC.Exts
import Pre... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-convert/Data/Repa/Convert/Format/Maybe.hs | haskell | | Conversions for "Data.Maybe" wrapped formats.
------------------------------------------------------------------------------------
| Maybe a raw list of characters, or something else.
# INLINE minSize #
We do this before accepting the actual value, so the conversion happens only
once, instead of when we pack ... |
module Data.Repa.Convert.Format.Maybe
( MaybeChars (..)
, MaybeBytes (..))
where
import Data.Repa.Convert.Internal.Format
import Data.Repa.Convert.Internal.Packable
import Data.Repa.Convert.Format.Bytes
import Data.Word
import GHC.Exts
import Prelude hiding (fail)... |
3b0564ed158dc81bc930b892c1484cd37f40d9a7294e6c05f552e124146dc360 | fhunleth/relsync | target_syncer_sup.erl | Copyright 2014
%%
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
distribute... | null | https://raw.githubusercontent.com/fhunleth/relsync/4f49df183fa4b5cff5f7afb4818d907b65d9ab37/src/target_syncer_sup.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language go... | Copyright 2014
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
This module provides a supervisor for the
-module(target_syncer_sup).
-behaviour(supervisor).
-export([start_link/0, start_child/1]).
-export([... |
2d531985587354a34639e510ffb77c45af693a50e632eb95113ab1d44eb705b8 | geophf/1HaskellADay | Exercise.hs | module Y2016.M08.D01.Exercise where
{--
The Numbers Game!
So, you have a number of variables of integer values that sum to a number. These
numbers must all be different.
Do it, to it.
Or, more specifically: Given a number of 'slots' and a value these slots, when
filled, sum to, give the value of these slots:
--}
s... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2016/M08/D01/Exercise.hs | haskell | -
The Numbers Game!
So, you have a number of variables of integer values that sum to a number. These
numbers must all be different.
Do it, to it.
Or, more specifically: Given a number of 'slots' and a value these slots, when
filled, sum to, give the value of these slots:
-
Note the return value: there may be multip... | module Y2016.M08.D01.Exercise where
summer :: Int -> Int -> [[Int]]
summer sum slotCount = undefined
Note also [ 1,2,3 ] for the sum of 6 is a different value than [ 3,2,1 ]
( 4,2 ) , ( 10,4 ) , ( 17,2 ) , ( 12,2 ) , ( 13,4 )
Answer ( for ( 4,2 ) ) is : [ [ 1,3],[3,1 ] ]
|
2e8257c5effc878a722ca4bc2985f6fd32ca4351dd958007b59d64b0df8fdd37 | TrustInSoft/tis-interpreter | mem_exec2.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/value/engine/mem_exec2.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
7500db36eaa180638a4896a13e61af15323efcdc86cfdf063b4daab6b942d448 | hatsugai/SyncStitch | det.ml | open Printf
open Error
open Col
open Event
open EventCol
open Lts
module IntSetHashtbl =
Hashtbl.Make (
struct
type t = IntSet.t
let equal = IntSet.equal
let hash = IntSet.hash
end)
let tau_closure lts ss =
let que = Queue.create () in
let rec loop ss =
if Queue.is_empty ... | null | https://raw.githubusercontent.com/hatsugai/SyncStitch/cbf0d28aa77a6f4579233ff64227fd7150e300e0/src/det.ml | ocaml | open Printf
open Error
open Col
open Event
open EventCol
open Lts
module IntSetHashtbl =
Hashtbl.Make (
struct
type t = IntSet.t
let equal = IntSet.equal
let hash = IntSet.hash
end)
let tau_closure lts ss =
let que = Queue.create () in
let rec loop ss =
if Queue.is_empty ... | |
a0f46ac784dfeb7990e2a979d6b6b470ea079b84f1788873e86c3810b02a33b3 | ghcjs/jsaddle-dom | SVGPathSegCurvetoQuadraticSmoothAbs.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGPathSegCurvetoQuadraticSmoothAbs
(setX, getX, setY, getY, SVGPathSegCurvetoQuadraticSmoothAbs(..),
gType... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGPathSegCurvetoQuadraticSmoothAbs.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/SVGPathSegCurvetoQuadraticSmoothAbs.y Mozilla SVGPathSegCurvetoQuadraticSmoothAbs.y documentation>
| <-US/docs/Web/API/SVGPathSegCurvetoQuadraticSmoothAbs.y Mozilla SVGPathSegCurvetoQuadraticSmoothAbs.y d... | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGPathSegCurvetoQuadraticSmoothAbs
(setX, getX, setY, getY, SVGPathSegCurvetoQuadraticSmoothAbs(..),
gTypeSVGPathSegCurvetoQuadraticSmoothAbs)
where
import Prelude ((.), (==), (>>=), return, IO, Int... |
4d7979e0e344e63e2e556eadb38a9da44df9a8a58ad5fb80469bd93870709f04 | mitchellwrosen/tasty-hspec | Hspec.hs | | @hspec@ and @tasty@ serve similar purposes ; consider using one or the
-- other.
--
-- However, in a pinch, this module allows you to run an @hspec@ 'H.Spec' as a
@tasty@ ' T.TestTree ' .
module Test.Tasty.Hspec
( -- * Tests
testSpec,
testSpecs,
-- * Options
TreatPendingAs (..),
-- * Examp... | null | https://raw.githubusercontent.com/mitchellwrosen/tasty-hspec/5b5e1eb4c6d0952f0227895ef72f68921ac3e1cb/src/Test/Tasty/Hspec.hs | haskell | other.
However, in a pinch, this module allows you to run an @hspec@ 'H.Spec' as a
* Tests
* Options
* Examples
$examples
$examples
'T.defaultMain'.
@
main = do
spec <- 'testSpec' "spec" mySpec
'T.defaultMain'
('T.testGroup' "tests"
[ spec
, ...
])
@
You can treat an 'H.p... | | @hspec@ and @tasty@ serve similar purposes ; consider using one or the
@tasty@ ' T.TestTree ' .
module Test.Tasty.Hspec
testSpec,
testSpecs,
TreatPendingAs (..),
)
where
import Control.Monad (guard)
import Data.Maybe (catMaybes, fromMaybe, mapMaybe)
import Data.Proxy
import Data.Typeable (Typeabl... |
6990858b2dff38acffd4d16de43f2eb8e1c8e9c81a9ca1910d9a2216bd361bdd | TerrorJack/ghc-alter | C.hs | {-# LANGUAGE Safe #-}
# LANGUAGE NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.C
Copyright : ( c ) The FFI task force 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
Maintainer :
-- Stability :... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/Foreign/C.hs | haskell | # LANGUAGE Safe #
---------------------------------------------------------------------------
|
Module : Foreign.C
License : BSD-style (see the file libraries/base/LICENSE)
Stability : provisional
Portability : portable
--------------------------------------------------------------------------- | # LANGUAGE NoImplicitPrelude #
Copyright : ( c ) The FFI task force 2001
Maintainer :
Bundles the C specific FFI library functionality
module Foreign.C
( module Foreign.C.Types
, module Foreign.C.String
, module Foreign.C.Error
) where
import Foreign.C.Types
import For... |
c6f17971a954a212b071e30c2027f247df9c0372690b9cf5227dd44b77c53e7a | ktakashi/sagittarius-scheme | parser-parameters.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; text/json/parser-parameters.scm - JSON parser parameters
;;;
Copyright ( c ) 2020 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;;... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/3971b131d463696297c320dbe595dffd08867dac/sitelib/text/json/parser-parameters.scm | scheme | coding : utf-8 ; -*-
text/json/parser-parameters.scm - JSON parser parameters
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, t... | Copyright ( c ) 2020 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(library (text json parser-parameters)
(export ... |
1ddb3fa8ab71601330fe25442f44d6865323a5fbc2e4101f390a19bb7765b727 | vincenthz/hs-crypto-pubkey | DH.hs | module Crypto.PubKey.ECC.DH (
Curve
, PublicPoint
, PrivateNumber
, SharedKey(..)
, generatePrivate
, calculatePublic
, getShared
) where
import Crypto.Number.Generate (generateMax)
import Crypto.PubKey.ECC.Prim (pointMul)
import Crypto.Random (CPRG)
import Crypto.Types.PubKey.DH (SharedKey(..))
impo... | null | https://raw.githubusercontent.com/vincenthz/hs-crypto-pubkey/c4192a87a03c329eadceb11c3406b4db14b56f11/Crypto/PubKey/ECC/DH.hs | haskell | | Generating a public point Q.
| Generating a shared key using our private number and
the other party public point. | module Crypto.PubKey.ECC.DH (
Curve
, PublicPoint
, PrivateNumber
, SharedKey(..)
, generatePrivate
, calculatePublic
, getShared
) where
import Crypto.Number.Generate (generateMax)
import Crypto.PubKey.ECC.Prim (pointMul)
import Crypto.Random (CPRG)
import Crypto.Types.PubKey.DH (SharedKey(..))
impo... |
6f30762694b30ed5095107553bdcbcf15d281e539100671cefd226f41de7709e | romstad/clj-chess | project.clj | (defproject chessboard "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.671"]
[clj-chess "0.5.0"]
[reagent "0.7.0"]
[re-frame "0.9.4"]]
:plugins [[lein-cljsbuild "1.1.4"]]
:min-lein-version "2.5.3"
... | null | https://raw.githubusercontent.com/romstad/clj-chess/1f7d4d0217c7299d49386a1e5dca404a37441728/examples/chessboard/project.clj | clojure | (defproject chessboard "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.671"]
[clj-chess "0.5.0"]
[reagent "0.7.0"]
[re-frame "0.9.4"]]
:plugins [[lein-cljsbuild "1.1.4"]]
:min-lein-version "2.5.3"
... | |
2691bf7aa6339d6ce152c758cfd77f2563a051075db415016de9b2d2b77452ee | vdloo/kodictl | stop.rkt | #!/usr/bin/env racket
#lang racket
(require json)
(require "../action.rkt")
(require "active-players.rkt")
(provide kodictl-stop)
; stop all active players
(define kodi-json-rpc-stop
(λ ()
(kodi-json-rpc-map-active-players
(λ (playerid)
(kodi-json-rpc-action "Player.Stop" "playerid"
(number->s... | null | https://raw.githubusercontent.com/vdloo/kodictl/31c775a0889c06fcf65a0d91d15937144eb6a30a/kodictl/commands/stop.rkt | racket | stop all active players
stop active players and blackhole output | #!/usr/bin/env racket
#lang racket
(require json)
(require "../action.rkt")
(require "active-players.rkt")
(provide kodictl-stop)
(define kodi-json-rpc-stop
(λ ()
(kodi-json-rpc-map-active-players
(λ (playerid)
(kodi-json-rpc-action "Player.Stop" "playerid"
(number->string playerid))))))
(def... |
205a0a868b7396df6f87d81b5e54428d7dd3ecdd2365502ba2b97f607113bf1c | ku-fpg/haskino-examples | DigitalCmds.hs | -------------------------------------------------------------------------------
-- |
Module :
Copyright : ( c ) University of Kansas
-- License : BSD3
-- Stability : experimental
--
-- TBD.
-------------------------------------------------------------------------------
module DigitalCmds where... | null | https://raw.githubusercontent.com/ku-fpg/haskino-examples/cdf10e43e5c8b5a38bc0bcbfb0e0faccfa9924e2/firmware/DigitalCmds.hs | haskell | -----------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
TBD.
----------------------------------------------------------------------------- | Module :
Copyright : ( c ) University of Kansas
module DigitalCmds where
import System.Hardware.Haskino
import Data.Word
import Comms
import FirmwareCmds
processDigitalCommand :: [Word8] -> Arduino ()
processDigitalCommand m =
case head m of
c | c == firmwareCmdVal DIG_CMD_READ_PIN ... |
8951bb5edf76ccbc87935641ab4d6ad845c58a8af63a9931dfd3d584bc988c3b | REMath/mit_16.399 | red123.mli | (* red123.mli *)
open Avalues1
open Avalues2
open Avalues3
val reduce : (Avalues1.t * Avalues2.t * Avalues3.t) -> (Avalues1.t * Avalues2.t * Avalues3.t)
| null | https://raw.githubusercontent.com/REMath/mit_16.399/3f395d6a9dfa1ed232d307c3c542df3dbd5b614a/project/Generic-FW-Abstract-Interpreter/red123.mli | ocaml | red123.mli | open Avalues1
open Avalues2
open Avalues3
val reduce : (Avalues1.t * Avalues2.t * Avalues3.t) -> (Avalues1.t * Avalues2.t * Avalues3.t)
|
ac8f96f84fe3c9a831df81bbaa6f72fb8bb316568411f65e10dbad865d291f50 | haskell-game/sdl2 | Filesystem.hs | module SDL.Raw.Filesystem (
-- * Filesystem Paths
getBasePath,
getPrefPath,
-- * File I/O Abstraction
allocRW,
freeRW,
rwFromConstMem,
rwFromFP,
rwFromFile,
rwFromMem,
rwClose,
rwRead,
rwSeek,
rwTell,
rwWrite,
readBE16,
readBE32,
readBE64,
readLE16,
readLE32,
readLE64,
write... | null | https://raw.githubusercontent.com/haskell-game/sdl2/a2646ede53d98aebf8f7c49b01f99236701b7e44/src/SDL/Raw/Filesystem.hs | haskell | * Filesystem Paths
* File I/O Abstraction
# INLINE freeRW #
# INLINE rwSeek # | module SDL.Raw.Filesystem (
getBasePath,
getPrefPath,
allocRW,
freeRW,
rwFromConstMem,
rwFromFP,
rwFromFile,
rwFromMem,
rwClose,
rwRead,
rwSeek,
rwTell,
rwWrite,
readBE16,
readBE32,
readBE64,
readLE16,
readLE32,
readLE64,
writeBE16,
writeBE32,
writeBE64,
writeLE16,
write... |
88bd3cf5b30eb5d824ec762fff6e2c3672f1f30e3ee1de5b59b77e78586bf295 | wilkerlucio/mazes | project.clj | (defproject mazes "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0-RC1"]
[org.clojure/clojurescript "0.0-3269"]
[org.clojure/core.async "0.1.346.0-17112a... | null | https://raw.githubusercontent.com/wilkerlucio/mazes/36bed0791cf1ab778db6d0b91a63bdb9fcbcf8bb/project.clj | clojure | :source-map-timestamp true
: source-map-timestamp true
default and assumes "resources"
default
watch and update CSS
if you want to embed a ring handler into the figwheel http-kit
server, this is simple ring servers, if this
doesn't work for you just run your own server :)
:ring-handler hello_world.server/handle... | (defproject mazes "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0-RC1"]
[org.clojure/clojurescript "0.0-3269"]
[org.clojure/core.async "0.1.346.0-17112a... |
ffb147b4e0bb9705d1841ef8f95fc0edbcdbc15588ffe592260b6127657b3b22 | input-output-hk/plutus | Time.hs | -- editorconfig-checker-disable-file
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
-- Otherwise we get a complaint about the 'fromIntegral' call in the generated instance of 'Integral' for 'Ada'
# OPTIONS_GHC -Wno - identities #
# O... | null | https://raw.githubusercontent.com/input-output-hk/plutus/00531085f482546267b964d08ae4ed89328de929/plutus-ledger-api/src/PlutusLedgerApi/V1/Time.hs | haskell | editorconfig-checker-disable-file
# LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
Otherwise we get a complaint about the 'fromIntegral' call in the generated instance of 'Integral' for 'Ada'
| UTCTime and UTCTime ranges.
| This is a length of time, as measured by a number of milliseconds.
| An 'Inter... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - identities #
# OPTIONS_GHC -fno - ignore - interface - pragmas #
# OPTIONS_GHC -fno - omit - interface - pragmas #
module PlutusLedgerApi.V1.Time
( POSIXTime(..)
, POSIXTimeRange
, DiffMilliSeconds(..)
, fromMilliSecon... |
e7999853dbf991add26cc78a197c026fa56e9575909c90fd8b7fd86bf2e132fa | unison-code/unison | CleanPragmas.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Transformations/CleanPragmas.hs | haskell | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | |
571e33e75716c943baedb59d5b1072c8a5ae06f4efd968f50a8629947c00a2fc | namin/inc | tests-6.1-req.scm | (add-tests-with-string-output "define function"
[(let ()
(define (x) 3)
(define (y) 4)
(fx+ (x) (y)))
=> "7\n"]
[(let ()
(define (f x y) (fx+ x y))
(f 3 4))
=> "7\n"]
[(let ()
(define (f x) (fx+ x x))
(f 3))
=> "6\n"])
| null | https://raw.githubusercontent.com/namin/inc/3f683935e290848485f8d4d165a4f727f6658d1d/src/tests-6.1-req.scm | scheme | (add-tests-with-string-output "define function"
[(let ()
(define (x) 3)
(define (y) 4)
(fx+ (x) (y)))
=> "7\n"]
[(let ()
(define (f x y) (fx+ x y))
(f 3 4))
=> "7\n"]
[(let ()
(define (f x) (fx+ x x))
(f 3))
=> "6\n"])
| |
89fc49e68412fe88fff28eb834f2a30efbeb125d535ca60418e5f7880779eb24 | mzp/coq-ide-for-ios | index.ml | (* -*- compile-command: "make -C ../.. bin/coqdoc" -*- *)
(************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/tools/coqdoc/index.ml | ocaml | -*- compile-command: "make -C ../.. bin/coqdoc" -*-
**********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
*****************************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : index.ml 13676 2010... |
c50438035d15cfde2a29b60a5f280c8f324887bbdfa6c79b7592a34746c32ab0 | tschady/advent-of-code | d13_test.clj | (ns aoc.2022.d13-test
(:require
[aoc.2022.d13 :as sut]
[clojure.test :refer :all]))
(def ex "[1,1,3,1,1]
[1,1,5,1,1]
[[1],[2,3,4]]
[[1],4]
[9]
[[8,7,6]]
[[4,4],4,4]
[[4,4],4,4,4]
[7,7,7,7]
[7,7,7]
[]
[3]
[[[]]]
[[]]
[1,[2,[3,[4,[5,6,7]]]],8,9]
[1,[2,[3,[4,[5,6,0]]]],8,9]")
(deftest challenges
(... | null | https://raw.githubusercontent.com/tschady/advent-of-code/53efcafb3099d2cddf953a07606179c756abf547/test/aoc/2022/d13_test.clj | clojure | (ns aoc.2022.d13-test
(:require
[aoc.2022.d13 :as sut]
[clojure.test :refer :all]))
(def ex "[1,1,3,1,1]
[1,1,5,1,1]
[[1],[2,3,4]]
[[1],4]
[9]
[[8,7,6]]
[[4,4],4,4]
[[4,4],4,4,4]
[7,7,7,7]
[7,7,7]
[]
[3]
[[[]]]
[[]]
[1,[2,[3,[4,[5,6,7]]]],8,9]
[1,[2,[3,[4,[5,6,0]]]],8,9]")
(deftest challenges
(... | |
e3002d1f5cac82cf17a03cfd085cf5ffeb63c1c9c6474d4ce29a328e97ccb1c8 | jameshaydon/lawvere | Expr.hs | module Lawvere.Expr where
import Control.Lens
import Control.Monad.Combinators.Expr
import Data.Generics.Labels ()
import Data.List (foldr1)
import Lawvere.Core
import Lawvere.Disp
import Lawvere.Parse
import Lawvere.Scalar
import Prettyprinter
import Protolude hiding (many, try)
import Text.Megaparsec
import qualifie... | null | https://raw.githubusercontent.com/jameshaydon/lawvere/2d7d12347658b502b317fece26d97984d280226c/src/Lawvere/Expr.hs | haskell | | Curry LcIdent Expr
Tuples are just shorthand for records.
pCurry = do
kwCurry
lab <- lexeme parsed
we need to look ahead for the dot
label/seperator pair encountered.
label/seperator pair encountered. | module Lawvere.Expr where
import Control.Lens
import Control.Monad.Combinators.Expr
import Data.Generics.Labels ()
import Data.List (foldr1)
import Lawvere.Core
import Lawvere.Disp
import Lawvere.Parse
import Lawvere.Scalar
import Prettyprinter
import Protolude hiding (many, try)
import Text.Megaparsec
import qualifie... |
207a7f3204b7301cfd1f35da1ef8e4c04c34bbd7d8f4f6c0a9672fd1c8878ac0 | janestreet/hardcaml | side.mli | (** Used to specify when an operation should be performed - before or after an event like
a clock edge. *)
type t =
| Before
| After
[@@deriving compare, sexp_of]
| null | https://raw.githubusercontent.com/janestreet/hardcaml/4126f65f39048fef5853ba9b8d766143f678a9e4/src/side.mli | ocaml | * Used to specify when an operation should be performed - before or after an event like
a clock edge. |
type t =
| Before
| After
[@@deriving compare, sexp_of]
|
fa1f615396bb7f773ef3c1fd7ac07e48387863da79c42b63e040e631ce092d38 | larskuhtz/wai-cors | Server.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UnicodeSyntax #
-- |
-- Module: Server
Description : Test HTTP server for
Copyright : © 2015 - 2018 < > .
License : MIT
Maintainer : < >
-- Stability: experimental
--
module Server
( main
) where
im... | null | https://raw.githubusercontent.com/larskuhtz/wai-cors/7af2f8acff5ddd3557f86d1759c4f6a8ea0ad17b/test/Server.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module: Server
Stability: experimental
-------------------------------------------------------------------------- --
Server application
-------------------------------------------------------------------------- --
CORS Policy
----------------------------------------------------... | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UnicodeSyntax #
Description : Test HTTP server for
Copyright : © 2015 - 2018 < > .
License : MIT
Maintainer : < >
module Server
( main
) where
import Control.Concurrent
import Control.Exception
import Control.Monad
import Network.So... |
0534c15743114c83d7a384b253d79283fa68b835b6910d9acc489404bc450614 | B-Lang-org/bsc | IfcBetterInfo.hs | # LANGUAGE CPP #
module IfcBetterInfo(
BetterInfo(..),
extractMethodInfo,
matchMethodName,
noMethodInfo
) where
#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 804)
import Prelude hiding ((<>))
#endif
i... | null | https://raw.githubusercontent.com/B-Lang-org/bsc/bd141b505394edc5a4bdd3db442a9b0a8c101f0f/src/comp/IfcBetterInfo.hs | haskell | import Util(traces)
module for extracting "better" method argument names and types from the symbol table
This information is used by IExpand for populating the VModInfo
and for recording the types of external method ports
method Id
possible rename for method result
for ready signal
for enable signal
default pr... | # LANGUAGE CPP #
module IfcBetterInfo(
BetterInfo(..),
extractMethodInfo,
matchMethodName,
noMethodInfo
) where
#if defined(__GLASGOW_HASKELL__) && (__GLASGOW_HASKELL__ >= 804)
import Prelude hiding ((<>))
#endif
i... |
2fa46b117282dd4253d0f63ebe0d006005cc81b972ce6fd4be5eb514f06f22d6 | termite-analyser/termite | main.ml | open Debug
open Llvm
open Smt
module SMTg = Smtgraph.Make (Smt.ZZ)
module Llvm2Smt = Llvm2smt.Init (Smt.ZZ) (SMTg)
type algos =
| Algo1
| Monodimensional
| Multidimensional
| MonodimMultiPc
let algo_to_string = function
| Algo1 -> "Algo1"
| Monodimensional -> "Monodimensional"
| Multidimensional ->... | null | https://raw.githubusercontent.com/termite-analyser/termite/285d92215a28fcce55614f6d04b44886f253a894/src/main.ml | ocaml | Parse the bitcode.
Apply the mem2reg pass, just in case.
* Transform a bitcode straight to an smt formula.
Get the graph
Get pagai's control points
Get pagai's invariants.
Filter out the invariants to get only the control_points.
Break down the graph.
The end.
* Do I really need to tell you what it's d... | open Debug
open Llvm
open Smt
module SMTg = Smtgraph.Make (Smt.ZZ)
module Llvm2Smt = Llvm2smt.Init (Smt.ZZ) (SMTg)
type algos =
| Algo1
| Monodimensional
| Multidimensional
| MonodimMultiPc
let algo_to_string = function
| Algo1 -> "Algo1"
| Monodimensional -> "Monodimensional"
| Multidimensional ->... |
f0d2a7d6923dbc03b0e36a814e9c12c18c3d60712ffd83075e24e366ab40420b | namenu/advent-of-code | day10.clj | --- Day 10 : Monitoring Station ---
(ns aoc.year2019.day10
(:require [aoc.util :refer [input cart->polar]]
[aoc.grid :refer [parse-grid]]
[aoc.year2019.intcode :refer :all]))
pt.1
(defn already-hit? [[dx dy] hits]
(some (fn [[hx hy]]
(and (= (neg? dx) (neg? hx))
... | null | https://raw.githubusercontent.com/namenu/advent-of-code/83f8cf05931f814dab76696bf46fec1bb1276fac/2019/clojure/src/aoc/year2019/day10.clj | clojure | --- Day 10 : Monitoring Station ---
(ns aoc.year2019.day10
(:require [aoc.util :refer [input cart->polar]]
[aoc.grid :refer [parse-grid]]
[aoc.year2019.intcode :refer :all]))
pt.1
(defn already-hit? [[dx dy] hits]
(some (fn [[hx hy]]
(and (= (neg? dx) (neg? hx))
... | |
efe815b1ab38be31966d90684bae7a83d585b1ddec41a5f70eb15d053fd2bd18 | goldfirere/singletons | T89.hs | {-# LANGUAGE OverloadedStrings #-}
module T89 where
import Data.Singletons.Base.TH
$(singletons [d|data Foo = Foo deriving (Enum)|])
| null | https://raw.githubusercontent.com/goldfirere/singletons/e89070a8916d067342c027ef35fb4b2a5039b448/singletons-base/tests/compile-and-dump/Singletons/T89.hs | haskell | # LANGUAGE OverloadedStrings # | module T89 where
import Data.Singletons.Base.TH
$(singletons [d|data Foo = Foo deriving (Enum)|])
|
df74110d660a602fab4babe8c2d38e317ef2cbbc22e264f50b117c9250220f1e | f-me/carma-public | Tech.hs | module Carma.Model.Service.Tech where
import Data.Text
import Data.Typeable
import Data.Scientific
import Data.Aeson((.=), object)
import Data.Model
import Data.Model.View
import Carma.Model.LegacyTypes (Checkbox)
import Carma.Model.Service (Service)
import Carma.Model.TechType (TechType)
import qualified Carma.Model... | null | https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/carma-models/src/Carma/Model/Service/Tech.hs | haskell | Naming scheme convention: complNpM, where N is the id of a
TechType dictionary entry. Actual visibility rules are set via | module Carma.Model.Service.Tech where
import Data.Text
import Data.Typeable
import Data.Scientific
import Data.Aeson((.=), object)
import Data.Model
import Data.Model.View
import Carma.Model.LegacyTypes (Checkbox)
import Carma.Model.Service (Service)
import Carma.Model.TechType (TechType)
import qualified Carma.Model... |
2958a99f0edca108758ab4d251c83a6336d0372c01e1614890ea0f6c50fbddac | jgrodziski/keycloak-clojure | keycloak.clj | (ns myapp.backend.keycloak
(:require [mount.core :refer [defstate]]
[clojure.java.io :as io])
(:import [org.keycloak.adapters KeycloakDeployment KeycloakDeploymentBuilder]
[org.keycloak.representations AccessToken]
[org.keycloak RSATokenVerifier]))
(defn load-keycloak-deployment
... | null | https://raw.githubusercontent.com/jgrodziski/keycloak-clojure/b811fe4f3e5b0d5cea7b1ce0aba7825b447b7696/sample/yada-backend/src/myapp/backend/keycloak.clj | clojure | (ns myapp.backend.keycloak
(:require [mount.core :refer [defstate]]
[clojure.java.io :as io])
(:import [org.keycloak.adapters KeycloakDeployment KeycloakDeploymentBuilder]
[org.keycloak.representations AccessToken]
[org.keycloak RSATokenVerifier]))
(defn load-keycloak-deployment
... | |
3a38c134338cb64f9c103314ef0e97e89f891c6a22a80197ba2633a4e3c4b01d | mankyKitty/fantastic-waddle | Bootstrap.hs | {-# LANGUAGE OverloadedStrings #-}
module Styling.Bootstrap
( BSStyle (..)
, styleClass
, contained
, bsButton
, bsButton_
, rangeInpConf
, bsRangeInput
, bsNumberInput
) where
import Control.Lens (mapped, over, _1, (%~))
import Data.Function ((&))
import Data.Char (to... | null | https://raw.githubusercontent.com/mankyKitty/fantastic-waddle/680ca473bf7141c63528195ae23cb799b2fb0eac/frontend/src/Styling/Bootstrap.hs | haskell | # LANGUAGE OverloadedStrings # | module Styling.Bootstrap
( BSStyle (..)
, styleClass
, contained
, bsButton
, bsButton_
, rangeInpConf
, bsRangeInput
, bsNumberInput
) where
import Control.Lens (mapped, over, _1, (%~))
import Data.Function ((&))
import Data.Char (toLower)
import Data.Semigr... |
8ef00e287b34fbbc18251a877a5933d917c866a0860cf8be3e449bfe8dc0e285 | vincenthz/hs-pem | PEM.hs | -- |
-- Module : Data.PEM
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
-- Read and write PEM files
--
module Data.PEM
( module Data.PEM.Types
, module Data.PEM.Writer
, module Data.PEM.Parser
) where
import Data.PEM.Types
import Data... | null | https://raw.githubusercontent.com/vincenthz/hs-pem/f83c850b29850d9c6e4307984cd314f7fa8bd2d7/Data/PEM.hs | haskell | |
Module : Data.PEM
License : BSD-style
Stability : experimental
Portability : portable
Read and write PEM files
| Maintainer : < >
module Data.PEM
( module Data.PEM.Types
, module Data.PEM.Writer
, module Data.PEM.Parser
) where
import Data.PEM.Types
import Data.PEM.Writer
import Data.PEM.Parser
|
5dc46eeee9997e495e82ff5eab29d869863353300bd5de8c83d5cbd6e95dd2c4 | racehub/om-bootstrap | bar_basic.cljs | #_
(:require [om-bootstrap.button :as b]
[om-bootstrap.nav :as n]
[om-tools.dom :as d :include-macros true])
(n/navbar
{:brand (d/a {:href "#"}
"Navbar")}
(n/nav
{:collapsible? true}
(n/nav-item {:key 1 :href "#"} "Link")
(n/nav-item {:key 2 :href "#"} "Link")
(b/dropdown {:... | null | https://raw.githubusercontent.com/racehub/om-bootstrap/18fb7f67c306d208bcb012a1b765ac1641d7a00b/dev/snippets/nav/bar_basic.cljs | clojure | #_
(:require [om-bootstrap.button :as b]
[om-bootstrap.nav :as n]
[om-tools.dom :as d :include-macros true])
(n/navbar
{:brand (d/a {:href "#"}
"Navbar")}
(n/nav
{:collapsible? true}
(n/nav-item {:key 1 :href "#"} "Link")
(n/nav-item {:key 2 :href "#"} "Link")
(b/dropdown {:... | |
0e681f31866ff1074e1e86d7ae16ba18b4a9e6390274044f972744380898867c | SahilKang/cl-rdkafka | consumer.lisp | Copyright ( C ) 2018 - 2020 < >
Copyright 2022 Google LLC
;;;
;;; This file is part of cl-rdkafka.
;;;
;;; cl-rdkafka is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , o... | null | https://raw.githubusercontent.com/SahilKang/cl-rdkafka/267e18399351ec5b6a282c9dbd9b194145ff454b/src/high-level/consumer.lisp | lisp |
This file is part of cl-rdkafka.
cl-rdkafka is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-rdkafka is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS... | Copyright ( C ) 2018 - 2020 < >
Copyright 2022 Google LLC
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package #:cl-rdkafka)
(defclass consumer... |
8377d3ea07484104b6f8b38996b7df85e8cbcc269310724ef3a40e4cdf7745f3 | racket/compiler | embed-me26.rkt | #lang racket/base
(module+ main
12)
(module submod racket/base
11)
10
(require (submod "embed-me27.rkt" other-submod))
| null | https://raw.githubusercontent.com/racket/compiler/88acf8a1ec81fec0fbcb6035af1d994d2fec4154/compiler-test/tests/compiler/embed/embed-me26.rkt | racket | #lang racket/base
(module+ main
12)
(module submod racket/base
11)
10
(require (submod "embed-me27.rkt" other-submod))
| |
873bfb5b02972b5b5a60bd456ccfe30d67c26b82705bdb03a2e4e5734b4965d9 | erldb/erldb | erldb_ets.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2013 ,
%%% @doc
%%%
%%% @end
Created : 23 Jul 2013 by < >
%%%-------------------------------------------------------------------
-module(erldb_ets).
-behaviour(gen_server).
%% API
-export([start_link/1]).
%% gen_s... | null | https://raw.githubusercontent.com/erldb/erldb/d014c29ab5efa00c26847d637ce09be83b10cc19/src/erldb_ets.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_server callbacks
===================================================================
API
===================================================================
---... | @author < >
( C ) 2013 ,
Created : 23 Jul 2013 by < >
-module(erldb_ets).
-behaviour(gen_server).
-export([start_link/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-define(SERVER, ?MODULE).
-record(state, {
tabs = []
}).
... |
5b80176c02209da269eee57a15fd5f8ea8d43895d334911ad6975967d2439a77 | dys-bigwig/racket-ncurses | main.rkt | #lang racket/base
(require "api.rkt")
(provide (all-from-out "api.rkt"))
| null | https://raw.githubusercontent.com/dys-bigwig/racket-ncurses/864af9e67a1daab7796f7e06b95aefea2168bd6f/main.rkt | racket | #lang racket/base
(require "api.rkt")
(provide (all-from-out "api.rkt"))
| |
bb46804ace7883fa5caceede09b114b2e1f5d3177bac3d0a5641874d190cfccb | agentultra/adventure-engine | Main.hs | module Main where
import Maker
main :: IO ()
main = run
| null | https://raw.githubusercontent.com/agentultra/adventure-engine/a7fc9722fb7771dd6c7d2c953910eb9e971a31f9/adventure-maker/Main.hs | haskell | module Main where
import Maker
main :: IO ()
main = run
| |
88534abe01f6841ef464a478d32732eda3da1296c5547056a94be67566b24d3b | buntine/Simply-Scheme-Exercises | 18-5.scm | ; Write prune, a procedure that takes a tree as argument and returns a copy of the
; tree, but with all the leaf nodes of the original tree removed. (If the argument to prune
is a one - node tree , in which the root node has no children , then prune should return
; #f because the result of removing the root node woul... | null | https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/18-trees/18-5.scm | scheme | Write prune, a procedure that takes a tree as argument and returns a copy of the
tree, but with all the leaf nodes of the original tree removed. (If the argument to prune
#f because the result of removing the root node wouldn’t be a tree.)
My solution does not use the filter operator. Instead if the node is leaf th... | is a one - node tree , in which the root node has no children , then prune should return
(define (prune tree)
(cond ((leaf? tree) #f)
(else (make-node (datum tree) (prune-forest (children tree))))))
(define (prune-forest forest)
(cond ((null? forest) '())
((leaf? (car forest)) (prune-forest (c... |
dee0c581f484fc3fa0ab921b58c80a524adcc092d090e3aabbe5dd64664bb481 | triffon/fp-2019-20 | first n members.rkt | (define (take n xs)
(cond
((< n 0) "error")
((> n (length xs)) xs)
((= n 0) '())
((if (= n 1) (list (car xs))
може да се напише ( cons ( car xs ) ( take ... ) )
(take 2134 '(9 7 2 3))
(take 0 '(2 9 2))
(take 2 '(1 2 3))
(take 3 '(1 2 3 4 5 6 7)) | null | https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-3/exercises/04.lists/solutions/first%20n%20members.rkt | racket | (define (take n xs)
(cond
((< n 0) "error")
((> n (length xs)) xs)
((= n 0) '())
((if (= n 1) (list (car xs))
може да се напише ( cons ( car xs ) ( take ... ) )
(take 2134 '(9 7 2 3))
(take 0 '(2 9 2))
(take 2 '(1 2 3))
(take 3 '(1 2 3 4 5 6 7)) | |
2bacd1e0a4253c6b97bb7e2da0740ab51ee63952eb98f155af7619cb6c4371f3 | brendanhay/amazonka | ChoiceStatus.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE StrictData #-}
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
Derived from AWS service... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-wellarchitected/gen/Amazonka/WellArchitected/Types/ChoiceStatus.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
Derived from AWS service descriptions , licensed under Apache 2.0 .
Module : A... |
19189cca6406352451cd4bf14681193b33abced6a06d36986fd55ff895c4cb2b | kmi/irs | namespaces.lisp | Copyright © 2008
(in-package #:irs)
(defvar *source-namespaces*
'(("grnd" "-grounding#")
("rfc2616" "#")
("rio" "-in-ocml#")))
(defun register-source-namespace (prefix url)
(push (list prefix url) *source-namespaces*)
(setup-namespaces-for-source))
In here are definitions of OCML namespace prefixe... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/src/kernel/namespaces.lisp | lisp | compile time.
XXX We should (but are not!) careful that we don't break the
bindings of the current ontology. | Copyright © 2008
(in-package #:irs)
(defvar *source-namespaces*
'(("grnd" "-grounding#")
("rfc2616" "#")
("rio" "-in-ocml#")))
(defun register-source-namespace (prefix url)
(push (list prefix url) *source-namespaces*)
(setup-namespaces-for-source))
In here are definitions of OCML namespace prefixe... |
b38b0b1a3f9b375ac9b8bd2a82ce4ba7e4bc5ea8af05aedca39c08d676756582 | jakubfijalkowski/hsass | Compilation.hs | -- | Compilation of sass source or sass files.
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE PatternGuards #
{-# LANGUAGE TypeSynonymInstances #-}
module Text.Sass.Compilation
(
-- * Compilation
compileFile
, compileString
... | null | https://raw.githubusercontent.com/jakubfijalkowski/hsass/afbce06f13edcc1ec16eb8f93cc730bc735dfdaf/Text/Sass/Compilation.hs | haskell | | Compilation of sass source or sass files.
# LANGUAGE BangPatterns #
# LANGUAGE CPP #
# LANGUAGE TypeSynonymInstances #
* Compilation
* Results
* Error reporting
| Represents compilation error.
^ Compilation satus code.
| Represents extended result - compiled string (or other string-lik... | # LANGUAGE FlexibleInstances #
# LANGUAGE PatternGuards #
module Text.Sass.Compilation
(
compileFile
, compileString
, compileByteString
, SassExtendedResult
, StringResult
, ExtendedResult
, ExtendedResultBS
, resultString
, resultIncludes
, resultSourcemap
, SassError
, errorSt... |
3febc0cdf3ecf11879768c77952289efc98a14c1dbd0c0d16472f60817ea71d8 | kazu-yamamoto/wai-app-file-cgi | Path.hs | # LANGUAGE OverloadedStrings , BangPatterns #
module Network.Wai.Application.Classic.Path (
Path
, pathString
, fromString
, (</>), (<\>), (<.>)
, breakAtSeparator, hasLeadingPathSeparator, hasTrailingPathSeparator
, isSuffixOf
) where
import Data.ByteString (ByteString)
import qualified Data.ByteStri... | null | https://raw.githubusercontent.com/kazu-yamamoto/wai-app-file-cgi/2a096b810ded557bd5e0d2bfe0e1b7736d7823ab/Network/Wai/Application/Classic/Path.hs | haskell | --------------------------------------------------------------
| File path.
--------------------------------------------------------------
pathDot :: Word8
|
Checking if the path ends with the path separator.
>>> hasLeadingPathSeparator "/foo/bar"
True
>>> hasLeadingPathSeparator "foo/bar"
False
|
Checking if t... | # LANGUAGE OverloadedStrings , BangPatterns #
module Network.Wai.Application.Classic.Path (
Path
, pathString
, fromString
, (</>), (<\>), (<.>)
, breakAtSeparator, hasLeadingPathSeparator, hasTrailingPathSeparator
, isSuffixOf
) where
import Data.ByteString (ByteString)
import qualified Data.ByteStri... |
017894963be3a3c87c469586bf73a7f6ca7db2878809f089cce2201109d1992a | dgiot/dgiot | emqx_connection.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2018 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/dgiot/dgiot/c601555e45f38d02aafc308b18a9e28c543b6f2c/src/emqx_connection.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2018 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_connection).
-include("emqx.hrl").
-include("emqx_mqtt.hrl").
-include("logger.hrl... |
b9d8afe9dfdd9c3ab8a8d5275a41c70215adfb2d4f817a61fd1c3adc943bc309 | erlware/relx | replace_os_vars_tests.erl | -module(replace_os_vars_tests).
-export([]).
| null | https://raw.githubusercontent.com/erlware/relx/16a7972f7679778d9d7f40228b1a20351f1077bd/shelltests/dev_replace_os_vars_tests/src/replace_os_vars_tests.erl | erlang | -module(replace_os_vars_tests).
-export([]).
| |
111c1c1dcfbb546aa1e01e57846aab77a09affbd8de3388e63b96542203da85e | ocsigen/ocsigenserver | outputfilter.ml | Ocsigen
*
* Module outputfilter.ml
* Copyright ( C ) 2008
*
* 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... | null | https://raw.githubusercontent.com/ocsigen/ocsigenserver/d468cf464dcc9f05f820c35f346ffdbe6b9c7931/src/extensions/outputfilter.ml | ocaml | This module enables rewritting the server output | Ocsigen
*
* Module outputfilter.ml
* Copyright ( C ) 2008
*
* 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... |
2ec01bb55fe6ff60ecfc61646e68b95edd59a75ec9602f7b1137a1a8fd8f8044 | talw/crisp-compiler | Utils.hs | module Utils where
import Data.Word
import Data.List (elemIndex)
tr :: [Char] -> [Char] -> String -> String
tr as bs str = flip map str $
\c -> maybe c (\ix -> bs !! ix) $ elemIndex c as
readBinary :: String -> Word32
readBinary = bin2dec . read
bin2dec :: Word32 -> Word32
bin2dec = convertBase 2 10
dec2bin : : ... | null | https://raw.githubusercontent.com/talw/crisp-compiler/1c4d6e9897520e8089ae329d961aeeeadc4648a4/src/Utils.hs | haskell | module Utils where
import Data.Word
import Data.List (elemIndex)
tr :: [Char] -> [Char] -> String -> String
tr as bs str = flip map str $
\c -> maybe c (\ix -> bs !! ix) $ elemIndex c as
readBinary :: String -> Word32
readBinary = bin2dec . read
bin2dec :: Word32 -> Word32
bin2dec = convertBase 2 10
dec2bin : : ... | |
01c26f4e68a2b2f1fb604ca7f6bd026c3721acef4f51e106d97d882d499b12ab | exercism/haskell | Tests.hs | # LANGUAGE TupleSections #
import Data.Foldable (for_)
import Data.Function (on)
import Data.Tree (Tree(Node), rootLabel)
import Data.List (sort)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import POV (fromPOV, tra... | null | https://raw.githubusercontent.com/exercism/haskell/f81ee7dc338294b3dbefb7bd39fc193546fcec26/exercises/practice/pov/test/Tests.hs | haskell | Functions used in the tests.
In the trees we're making, we don't care about the ordering of children.
This is significant when rerooting on nodes that have a parent and children.
The former parent can go either before or after the former children.
Either choice would be correct in the context of this problem.
So ... | # LANGUAGE TupleSections #
import Data.Foldable (for_)
import Data.Function (on)
import Data.Tree (Tree(Node), rootLabel)
import Data.List (sort)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import POV (fromPOV, tra... |
179e48395f0fb2c0818a11fbb08051a4c8f60a38d5e7611703be5789a5644d55 | Abbath/Calculator | Css.hs | {-# LANGUAGE OverloadedStrings #-}
module Calculator.Css where
import Clay
getCss :: Css
getCss = do
h1 ? fontSize (px 24)
body ? textAlign (alignSide sideCenter)
input # "type=\"input\"" ? do
width (px 600)
height (px 50)
fontSize (px 18)
postCss :: Css
postCss = do
h1 ? fontSize (px 2... | null | https://raw.githubusercontent.com/Abbath/Calculator/75985d5a9b4e602bc087462c8046bf2cf692a0e1/Calculator/src/Calculator/Css.hs | haskell | # LANGUAGE OverloadedStrings # | module Calculator.Css where
import Clay
getCss :: Css
getCss = do
h1 ? fontSize (px 24)
body ? textAlign (alignSide sideCenter)
input # "type=\"input\"" ? do
width (px 600)
height (px 50)
fontSize (px 18)
postCss :: Css
postCss = do
h1 ? fontSize (px 24)
body ? textAlign (alignSide si... |
cba81eff2ac869894319163c59fc98fe9c7b4c248e64096fef9920c956d0ed25 | sjl/flax | api.lisp | (in-package :flax.drawing)
;;;; Parameters ---------------------------------------------------------------
(defparameter *black* (rgb 0 0 0))
(defparameter *white* (rgb 1 1 1))
Canvas -------------------------------------------------------------------
(defclass* canvas ()
((width :type (integer 1))
(height :t... | null | https://raw.githubusercontent.com/sjl/flax/0dc4e7c0d096cd01a1009c8fbd0d96174ed48090/src/drawing/api.lisp | lisp | Parameters ---------------------------------------------------------------
Utils --------------------------------------------------------------------
Paths --------------------------------------------------------------------
Triangles ----------------------------------------------------------------
Rectangles ----... | (in-package :flax.drawing)
(defparameter *black* (rgb 0 0 0))
(defparameter *white* (rgb 1 1 1))
Canvas -------------------------------------------------------------------
(defclass* canvas ()
((width :type (integer 1))
(height :type (integer 1))
(padding :type (single-float 0.0 0.5) :initform 0.03)
(ou... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.