_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 |
|---|---|---|---|---|---|---|---|---|
ee9d5758b5a99c5f01ee6652119d1917946cf0553d616e76d9e4f7c2ccc8322f | cdsmith/explainable-predicates | QuickCheck.hs | -- | QuickCheck integration for 'Predicate'
module Test.Predicates.QuickCheck (satisfies) where
import Test.Predicates (Predicate (accept, explain))
import Test.QuickCheck (Property, counterexample)
-- $setup
-- >>> :set -XExtendedDefaultRules
-- >>> :set -Wno-type-defaults
-- >>> import Test.Predicates
-- >>> import... | null | https://raw.githubusercontent.com/cdsmith/explainable-predicates/691c1840d0042d8d2f0cb5f5442f7f6b5d1e5f3d/src/Test/Predicates/QuickCheck.hs | haskell | | QuickCheck integration for 'Predicate'
$setup
>>> :set -XExtendedDefaultRules
>>> :set -Wno-type-defaults
>>> import Test.Predicates
>>> import Test.QuickCheck
| QuickCheck property that checks if a predicate is satisfied.
@
@
@
@ | module Test.Predicates.QuickCheck (satisfies) where
import Test.Predicates (Predicate (accept, explain))
import Test.QuickCheck (Property, counterexample)
quickCheck $ \\(Positive x ) - > [ 0 .. x ] \`satisfies\ ` ( containsAll [ eq 1 , eq 2 ] )
* * * Failed ! Falsified ( after 1 test ):
Positive { getPo... |
cfe6e022bf3961a767afc52133971b857e6f80e5bcf61bbc114b3a99af03e5a8 | LennMars/algorithms_in_OCaml | polynomialRing_test.ml | open Util
module P = PolynomialRing.Make (RationalBig)
open RationalBig
open P
let f = [one, [|2; 1|]; one, [|1; 2|]; one, [|0; 2|]] (* x^2y + xy^2 + y^2 *)
let negone = r (-1, 1)
y^2 - 1
let g2 = [one, [|1; 1|]; negone, [|0; 0|]] (* xy - 1 *)
let remove_abstr f = List.map (fun (a, x) -> float_of_rational a, x) f
... | null | https://raw.githubusercontent.com/LennMars/algorithms_in_OCaml/f7fb8ca9f497883d86be3167bfc98a4a28ac73c9/polynomialRing/polynomialRing_test.ml | ocaml | x^2y + xy^2 + y^2
xy - 1
List.fold_left ( +~ ) [] (List.map2 ( *~ ) qs divisors) +~ r | open Util
module P = PolynomialRing.Make (RationalBig)
open RationalBig
open P
let negone = r (-1, 1)
y^2 - 1
let remove_abstr f = List.map (fun (a, x) -> float_of_rational a, x) f
let divide lex gs f =
let (qs, r) = divide (lex [0;1]) gs f in
(qs, r)
let sort f = List.sort (fun (_,x) (_,y)-> lex [0;1] x y) f... |
46026e2a81469c198d5e2a146e4d454995001eebdcb27338102f0a33bc1a5b3d | ragkousism/Guix-on-Hurd | anthy.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/anthy.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2016 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages anthy)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (... |
27e8bc74306bab9ed89764659544c653016a8fcba6ab7c0904c84d65492d32a1 | foretspaisibles/ocaml-rashell | rashell_Docker.ml | Rashell_Docker -- support
Rashell ( )
This file is part of Rashell
Copyright © 2015—2016
This file must be used under the terms of the MIT license .
This source file is licensed as described in the file LICENSE , which
you should have received as part of this distribution . The te... | null | https://raw.githubusercontent.com/foretspaisibles/ocaml-rashell/dba71d34aa3940bf6fad66fbe3ae11f0c095d25a/src/rashell_Docker.ml | ocaml | TODO: should we check that
* (a) the volume name is correct (alphanumeric
* character, followed by [a-z0-9_.-]+)
* (b) the source path exists
*
* or let docker run fail?
*
don't let exceptions escape Lwt monad | Rashell_Docker -- support
Rashell ( )
This file is part of Rashell
Copyright © 2015—2016
This file must be used under the terms of the MIT license .
This source file is licensed as described in the file LICENSE , which
you should have received as part of this distribution . The te... |
9559b8819103f1bdc6b050070de13173f42cfbd9ca4fc0f2ba136adceec2f39a | maralorn/kassandra | ListElementWidget.hs | # LANGUAGE BlockArguments #
module Kassandra.ListElementWidget (
definitionElementWidget,
configListWidget,
AdhocContext (..),
tellList,
queryWidget,
selectWidget,
) where
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Sequence as Seq
import qualified Data.Set as Set
import Kassandr... | null | https://raw.githubusercontent.com/maralorn/kassandra/598133b89ab4e4a6209da920636e9e6ee540f38a/apps/kassandra/kassandra/src/Kassandra/ListElementWidget.hs | haskell | # LANGUAGE BlockArguments #
module Kassandra.ListElementWidget (
definitionElementWidget,
configListWidget,
AdhocContext (..),
tellList,
queryWidget,
selectWidget,
) where
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Sequence as Seq
import qualified Data.Set as Set
import Kassandr... | |
60393b47e8f945ed6a7eead983dfb61a27eeffb8746fb8198ec66589f50df3b2 | lingnand/VIMonad | Roledex.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , TypeSynonymInstances #
-----------------------------------------------------------------------------
-- |
Module : XMonad . Layout . Roledex
-- Copyright : (c)
License : BSD
--
-- Maintainer :
-- Stability : unstable
-- Portability : ... | null | https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/XMonadContrib/XMonad/Layout/Roledex.hs | haskell | ---------------------------------------------------------------------------
|
Copyright : (c)
Maintainer :
Stability : unstable
Portability : unportable
---------------------------------------------------------------------------
* Usage
$usage
* Screenshots
$screenshot
$usage
You can use this mo... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , TypeSynonymInstances #
Module : XMonad . Layout . Roledex
License : BSD
This is a completely pointless layout which acts like Microsoft 's Flip 3D
module XMonad.Layout.Roledex (
Roledex(Roledex)) where
import XMonad
import qualified XMo... |
25d1c687c8a2b3f6bf1f4fd915ccab47daedac99fa594e8d129cfd38e0999e36 | rurban/clisp | text.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
CLX text keyboard and pointer requests
;;;
TEXAS INSTRUMENTS INCORPORATED
;;; P.O. BOX 2909
AUSTIN , TEXAS 78769
;;;
Copyright ( C ) 1987 Texas Instruments Incorporated .
;;;
;;; Permission is grante... | null | https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/modules/clx/mit-clx/text.lisp | lisp | Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
P.O. BOX 2909
Permission is granted to any individual or institution to use, copy, modify,
and distribute this software, provided that this complete copyright and
permission notice is maintained, intact, in all copies and supporting
... |
CLX text keyboard and pointer requests
TEXAS INSTRUMENTS INCORPORATED
AUSTIN , TEXAS 78769
Copyright ( C ) 1987 Texas Instruments Incorporated .
Texas Instruments Incorporated provides this software " as is " without
(in-package :xlib)
(defparameter *max-string-size* 254)
( sub)sequence , u... |
0dc5ab8a2eeffce43d2520c6f32a8cdb95cc79a4b8d118c0ac6f6ba674b865ef | sondresl/AdventOfCode | Day20.hs | module Day20 where
import Data.Maybe
import Data.List.Extra
import Control.Arrow ((&&&))
import qualified Data.Set as S
import qualified Data.Map.Strict as M
import qualified Data.PQueue.Prio.Min as P
data Point = Wall
| Path
| Letter Char
| Portal String
| Space
... | null | https://raw.githubusercontent.com/sondresl/AdventOfCode/51525441795417f31b3eb67a690aa5534d1e699b/2019/Haskell/src/Day20.hs | haskell | Finished | module Day20 where
import Data.Maybe
import Data.List.Extra
import Control.Arrow ((&&&))
import qualified Data.Set as S
import qualified Data.Map.Strict as M
import qualified Data.PQueue.Prio.Min as P
data Point = Wall
| Path
| Letter Char
| Portal String
| Space
... |
c593db0c4e3141a5b655c2b6e6417710e3fa184e71ca14ad0c0ca5a9393ac21c | fox000002/hy-fluent | io.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; IO
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Syntax:
;;
;; (read-delimited-string port)
;;
;; read-generic-in-range-prompt
;; (read-real-in-range prompt default range)
;; (read-integer-in-range prompt default range)
;; read-object-gen... | null | https://raw.githubusercontent.com/fox000002/hy-fluent/a26358455f92e304f3d62202587ccf5682a156f4/fluent_gui/io.scm | scheme |
IO
Syntax:
(read-delimited-string port)
read-generic-in-range-prompt
(read-real-in-range prompt default range)
(read-integer-in-range prompt default range)
read-object-generic-list
read-object-generic
read-object-id/name-list
read-object-id/name
read-string-from-list
... | readq - generic
|
c9cd30645ee445bbcfed0d77364bd4050a71b525bf5a429c721f666af453745d | mivoq/hunpos | message_node.mli | class type message_node =
object
method set_class_name : string -> unit
method get_class_name : string
method set_messages_in : (string list) -> unit
method get_messages_in : (string list)
method set_messages_out : (string list) -> unit
method get_messages_out :... | null | https://raw.githubusercontent.com/mivoq/hunpos/0f0f775039fa749e67711c07ac681a16c0979349/ocaml-cmake/examples/code-analysis/message_node.mli | ocaml | class type message_node =
object
method set_class_name : string -> unit
method get_class_name : string
method set_messages_in : (string list) -> unit
method get_messages_in : (string list)
method set_messages_out : (string list) -> unit
method get_messages_out :... | |
9462672d10aa55a9628a259ae6988e99ccc915e03bfeac85af897d70a7cadc48 | pixlsus/registry.gimp.org_static | Amiga_GlowIcons.scm | ; __ __ __
; __/ //_ __/ //_______/ //_
; \_ _|_\_ \__ |
; ______| \ / \___/ \ |______
| _ 01 | | || | | | _ | 08 _ |
; \___|______||____| |_______|____/asd
; _/ \_
; || t e a m p o w e r a m i g a... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/Amiga_GlowIcons.scm | scheme | __ __ __
__/ //_ __/ //_______/ //_
\_ _|_\_ \__ |
______| \ / \___/ \ |______
\___|______||____| |_______|____/asd
_/ \_
|| t e a m p o w e r a m i g a ||
//-/_/--/__/ \__\--\_\--\\
/\ ... | | _ 01 | | || | | | _ | 08 _ |
_ \/ _ _ _ _ _ _ _ _ _ _ \/ _
|| Author : aka ||
|| Saint - Petersburg , RUSSIA , 2008 ! ||
(define (script-fu-glow-icons image
drawable
glow-intensity
blur-intensity
icon-bright
... |
0e90ee0b961cf47dd4a59b99cf359fc1cdaaadb1654c9ed5d49627d584e6a01d | ygmpkk/house | List.hs | {-# OPTIONS -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.List
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : stable
-... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/base/Data/List.hs | haskell | # OPTIONS -fno-implicit-prelude #
---------------------------------------------------------------------------
|
Module : Data.List
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : stable
Portability : portable
------------------------------------------------... | Copyright : ( c ) The University of Glasgow 2001
Operations on lists .
module Data.List
(
#ifdef __NHC__
[] (..)
,
#endif
: : ( a ) = > [ a ] - > a
: : ( a ) = > [ a ] - > a
: : ( a ) = > [ a ] - > a
: : ( a ) = > [ a ] - > a
, zip3
, zip4, zip5, zip... |
86cd4ea79f97a6125c2b04e31875135a3e69ccc56b0afcb35fab2e992e2e68e4 | juspay/atlas | CancellationReason.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
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
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/src/Product/CancellationReason.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
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
dis... | |
baeaefccb7c0a79394001aed07d1b50808a68bf5fd7965f177cc88503c16f5af | conscell/hugs-android | Assoc.hs | Copyright ( c ) 1998 .
-- See COPYRIGHT file for terms and conditions.
module Assoc
{-# DEPRECATED "This module is unmaintained, and will disappear soon" #-}
( -- associative collections
{-
-- non-observable classes
AssocX(..),
OrdAssocX(..),
FiniteMapX(..),
OrdFiniteMapX(..),
-- ob... | null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/oldlib/Assoc.hs | haskell | See COPYRIGHT file for terms and conditions.
# DEPRECATED "This module is unmaintained, and will disappear soon" #
associative collections
-- non-observable classes
AssocX(..),
OrdAssocX(..),
FiniteMapX(..),
OrdFiniteMapX(..),
-- observable classes
Assoc(..),
OrdAssoc(..),
Finite... | Copyright ( c ) 1998 .
module Assoc
module Assoc,
re - export view types from EdisonPrelude for convenience
Maybe2(..),
Maybe3(..)
) where
import Prelude hiding (null,map,lookup,foldr,foldl,foldr1,foldl1,filter)
import EdisonPrelude(Maybe2(..), Maybe3(..))
import Sequence(Sequence)
import ListS... |
eca24dcd4e5c70d8a1966c171befff5f8e7ae28d315042886d1570099dd847e6 | Carnap/Carnap | TruthTable.hs | # LANGUAGE RankNTypes , FlexibleContexts , TypeSynonymInstances , FlexibleInstances #
module Carnap.GHCJS.Action.TruthTable (truthTableAction) where
import Lib
import Carnap.GHCJS.SharedTypes
import Carnap.Core.Data.Types
import Carnap.Core.Data.Classes (Schematizable, Modelable(..))
import Carnap.Calculi.NaturalDeduc... | null | https://raw.githubusercontent.com/Carnap/Carnap/6f4461b2ac023700a5ede7c1db3b64f166d6589e/Carnap-GHCJS/src/Carnap/GHCJS/Action/TruthTable.hs | haskell | XXX: wait until we have a good way of saving
counterexamples to save the problem in the above
case. Otherwise you could confusingly save a failing
truth table as correct.
-----------------------
Full Truth Tables --
-----------------------
--------------------------
Partial Truth Tables --
-----------------------... | # LANGUAGE RankNTypes , FlexibleContexts , TypeSynonymInstances , FlexibleInstances #
module Carnap.GHCJS.Action.TruthTable (truthTableAction) where
import Lib
import Carnap.GHCJS.SharedTypes
import Carnap.Core.Data.Types
import Carnap.Core.Data.Classes (Schematizable, Modelable(..))
import Carnap.Calculi.NaturalDeduc... |
d8ab837fcf49530edcaef8117bf19f267e280b9ee111761f76ace5229b4b530d | change-metrics/monocle | Bugzilla.hs | # OPTIONS_GHC -fno - warn - redundant - constraints #
-- |
Copyright : ( c ) 2021 Monocle authors
SPDX - License - Identifier : AGPL-3.0 - only
-- Maintainer: Monocle authors <>
--
BugZilla system
module Lentille.Bugzilla (
searchExpr,
toTaskData,
getBZData,
getBugzillaSession,
getBugWithScore,
getBu... | null | https://raw.githubusercontent.com/change-metrics/monocle/7a6fb4c3c3e30d85d375b1f7f10a57e5b2d78a71/src/Lentille/Bugzilla.hs | haskell | |
Maintainer: Monocle authors <>
* The context
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------... | # OPTIONS_GHC -fno - warn - redundant - constraints #
Copyright : ( c ) 2021 Monocle authors
SPDX - License - Identifier : AGPL-3.0 - only
BugZilla system
module Lentille.Bugzilla (
searchExpr,
toTaskData,
getBZData,
getBugzillaSession,
getBugWithScore,
getBugsWithScore,
BZEffect,
runBZ,
Bugzi... |
50b5d1314a493bdeeda80e074e97ac7df786b6891e4e179f8ecd8ac01fd87542 | janestreet/ppx_css | strategy_intf.ml | open! Core
module type S = sig
type t
val name : string
val initialize : unit -> t Or_error.t
val update : t -> string -> unit
end
type t =
| T :
{ state : 'a
; strategy : (module S with type t = 'a)
}
-> t
| null | https://raw.githubusercontent.com/janestreet/ppx_css/55296423f273d6d475a273c33c0d8d4cfa304660/inline_css/src/strategy_intf.ml | ocaml | open! Core
module type S = sig
type t
val name : string
val initialize : unit -> t Or_error.t
val update : t -> string -> unit
end
type t =
| T :
{ state : 'a
; strategy : (module S with type t = 'a)
}
-> t
| |
ba85582b4f9a46d73eb434c4f50b2dc14d653bcbe0c88a53f2e6ad65a4cb71b4 | falsetru/htdp | 32.2.4.scm | (define-struct state (left boat-on-left right) #:transparent); left, right: side / board-on-left: bool
(define-struct side (m c) #:transparent) ; m, c: number
(define (valid-side? side)
(or (= (side-m side) 0)
(>= (side-m side) (side-c side) 0)))
(define (valid-state? state)
(and (valid-side? (state-left s... | null | https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/32/32.2.4.scm | scheme | left, right: side / board-on-left: bool
m, c: number |
(define (valid-side? side)
(or (= (side-m side) 0)
(>= (side-m side) (side-c side) 0)))
(define (valid-state? state)
(and (valid-side? (state-left state))
(valid-side? (state-right state))))
(define (filter-valid-states states)
(filter valid-state? states))
(require rackunit)
(require rackunit/te... |
7c7d37e48932b167bc7d6f4d6a655ebea80f41affda48360b5de41ef9ede5594 | ocramz/heidi | Generic.hs | # language LambdaCase #
# options_ghc -Wno - unused - imports #
module Heidi.Data.Frame.Algorithms.GenericTrie.Generic where
-- containers
import qualified Data.Set as S
-- generic-trie
import qualified Data.GenericTrie as GT
-- text
import qualified Data.Text as T (Text, pack, unpack)
import Heidi.Data.Row.GenericTr... | null | https://raw.githubusercontent.com/ocramz/heidi/172e4337a1f730c038ba10f48ea6bb3aa8acbf1f/src/Heidi/Data/Frame/Algorithms/GenericTrie/Generic.hs | haskell | containers
generic-trie
text
-- a user shouldn\t have to manipulate TCs
spread :: Foldable t => [TC] -> [TC] -> t (Row [TC] VP) -> Frame (Row [TC] VP)
spread = spreadWith valueToKey
gather :: Foldable t =>
S.Set [TC]
-> [TC]
-> [TC]
-> t (Row [TC] VP)
-> Frame (Row [TC]... | # language LambdaCase #
# options_ghc -Wno - unused - imports #
module Heidi.Data.Frame.Algorithms.GenericTrie.Generic where
import qualified Data.Set as S
import qualified Data.GenericTrie as GT
import qualified Data.Text as T (Text, pack, unpack)
import Heidi.Data.Row.GenericTrie (Row)
import Heidi.Data.Frame.Algor... |
dd8da85e6b9111e7ce3c24af8b33d7e71cf68d18c938d5fb42687bc221f059fb | crategus/cl-cffi-gtk | application-properties.lisp | ;;;; Application Properties - 2021-10-12
(in-package :gtk-application)
(defun application-print-properties (app)
(format t " application-id : ~a~%" (g-application-application-id app))
(format t " flags : ~a~%" (g-application-flags app))
(format t " inactivity-timeout : ~a~%" (g-application-inac... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/demo/gtk-application/application-properties.lisp | lisp | Application Properties - 2021-10-12
Create an application
Create an application window
Show the application window
Run the application |
(in-package :gtk-application)
(defun application-print-properties (app)
(format t " application-id : ~a~%" (g-application-application-id app))
(format t " flags : ~a~%" (g-application-flags app))
(format t " inactivity-timeout : ~a~%" (g-application-inactivity-timeout app))
(format t " ... |
463a7381227b90938e3a19c58e91a25682d5d0abc6e8cd2ade03fadfee68571b | cmsc430/www | parse.rkt | #lang racket
(provide parse)
(require "ast.rkt")
;; S-Expr -> Expr
(define (parse s)
(match s
['eof (Eof)]
[(? exact-integer?) (Int s)]
[(? boolean?) (Bool s)]
[(? char?) (Char s)]
[(list (? op0? o)) (Prim0 o)]
[(list (? op1? o) e) (Prim1 o (parse e))]
[... | null | https://raw.githubusercontent.com/cmsc430/www/99cece16a9b2cd1c011eab07d76d30d8b963c458/langs/evildoer/parse.rkt | racket | S-Expr -> Expr
Any -> Boolean | #lang racket
(provide parse)
(require "ast.rkt")
(define (parse s)
(match s
['eof (Eof)]
[(? exact-integer?) (Int s)]
[(? boolean?) (Bool s)]
[(? char?) (Char s)]
[(list (? op0? o)) (Prim0 o)]
[(list (? op1? o) e) (Prim1 o (parse e))]
[(list 'begin e1 e2... |
b81d8d69a41291d4d5f6c630f7ae0f86dd9638d5a24249ac73d7810905b3ebf9 | DSTOQ/haskell-stellar-sdk | Stellar.hs | # LANGUAGE DefaultSignatures #
module Control.Monad.Stellar
( MonadStellar
, accountById
, accountTransactions
) where
import Named
import Protolude
import Stellar.Client.Types
import Control.Monad.Trans (MonadTrans)
import Control.Monad.Trans.Cont (ContT)
import Control.Monad.Trans.RWS (RWST)
im... | null | https://raw.githubusercontent.com/DSTOQ/haskell-stellar-sdk/82a76c2f951a2aaabdc38092fdc89044b278c53d/client/src/Control/Monad/Stellar.hs | haskell | # LANGUAGE DefaultSignatures #
module Control.Monad.Stellar
( MonadStellar
, accountById
, accountTransactions
) where
import Named
import Protolude
import Stellar.Client.Types
import Control.Monad.Trans (MonadTrans)
import Control.Monad.Trans.Cont (ContT)
import Control.Monad.Trans.RWS (RWST)
im... | |
635a6c23b0f7d0bed8c9bcf49a3a6717aa66d1838a87429a68054a872ddaa504 | Novus-School/novus | adapters.clj | (ns novus.student.adapters)
| null | https://raw.githubusercontent.com/Novus-School/novus/f214c710ba74e13787f5fe38203673d1b9076fd6/novus/src/main/novus/student/adapters.clj | clojure | (ns novus.student.adapters)
| |
34d7b2e14d87266011657acbe95dc9fc7a64bb94e0efa8a8ab87daa53f96d9e3 | lucasdicioccio/prodapi | Api.hs | # LANGUAGE TypeFamilies #
module Prod.UserAuth.Api
( UserAuthApi,
CookieProtect,
)
where
import Data.Text (Text)
import Prod.UserAuth.Base
import Prod.UserAuth.JWT
import Servant
import Servant.Server.Experimental.Auth (AuthServerData)
import Web.JWT
type CookieProtect = AuthProtect "prod-user-auth"
type in... | null | https://raw.githubusercontent.com/lucasdicioccio/prodapi/4c43e1d617832f8ae88cb15afada1d5ab5e46ea4/prodapi-userauth/src/Prod/UserAuth/Api.hs | haskell | # LANGUAGE TypeFamilies #
module Prod.UserAuth.Api
( UserAuthApi,
CookieProtect,
)
where
import Data.Text (Text)
import Prod.UserAuth.Base
import Prod.UserAuth.JWT
import Servant
import Servant.Server.Experimental.Auth (AuthServerData)
import Web.JWT
type CookieProtect = AuthProtect "prod-user-auth"
type in... | |
80a85353b3f9b482d078a9aa6ca2e572724ac6f2a3546ca38c30396027363f43 | onedata/op-worker | lfm_files_posix_test_SUITE.erl | %%%-------------------------------------------------------------------
@author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%% @doc
%%% This file contains tests of lfm API on posix storage.
%%% @end
%%%---------------------------------------... | null | https://raw.githubusercontent.com/onedata/op-worker/71d2ac527f4d20ca40b8f5ae28b8107b68ca90e9/test_distributed/lfm_files_posix_test_SUITE.erl | erlang | -------------------------------------------------------------------
@end
@doc
This file contains tests of lfm API on posix storage.
@end
-------------------------------------------------------------------
export for ct
tests
====================================================================
Test function
=====... | @author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(lfm_files_posix_test_SUITE).
-author("Michal Cwiertnia").
-include("lfm_files_test_base.hrl").
-include("modules/fslogic/fslogic_common.hrl").
-include("modules/logical_file_manager/lfm.hrl... |
0332e1b36da0a18ad049b2f53b24d98c7a9113d531d9c3520a45294bd5bd4dd4 | johnswanson/tictag | util.clj | (ns c2.util)
(defmacro p
"Print and return native JavaScript argument."
[x]
`(let [res# ~x]
(.log js/console res#)
res#))
(defmacro pp
"Pretty print and return argument (uses `prn-str` internally)."
[x]
`(let [res# ~x]
(.log js/console (prn-str res#))
res#))
(defmacro profile
"Profi... | null | https://raw.githubusercontent.com/johnswanson/tictag/89140b5084817690ec417b07b7d095ba7677f4e0/src/clj/c2/util.clj | clojure | (ns c2.util)
(defmacro p
"Print and return native JavaScript argument."
[x]
`(let [res# ~x]
(.log js/console res#)
res#))
(defmacro pp
"Pretty print and return argument (uses `prn-str` internally)."
[x]
`(let [res# ~x]
(.log js/console (prn-str res#))
res#))
(defmacro profile
"Profi... | |
14b9213ce6c907268fd9e266b0b71f539b91d6107bb608b3164e8e420adf4c47 | input-output-hk/cardano-wallet-legacy | Accounts.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Test.Spec.Accounts (spec) where
import Universum
import Test.Hspec (Spec, describe, shouldBe, shouldSatisfy)
import Test.Hspec.QuickCheck (prop)
import Test.QuickCheck (arbitrary, withMaxSuccess)
import ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/test/unit/Test/Spec/Accounts.hs | haskell | addresses. Remember, it's only when we create a new HdRoot that
we enforce this invariant.
as by defaults each fixture's wallet is created with a
default account at index 'firstHardened'.
trying to make one would be overkill.
Unexpected Failure
as by defaults each fixture's wallet is created with a
default acco... | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Test.Spec.Accounts (spec) where
import Universum
import Test.Hspec (Spec, describe, shouldBe, shouldSatisfy)
import Test.Hspec.QuickCheck (prop)
import Test.QuickCheck (arbitrary, withMaxSuccess)
import ... |
f9a83a6530b43f03306146df272931186babf77bf2ecaa5c69d53a8e2c79227d | ariesteam/aries | matrix_ops.clj | Copyright 2009
;;;
;;; This file is part of CLJ-DISTRICT.
;;;
;;; CLJ-DISTRICT 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 option ) any later version .... | null | https://raw.githubusercontent.com/ariesteam/aries/b3fafd4640f4e7950fff3791bc4ea4c06ee4dcdf/plugins/org.integratedmodelling.aries.core/bindings/clojure/district/matrix_ops.clj | clojure |
This file is part of CLJ-DISTRICT.
CLJ-DISTRICT is free software: you can redistribute it
CLJ-DISTRICT is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for m... | Copyright 2009
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 option ) any later version .
You should have received a copy of the GNU General Public License
(ns district.matrix-ops
(:refer-cl... |
20141357a4d92def9b88a7146392f32ee886e9672c275bd17551830fdb775413 | hemmi/coq2scala | eterm.ml | *
- Get types of existentials ;
- Flatten dependency tree ( prefix order ) ;
- Replace existentials by indices in term , applied to the right arguments ;
- Apply term prefixed by quantification on " existentials " .
- Get types of existentials ;
- Flatten dependency tree (prefix order) ;
... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2/plugins/subtac/eterm.ml | ocaml | spiwack: Store field for internalizing ev_tac in evar_infos' evar_extra.
Remove existential variables in types and build the corresponding products
Substitute evar refs in the term by variables | *
- Get types of existentials ;
- Flatten dependency tree ( prefix order ) ;
- Replace existentials by indices in term , applied to the right arguments ;
- Apply term prefixed by quantification on " existentials " .
- Get types of existentials ;
- Flatten dependency tree (prefix order) ;
... |
a298b8a55312170b5deb99a3226171ef317c5fab385322a3fdf7a4b07288a0cb | Z572/gwwm | keybind.scm | (define-module (gwwm keybind)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-71)
#:use-module (wlroots types keyboard)
#:use-module (gwwm commands)
#:use-module (oop goops )
#:use-module (gwwm keymap)
#:use-module (ice-9 match))
(define SHIFT WLR_MODIFIER_SHIFT )
(define CAPS WLR_MODIFIER_CAPS )
(de... | null | https://raw.githubusercontent.com/Z572/gwwm/c993fcb203e9d83c8089ac1cd23b999978490a98/gwwm/keybind.scm | scheme | (define-method (ref-key (k <integer>))
(ref-key (string->symbol (number->string k)))) | (define-module (gwwm keybind)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-71)
#:use-module (wlroots types keyboard)
#:use-module (gwwm commands)
#:use-module (oop goops )
#:use-module (gwwm keymap)
#:use-module (ice-9 match))
(define SHIFT WLR_MODIFIER_SHIFT )
(define CAPS WLR_MODIFIER_CAPS )
(de... |
60c7f4215b1b6d50d558c96863471e7438bc887316b458946928577b18ed630f | surganov/cis194 | Fibonacci.hs | import Numeric (showHex, showIntAtBase)
import Data.Char (intToDigit)
Exercise 1
fib :: Integer -> Integer
fib 0 = 0
fib 1 = 1
fib n = fib (n-1) + fib (n-2)
fibs1 :: [Integer]
fibs1 = fib <$> [0..]
exercise1 = print $ take 30 fibs1
Exercise 2
fibs2 :: [Integer]
fibs2 = 0 : 1 : zipWith (+) fibs2 (tail fibs2)
... | null | https://raw.githubusercontent.com/surganov/cis194/e727f29389fb01c6d221940d45b394fd67e068c4/06/Fibonacci.hs | haskell | import Numeric (showHex, showIntAtBase)
import Data.Char (intToDigit)
Exercise 1
fib :: Integer -> Integer
fib 0 = 0
fib 1 = 1
fib n = fib (n-1) + fib (n-2)
fibs1 :: [Integer]
fibs1 = fib <$> [0..]
exercise1 = print $ take 30 fibs1
Exercise 2
fibs2 :: [Integer]
fibs2 = 0 : 1 : zipWith (+) fibs2 (tail fibs2)
... | |
b8d78e0455d32a67accfe47db18de442337ed70e012b6e991dc2c8d7b84429a5 | anton-k/processing-for-haskell | RegularPolygon.hs | -- original code:
Regular Polygon
--
What is your favorite ? Pentagon ? Hexagon ? ? No ? What about the icosagon ?
-- The polygon() function created for this example is capable of drawing any regular polygon.
-- Try placing different numbers into the polygon() function calls within draw() to explore.
import Gra... | null | https://raw.githubusercontent.com/anton-k/processing-for-haskell/7f99414f3c266135b6a2848978fcb572fd7b67b1/examples/Form/RegularPolygon.hs | haskell | original code:
The polygon() function created for this example is capable of drawing any regular polygon.
Try placing different numbers into the polygon() function calls within draw() to explore.
We specify the scope of local transformation with indentation.
-----------------------------------------
Sidenote
I... |
Regular Polygon
What is your favorite ? Pentagon ? Hexagon ? ? No ? What about the icosagon ?
import Graphics.Proc
main = runProc $ def { procSetup = setup, procDraw = draw }
width = 640
height = 360
setup = do
smooth
size (P2 width height)
draw() = do
background (grey 102)
fill (grey 250)
Triang... |
e2303317411c90b930ad5f7f0367dd10d29547bb4a2dda4783f8c336fe557299 | simonstl/introducing-erlang-2nd | drop.erl | -module(drop).
-behaviour(gen_server).
-export([start_link/0]). % convenience call for startup
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]). % gen_server calls
-define(SERVER, ?MODULE). % macro that just defines this module as se... | null | https://raw.githubusercontent.com/simonstl/introducing-erlang-2nd/607e9c85fb767cf5519d331ef6ed549aee51fe61/ch11/ex3-drop-app/drop.erl | erlang | convenience call for startup
gen_server calls
macro that just defines this module as server
simple counter state
convenience method for startup
gen_server callbacks | -module(drop).
-behaviour(gen_server).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
start_link() ->
gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
init([]) ->
{ok, #state{count=0}}.
handle_call(_Request, _From, State) ->
... |
ffd34db5022e8e26caa0474340fd3f7f86c8427972b4c33632e1329541d51b2d | softwarelanguageslab/maf | R5RS_various_gcipd-4.scm | ; Changes:
* removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((id (lambda (x)
x))
(f (lambda (n)
(if (<change> (<= n 1) (not (<= n 1)))
1
(* n (f (- n 1))))))
(g (... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_various_gcipd-4.scm | scheme | Changes:
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
(letrec ((id (lambda (x)
x))
(f (lambda (n)
(if (<change> (<= n 1) (not (<= n 1)))
1
(* n (f (- n 1))))))
(g (lambda (n)
(if (<= n 1) 1 (+ (* n n) (g (- n... |
c3b607c36c7d9ae87ac3fd3443319bcbd0d0e18c47435dfee561366b202e7dc2 | sicmutils/sicmutils | brent_test.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns sicmutils.numerical.unimin.brent-test
(:require [clojure.test :refer [is deftest testing]]
[clojure.test.check.generators :as gen]
[com.gfredericks.test.chuck.clojure-test :refer [checking]]
[same :refer [ish? zeroish? with-comparator] :inc... | null | https://raw.githubusercontent.com/sicmutils/sicmutils/f181f153f1432e9648206f903282e7cb4cdd9644/test/sicmutils/numerical/unimin/brent_test.cljc | clojure | #_"SPDX-License-Identifier: GPL-3.0"
(ns sicmutils.numerical.unimin.brent-test
(:require [clojure.test :refer [is deftest testing]]
[clojure.test.check.generators :as gen]
[com.gfredericks.test.chuck.clojure-test :refer [checking]]
[same :refer [ish? zeroish? with-comparator] :inc... | |
128aac376904cb6e28e9e75f8ebe41d2d971d337ec43118d46188cac398d71a7 | mikeananev/clj-compress | core_test.clj | (ns clj-compress.core-test
(:require [clojure.test :refer :all]
[clojure.java.io :refer [file output-stream input-stream] :as io]
[clj-compress.core :refer :all])
(:import (java.io ByteArrayOutputStream)
(org.apache.commons.io FileUtils)))
(deftest compress-data-test
(testing ... | null | https://raw.githubusercontent.com/mikeananev/clj-compress/3dbb8cf7d91c62b221f3b00125c19ccacf528849/test/clj_compress/core_test.clj | clojure | exclude lz4 cause it very very slow on big files | (ns clj-compress.core-test
(:require [clojure.test :refer :all]
[clojure.java.io :refer [file output-stream input-stream] :as io]
[clj-compress.core :refer :all])
(:import (java.io ByteArrayOutputStream)
(org.apache.commons.io FileUtils)))
(deftest compress-data-test
(testing ... |
e6da7c845c061767ae1a13c2f17476d692d46a598848f5629a80ad5a6b5b5f41 | np/hlatex | pphlatex.hs | import System.Environment
import System.Cmd
import System.Exit
whileSuccess :: [IO ExitCode] -> IO ExitCode
whileSuccess [] = return ExitSuccess
whileSuccess (x:xs) = do code <- x
case code of
ExitSuccess -> whileSuccess xs
_ -> return code... | null | https://raw.githubusercontent.com/np/hlatex/4f2212c5db5e10dab7f6cbb9cf47a041b3320176/attic/pphlatex.hs | haskell | import System.Environment
import System.Cmd
import System.Exit
whileSuccess :: [IO ExitCode] -> IO ExitCode
whileSuccess [] = return ExitSuccess
whileSuccess (x:xs) = do code <- x
case code of
ExitSuccess -> whileSuccess xs
_ -> return code... | |
e4c21669845489e4981d0096b5992b4c9cb4490ae9c176d8349f2076c1c42fb2 | mvaldesdeleon/haskell-book | stdfuns.hs | module StdFuns where
myOr returns True if any in the list is True
myOr :: [Bool] -> Bool
myOr [] = False
myOr (x:xs) = if x then True
else myOr xs
-- myAny returns True if a -> Bool applied to any of the values in the list returns True
myAny :: (a -> Bool) -> [a] -> Bool
myAny _ [] = False
myAny... | null | https://raw.githubusercontent.com/mvaldesdeleon/haskell-book/ee4a70708041686abe2f1d951185786119470eb4/ch09/stdfuns.hs | haskell | myAny returns True if a -> Bool applied to any of the values in the list returns True
After you write the recursive myElem, write another version that uses any.
Implement myReverse.
squish flattens a list of lists into a list
squishMap maps a function over a list and concatenates the results.
Using the myMinimumB... | module StdFuns where
myOr returns True if any in the list is True
myOr :: [Bool] -> Bool
myOr [] = False
myOr (x:xs) = if x then True
else myOr xs
myAny :: (a -> Bool) -> [a] -> Bool
myAny _ [] = False
myAny f (x:xs) = if f x then True
else myAny f xs
myElem :: Eq a => a... |
5a26f7cb69edfe7b159e73dd73900afb1ba9019fc430176fe29f25a6152017b9 | id774-2/maeve | back-end.scm | (define-module maeve.compiler.back-end
;; MIR -> Assembly
(use maeve.compiler.intermediate-language-util)
(use maeve.compiler.intermediate-language-instance)
(use maeve.compiler.register-allocation)
(use maeve.compiler.misc)
(use maeve.compiler.middle-end)
(export-all))
(select-module maeve.compiler.back... | null | https://raw.githubusercontent.com/id774-2/maeve/a9442c3479b0d575f896b898eb889297f30e1a96/compiler/back-end.scm | scheme | MIR -> Assembly
type tag
(lambda (i s)
(values
'(r-addr fp r0 r1 rk))
,@(stack:free (- sp+:misc (if (not abi) vsize 0))))
type tag
(map
(lambda (gv) (list ".globl " (loop:jump-lsm gv) "\n"))
exported-gvars)
imm mem
jmp *
else $
(seq (map loop-s es))
(label name)
... | (define-module maeve.compiler.back-end
(use maeve.compiler.intermediate-language-util)
(use maeve.compiler.intermediate-language-instance)
(use maeve.compiler.register-allocation)
(use maeve.compiler.misc)
(use maeve.compiler.middle-end)
(export-all))
(select-module maeve.compiler.back-end)
(define *user-... |
0b382096a2bd6e329492acdf2f62252c5b15a0d869c237c511b517cc4ae4b3b3 | sky-big/RabbitMQ | rabbit_mgmt_wm_permissions_user.erl | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITH... | null | https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_permissions_user.erl | erlang | compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
-------------------------------------------------------------------- | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ Management Plugin .
The Initial Developer of the Original Code... |
4075515435ce6e11ff76239a597c9a28bfea649c8b5e1b668c754bef6e5acbf3 | janestreet/core | set.ml | open! Import
module List = List0
open Set_intf
module Merge_to_sequence_element = Merge_to_sequence_element
module type Elt_plain = Elt_plain
module type Elt = Elt
module type Elt_binable = Elt_binable
let to_comparator (type k cmp) ((module M) : (k, cmp) Comparator.Module.t) = M.comparator
let of_comparator (type k... | null | https://raw.githubusercontent.com/janestreet/core/d0d1b3915c9350d8e9f2b395a817659e539e6155/core/src/set.ml | ocaml | Don't use [of_sorted_array] to avoid the allocation of an intermediate array
The binary representation of set is used in the stable modules below, so it's
assumed to be stable (if the elt is stable). | open! Import
module List = List0
open Set_intf
module Merge_to_sequence_element = Merge_to_sequence_element
module type Elt_plain = Elt_plain
module type Elt = Elt
module type Elt_binable = Elt_binable
let to_comparator (type k cmp) ((module M) : (k, cmp) Comparator.Module.t) = M.comparator
let of_comparator (type k... |
cc61cabdf355aa49f8418fce2a67fd6563b3f50e5ca26d4774a47802fb250517 | Perry961002/SICP | exe3.48-deadlock.scm | (load "Chap3\\exercise\\exe3.47-make-semaphore.scm")
(define (exchange account1 account2)
(let ((difference (- (account1 'balance)
(account2 'balance))))
((account1 'withdraw) difference)
((account2 'deposit) difference)))
(define (set-id)
(let ((i 0))
... | null | https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap3/exercise/exe3.48-deadlock.scm | scheme | 测试
(define a (make-id))
= = > 1
= = > 1
(define b (make-id))
= = > 2
= = > 2
测试 | (load "Chap3\\exercise\\exe3.47-make-semaphore.scm")
(define (exchange account1 account2)
(let ((difference (- (account1 'balance)
(account2 'balance))))
((account1 'withdraw) difference)
((account2 'deposit) difference)))
(define (set-id)
(let ((i 0))
... |
108ca7b9edaf4ffa67b0ac6b6132c85fb96cd5200995d9a162e7df0401757749 | stschiff/sequenceTools | mergeit_wrapper.hs | #!/usr/bin/env stack
-- stack script --resolver lts-14.1 --package turtle
{-# LANGUAGE OverloadedStrings #-}
import Control.Applicative (optional)
import Prelude hiding (FilePath)
import Turtle
data Options = Options {
optGeno1 :: FilePath,
optSnp1 :: FilePath,
optInd1 :: FilePath,
optGeno2 :: FilePat... | null | https://raw.githubusercontent.com/stschiff/sequenceTools/7bdebf13937d8f6dff7da8b67091d57b6d4c47c4/scripts/mergeit_wrapper.hs | haskell | stack script --resolver lts-14.1 --package turtle
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
import Control.Applicative (optional)
import Prelude hiding (FilePath)
import Turtle
data Options = Options {
optGeno1 :: FilePath,
optSnp1 :: FilePath,
optInd1 :: FilePath,
optGeno2 :: FilePath,
optSnp2 :: FilePath,
optInd2 :: FilePath,
optOutPrefix :: FilePath,
o... |
3f0f3df5cf654a37d1f586eeb54342a0a952255741c3c7c65437530fa4ca8cbe | ghcjs/ghcjs-examples | hello.hs | module Main where
main = putStrLn "Hello World!"
| null | https://raw.githubusercontent.com/ghcjs/ghcjs-examples/217b7fd3816f57634977beac711452704c3ea688/weblog/hello/hello.hs | haskell | module Main where
main = putStrLn "Hello World!"
| |
9b064624be6be326d1e54418fba52e148ad82089f3c48ced6c3b1dfd1ba219f1 | camlp4/camlp4 | Rprint.ml | camlp4r
(****************************************************************************)
(* *)
(* OCaml *)
(* ... | null | https://raw.githubusercontent.com/camlp4/camlp4/6e98f7dbe264e68966d93b85996e8cc6fdaa7bbe/camlp4/Camlp4Top/Rprint.ml | ocaml | **************************************************************************
OCaml
... | camlp4r
Copyright 2002 - 2006 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed under
the terms of the GNU Library General Public License , with the special
Authors :
* - Daniel de Rauglaudre : initial version
* - : refac... |
67374dd7327edb2a05e598c49996f0419e1ed832a93e0ddd081004b3df5e4d08 | smuenzel/opile | variable.ml | open! Core
include Compiler_without_sexp.Variable
let sexp_of_t t =
unique_name t
|> [%sexp_of: string]
module Set = struct
include Compiler_without_sexp.Variable.Set
let sexp_of_t t = fold (fun key acc -> key :: acc) t [] |> [%sexp_of: t list]
end
module Map = struct
include Compiler_without_sexp.Variab... | null | https://raw.githubusercontent.com/smuenzel/opile/190ca86df6440550d0fddf0222e16ba2e52bca64/compiler-with-sexp/variable.ml | ocaml | open! Core
include Compiler_without_sexp.Variable
let sexp_of_t t =
unique_name t
|> [%sexp_of: string]
module Set = struct
include Compiler_without_sexp.Variable.Set
let sexp_of_t t = fold (fun key acc -> key :: acc) t [] |> [%sexp_of: t list]
end
module Map = struct
include Compiler_without_sexp.Variab... | |
766d9d73627f229fac9ce07cccd2d76b4e6496f7e0c60f03f8da3b128d6b12f6 | AlexKnauth/music | chord-symbol.rkt | #lang agile
(require "chord.rkt")
(module+ example
(provide (all-defined-out))
(require music/util/defs
(for-syntax racket/syntax)))
;; ------------------------------------------------------------------------
(provide chord-symbol chord-symbol-root
chord-symbol-kind
)
A ChordSymbo... | null | https://raw.githubusercontent.com/AlexKnauth/music/b4489c27d7c0f7116d769344c787fa76b479e5fa/music/data/chord/chord-symbol.rkt | racket | ------------------------------------------------------------------------
A ChordSymbolKind is a (chord-symbol-kind String ChordKind)
The `name` field must match up with the MusicXML definition for the
string inside the kind element here:
<harmony>
<root> ... </root>
<kind> `name` </kind>
<frame> ... </fra... | #lang agile
(require "chord.rkt")
(module+ example
(provide (all-defined-out))
(require music/util/defs
(for-syntax racket/syntax)))
(provide chord-symbol chord-symbol-root
chord-symbol-kind
)
A ChordSymbol is a ( chord - symbol Note ChordSymbolKind )
(struct chord-symbol [root sy... |
0e57f7edbe9e0d1d06f23de0334093e291d5cd99b0e6d244e31926bbd2758702 | reagent-project/reagent-cookbook | handler.clj | (ns mermaid.handler
(:require [clojure.java.io :as io]
[compojure.core :refer [GET defroutes]]
[compojure.route :refer [not-found resources]]
[ring.middleware.defaults :refer [site-defaults wrap-defaults]]
[prone.middleware :refer [wrap-exceptions]]))
(defrou... | null | https://raw.githubusercontent.com/reagent-project/reagent-cookbook/ccda91a74377098d27e2707c306a0187243cb290/old-recipes/mermaid/src/clj/mermaid/handler.clj | clojure | (ns mermaid.handler
(:require [clojure.java.io :as io]
[compojure.core :refer [GET defroutes]]
[compojure.route :refer [not-found resources]]
[ring.middleware.defaults :refer [site-defaults wrap-defaults]]
[prone.middleware :refer [wrap-exceptions]]))
(defrou... | |
c583f93efdf20e5fff1c73d3369d4838cd5970de4ad941261b4bf35bd1e917f4 | gvolpe/shopping-cart-haskell | Main.hs | module Main where
import Control.Monad ( unless )
import Hedgehog
import System.Exit
import Utils.TextTest
main :: IO ()
main = do
results <- sequence [checkParallel utilTextTests]
checkParallel paymentTests
unless (and results) $ exitFailure
| null | https://raw.githubusercontent.com/gvolpe/shopping-cart-haskell/3c54d7671f40a49fcd38f182ec7f8672dbafe8a7/test/Main.hs | haskell | module Main where
import Control.Monad ( unless )
import Hedgehog
import System.Exit
import Utils.TextTest
main :: IO ()
main = do
results <- sequence [checkParallel utilTextTests]
checkParallel paymentTests
unless (and results) $ exitFailure
| |
704b48532f5525e64f99246718737b6daf6fe983b50fbdaac82ecbc52f1f6140 | javalib-team/javalib | jLow2High.ml |
* This file is part of Javalib
* Copyright ( c)2007 ( Université de Rennes 1 )
* Copyright ( c)2007,2008 , 2009 ( CNRS )
*
* This software is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 , with the special exce... | null | https://raw.githubusercontent.com/javalib-team/javalib/0699f904dbb17e87ec0ad6ed0c258a1737e60329/src/jLow2High.ml | ocaml | convert a list of attributes to an [attributes] structure.
it seems quite common
get rid of flags that can only happen in lambdas |
* This file is part of Javalib
* Copyright ( c)2007 ( Université de Rennes 1 )
* Copyright ( c)2007,2008 , 2009 ( CNRS )
*
* This software is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 , with the special exce... |
3205eb597a8e694ff3ddbd054fc2afdba3a7085ee3a1938702c2078dddc4e9bf | AshleyYakeley/Truth | UpdateOrder.hs | module Changes.Core.Types.UpdateOrder where
import Changes.Core.Import
import Changes.Core.Lens
import Changes.Core.Types.EditApplicative
import Changes.Core.Types.ReadOnly
import Changes.Core.Types.Whole
data UpdateOrder update =
forall o. MkUpdateOrder (o -> o -> Ordering)
(FloatingC... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/d704b8baaa77dac002922eccecdd91018c4b7eef/Changes/changes-core/lib/Changes/Core/Types/UpdateOrder.hs | haskell | module Changes.Core.Types.UpdateOrder where
import Changes.Core.Import
import Changes.Core.Lens
import Changes.Core.Types.EditApplicative
import Changes.Core.Types.ReadOnly
import Changes.Core.Types.Whole
data UpdateOrder update =
forall o. MkUpdateOrder (o -> o -> Ordering)
(FloatingC... | |
77e993d2aae7075005afb00ac4a81dc991e3f2d52a92aac214049bd00144a8d3 | gregnwosu/haskellbook | bytestringtest.hs | {-# LANGUAGE OverloadedStrings #-}
module BS where
import qualified Data.Text.IO as TIO
import qualified Data.Text.Encoding as TE
import qualified Data.ByteString.Lazy as BL
import qualified Codec.Compression.GZip as GZip
input :: BL.ByteString
input = "123"
compressed :: BL.ByteString
compressed = GZip.compress ... | null | https://raw.githubusercontent.com/gregnwosu/haskellbook/b21fb6772e58f07cff334d9c551d0477ec856897/chapter28/src/bytestringtest.hs | haskell | # LANGUAGE OverloadedStrings #
this will fail as its not recognisable text
TIO.putStrLn $ TE.decodeUtf8 (BL.toStrict compressed) |
module BS where
import qualified Data.Text.IO as TIO
import qualified Data.Text.Encoding as TE
import qualified Data.ByteString.Lazy as BL
import qualified Codec.Compression.GZip as GZip
input :: BL.ByteString
input = "123"
compressed :: BL.ByteString
compressed = GZip.compress input
main :: IO ()
main = do
TI... |
4f97f2393e7a2229859350655fcb278d06a85afccf56d01f517df2cebf295b26 | denisidoro/graffiti | interceptors.clj | (ns graffiti.interceptors
(:require [clojure.walk :as walk]
[quark.collection.ns :as ns])
(:import (clojure.lang IPersistentMap)))
(defn simplify
"Converts all ordered maps nested within the map into standard hash maps, and
sequences into vectors, which makes for easier constants in the tests, and... | null | https://raw.githubusercontent.com/denisidoro/graffiti/f4ea2103e060fafe2c84a14aff5f68cf8039e1aa/src/graffiti/interceptors.clj | clojure | (ns graffiti.interceptors
(:require [clojure.walk :as walk]
[quark.collection.ns :as ns])
(:import (clojure.lang IPersistentMap)))
(defn simplify
"Converts all ordered maps nested within the map into standard hash maps, and
sequences into vectors, which makes for easier constants in the tests, and... | |
34ece6e9ff8b2b368ba39805259e3fe819b1f923b2a74ab4e8e4a297e90514bf | returntocorp/semgrep | unit_graph_code.mli | (* Test suite for this folder. *)
val tests : graph_of_string:(string -> Graph_code.t) -> Testutil.test list
| null | https://raw.githubusercontent.com/returntocorp/semgrep/855abad9ada6ea5fd72d437fd69ff2e5fa42c1f1/libs/graph_code/unit_graph_code.mli | ocaml | Test suite for this folder. | val tests : graph_of_string:(string -> Graph_code.t) -> Testutil.test list
|
f484e5d6fe5217278365b6d7f179cb1d8e6c45c87ee2fa2723f8325ce080b4ca | wdebeaum/step | app.lisp | ;;;;
;;;; W::app
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::app
(SENSES
((LF-PARENT ONT::computer-software) ;computer-program)
(example "quit the application")
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/app.lisp | lisp |
W::app
computer-program) |
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::app
(SENSES
(example "quit the application")
)
)
)
))
|
7b826726b07e62ef73266bf548443161d68cb3a2f018ff0d124d8c84831dfe90 | rsnikhil/Forvis_RISCV-ISA-Spec | TestStackSafety.hs | # LANGUAGE TemplateHaskell #
HEADER sequence :
- SW SP RA 1 @H1 - store RA
- ADDI SP SP 2 @H2 - increment SP
- ADDI RA R0 0 @H3 - untag RA so others can use
RETURN sequence :
- LW RA SP -1 @R1 - load return address
- ADDI SP SP -... | null | https://raw.githubusercontent.com/rsnikhil/Forvis_RISCV-ISA-Spec/0c5590a12f4b39644d0497fa6285ad5e33003dfc/micropolicies/TestStackSafety.hs | haskell | This machine has a LARGER inaccessible region
liveness is a different question )
This machine has a LARGER inaccessible region
liveness is a different question)
From /src
From .
Should this be something else?
Should this be something else?
----------------------------------------------------------------------... | # LANGUAGE TemplateHaskell #
HEADER sequence :
- SW SP RA 1 @H1 - store RA
- ADDI SP SP 2 @H2 - increment SP
- ADDI RA R0 0 @H3 - untag RA so others can use
RETURN sequence :
- LW RA SP -1 @R1 - load return address
- ADDI SP SP -... |
2bef5130240885a7fd2e78ad4d70ad394727ab68a371ff2a74206e6e9cb5e68b | replikativ/konserve | node_filestore_test.cljs | (ns konserve.node-filestore-test
(:require [cljs.core.async :refer [go take! <! >! put! take! close! chan timeout]]
[cljs.nodejs :as node]
[cljs-node-io.core :as io]
[cljs-node-io.fs :as fs]
[cljs.test :refer-macros [deftest is testing async use-fixtures]]
[... | null | https://raw.githubusercontent.com/replikativ/konserve/6c0bf0aa36aa6f21f3efbe3a61d98a79275665e3/test/konserve/node_filestore_test.cljs | clojure | assoc-in overwrites
assoc-in overwrites
TODO what are bget semantics (stream & chan behaviors) when called on a deleted store
lock used for reading/update blobs, list-keys | (ns konserve.node-filestore-test
(:require [cljs.core.async :refer [go take! <! >! put! take! close! chan timeout]]
[cljs.nodejs :as node]
[cljs-node-io.core :as io]
[cljs-node-io.fs :as fs]
[cljs.test :refer-macros [deftest is testing async use-fixtures]]
[... |
05cb1f326f62af853cd2e3619fa55505665f0b3816baf605433f604077a4bc20 | marcoonroad/twostep | base32.ml | let base32_alphabet =
[ "a"
; "b"
; "c"
; "d"
; "e"
; "f"
; "g"
; "h"
; "i"
; "j"
; "k"
; "l"
; "m"
; "n"
; "o"
; "p"
; "q"
; "r"
; "s"
; "t"
; "u"
; "v"
; "w"
; "x"
; "y"
; "z"
; "2"
; "3"
; "4"
; "5"
; "6"
; "7"
]
let reverse_base32_alphabet = functi... | null | https://raw.githubusercontent.com/marcoonroad/twostep/090ce0dddbd2016b28bb145e3f8bcbea08ef60fc/lib/base32.ml | ocaml | let base32_alphabet =
[ "a"
; "b"
; "c"
; "d"
; "e"
; "f"
; "g"
; "h"
; "i"
; "j"
; "k"
; "l"
; "m"
; "n"
; "o"
; "p"
; "q"
; "r"
; "s"
; "t"
; "u"
; "v"
; "w"
; "x"
; "y"
; "z"
; "2"
; "3"
; "4"
; "5"
; "6"
; "7"
]
let reverse_base32_alphabet = functi... | |
2b1e51cb79074da23499a3ffd4474879de461aacb129dca85a6b47177c35baf6 | SPY/idris-codegen-wasm | Main.hs | module Main where
import Idris.AbsSyntax
import Idris.ElabDecls
import Idris.Main
import Idris.Options
import IRTS.Compiler
import IRTS.CodegenWasm
import System.Environment
import System.Exit
import Paths_idris_codegen_wasm
data Opts = Opts {
inputs :: [FilePath],
output :: FilePath
}
showUsage = do
... | null | https://raw.githubusercontent.com/SPY/idris-codegen-wasm/77e2f75dbe0c382409eb32eb4b617c7ca4484213/src/Main.hs | haskell | module Main where
import Idris.AbsSyntax
import Idris.ElabDecls
import Idris.Main
import Idris.Options
import IRTS.Compiler
import IRTS.CodegenWasm
import System.Environment
import System.Exit
import Paths_idris_codegen_wasm
data Opts = Opts {
inputs :: [FilePath],
output :: FilePath
}
showUsage = do
... | |
c90866d8b9ff1af74af290d747f35f3becbac3571f33118e2fb5e7e405ade5ad | discus-lang/ddc | OpFun.hs |
module DDC.Core.Discus.Prim.OpFun
( OpFun (..)
, readOpFun
, typeOpFun)
where
import DDC.Core.Discus.Prim.TyConDiscus
import DDC.Core.Discus.Prim.Base
import DDC.Type.Exp.Simple
import DDC.Data.Pretty
import Control.DeepSeq
import Data.Char
import Data.List
instance NFData OpFun where
rnf op... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core-discus/DDC/Core/Discus/Prim/OpFun.hs | haskell | | Read a primitive function operator.
curryN#
applyN#
reify#
| Take the type of a primitive function operator. |
module DDC.Core.Discus.Prim.OpFun
( OpFun (..)
, readOpFun
, typeOpFun)
where
import DDC.Core.Discus.Prim.TyConDiscus
import DDC.Core.Discus.Prim.Base
import DDC.Type.Exp.Simple
import DDC.Data.Pretty
import Control.DeepSeq
import Data.Char
import Data.List
instance NFData OpFun where
rnf op... |
8c4c796cf43da2dc636cf628e0cca1909b5b1695501ea8fa16035197c4156440 | logicmoo/wam_common_lisp | unicode.lsp | ;;;; -*- Mode: Lisp; Syntax: Common-Lisp; indent-tabs-mode: nil; Package: SYSTEM -*-
;;;; vim: set filetype=lisp tabstop=8 shiftwidth=2 expandtab:
;;;;
Copyright ( c ) 2011 , .
;;;;
;;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General P... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/lsp/unicode.lsp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; indent-tabs-mode: nil; Package: SYSTEM -*-
vim: set filetype=lisp tabstop=8 shiftwidth=2 expandtab:
This program is free software; you can redistribute it and/or
either
See file '../Copyright' for full details.
unicode.lsp -- encoding and decoding
ENCODING / DECO... |
Copyright ( c ) 2011 , .
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
(in-package "SYSTEM")
(define-condition character-coding-error (error)
((external-format :initarg :external-format :reader character-coding-er... |
304da3cfae043eb4e2c6d711bc0c9182d12c2b98b5e9b456af3353a59c2b8310 | may-liu/qtalk | http_get_muc_history.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(http_get_muc_history).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-include("logger.hrl").
-include("http_req.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
catch ejb_monitor:monitor_count(<... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/scripts/ejb_http_server/src/http_get_muc_history.erl | erlang | Feel free to use, reuse and abuse the code in this file. | -module(http_get_muc_history).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-include("logger.hrl").
-include("http_req.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
catch ejb_monitor:monitor_count(<<"http_get_muc_history_domain">>,1),
do_handle(Req, Stat... |
59446f393800bb3e332b656cefd71fec13b4915b2b43d16e0a3eb60b0af0a7bc | xvw/preface | arrow_apply.mli | (** Building a {!module:Preface_specs.Arrow_apply} *)
(** {1 Using the minimal definition} *)
* { 2 Using apply over an Arrow }
Build an { ! module - type : Preface_specs . ARROW_APPLY } using
{ ! module - type : Preface_specs . Arrow_apply . WITH_APPLY } over an
{ ! module - type : Preface_specs .... | null | https://raw.githubusercontent.com/xvw/preface/3e87129b9b3ec76e77df64de382eb0c976c7a7dc/lib/preface_make/arrow_apply.mli | ocaml | * Building a {!module:Preface_specs.Arrow_apply}
* {1 Using the minimal definition}
* {2 Deriving Operation}
* {2 Deriving Infix} |
* { 2 Using apply over an Arrow }
Build an { ! module - type : Preface_specs . ARROW_APPLY } using
{ ! module - type : Preface_specs . Arrow_apply . WITH_APPLY } over an
{ ! module - type : Preface_specs . ARROW } .
Standard method , using the minimal definition of an alt to derive its full ... |
023c88e91fe23d22406f555aa3e2780d7b36c9196a9fe613cf63ec2e2edd740f | OlafChitil/hat | IOBuiltinTypes.hs | module Hat.IOBuiltinTypes
(IOMode(..), BufferMode(..), SeekMode(..),
aAbsoluteSeek, aAppendMode, aBlockBuffering,
aLineBuffering, aNoBuffering, aReadMode,
aReadWriteMode, aRelativeSeek, aSeekFromEnd,
aWriteMode, (++=%$=+=%%==), (+>=%$=>=%%==),
(+##=%$=##=%%==))
wher... | null | https://raw.githubusercontent.com/OlafChitil/hat/8840a480c076f9f01e58ce24b346850169498be2/Hat/IOBuiltinTypes.hs | haskell | module Hat.IOBuiltinTypes
(IOMode(..), BufferMode(..), SeekMode(..),
aAbsoluteSeek, aAppendMode, aBlockBuffering,
aLineBuffering, aNoBuffering, aReadMode,
aReadWriteMode, aRelativeSeek, aSeekFromEnd,
aWriteMode, (++=%$=+=%%==), (+>=%$=>=%%==),
(+##=%$=##=%%==))
wher... | |
c120f8ef10a132629e746cbbea4be5575a17a37f2d014671284ebbfe8fea95c5 | couchbase/couchdb | couch_index_barrier.erl | -*- Mode : Erlang ; tab - width : 4 ; c - basic - offset : 4 ; indent - tabs - mode : nil -*- * /
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 appl... | null | https://raw.githubusercontent.com/couchbase/couchdb/7794c1906edf244029eb56b15cbb145624d0359c/src/couch_set_view/src/couch_index_barrier.erl | erlang | use this file except in compliance with the License. You may obtain a copy of
the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | -*- Mode : Erlang ; tab - width : 4 ; c - basic - offset : 4 ; indent - tabs - mode : nil -*- * /
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(couch_index_barrier).
-behaviour(gen_server).
... |
79ffd40b85fcf4fcc6d58036f0484e79f31f9ae14ee855e8b6c1595ba253f8ed | vii/dysfunkycom | raw-audio-test.lisp |
(in-package #:sdl-examples)
(defparameter *wav-file* "example.wav")
(defparameter *audio-length* 0)
(defparameter *audio-remaining* 0)
(defparameter *audio-position* nil)
(defparameter *audio-buffer-start* nil)
(defparameter *file-found* nil)
(defparameter *audio-opened* nil)
(defparameter *status* "")
(cffi:defcall... | null | https://raw.githubusercontent.com/vii/dysfunkycom/a493fa72662b79e7c4e70361ad0ea3c7235b6166/addons/lispbuilder-sdl/examples/raw-audio-test.lisp | lisp | Play audio only when data remains
callbacks from foreign threads
Store the initial play position of the buffer
Set the callback used to fill the audio buffer
Open the audio device
Start playing the audio stream
Pause the audio stream
Lock the audio device to halt all callbacks
Close the audio device
NOTE: De... |
(in-package #:sdl-examples)
(defparameter *wav-file* "example.wav")
(defparameter *audio-length* 0)
(defparameter *audio-remaining* 0)
(defparameter *audio-position* nil)
(defparameter *audio-buffer-start* nil)
(defparameter *file-found* nil)
(defparameter *audio-opened* nil)
(defparameter *status* "")
(cffi:defcall... |
90367f6bd5568dd4027a68809222e96f07ddd49dc97a1895fd1e38d9d80441ee | SNePS/SNePS2 | imports.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNIP ; Base : 10 -*-
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : imports.lisp , v 1.2 2013/08/28 19:07:26 shapiro Exp $
;; This file is part of SNePS.
$ BEGIN LICENSE$
The contents of this file a... | null | https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/snip/imports.lisp | lisp | Syntax : Common - Lisp ; Package : SNIP ; Base : 10 -*-
This file is part of SNePS.
you may
not use this file except in compliance with the License. You
may obtain a copy of the License at
. edu/sneps/Downloads/ubpl.pdf.
or implied. See the License for the specific language gov
erning rights and limitations ... |
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : imports.lisp , v 1.2 2013/08/28 19:07:26 shapiro Exp $
$ BEGIN LICENSE$
The contents of this file are subject to the University at
Software distributed under the License is distributed on an
" AS IS " b... |
688cc3e20fff97a58aa7a5799cdc1964d04bc765b0f8402b9d632dc3273c4f48 | input-output-hk/cardano-wallet | TokenQuantitySpec.hs | # LANGUAGE LambdaCase #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
module Cardano.Wallet.Primitive.Types.TokenQuantitySpec
( spec
) where
import Prelude
import Cardano.Wallet.Primitive.Types... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/5efe75a5b531824a8407653fd99c2d2d410b8f1e/lib/primitive/test/spec/Cardano/Wallet/Primitive/Types/TokenQuantitySpec.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Partitioning
---------------------------------------------------------------------... | # LANGUAGE LambdaCase #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
module Cardano.Wallet.Primitive.Types.TokenQuantitySpec
( spec
) where
import Prelude
import Cardano.Wallet.Primitive.Types... |
96bf9e837287488c9ecfc8967b524d14679cba110c4f56ff3e1e2ae347614e2e | GaloisInc/pate | State.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE TemplateHaskell #
module Pate.Interactive.State (
SourcePair(..),
EquivalenceTest(..),
TraceEvent(..),
Failure(..),
State,
emptyState,
successful,
indeterminate,
failure,
recentEvents,
originalBinary,
patchedBinary,
sources,
met... | null | https://raw.githubusercontent.com/GaloisInc/pate/af72348c2c70b0ce5c28d10afa154ee33a9c3e08/src/Pate/Interactive/State.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE GADTs #
| Trace events that can be generated for debugging purposes
These are visualized in a separate window. This data type is intended to
provide just enough structure to visualize complex terms when desired
(ideally lazily)
| The state tracks verification successes and fai... | # LANGUAGE TemplateHaskell #
module Pate.Interactive.State (
SourcePair(..),
EquivalenceTest(..),
TraceEvent(..),
Failure(..),
State,
emptyState,
successful,
indeterminate,
failure,
recentEvents,
originalBinary,
patchedBinary,
sources,
metrics,
traceEvents,
ProofTreeNode(..),
ProofTree... |
ef7880175b24668bf3d705d526c48615d363ac777df8040becceb719abffa492 | amnh/poy5 | unionTree.ml | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
(* *)
(* This program is free softwa... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/unionTree.ml | ocaml |
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This progra... | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; ... |
8fce88c0a6c81be2c10f5d1fd85a9fe4934696e5d16b53881874a6156b87ae9b | kudelskisecurity/scannerl | out_behavior.erl | %%% This modules set the required functions to implement in any output module.
-module(out_behavior).
-author("David Rossier - ").
-export([behaviour_info/1]).
behaviour_info(callbacks) ->
[
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% init(Scaninfo, Options)
%%% @return Object
%%% Sca... | null | https://raw.githubusercontent.com/kudelskisecurity/scannerl/8133065030d014401c47b2470e67a36e9df81b1e/src/outmodules/out_behavior.erl | erlang | This modules set the required functions to implement in any output module.
init(Scaninfo, Options)
@return Object
Scaninfo contains information on the scan
Options is the options given to the module
(mod:opts)
Object is a record defining the informations
needed by the output module.
clean(Object, Scanin... |
-module(out_behavior).
-author("David Rossier - ").
-export([behaviour_info/1]).
behaviour_info(callbacks) ->
[
{init, 2},
{clean, 1},
{get_description, 0},
{get_arguments, 0},
output(Object , Msg )
{output, 2}
];
behaviour_info(_) ->
undefined.
|
e33560b2be055f2a976903c0903b00e91860f0e1e39ce19ae902cfe183041680 | kupl/LearnML | original.ml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
type bounded = var list
let update_bounded (a : string) (stk : 'a list) : 'a list = a :: stk
let rec find_bounded a (stk : 'b list) : bool =
match stk with
| [] -> false
| hd :: tl -> if hd = a then true else find_bounded a... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub121/original.ml | ocaml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
type bounded = var list
let update_bounded (a : string) (stk : 'a list) : 'a list = a :: stk
let rec find_bounded a (stk : 'b list) : bool =
match stk with
| [] -> false
| hd :: tl -> if hd = a then true else find_bounded a... | |
d01c4223bc8af0adbbed3b1c3590af8beed564341dbbb630c04b62fc8e9bea35 | jyh/metaprl | mfir_exp.ml | doc <:doc<
@module[Mfir_exp]
The @tt[Mfir_exp] module declares terms to represent FIR expressions.
@docoff
------------------------------------------------------------------------
@begin[license]
This file is part of MetaPRL, a modular, higher order
logical framework that provides a logical prog... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/fir/mfir_exp.ml | ocaml | *************************************************************************
* Declarations.
*************************************************************************
XXX: documentation needs to be completed.
XXX: documentation needs to be completed.
******************************************************************... | doc <:doc<
@module[Mfir_exp]
The @tt[Mfir_exp] module declares terms to represent FIR expressions.
@docoff
------------------------------------------------------------------------
@begin[license]
This file is part of MetaPRL, a modular, higher order
logical framework that provides a logical prog... |
7f7586f934adb6bad392460aa9d07bb2e17b6f982c2e42640bc2249a43c7c276 | ocaml-flambda/ocaml-jst | user_error1.ml | TEST
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
What happens if the user tries to write one of the... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/b1f0cf9f9114128db609bdd5a1edfda1e3144a30/testsuite/tests/jst-modular-extensions/user_error1.ml | ocaml | TEST
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
What happens if the user tries to write one of the... | |
2107993fb0a3eb6683641085f6e0f9b27f7d82c2dcd35ff06ee298c0be570385 | yutotakano/discord-haskell-voice | UDPLoop.hs | # LANGUAGE ImportQualifiedPost #
|
Module : Discord . Internal . Voice . UDPLoop
Description : Strictly for internal use only . See Discord . Voice for the public interface .
Copyright : ( c ) ( 2021 )
License : MIT
Maintainer :
= WARNING
This module is considered _ _ internal _ _ .
... | null | https://raw.githubusercontent.com/yutotakano/discord-haskell-voice/793be7f3b25505ce882dfdd606104fb8e950d9e3/src/Discord/Internal/Voice/UDPLoop.hs | haskell | | A custom logging function that writes the date/time and the thread ID.
receivables channel, and then starts an eternal loop of sending and receiving
packets.
Perform IP discovery
-connections#ip-discovery
No need to perform IP discovery.
| Starts the sendable loop in another thread, and starts the receivable
... | # LANGUAGE ImportQualifiedPost #
|
Module : Discord . Internal . Voice . UDPLoop
Description : Strictly for internal use only . See Discord . Voice for the public interface .
Copyright : ( c ) ( 2021 )
License : MIT
Maintainer :
= WARNING
This module is considered _ _ internal _ _ .
... |
e46219dcc064cbefe0e44fefc910d5055468a1f574f491e59b5baafcbdacc7e9 | bsansouci/bsb-native | pattern_matching.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cr... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/debugger/pattern_matching.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
OCaml port by and
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Pa... |
247c7107d16b4cadfdca4cce3c62c71213521d76c0e474c3b9e6803e24b51e42 | biegunka/biegunka | Templates.hs | # LANGUAGE ExistentialQuantification #
-- | Generic TemplateSystem interface
module Control.Biegunka.Templates
( TemplateSystem(..)
, Templates(..)
) where
import Data.Text (Text)
-- | A templating system implementation.
class TemplateSystem t where
templating :: t -> Text -> Text
-- | Wrap a templating sys... | null | https://raw.githubusercontent.com/biegunka/biegunka/74fc93326d5f29761125d7047d5418899fa2469d/src/Control/Biegunka/Templates.hs | haskell | | Generic TemplateSystem interface
| A templating system implementation.
| Wrap a templating system, hiding the implementation. | # LANGUAGE ExistentialQuantification #
module Control.Biegunka.Templates
( TemplateSystem(..)
, Templates(..)
) where
import Data.Text (Text)
class TemplateSystem t where
templating :: t -> Text -> Text
data Templates = forall t. TemplateSystem t => Templates t
|
1c8dbbf6411b7fdf54aa21092c9c087359654909128a196c9ce75b4f6118def7 | rudolph-miller/cl-gists | file.lisp | (in-package :cl-user)
(defpackage cl-gists-test.file
(:use :cl
:prove
:cl-gists-test.init
:cl-gists)
(:import-from :cl-gists.file
:make-file
:make-files))
(in-package :cl-gists-test.file)
(plan nil)
(subtest "file"
(let ((file (make-file :name "sample.lisp... | null | https://raw.githubusercontent.com/rudolph-miller/cl-gists/bcf3687f0af8b2eb5acaeda5db94d67446e56daf/t/file.lisp | lisp | (in-package :cl-user)
(defpackage cl-gists-test.file
(:use :cl
:prove
:cl-gists-test.init
:cl-gists)
(:import-from :cl-gists.file
:make-file
:make-files))
(in-package :cl-gists-test.file)
(plan nil)
(subtest "file"
(let ((file (make-file :name "sample.lisp... | |
e7e102f80e08002d5f6e296f3e652b5c14bd784aa2d2536b20eb9fca45e4a8f8 | discus-lang/ddc | Compounds.hs | {-# OPTIONS_HADDOCK hide #-}
# LANGUAGE TypeFamilies #
-- | Utilities for constructing and destructing compound expressions.
--
For the generic version of the AST .
--
module DDC.Core.Exp.Generic.Compounds
( module DDC.Type.Exp.Simple.Compounds
-- * Abstractions
, makeXAbs, takeXAbs
... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Exp/Generic/Compounds.hs | haskell | # OPTIONS_HADDOCK hide #
| Utilities for constructing and destructing compound expressions.
* Abstractions
* Applications
* Data Constructors
Abstractions ---------------------------------------------------------------
| Make some nested abstractions.
| Split type and value/witness abstractions from the front ... | # LANGUAGE TypeFamilies #
For the generic version of the AST .
module DDC.Core.Exp.Generic.Compounds
( module DDC.Type.Exp.Simple.Compounds
, makeXAbs, takeXAbs
, makeXLAMs, takeXLAMs
, makeXLams, takeXLams
, makeXApps, takeXApps, splitXApps
, tak... |
5ccc72aace351e014a7f2d9f730a197c3e0ee9963fa1b6afba29d0886b42d598 | nathell/clj-json-rpc | project.clj | (defproject clj-json-rpc "0.1.1"
:description "A JSON-RPC server for Clojure, suitable for use with Ring."
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/data.json "0.2.2"]]) | null | https://raw.githubusercontent.com/nathell/clj-json-rpc/2e6469d8b6ff2d256d7be12e0cf8006024529a10/project.clj | clojure | (defproject clj-json-rpc "0.1.1"
:description "A JSON-RPC server for Clojure, suitable for use with Ring."
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/data.json "0.2.2"]]) | |
17c23b86f5793dcbb87b3d28d442094d4a88f2c1ca4aa61b7f2de3d379cf459a | parapluu/Concuerror | proxy.erl | -module(proxy).
-export([proxy/0]).
-export([scenarios/0]).
-concuerror_options_forced([{depth_bound, 1000}, {instant_delivery, false}]).
scenarios() -> [{?MODULE, inf, dpor}].
proxy() ->
C = self(),
B = proxy(100, C),
_A = spawn(fun() ->
C ! hello,
B ! worl... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/dpor_tests/src/proxy.erl | erlang | -module(proxy).
-export([proxy/0]).
-export([scenarios/0]).
-concuerror_options_forced([{depth_bound, 1000}, {instant_delivery, false}]).
scenarios() -> [{?MODULE, inf, dpor}].
proxy() ->
C = self(),
B = proxy(100, C),
_A = spawn(fun() ->
C ! hello,
B ! worl... | |
b0461b36ca81ba0c40889ffbb053fbb097934bcffa9c7e24df7c09185bf91130 | danilkolikov/dfl | ModuleExports.hs | |
Module : Compiler . Prettify . InferenceProcessorOutput
Description : Prettifying of InferenceProcessorOutput
Copyright : ( c ) , 2019
License : MIT
Functions for pretty printing of InferenceProcessorOutput
Module : Compiler.Prettify.InferenceProcessorOutput
Description : ... | null | https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/src/Compiler/Prettify/ModuleExports.hs | haskell | |
Module : Compiler . Prettify . InferenceProcessorOutput
Description : Prettifying of InferenceProcessorOutput
Copyright : ( c ) , 2019
License : MIT
Functions for pretty printing of InferenceProcessorOutput
Module : Compiler.Prettify.InferenceProcessorOutput
Description : ... | |
61e04c5cd9dc348071ab8b94f361891f139a1d83ece399ea25167a682da4756f | ndmitchell/hlint | Summary.hs | # LANGUAGE RecordWildCards #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE DataKinds #
module Summary (generateMdSummary, generateJsonSummary, generateExhaustiveConfig) where
import qualified Data.Map as Map
import Control.Monad.Extra
import System.FilePath
import Data.List.Extra
import System.Direct... | null | https://raw.githubusercontent.com/ndmitchell/hlint/13c2f941d30da49166d134703ff61f727fee0453/src/Summary.hs | haskell | | The summary of built-in hints is generated by running the test cases in
@src/Hint/*.hs@.
| Generate a summary of hints, including built-in hints and YAML-configured hints
| Render using <code> if it is single-line, otherwise using <pre>. | # LANGUAGE RecordWildCards #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE DataKinds #
module Summary (generateMdSummary, generateJsonSummary, generateExhaustiveConfig) where
import qualified Data.Map as Map
import Control.Monad.Extra
import System.FilePath
import Data.List.Extra
import System.Direct... |
0e04e5a3072c3da76499d0ad1fbaf843cf81261d141fb05521440f903e40dc0b | ahf/peculium_core | peculium_core_peer.erl | %%%
Copyright ( c ) 2013 .
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions are met:
%%%
%%% * Redistributions of source code must retain the above copyright notice, this
%%% list of condition... | null | https://raw.githubusercontent.com/ahf/peculium_core/50259b7ee11ad31316e97c7e88b33cae3f89e5a1/src/peculium_core_peer.erl | erlang |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions... | Copyright ( c ) 2013 .
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND
DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR LIABLE
FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF S... |
a44cd56cbad5612447b5e4c2e7fd925dba52e0f59dc89b207c2ed14bfc94c46e | jrm-code-project/LISP-Machine | code-generation-for-constraint-frames.lisp | -*-Mode : lisp;package : window - maker;base:8 ; : ZL-*-
Copyright C LISP MACHINE INC . , 1985 .
;;;
;;;
At this point of time all the structure should be under the very first frame
;;; which is pointed to by the variable *frame*
;;; The goal is to construct the list of panes and the constraints on the organizati... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/window/window-maker/code-generation-for-constraint-frames.lisp | lisp | package : window - maker;base:8 ; : ZL-*-
which is pointed to by the variable *frame*
The goal is to construct the list of panes and the constraints on the organization
of these panes to reflect exactly what the user has done in the graphical section
of the window editor.
this will be only for checking the ca... | Copyright C LISP MACHINE INC . , 1985 .
At this point of time all the structure should be under the very first frame
(defun generate-pane-specifier-section ()
force the top level frame to have one pane .
(or (funcall *frame* :list-of-panes-or-frames)
(funcall *frame* :make-a-pane-to-use-for-code-generat... |
48a905f65523e9817919104a14a6bd5ccf2ca19e1647b438d034f368cc7d922b | neongreen/haskell-ex | Draw.hs | module Draw (BoardToken (..), BoardPosition (..),
drawBoard,
drawToken,
drawPrompt,
drawError,
reset,
convertStrToPosition) where
import System.Console.ANSI
import Control.Monad
import Data.Char
data BoardPosition = PositionUnsupported Str... | null | https://raw.githubusercontent.com/neongreen/haskell-ex/345115444fdf370a43390fd942e2851b9b1963ad/week1/tictactoe/avatar29A/tictac/src/Draw.hs | haskell | drawBoard draws a game board
Borders
Draw borders
drawToken draws X or O by the given coords
drawColorText draws text with was choosen color foreground
drawWhiteText draws text on console in 'white' foreground
drawGreenText draws text on console in 'green' foreground
reset clear and discard all changes (color... | module Draw (BoardToken (..), BoardPosition (..),
drawBoard,
drawToken,
drawPrompt,
drawError,
reset,
convertStrToPosition) where
import System.Console.ANSI
import Control.Monad
import Data.Char
data BoardPosition = PositionUnsupported Str... |
5710902b9253bbe02a01d335b338ffc946f6876a729135751224764e88c397c0 | haskell/ghc-events | EventParserUtils.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
module GHC.RTS.EventParserUtils (
EventParser(..),
EventParsers(..),
getString,
getText,
getTextNul,
mkEventTypeParsers,
simpleEvent,
skip,
) where
import Data.Array
import Data.Binary
import Data.Binary... | null | https://raw.githubusercontent.com/haskell/ghc-events/914038eed3d16a5dbe1036c52e39a6db6dc12a90/src/GHC/RTS/EventParserUtils.hs | haskell | | Decode a given length of bytes as a 'Text'
^ Number of bytes to decode
| Decode a null-terminated string as a 'Text'
| Skip over n bytes of input
Code to build the event parser table.
Our event log format allows new fields to be added to events over
time. This means that our parser must be able to handle:... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
module GHC.RTS.EventParserUtils (
EventParser(..),
EventParsers(..),
getString,
getText,
getTextNul,
mkEventTypeParsers,
simpleEvent,
skip,
) where
import Data.Array
import Data.Binary
import Data.Binary... |
5a4e6310fed3aab97ac465264160c968fce41ac478d1a4ec8329e8487a3137b3 | UU-ComputerScience/uhc | Lazy.hs | # LANGUAGE CPP #
-----------------------------------------------------------------------------
-- |
Module : Control . . ST.Lazy
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- P... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/ehclib/base/Control/Monad/ST/Lazy.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : provisional
Portability : non-portable (requires universal quantification for runST)
except that the monad delays evaluation of state oper... | # LANGUAGE CPP #
Module : Control . . ST.Lazy
Copyright : ( c ) The University of Glasgow 2001
This module presents an identical interface to " Control . Monad . ST " ,
module Control.Monad.ST.Lazy (
ST,
runST,
fixST,
strictToLazyST, lazyToStrictST,
RealWo... |
4a79335287fae8aa87ad257ccf34dc692d39be2311cebd912a5c02666112a597 | endobson/racket-llvm | extra.rkt | #lang racket/base
(require
racket/contract
"aggregate.rkt"
"parameters.rkt"
"memory.rkt"
"globals.rkt"
"convertible.rkt"
"modules.rkt"
"memory.rkt"
"predicates.rkt"
"references.rkt"
"types.rkt"
"builder.rkt"
"functions.rkt"
"misc-instructions.rkt"
"../ffi/safe.rkt"
(only-in "../ffi/ctypes.rkt" set-safe... | null | https://raw.githubusercontent.com/endobson/racket-llvm/3eb557b0fe4bddfdfce8e8f4659d218535daa061/private/simple/extra.rkt | racket | #lang racket/base
(require
racket/contract
"aggregate.rkt"
"parameters.rkt"
"memory.rkt"
"globals.rkt"
"convertible.rkt"
"modules.rkt"
"memory.rkt"
"predicates.rkt"
"references.rkt"
"types.rkt"
"builder.rkt"
"functions.rkt"
"misc-instructions.rkt"
"../ffi/safe.rkt"
(only-in "../ffi/ctypes.rkt" set-safe... | |
ac7f96fbb3325a14491fa08a70cd8a0f658b9ca821cde07eb921b6296bbaaf90 | zcaudate/hara | process_test.clj | (ns hara.test.form.process-test
(:use hara.test)
(:require [hara.test.form.process :refer :all]
[hara.test.common :as common]
[hara.event :as event]))
^{:refer hara.test.form.process/process :added "3.0"}
(fact "processes a form or a check"
(defn view-signal [op]
(let [output (atom ni... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/test/form/process_test.clj | clojure | (ns hara.test.form.process-test
(:use hara.test)
(:require [hara.test.form.process :refer :all]
[hara.test.common :as common]
[hara.event :as event]))
^{:refer hara.test.form.process/process :added "3.0"}
(fact "processes a form or a check"
(defn view-signal [op]
(let [output (atom ni... | |
1941d68abb8aec683b2f645b1733272e3d7630a18846a238b2a07ef9e1706cc4 | LuxLang/lux | project.clj | This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 .
If a copy of the MPL was not distributed with this file , You can obtain one at /.
(def version "0.8.0-SNAPSHOT")
(defproject com.github.luxlang/lux-bootstrapper #=(identity version)
2.1.0 introduced jar classifiers
:descri... | null | https://raw.githubusercontent.com/LuxLang/lux/91bc060bc498a0d2418198cfcb9dc39636d1d867/lux-bootstrapper/project.clj | clojure | This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 .
If a copy of the MPL was not distributed with this file , You can obtain one at /.
(def version "0.8.0-SNAPSHOT")
(defproject com.github.luxlang/lux-bootstrapper #=(identity version)
2.1.0 introduced jar classifiers
:descri... | |
5187b4af4646473fc261cd6d893b70714eab361bb749da00642290e15b9da231 | mhuebert/chia | markdown.cljs | (ns website.views.markdown
(:require [chia.view.legacy :as v :refer [defclass]]
[goog.object :as gobj]
[clojure.string :as string]
["highlight.js/lib/highlight" :as hljs]
["highlight.js/lib/languages/clojure" :as highlight-clj]
["highlight.js/lib/languages/x... | null | https://raw.githubusercontent.com/mhuebert/chia/74ee3ee9f86efbdf81d8829ab4f0a44d619c73d3/website/src/website/views/markdown.cljs | clojure | (ns website.views.markdown
(:require [chia.view.legacy :as v :refer [defclass]]
[goog.object :as gobj]
[clojure.string :as string]
["highlight.js/lib/highlight" :as hljs]
["highlight.js/lib/languages/clojure" :as highlight-clj]
["highlight.js/lib/languages/x... | |
ae88bdbe147a5fc0e03628b76e3ee5d82f6f88eaf9d78d5636f581d7b4f5b53e | swaywm/wlroots-ocaml | wlroots.ml | include Event
module Output_layout = Output_layout
module Seat = Seat
module Xcursor_manager = Xcursor_manager
module Cursor = Cursor
module Xdg_shell = Xdg_shell
module Compositor = Compositor
module Data_device = Data_device
module Backend = Backend
module Output = Output
module Input_device = Input_device
module Ke... | null | https://raw.githubusercontent.com/swaywm/wlroots-ocaml/a4a36121a331c14b0f2ab363a6a59065513985e5/lib/wlroots.ml | ocaml | include Event
module Output_layout = Output_layout
module Seat = Seat
module Xcursor_manager = Xcursor_manager
module Cursor = Cursor
module Xdg_shell = Xdg_shell
module Compositor = Compositor
module Data_device = Data_device
module Backend = Backend
module Output = Output
module Input_device = Input_device
module Ke... | |
039355ead5633256a874617a3112a94fb31546a826070cf8c0a74589f1c7bb55 | bef/erlswf | url_rewrite.erl | #!/usr/bin/env escript
-mode(compile).
%%
%% squid url rewriter
%%
%% squid.conf:
%% acl flashfiles urlpath_regex -i \.swf$
acl redirector browser -i eswfurlrewrite
%%
url_rewrite_program /Users / BeF / devel / stuff / trunk / swf / url_rewrite.erl
%% url_rewrite_children 1
url_rewrite_concurrency 1
%% url_rewr... | null | https://raw.githubusercontent.com/bef/erlswf/1397591d012aaa020f9ffc0ecd5436e65814e668/url_rewrite.erl | erlang |
squid url rewriter
squid.conf:
acl flashfiles urlpath_regex -i \.swf$
url_rewrite_children 1
url_rewrite_access deny to_localhost
url_rewrite_access deny redirector
url_rewrite_access allow flashfiles
url_rewrite_access deny all
ibrowse | #!/usr/bin/env escript
-mode(compile).
acl redirector browser -i eswfurlrewrite
url_rewrite_program /Users / BeF / devel / stuff / trunk / swf / url_rewrite.erl
url_rewrite_concurrency 1
main(_) ->
code:add_pathsz([
swf analyzer
]),
error_logger:tty(false),
ibrowse:start(),
Sender = spawn(fun sender... |
b9ba0412890d1ac4e5db687e8b1d4e1d836ed303cb62d983228e009537687d13 | tamarit/edd | edd_trace.erl | Copyright ( C ) 2013 < >
This file is part of Erlang Declarative Debugger .
%%%
Erlang Declarative Debugger 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 L... | null | https://raw.githubusercontent.com/tamarit/edd/867f287efe951bec6a8213743a218b86e4f5bbf7/src/edd_trace.erl | erlang |
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-----------------------------------------------------------------------------
@version 0.1
@d... | Copyright ( C ) 2013 < >
This file is part of Erlang Declarative Debugger .
Erlang Declarative Debugger 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 Licen... |
053fed100dc7bce02064f1f6cd534a5d8a2726490e7ff264091aa7b9a0beeaf3 | theodormoroianu/SecondYearCourses | LambdaChurch_20210415165915.hs | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415165915.hs | haskell | alpha-equivalence
subst u x t defines [u/x]t, i.e., substituting u for x in t
This substitution avoids variable captures so it is safe to be used when
reducing terms with free variables (e.g., if evaluating inside lambda abstractions)
^ substitution term
^ variable to be substitutes
^ term in which the substit... | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... |
19a899fb0ed02919dcb1f8752ca1e867b31a98fca39206b9fa69164187c0a4c9 | bsansouci/bsb-native | unix_tools.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cr... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/debugger/unix_tools.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
OCaml port by and
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Un... |
67afd35de9fba1442e8350acadb4c21ae88b20dbb21402b27fc9c27395db9456 | jeapostrophe/exp | boggle.rkt | #lang racket/base
(require racket/match
racket/list)
(define empty-dict (hasheq))
(define empty-entry (cons #f empty-dict))
(define (dict-add d w)
(if (empty? w)
d
(hash-update d (first w)
(match-lambda
[(cons word? rest-d)
(cons (or word? (empty... | null | https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/boggle.rkt | racket | #lang racket/base
(require racket/match
racket/list)
(define empty-dict (hasheq))
(define empty-entry (cons #f empty-dict))
(define (dict-add d w)
(if (empty? w)
d
(hash-update d (first w)
(match-lambda
[(cons word? rest-d)
(cons (or word? (empty... | |
d33eedf37bdffbcc112274c78324e8841926304f6262dc01022ec7309d1a7a3e | qiao/sicp-solutions | 3.47.scm | (define (make-mutex)
(let ((cell (list false)))
(define (the-mutex m)
(cond ((eq? m 'acquire)
(if (test-and-set! cell)
(the-mutex 'acquire)))
((eq? m 'release)
(clear! cell))))
the-mutex))
(define (clear! cell)
(set-car! cell false))
(define (te... | null | https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter3/3.47.scm | scheme | a. in terms of mutexes
if already have n processes acquiring the semaphore
acquire again
b. in terms of atomic test-and-set! operations | (define (make-mutex)
(let ((cell (list false)))
(define (the-mutex m)
(cond ((eq? m 'acquire)
(if (test-and-set! cell)
(the-mutex 'acquire)))
((eq? m 'release)
(clear! cell))))
the-mutex))
(define (clear! cell)
(set-car! cell false))
(define (te... |
2cf2eb45167f2aa7b196f16cec5b95ff5fbe7562a254dff47c4064fa2182f19d | BitGameEN/bitgamex | timer2_processor.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011 - 2012 Juan Jose Comellas ,
%%% @doc High performance timer module
%%% @end
%%%
This source file is subject to the New BSD License . You should have received
%%% a copy of the New BSD license with this software... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/timer2/src/timer2_processor.erl | erlang | -------------------------------------------------------------------
@doc High performance timer module
@end
a copy of the New BSD license with this software. If not, it can be
retrieved from: -license.php
-------------------------------------------------------------------
-----------------------------------------... | @author < >
( C ) 2011 - 2012 Juan Jose Comellas ,
This source file is subject to the New BSD License . You should have received
-module(timer2_processor).
-author('Mahesh Paolini-Subramanya <>').
-compile([{parse_transform, lager_transform}]).
-behaviour(gen_server).
-define(SERVER, ?MODULE).
-ex... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.