_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 |
|---|---|---|---|---|---|---|---|---|
223b611d9244e7f35c68d075a814f460bff63ab6600b981dafa75a88c0ba411e | dmjio/miso | Element.hs | {-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Miso.Html.Element
Copyright : ( C ) 2016 - 2018
-- License : BSD3-style (see the file LICENSE)
Maintainer : < >
-- Stability : experimental
-- Portability :... | null | https://raw.githubusercontent.com/dmjio/miso/339505587fd8576c7f89484d3a4244732a9f00e6/src/Miso/Html/Element.hs | haskell | # LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
|
Module : Miso.Html.Element
License : BSD3-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
--------------------------------------------------------------------... | Copyright : ( C ) 2016 - 2018
Maintainer : < >
module Miso.Html.Element
nodeHtml
, nodeHtmlKeyed
, h1_
, h2_
, h3_
, h4_
, h5_
, h6_
, div_
, p_
, hr_
, pre_
, blockquote_
, code_
, em_
, span_
, a_
, strong_
, i_
, b_... |
fefc0b211757dfb782eca302a9a64855eb376a1b180c0c693cb02cf76a024f2a | project-oak/hafnium-verification | InferredNullability.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/nullsafe/InferredNullability.ml | ocaml | Nullability was fully determined by t1.
Nullability was fully determined by t2
Nullability is not fully determined by neither t1 nor t2
Let TypeOrigin logic to decide what to prefer in this case.
|
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
f6bc7479d8689251af01f8a10fdc8e7433d7ff705befe22f4b0f3bb9665bd0d1 | csabahruska/jhc-components | Show.hs | module Grin.Show(
prettyFun,
prettyExp,
printGrin,
hPrintGrin,
graphGrin,
render
) where
import Char
import Control.Monad.Writer(tell,when,forM_,execWriter)
import Data.Maybe
import IO
import qualified Data.Map as Map
import qualified Data.Set as Set
import C.Prims
import Data.Graph.Induct... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-grin/src/Grin/Show.hs | haskell | prettyExp vl (Store v@Var {}) | getType v == tyDNode = vl <> keyword "demote" <+> prettyVal v
prettyExp vl (Store v) = vl <> keyword "store" <+> prettyVal v
pv (V 0) = char '_'
pv (V i) = char 'v' <> tshow i | module Grin.Show(
prettyFun,
prettyExp,
printGrin,
hPrintGrin,
graphGrin,
render
) where
import Char
import Control.Monad.Writer(tell,when,forM_,execWriter)
import Data.Maybe
import IO
import qualified Data.Map as Map
import qualified Data.Set as Set
import C.Prims
import Data.Graph.Induct... |
d26bc6c9750286ad6ab0caaa1a52f67b1d85b9f63679309668c1ff2a6ad9ba9d | phuhl/linux_notification_center | Glade.hs | {-# LANGUAGE QuasiQuotes, OverloadedStrings #-}
module NotificationCenter.Notifications.Notification.Glade where
import Data.String.Here.Uninterpolated (hereFile)
glade =
[hereFile|notification.glade|]
| null | https://raw.githubusercontent.com/phuhl/linux_notification_center/640ce0fc05a68f2c28be3d9f27fe73516d4332f9/src/NotificationCenter/Notifications/Notification/Glade.hs | haskell | # LANGUAGE QuasiQuotes, OverloadedStrings # |
module NotificationCenter.Notifications.Notification.Glade where
import Data.String.Here.Uninterpolated (hereFile)
glade =
[hereFile|notification.glade|]
|
555d00cc193d8235bf40eac28c65dad16cb5b1de9e08ddcc49f6f4f6f1e364de | manualChair/commonlib | typep.lsp | ;;;(include 'typep "./types/typep")
;;;(typep item type-symbol)
;;;
;;;item : atom or list
;;;
;;;type-symbol : symbol of Data-type
;;;
;;;return : T or nil
;;; +------------------------------------------------------+
Copyright ( c ) 2020 manual chair japan
Released under the MIT ... | null | https://raw.githubusercontent.com/manualChair/commonlib/79164a197831e89b76f86d452c55688ca0d896a6/types/typep.lsp | lisp | (include 'typep "./types/typep")
(typep item type-symbol)
item : atom or list
type-symbol : symbol of Data-type
return : T or nil
+------------------------------------------------------+
-license.php
+------------------------------------------------------+
|
Copyright ( c ) 2020 manual chair japan
Released under the MIT license
(include 'type-of "./types/type-of")
(defun typep (item type-symbol)
(= (type-of item) type-symbol)
) |
147edef23149e0c55b423eef4608de8f5660ec0fa8662807ac654bf4fdef076e | obsidiansystems/prim-uniq | Tag.hs | # LANGUAGE Trustworthy #
module Data.Unique.Tag
( Tag
, newTag
, RealWorld
, (:~:)(..)
, GEq(..)
, GOrdering(..)
, GCompare(..)
) where
import Data.GADT.Compare
import Unsafe.Unique.Tag
import Data.Type.Equality ((:~:)(..))
import Control.Monad.Primitive (RealWorld)
| null | https://raw.githubusercontent.com/obsidiansystems/prim-uniq/401f8880a1b2045f2ad8c4714dda0a1c8c3735b4/src/Data/Unique/Tag.hs | haskell | # LANGUAGE Trustworthy #
module Data.Unique.Tag
( Tag
, newTag
, RealWorld
, (:~:)(..)
, GEq(..)
, GOrdering(..)
, GCompare(..)
) where
import Data.GADT.Compare
import Unsafe.Unique.Tag
import Data.Type.Equality ((:~:)(..))
import Control.Monad.Primitive (RealWorld)
| |
bbd5b4c510ec3ca022ba27455e5af6a23ae75426f11665406f26acf437688d9c | erlangonrails/devdb | yaws_soap_lib.erl | %%%-------------------------------------------------------------------
Created : 29 Nov 2006 by < >
Author : ( ) .
Desc . : Common SOAP code .
%%%-------------------------------------------------------------------
modified ( WdJ , May 2007 ): deal with imports in the WSDL .
modified ( WdJ , Augus... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/contrib/yaws/src/yaws_soap_lib.erl | erlang | -------------------------------------------------------------------
-------------------------------------------------------------------
For testing...
-define(dbg(X,Y),
error_logger:info_msg("*dbg ~p(~p): " X,
[?MODULE, ?LINE | Y])).
in erlsom_lib?
Writes the header file (reco... | Created : 29 Nov 2006 by < >
Author : ( ) .
Desc . : Common SOAP code .
modified ( WdJ , May 2007 ): deal with imports in the WSDL .
modified ( WdJ , August 2007 ): the WSDL can contain more than 1 schema
-module(yaws_soap_lib).
-export([initModel/1, initModel/2,
initModelFile/1,
config_fi... |
e9c299ee48da434a798483dd2c6132c838a310fa365ef5b6bb09c9bca431703c | appleshan/cl-http | cl-http-70-181.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*-
Patch file for CL - HTTP version 70.181
Reason : repair a collision between an flavors error reader search - keys and the corresponding CLOS methods .
;;;
;;; DEFINE-CONDITION URL::SEARCH-URL-FORM-VALUE-NOT-FOUND: avo... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/server/patch/cl-http-70/cl-http-70-181.lisp | lisp | Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*-
DEFINE-CONDITION URL::SEARCH-URL-FORM-VALUE-NOT-FOUND: avoid collision between flavors and clos methods.
Function (CLOS:METHOD URL:SEARCH-KEYS (URL::SEARCH-URL-FORM-VALUE-NOT-FOUND)): use special accessor for errors.
Function (CLOS:METHO... | Patch file for CL - HTTP version 70.181
Reason : repair a collision between an flavors error reader search - keys and the corresponding CLOS methods .
Undefine URL : SEARCH - KEYS as a flavors function .
CLOS class URL::SEARCH - MIXIN : redefine search - keys as a clos method .
while running on FUJI - VLM... |
c5587ab67017e0f1480e5fcdde7362d77600ed87c69a808b783f45db40e1e566 | dselsam/arc | Features.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE StrictData #-}
module Solver.Tactics.Blast.BabyBlasts.IntersectionBlast.Features (synthIntersectionBlastMasks, synthIntersectionBlastCandidates) where
import Util.Imports
import qualified Util.List as List
import Util.List (uncurry4)
import Data.List hiding (partition)
imp... | null | https://raw.githubusercontent.com/dselsam/arc/7e68a7ed9508bf26926b0f68336db05505f4e765/src/Solver/Tactics/Blast/BabyBlasts/IntersectionBlast/Features.hs | haskell | # LANGUAGE StrictData #
no negation | # LANGUAGE ScopedTypeVariables #
module Solver.Tactics.Blast.BabyBlasts.IntersectionBlast.Features (synthIntersectionBlastMasks, synthIntersectionBlastCandidates) where
import Util.Imports
import qualified Util.List as List
import Util.List (uncurry4)
import Data.List hiding (partition)
import qualified Data.Map as Ma... |
6db63a84fa831f1b89b989200985ca804956d8d60988dc55997dfc513a426b3a | anuragsoni/color | color.ml | let round x = int_of_float @@ Gg.Float.round x
let positive_float x y = mod_float (mod_float x y +. y) y
type t = Gg.color
module Hsla = struct
type t = {h: float; s: float; l: float; a: float}
end
module Rgba' = struct
type t = {r: float; g: float; b: float; a: float}
end
module Rgba = struct
type t = {r: i... | null | https://raw.githubusercontent.com/anuragsoni/color/f209a500112fbf4ae267bcfdb67d2947aa2e053f/lib/color.ml | ocaml | let round x = int_of_float @@ Gg.Float.round x
let positive_float x y = mod_float (mod_float x y +. y) y
type t = Gg.color
module Hsla = struct
type t = {h: float; s: float; l: float; a: float}
end
module Rgba' = struct
type t = {r: float; g: float; b: float; a: float}
end
module Rgba = struct
type t = {r: i... | |
495526ac16d4d3af6b99e4cd15b7d4ca5103f37e3034750dbf22acef026e787f | donut-party/dbxray | dbxray_test.clj | (ns donut.dbxray-test
(:require
[clojure.test :refer [deftest is testing]]
[donut.dbxray :as dbx]
[matcher-combinators.test] ;; adds support for `match?` and `thrown-match?` in `is` expressions
[next.jdbc :as jdbc])
(:import
(io.zonky.test.db.postgres.embedded EmbeddedPostgres)))
(defonce embedded-p... | null | https://raw.githubusercontent.com/donut-party/dbxray/ded8d88f870b2bc590cb0ced86388dc32b034908/test/donut/dbxray_test.clj | clojure | adds support for `match?` and `thrown-match?` in `is` expressions
---
helpers
---
---
tests
---
---
postgres
---
---
mysql
---
---
sqlite
---
---
h2
---
---
---
---
scratch
--- | (ns donut.dbxray-test
(:require
[clojure.test :refer [deftest is testing]]
[donut.dbxray :as dbx]
[next.jdbc :as jdbc])
(:import
(io.zonky.test.db.postgres.embedded EmbeddedPostgres)))
(defonce embedded-pg (future (EmbeddedPostgres/start)))
(def ^:dynamic *dbtype*)
(def ^:dynamic *dbconn*)
(defn exec... |
d92749acabbd5b1fe1b986515f3c6b731ea47e4242a18b84b2781490322cfeba | sshine/hs-jq | JqParserTestSuite.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module JqParserTestSuite where
import Control.Monad
import Data.Maybe (catMaybes)
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.IO as IO
import Test.Hspec.Megaparsec
import... | null | https://raw.githubusercontent.com/sshine/hs-jq/157b89a34b1f72581b02302b876785d6074dffa3/test/JqParserTestSuite.hs | haskell | # LANGUAGE OverloadedStrings #
the jq program
the JSON input to this program
the expected jq output, error or values. | # LANGUAGE RecordWildCards #
module JqParserTestSuite where
import Control.Monad
import Data.Maybe (catMaybes)
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.IO as IO
import Test.Hspec.Megaparsec
import Test.Tasty.Hspec
import... |
0e673a9779f32418675f2d05c4867961f4d43ed15fc17a24ca524eee8d91c3d4 | studzien/hack-erlang-vm | hevm_code.erl | %%%===================================================================
%%% The code table's internal state is a simple mapping between
%%% module name atom and the module's code in binary
It is expressed by an Erlang map and is temporary :)
%%%===================================================================
-modul... | null | https://raw.githubusercontent.com/studzien/hack-erlang-vm/7765635f7c1e47e6c36e8ac4e824f320dc99ea3a/src/hevm_code.erl | erlang | ===================================================================
The code table's internal state is a simple mapping between
module name atom and the module's code in binary
===================================================================
API
gen_server callbacks
==============================================... | It is expressed by an Erlang map and is temporary :)
-module(hevm_code).
-behaviour(gen_server).
-compile({no_auto_import, [get/1]}).
-export([start_link/0,
get/1,
add/2,
list/0]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminat... |
5eafe8bb0fb81223aa79b39a880c40d52603832a8c18d501ddb29749b2400431 | wedesoft/sfsim25 | map_tiles.clj | (ns sfsim25.map-tiles
"Split up part of Mercator map into map tiles of specified size and save them in computed file names."
(:import [java.io File]
[ij ImagePlus]
[ij.io Opener FileSaver])
(:require [sfsim25.util :refer (tile-dir tile-path)]))
(defn make-map-tiles
"Program to generate ma... | null | https://raw.githubusercontent.com/wedesoft/sfsim25/f7e610b523093d00c65ecd9d53dab8c2153eca0f/src/sfsim25/map_tiles.clj | clojure | (ns sfsim25.map-tiles
"Split up part of Mercator map into map tiles of specified size and save them in computed file names."
(:import [java.io File]
[ij ImagePlus]
[ij.io Opener FileSaver])
(:require [sfsim25.util :refer (tile-dir tile-path)]))
(defn make-map-tiles
"Program to generate ma... | |
c808adabbeb6481066a9c910486e30558a6f6dc0bb9397567d4fb9d401f21ab6 | pbrisbin/yesod-paginator | WidgetsSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Yesod.Paginator.WidgetsSpec
( spec
) where
import Data.Functor ((<&>))
import SpecHelper
import Test.QuickCheck
spec :: Spec
spec = do
withApp $ do
describe "simple" $ it "works" $ do
get $ SimpleR 10 3 3
statusIs 200
bodyContains $ con... | null | https://raw.githubusercontent.com/pbrisbin/yesod-paginator/34801597772c4bb9cbb207f3f6509e447124d1af/test/Yesod/Paginator/WidgetsSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module Yesod.Paginator.WidgetsSpec
( spec
) where
import Data.Functor ((<&>))
import SpecHelper
import Test.QuickCheck
spec :: Spec
spec = do
withApp $ do
describe "simple" $ it "works" $ do
get $ SimpleR 10 3 3
statusIs 200
bodyContains $ concat
[ "<ul class=\"pagi... |
ed36cfc2bba54f631bf4d71bfcfbd26826533dd5cea5b01b74a503e1b6c6ebea | lipas-liikuntapaikat/lipas | routes.cljs | (ns lipas.ui.admin.routes
(:require
[lipas.ui.utils :as utils :refer [==>]]
[lipas.ui.admin.views :as views]))
(def routes
["admin"
{:name :lipas.ui.routes/admin
:tr-key :lipas.admin/headline
:view views/main
:controllers
[{:start
(fn [& params]
(==> [:lipas.ui.admin.even... | null | https://raw.githubusercontent.com/lipas-liikuntapaikat/lipas/f60185b597d2a7fca5480b392cd33187bccfb34a/webapp/src/cljs/lipas/ui/admin/routes.cljs | clojure | (ns lipas.ui.admin.routes
(:require
[lipas.ui.utils :as utils :refer [==>]]
[lipas.ui.admin.views :as views]))
(def routes
["admin"
{:name :lipas.ui.routes/admin
:tr-key :lipas.admin/headline
:view views/main
:controllers
[{:start
(fn [& params]
(==> [:lipas.ui.admin.even... | |
0c317c31a054bdfd732a684640bf678bd156fd264452c026f42e5362ca6d486f | keithj/cl-genomic | bio-sequence-io.lisp | ;;;
Copyright ( c ) 2007 - 2011 . All rights reserved .
;;;
;;; This file is part of cl-genomic.
;;;
;;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;... | null | https://raw.githubusercontent.com/keithj/cl-genomic/d160199c2b369df97afd3fded16b1ade507b80dd/src/io/bio-sequence-io.lisp | lisp |
This file is part of cl-genomic.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR P... | Copyright ( c ) 2007 - 2011 . All rights reserved .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package :bio-sequence)
(defmethod begin-object ((... |
3a0e0e69338b22999a8f4ae120d8445e7e3ee9cb8bc4d6e7fa6415baac544bf2 | ajhc/ajhc | Type.hs | {-# OPTIONS_GHC -pgmF drift-ghc -F #-}
| The definitions related to jhc core
module E.Type where
import Data.Foldable hiding(concat)
import Data.Traversable
import C.Prims
import Cmm.Number
import Doc.DocLike hiding((<$>))
import Info.Types
import Name.Id
import Name.Name
import Name.Names
import StringTable.Atom
... | null | https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/src/E/Type.hs | haskell | # OPTIONS_GHC -pgmF drift-ghc -F #
the type of a supercombinator
a rule in its user visible form
# UNPACK #
!derive: is !
------------------------------------
a generalization of the lambda cube
see E.TypeCheck for a description
of the type system.
------------------------------------
^ the sort of boxed lazy typ... | | The definitions related to jhc core
module E.Type where
import Data.Foldable hiding(concat)
import Data.Traversable
import C.Prims
import Cmm.Number
import Doc.DocLike hiding((<$>))
import Info.Types
import Name.Id
import Name.Name
import Name.Names
import StringTable.Atom
import Util.Gen
import qualified Info.I... |
dd8ed8942d47075c5869eaff560e63d3438bc128c7584ef595a568fb181b56ef | SRI-CSL/f3d | acl-ffi-fns.lisp | (in-package :qffi)
(defvar *lisp_call_address_function_address* nil)
(defun register-callback-now (name)
(let* ((c-name (if (consp name) (cadr name) (string-downcase name)))
(name (if (consp name) (car name) name))
(index (nth-value 1 (ff:register-foreign-callable name :reuse t))))
( format t " ~%Registering ... | null | https://raw.githubusercontent.com/SRI-CSL/f3d/93285f582198bfbab33ca96ff71efda539b1bec7/f3d-core/qffi/acl/acl-ffi-fns.lisp | lisp | already defined in $FREEDIUS/lisp/lcl/acl-lcl-fns.lisp
(error "LtoA: Foreign pointer is not an integer.")
what about :unsigned-long?
(warn "(FOREIGN-POINTER-TYPE) is bogus~%")
should be :unsigned-long
should be :unsigned-long | (in-package :qffi)
(defvar *lisp_call_address_function_address* nil)
(defun register-callback-now (name)
(let* ((c-name (if (consp name) (cadr name) (string-downcase name)))
(name (if (consp name) (car name) name))
(index (nth-value 1 (ff:register-foreign-callable name :reuse t))))
( format t " ~%Registering ... |
240f9ee8495eaa2a6bf12788a5e7556e7c2d37c76f06f155feb7be78b2b99954 | abdulapopoola/SICPBook | Ex1.20.scm | (define (gcd a b)
(if (= b 0)
a
(gcd b (remainder a b))))
;; Normal form for (gcd 206 40)
;; Count of remainder operations
;;
(gcd 206 40)
(define (gcd 206 40)
(if (= 40 0)
206
(gcd 40 (remainder 206 40))))
-- > ( gcd 40 ( remainder 206 40 ) )
(if (= (remainder 206 40) 0)) ;;<-- remain... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%201/1.2/Ex1.20.scm | scheme | Normal form for (gcd 206 40)
Count of remainder operations
<-- remainder is called once here
Count of remainder operations
<-- called once
<-- called once
<-- called once
<-- called once
| (define (gcd a b)
(if (= b 0)
a
(gcd b (remainder a b))))
(gcd 206 40)
(define (gcd 206 40)
(if (= 40 0)
206
(gcd 40 (remainder 206 40))))
-- > ( gcd 40 ( remainder 206 40 ) )
40
(gcd (remainder 206 40) (remainder 40 (remainder 206 40)))
-- > ( gcd ( remainder 206 40 ) ( remaind... |
091b095fa5d971480d2d5dd544d9a3e5bb6b7643a30dc503b5cd744a1b47abae | maxsnew/modal-scheme | solution.rkt | #lang fiddle
(require fiddle/prelude)
(require fiddle/stdlib/IO)
(require fiddle/stdlib/CoList)
(require "../../Parse.rkt")
(require fiddle/stdlib/FlexVec)
(require "../Intcode.rkt")
(provide main-a main-b)
(def-thunk (! run-with-input x)
[syntax <- (! parse-intcode-program)]
[inps <- (! List x)]
[driver = (~ ... | null | https://raw.githubusercontent.com/maxsnew/modal-scheme/3bcda7f40e7b878049d23ed553767988d6a83324/examples/advent-2019/05/solution.rkt | racket | #lang fiddle
(require fiddle/prelude)
(require fiddle/stdlib/IO)
(require fiddle/stdlib/CoList)
(require "../../Parse.rkt")
(require fiddle/stdlib/FlexVec)
(require "../Intcode.rkt")
(provide main-a main-b)
(def-thunk (! run-with-input x)
[syntax <- (! parse-intcode-program)]
[inps <- (! List x)]
[driver = (~ ... | |
ca06379d8d5e8eaa8420bc29ada5c64728ee08c7218096dfab334977660922da | monadbobo/ocaml-core | persistent_singleton.ml | (** Implements a value that is either in a file, or in memory, but not both. Is used by
live and the friend to store sequence numbers and counters. If the value is moved to
memory, changed, and then the process crashes, the file will correctly reflect that
the value has been lost. *)
open Core.Std
open Imp... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/async/extra/lib/persistent_singleton.ml | ocaml | * Implements a value that is either in a file, or in memory, but not both. Is used by
live and the friend to store sequence numbers and counters. If the value is moved to
memory, changed, and then the process crashes, the file will correctly reflect that
the value has been lost. |
open Core.Std
open Import
module type Arg = Sexpable
module type S = sig
type persistent_singleton
val load :
string
-> default:persistent_singleton
-> persistent_singleton Deferred.t
val save :
string
-> value:persistent_singleton
-> unit Deferred.t
end
module Make (Z : Arg) : S wit... |
277de2f703c4e36b5ba2f276d12c65b177d1c4b2c5c21ece64b5e0ae9454c44b | ChristopherBiscardi/snap-for-beginners | Site.hs | {-# LANGUAGE OverloadedStrings #-}
------------------------------------------------------------------------------
-- | This module is where all the routes and handlers are defined for your
-- site. The 'app' function is the initializer that combines everything
-- together and is exported by this module.
module Site
... | null | https://raw.githubusercontent.com/ChristopherBiscardi/snap-for-beginners/d35a4bbdd0a459983e2f37400fbc2bf8c8bf6239/code/df-samples/src/Site.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
| This module is where all the routes and handlers are defined for your
site. The 'app' function is the initializer that combines everything
together and is exported by this module.
---------------------------... |
module Site
( app
) where
import Control.Applicative
import Data.ByteString (ByteString)
import Data.Maybe
import qualified Data.Text as T
import Snap.Core
import Snap.Snaplet
import Snap.Snaplet.Auth
import Snap.Snaplet.Auth.Backends.JsonFile
... |
17bad97bef00c09f1b3dba732653c08d6fe9cdd6d2a01244e3a0d35ab1781e78 | letmaik/monadiccp | Graph.hs |
- Monadic Constraint Programming
- /~toms/MCP/
-
- Monadic Constraint Programming
- /~toms/MCP/
- Pieter Wuille
-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# LANGUAGE FlexibleInstances #
module Control.CP.FD.Graph (
EGConstraintS... | null | https://raw.githubusercontent.com/letmaik/monadiccp/fe4498e46a7b9d9e387fd5e4ed5d0749a89d0188/src/Control/CP/FD/Graph.hs | haskell | # LANGUAGE RankNTypes #
not represented as constraints between them
i0 == p
b0 == p
c0 == p
super[p] == i0
super[p] == b0
super[p] == c0
i0==i1+i2
i0==i1-i2
i0==i1*i2
i0==i1%i2
i0==abs(i1)
i0==c0[i1]
i0==fold(p,i1,c0) {- inner intExtern(-1) is fold-function's return value, intExtern(-2) is the accumula... |
- Monadic Constraint Programming
- /~toms/MCP/
-
- Monadic Constraint Programming
- /~toms/MCP/
- Pieter Wuille
-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# LANGUAGE FlexibleInstances #
module Control.CP.FD.Graph (
EGConstraintSpec(..),
EGParTerm(..),
... |
a1863b04fd145aa5d86a22c23a230a910e914c2778dbc48bcf09ec72e00706f0 | ocsigen/js_of_ocaml | static_eval.ml | Js_of_ocaml tests
* /
* Copyright ( C ) 2019 Hugo Heuzard
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/4b1253d25c7539a73305f4320a945ee9751abfee/compiler/tests-compiler/static_eval.ml | ocaml | Js_of_ocaml tests
* /
* Copyright ( C ) 2019 Hugo Heuzard
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any... | |
2c2b60dc7a8afdbf4aeadf0f8b21a877cca84ad16e60eaa4dd1b0a820b830841 | well-typed/cborg | Issue135.hs | Issue # 135 : Ensure that surrogate characters round - trip
--
module Tests.Regress.Issue135
( testTree -- :: TestTree
) where
import Codec.Serialise
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.Tasty.HUnit
newtype StringWithSurrogates = StringWithSurrogate... | null | https://raw.githubusercontent.com/well-typed/cborg/9be3fd5437f9d2ec1df784d5d939efb9a85fd1fb/serialise/tests/Tests/Regress/Issue135.hs | haskell |
:: TestTree | Issue # 135 : Ensure that surrogate characters round - trip
module Tests.Regress.Issue135
) where
import Codec.Serialise
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.Tasty.HUnit
newtype StringWithSurrogates = StringWithSurrogates String
... |
b5be60ea6808bfa36521760eb39dd8d10c63f79a6d8f257aaf601a08c73f19a8 | samply/blaze | resource_handle_cache.clj | (ns blaze.db.resource-handle-cache
"A cache for resource handles.
Caffeine is used because it have better performance characteristics as a
ConcurrentHashMap."
(:require
[blaze.db.resource-handle-cache.spec]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[taoensso.timbre :as log])
(:import... | null | https://raw.githubusercontent.com/samply/blaze/cbf6431a254f347a704f1abe1de4f4fe8a249ac9/modules/db/src/blaze/db/resource_handle_cache.clj | clojure | (ns blaze.db.resource-handle-cache
"A cache for resource handles.
Caffeine is used because it have better performance characteristics as a
ConcurrentHashMap."
(:require
[blaze.db.resource-handle-cache.spec]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[taoensso.timbre :as log])
(:import... | |
d12c4dd373b85215e60e7a440dc6ef9a51aeaf54b12707ba778af463e7e8d001 | glguy/toml-parser | Errors.hs | |
Module : TOML.Errors
Description : /Internal:/ Errors that can occur while processing TOML
Copyright : ( c ) , 2017
License : ISC
Maintainer :
Module : TOML.Errors
Description : /Internal:/ Errors that can occur while processing TOML
Copyright : (c) Eric Mertens, 2017
License ... | null | https://raw.githubusercontent.com/glguy/toml-parser/a338e635292fa96dbcf15313f0a27c3ae1110d1f/src/TOML/Errors.hs | haskell | ^ unexpected token while parser
^ unterminated token while parser
^ ambiguous table entry
| 'displayException' provides human-readable error message
| Generates a human-readable description of a token.
| Generates a human-readable description of a lexical error. | |
Module : TOML.Errors
Description : /Internal:/ Errors that can occur while processing TOML
Copyright : ( c ) , 2017
License : ISC
Maintainer :
Module : TOML.Errors
Description : /Internal:/ Errors that can occur while processing TOML
Copyright : (c) Eric Mertens, 2017
License ... |
69668fc1e78b65225a86242ac6d05863a63279a6bfaf35a7890803edd6d0537d | michalkonecny/aern2 | Float.hs | |
Module : AERN2.MP.Float
Description : Arbitrary precision floating point numbers
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Arbitrary precision floating - point numbers with up / down - rounded operations .
... | null | https://raw.githubusercontent.com/michalkonecny/aern2/f42a9cc59006bdeda270ac969e1e7b414ad2223d/aern2-mp/src/AERN2/MP/Float.hs | haskell | * Precision operations
* Helper structure
* The type definition and basic operations
* Arithmetic operations
* Infix operators for up/down-rounded operations
* Tests | |
Module : AERN2.MP.Float
Description : Arbitrary precision floating point numbers
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Arbitrary precision floating - point numbers with up / down - rounded operations .
... |
72acc0699865e76eea901a37e8e6cbe96eded5716c733c65c9970e67bd33ec1d | jyh/metaprl | nuprl_fun_1.mli | extends Ma_sqequal_1
define unfold_identity : "identity"[]{} <-->
"lambda"[]{"x".'"x"}
define unfold_tidentity : "tidentity"[]{'"T"} <-->
"identity"[]{}
define unfold_tlambda : "tlambda"[]{'"T";"x".'"b"['"x"]} <-->
"lambda"[]{"x".'"b"['"x"]}
define unfold_compose : "compose"[]{'"f";'"g"} <-->
... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/mesa/nuprl_fun_1.mli | ocaml | extends Ma_sqequal_1
define unfold_identity : "identity"[]{} <-->
"lambda"[]{"x".'"x"}
define unfold_tidentity : "tidentity"[]{'"T"} <-->
"identity"[]{}
define unfold_tlambda : "tlambda"[]{'"T";"x".'"b"['"x"]} <-->
"lambda"[]{"x".'"b"['"x"]}
define unfold_compose : "compose"[]{'"f";'"g"} <-->
... | |
f7844ff7e19e89ce9ad033d6d47fd5d97bebd132a92a1acb285f22ea6442f22a | simplex-chat/simplex-chat | M20220926_connection_alias.hs | # LANGUAGE QuasiQuotes #
module Simplex.Chat.Migrations.M20220926_connection_alias where
import Database.SQLite.Simple (Query)
import Database.SQLite.Simple.QQ (sql)
m20220926_connection_alias :: Query
m20220926_connection_alias =
[sql|
PRAGMA ignore_check_constraints=ON;
ALTER TABLE connections ADD COLUMN local_... | null | https://raw.githubusercontent.com/simplex-chat/simplex-chat/6730a687e289c5fd0dfb1a9948f1dbf7178201d3/src/Simplex/Chat/Migrations/M20220926_connection_alias.hs | haskell | # LANGUAGE QuasiQuotes #
module Simplex.Chat.Migrations.M20220926_connection_alias where
import Database.SQLite.Simple (Query)
import Database.SQLite.Simple.QQ (sql)
m20220926_connection_alias :: Query
m20220926_connection_alias =
[sql|
PRAGMA ignore_check_constraints=ON;
ALTER TABLE connections ADD COLUMN local_... | |
768e50b83e28bf8f1afa478580a59e4cc3fd8d9d055ff1b54fa6ed8bb49087d4 | haskell-rewriting/term-rewriting | Term.hs | -- This file is part of the 'term-rewriting' library. It is licensed
under an MIT license . See the accompanying ' LICENSE ' file for details .
--
Authors :
-- Tests for Data.Rewriting.Term
module Term where
import Arbitrary
import Data.Rewriting.Pos
import Data.Rewriting.Term
import Control.Monad (liftM2)
i... | null | https://raw.githubusercontent.com/haskell-rewriting/term-rewriting/d01ee419f9fd3c2011d37b6417326a9373d5ee9c/test/Term.hs | haskell | This file is part of the 'term-rewriting' library. It is licensed
Tests for Data.Rewriting.Term | under an MIT license . See the accompanying ' LICENSE ' file for details .
Authors :
module Term where
import Arbitrary
import Data.Rewriting.Pos
import Data.Rewriting.Term
import Control.Monad (liftM2)
import Data.Maybe (fromMaybe)
propReplaceAt1 :: Pos -> Term' -> Term' -> Bool
propReplaceAt1 p t t' = fro... |
0e94a9cbffb76f18e2d2cd5200dcde6df98a425a65ef4b25941660ebbdcd0f0e | cljdoc/cljdoc | 010_convert_builds_error_info_from_exception_to_data.clj | (ns migrations.010-convert-builds-error-info-from-exception-to-data
"Adds new error_info_map column to builds table leaving existing error_info column to support
reversion to old code if necessary."
(:require [clojure.java.jdbc :as jdbc]
[clojure.tools.logging :as log]
[taoensso.nippy :as... | null | https://raw.githubusercontent.com/cljdoc/cljdoc/831f0c99f32519fd2211db58806e7d33d8947c3e/resources/migrations/010_convert_builds_error_info_from_exception_to_data.clj | clojure | For security reasons, newer versions of nippy are restrictive on what
classes they will thaw. For this conversion from exception-object to
generic data, we temporarily revert to old nippy behavior of thawing any old object.
a current version of sqlite3 in production as of this writing.
Also relying on a current ve... | (ns migrations.010-convert-builds-error-info-from-exception-to-data
"Adds new error_info_map column to builds table leaving existing error_info column to support
reversion to old code if necessary."
(:require [clojure.java.jdbc :as jdbc]
[clojure.tools.logging :as log]
[taoensso.nippy :as... |
9faae1e378a3367ccded98e87cadcabb2ae88a56cd81512e6a76ef9a92bcfea3 | sdiehl/pairing | Pairing.hs | module Test.Pairing where
import Protolude
import Data.Curve.Weierstrass
import Data.Group
import Data.Pairing.Hash
import Test.QuickCheck.Instances ()
import Test.QuickCheck.Monadic
import Test.Tasty
import Test.Tasty.QuickCheck
bilinearity :: (Eq c, Group a, Group b, Group c)
=> (a -> b -> c) -> Word -> a -> b -... | null | https://raw.githubusercontent.com/sdiehl/pairing/9e3fd026fb43fd64917a3b267d0d8d351eba77cc/test/Test/Pairing.hs | haskell | module Test.Pairing where
import Protolude
import Data.Curve.Weierstrass
import Data.Group
import Data.Pairing.Hash
import Test.QuickCheck.Instances ()
import Test.QuickCheck.Monadic
import Test.Tasty
import Test.Tasty.QuickCheck
bilinearity :: (Eq c, Group a, Group b, Group c)
=> (a -> b -> c) -> Word -> a -> b -... | |
07d60dc6b8e8d31c252e827265ffd7c79baf833fc185e8bc0fc030097a929671 | shayne-fletcher/zen | recognizer.ml | type 'a remaining =
| Remains of 'a list
| Recognition_fails
type 'a recognizer = 'a list -> 'a remaining
let empty toks = Remains toks
let end_of_input = function
| [] -> Remains []
| _ -> Recognition_fails
let recognizer_of_token test =
fun toks ->
match toks with
| (t :: ts) -> if test t then Remai... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/regexp/recognizer.ml | ocaml | type 'a remaining =
| Remains of 'a list
| Recognition_fails
type 'a recognizer = 'a list -> 'a remaining
let empty toks = Remains toks
let end_of_input = function
| [] -> Remains []
| _ -> Recognition_fails
let recognizer_of_token test =
fun toks ->
match toks with
| (t :: ts) -> if test t then Remai... | |
47024e3b7bddb8c5e630c3ee84690ed736441c17432472e1c2cceb4a47705569 | nominolo/scion | Session.hs | # LANGUAGE GeneralizedNewtypeDeriving , OverloadedStrings ,
ScopedTypeVariables #
ScopedTypeVariables #-}
-- | Basic Ideas:
--
-- All we need to /describe/ a session is a 'SessionConfig'. From
-- that we can reconstruct all internal state on demand. Of course,
-- for efficiency we do lots ... | null | https://raw.githubusercontent.com/nominolo/scion/99b4589175665687181a932cd836850205625f71/src/Scion/Session.hs | haskell | | Basic Ideas:
All we need to /describe/ a session is a 'SessionConfig'. From
that we can reconstruct all internal state on demand. Of course,
for efficiency we do lots of caching (preferably on disk).
worker. This causes a bit of overhead, but for most actions will
be negligible.
Most interactions will be... | # LANGUAGE GeneralizedNewtypeDeriving , OverloadedStrings ,
ScopedTypeVariables #
ScopedTypeVariables #-}
Session state stored and managed by a separate process , the Scion
module Scion.Session where
import Scion.Types.Compiler
import Scion.Types.Note
import Scion.Types.Session
import Sci... |
af2261ebac71f4211049da50d3c366b21ffc112ca33e2b9f7d3f34f1466e9da8 | jeffshrager/biobike | workspace-code.lisp | -*- Package : weblistener ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :weblistener)
;;; +=========================================================================+
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
;;; | ... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Webuser/workspace-code.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and as... |
(in-package :weblistener)
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subj... |
f24d21085965eb29d45843c17e467415521e412b511e11303f3587e545fdb179 | pirapira/coq2rust | dag.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2013
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/stm/dag.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
A cluster is just a set of nodes. ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2013
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
module type S = sig
module... |
624455747836813e7292c540b49181cf17ab2c8418eab06840594d4cb0ca7a85 | s-expressionists/Concrete-Syntax-Tree | list-structure.lisp | (cl:in-package #:concrete-syntax-tree)
;;; For any CST, determine its structure as represented by successive
REST values . Return the result as two values the first value
;;; contains the number of unique CONS-CSTs in the chain, and the
second value is one of the keywords : proper , : dotted , and
;;; :circular.... | null | https://raw.githubusercontent.com/s-expressionists/Concrete-Syntax-Tree/a56a5246fbaa90b98a29368c011a6616f2bcb482/list-structure.lisp | lisp | For any CST, determine its structure as represented by successive
contains the number of unique CONS-CSTs in the chain, and the
:circular. For an ATOM-CST, 0 and :dotted is returned.
This function is useful for processing code because lists
representing code are not often very long, so the method used is
fast a... | (cl:in-package #:concrete-syntax-tree)
REST values . Return the result as two values the first value
second value is one of the keywords : proper , : dotted , and
(defun list-structure (cst)
First we attempt to just traverse the CST as usual , assuming that
(loop for remaining = cst then (rest remaining)
fo... |
62c21928af9c444c715da263a3de1fb81b2a2a7a1353cc1b7756935b0d89d596 | ocaml/camlp-streams | stream_stdlib.ml | let list = ([] : unit list)
let stream = Stream.of_list list
| null | https://raw.githubusercontent.com/ocaml/camlp-streams/e6929398050e6b1bb8093d6526796930883cd2d0/test/stream_stdlib.ml | ocaml | let list = ([] : unit list)
let stream = Stream.of_list list
| |
26a02c8a724959ac33c848804f91de5fe93de62ad692efd32e6619348c10ee7e | reanimate/reanimate | doc_libertine.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Reanimate
import Reanimate.LaTeX
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv $ staticFrame 1 $
center $ withStrokeWidth 0 $ wit... | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_libertine.hs | haskell | stack runghc --package reanimate
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
module Main (main) where
import Reanimate
import Reanimate.LaTeX
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv $ staticFrame 1 $
center $ withStrokeWidth 0 $ withFillOpacity 1 $ scale 4 $
latexCfg libertine "libertine"
|
12f22a84ffe7d8c58198f97c800781fd6f98a10de6e59837c8cc489ca0ec52c1 | pavankumarbn/DroneGUIROS | _package_navdata_pwm.lisp | (cl:in-package ardrone_autonomy-msg)
(cl:export '(HEADER-VAL
HEADER
DRONE_TIME-VAL
DRONE_TIME
TAG-VAL
TAG
SIZE-VAL
SIZE
MOTOR1-VAL
MOTOR1
MOTOR2-VAL
MOTOR2
MOTOR3-VAL
MOTOR3
MOTOR4... | null | https://raw.githubusercontent.com/pavankumarbn/DroneGUIROS/745320d73035bc50ac4fea2699e22586e10be800/devel/share/common-lisp/ros/ardrone_autonomy/msg/_package_navdata_pwm.lisp | lisp | (cl:in-package ardrone_autonomy-msg)
(cl:export '(HEADER-VAL
HEADER
DRONE_TIME-VAL
DRONE_TIME
TAG-VAL
TAG
SIZE-VAL
SIZE
MOTOR1-VAL
MOTOR1
MOTOR2-VAL
MOTOR2
MOTOR3-VAL
MOTOR3
MOTOR4... | |
7c2e7b756ff0cfb361a74842d0fbd35522bce006d1840776a227d38e43ee146f | rescript-association/reanalyze | Exceptions.mli | type t
val add : Exn.t -> t -> t
val diff : t -> t -> t
val empty : t
val isEmpty : t -> bool
val iter : (Exn.t -> unit) -> t -> unit
val fromList : Exn.t list -> t
val pp :
exnTable:(Exn.t, Common.LocSet.t) Hashtbl.t option ->
Format.formatter -> t -> unit
val toList : t -> Exn.t list
val union : t -> t -> t | null | https://raw.githubusercontent.com/rescript-association/reanalyze/6335ce4399ecb305e653561d2d01912fd6c8f917/src/Exceptions.mli | ocaml | type t
val add : Exn.t -> t -> t
val diff : t -> t -> t
val empty : t
val isEmpty : t -> bool
val iter : (Exn.t -> unit) -> t -> unit
val fromList : Exn.t list -> t
val pp :
exnTable:(Exn.t, Common.LocSet.t) Hashtbl.t option ->
Format.formatter -> t -> unit
val toList : t -> Exn.t list
val union : t -> t -> t | |
131afc532b0d5b28938ade94e1612af719dd5a8304dc09adef7658325573dfd6 | jaspervdj/advent-of-code | 03.hs | import AdventOfCode.Main
import Data.Char (isLower, ord)
priority :: Char -> Int
priority c
| isLower c = ord c - ord 'a' + 1
| otherwise = ord c - ord 'A' + 27
group3 :: [a] -> [(a, a, a)]
group3 (x : y : z : t) = (x, y, z) : group3 t
group3 _ = []
main :: IO ()
mai... | null | https://raw.githubusercontent.com/jaspervdj/advent-of-code/c17ce6de806cd50ead39b61228911737798ec8a8/2022/03.hs | haskell | import AdventOfCode.Main
import Data.Char (isLower, ord)
priority :: Char -> Int
priority c
| isLower c = ord c - ord 'a' + 1
| otherwise = ord c - ord 'A' + 27
group3 :: [a] -> [(a, a, a)]
group3 (x : y : z : t) = (x, y, z) : group3 t
group3 _ = []
main :: IO ()
mai... | |
6789a3eac64eead40fdb2450a7308bc97ffc36be8013667691ae2093a4936a8e | thesis/shale | periodic.clj | (ns shale.periodic
(:require [clojure.set]
[overtone.at-at :as at-at]
[com.stuartsierra.component :as component]
[schema.core :as s]
[shale.logging :as logging]
[shale.sessions :as sessions]
[shale.nodes :as nodes])
(:import shale.sessions.Sess... | null | https://raw.githubusercontent.com/thesis/shale/84180532e46ee5d9ee0218138da04ea035bcf7d2/src/clj/shale/periodic.clj | clojure | (ns shale.periodic
(:require [clojure.set]
[overtone.at-at :as at-at]
[com.stuartsierra.component :as component]
[schema.core :as s]
[shale.logging :as logging]
[shale.sessions :as sessions]
[shale.nodes :as nodes])
(:import shale.sessions.Sess... | |
48fb36af602979cb59985e290fd183ff034adbfd2d374b55168a720281e4161f | cuter-testing/cuter | cuter_iserver_tests.erl | -*- erlang - indent - level : 2 -*-
%%------------------------------------------------------------------------------
-module(cuter_iserver_tests).
-include_lib("eunit/include/eunit.hrl").
-include("include/eunit_config.hrl").
-include_lib("include/cuter_macros.hrl").
This should be provided by EUnit
-type descr(... | null | https://raw.githubusercontent.com/cuter-testing/cuter/00f2299a63f9089f1eec420140098b5c985cf204/test/utest/src/cuter_iserver_tests.erl | erlang | ------------------------------------------------------------------------------
Ensure start/stop runs properly | -*- erlang - indent - level : 2 -*-
-module(cuter_iserver_tests).
-include_lib("eunit/include/eunit.hrl").
-include("include/eunit_config.hrl").
-include_lib("include/cuter_macros.hrl").
This should be provided by EUnit
-type descr() :: nonempty_string().
-spec start_stop_test_() -> [{descr(), _}, ...].
start_s... |
f66ff45882de51bec08699667d1bcb00c7a25c453ced7ce3f18565c131b9e774 | ekmett/ekmett.github.com | Reducer.hs | # LANGUAGE UndecidableInstances , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , GeneralizedNewtypeDeriving , TypeOperators , ScopedTypeVariables , CPP #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Monoid.Reducer
Copyright : ( c ) 2... | null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/monoids/Data/Monoid/Reducer.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Monoid.Reducer
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable (MPTCs)
This 'unit' acts in many ways like 'return' for a 'Monad' but is limited
to a single type.
------... | # LANGUAGE UndecidableInstances , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , GeneralizedNewtypeDeriving , TypeOperators , ScopedTypeVariables , CPP #
Copyright : ( c ) 2009
A @c@-'Reducer ' is a ' Monoid ' with a canonical mapping from @c@ to the Monoid .
module Data.Monoid.Reducer
... |
f314191cd9093578ef11b9654eb9e32f2d0f71dfcf1f7edd799f28ec85a6f64e | gfngfn/SATySFi | out.mli |
open Types
exception IllegalOut of string
val main : abstract_tree - > string
open Types
exception IllegalOut of string
val main : abstract_tree -> string
*)
| null | https://raw.githubusercontent.com/gfngfn/SATySFi/9dbd61df0ab05943b3394830c371e927df45251a/obsolete/out.mli | ocaml |
open Types
exception IllegalOut of string
val main : abstract_tree - > string
open Types
exception IllegalOut of string
val main : abstract_tree -> string
*)
| |
3cd015c4f30658735a4b7854657f31c4498838fe68d16b84acd9fac3410b116f | msantos/erpcgen | test_prog1_2.erl | %%%----------------------------------------------------------------------
%%% File : test3_service.erl
%%% Purpose : Old-style-rpc_gen method for implementing server-side.
Copyright ( c ) 2000 , 2001 Sendmail , Inc. All rights reserved .
%%%----------------------------------------------------------------------
... | null | https://raw.githubusercontent.com/msantos/erpcgen/f4d14eebd689496ef30acf08ed16db1c0e3f5004/examples/test/test_prog1_2.erl | erlang | ----------------------------------------------------------------------
File : test3_service.erl
Purpose : Old-style-rpc_gen method for implementing server-side.
----------------------------------------------------------------------
External exports
gen_server callbacks
-------------------------------------------... | Copyright ( c ) 2000 , 2001 Sendmail , Inc. All rights reserved .
-module(test_prog1_2).
-behaviour(gen_server).
-define(NAME, ?MODULE).
-define(Timeout, infinity).
-export([start_link/0]).
-export([fnull/0, fnull/1, double/1, double/2, repeat/1, repeat/2,
pow/1, pow/2]).
-export([init/1, handle_call/3, hand... |
40ceb1acda89360406746bda1c06410845aadee76917c34f5ea2b79ead819d73 | ocaml/odoc | bugs_post_406.mli | * Let - open in class types ,
This was added to the language in 4.06
This was added to the language in 4.06 *)
class type let_open =
let open List in
object end
class let_open' :
let open List in
object end
| null | https://raw.githubusercontent.com/ocaml/odoc/65074eeee3fe8478c4df5099cf83a95326484105/test/generators/cases/bugs_post_406.mli | ocaml | * Let - open in class types ,
This was added to the language in 4.06
This was added to the language in 4.06 *)
class type let_open =
let open List in
object end
class let_open' :
let open List in
object end
| |
f18083f28fa8b5e48a992947fb6bd68a9329c6f548ed30397b13d849726d9b44 | SjVer/Som-Lang | ident.ml | type t =
| Ident of string
| Cons of string * t
let rec to_string = function
| Ident s -> s
| Cons (l, s) -> l ^ "::" ^ to_string s
let compare a b = compare (to_string a) (to_string b)
let rec prepend prefix ident =
match prefix with
| Ident s -> Cons (s, ident)
| Cons (s, l) -> Cons (s, prepend l... | null | https://raw.githubusercontent.com/SjVer/Som-Lang/4ccd94c7f31818ac52b3eb005f8df990e6d2a8eb/somc/lib/symboltable/ident.ml | ocaml | type t =
| Ident of string
| Cons of string * t
let rec to_string = function
| Ident s -> s
| Cons (l, s) -> l ^ "::" ^ to_string s
let compare a b = compare (to_string a) (to_string b)
let rec prepend prefix ident =
match prefix with
| Ident s -> Cons (s, ident)
| Cons (s, l) -> Cons (s, prepend l... | |
da71e1c4e9d1fcba98f36605b7f38159b467341b3a1629f598bec58a0e3b5318 | geophf/1HaskellADay | Exercise.hs | module Y2018.M11.D26.Exercise where
-
An IQ puzzler :
Four ( A , B , C and D ) suspects were interrogated :
A said : C wo n't cheat unless B cheated .
B said : Either A or B cheated .
C said : B did n't cheat , I cheated .
D said : B cheated .
Only one person is lying . Who is lying and who(st(s ) ) ch... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M11/D26/Exercise.hs | haskell | } | module Y2018.M11.D26.Exercise where
-
An IQ puzzler :
Four ( A , B , C and D ) suspects were interrogated :
A said : C wo n't cheat unless B cheated .
B said : Either A or B cheated .
C said : B did n't cheat , I cheated .
D said : B cheated .
Only one person is lying . Who is lying and who(st(s ) ) ch... |
887f9a41ffc69be68c3b1a2594767a607bf33249cd9810fc670bceb33fe7d991 | 8c6794b6/haskell-sc-scratch | helloWebRoutes.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TemplateHaskell #
|
Module : $ Header$
Maintainer :
Stability : unstable
Portability : portable
Example from :
< >
Module : $Header$
Maintainer :
Stability : unstable
Portability : portable
Exa... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Happstack/CrashCourses/07_WebRoutes/helloWebRoutes.hs | haskell | # LANGUAGE DeriveDataTypeable #
(segment "Home" *> pure Home) <|> | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TemplateHaskell #
|
Module : $ Header$
Maintainer :
Stability : unstable
Portability : portable
Example from :
< >
Module : $Header$
Maintainer :
Stability : unstable
Portability : portable
Example from:
<>
-}
module Main where... |
6efbd11574f690d0beaabb9b8f1de908d6fea1cfea9165421288af9994663096 | basho/riak_function_contrib | bucket_inspector.erl | %% -------------------------------------------------------------------
%%
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required by app... | null | https://raw.githubusercontent.com/basho/riak_function_contrib/bad124ac39c72eb6ed85e6f30cfc779515e4e612/other/erlang/bucket_inspector.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permission... | This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(bucket_inspector).
-export([inspect/2]).
inspect(Bucket, Server) ->
... |
2d6250bff771685493747a36801257a782298fa0f5b5a563823f1700d7a00fac | fpco/schoolofhaskell | Scheduler.hs | module SchoolOfHaskell.Scheduler
(
-- Scheduler Types
Env
, Settings
, Err
-- Container Types
, ContainerDetail
, ContainerId
, ContainerReceipt
, ContainerSpec
-- Scheduler Env
, discoverEnv
, keysEnv
, profileEnv
... | null | https://raw.githubusercontent.com/fpco/schoolofhaskell/171454d255f57bb9ab82974625501e964c8c9b96/soh-scheduler/src/SchoolOfHaskell/Scheduler.hs | haskell | Scheduler Types
Container Types
Scheduler Env
Scheduler Settings
Container API | module SchoolOfHaskell.Scheduler
(
Env
, Settings
, Err
, ContainerDetail
, ContainerId
, ContainerReceipt
, ContainerSpec
, discoverEnv
, keysEnv
, profileEnv
, sessionEnv
, mkSettings
, setCluster
Container Spec
... |
487be6fbe0ca54cbc9d021b55856d93c0c7f131e4793d25c70e50d3499bbec51 | avsm/platform | opamDownload.ml | (**************************************************************************)
(* *)
Copyright 2012 - 2015 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/repository/opamDownload.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2015 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
open OpamTypes
open OpamProcess.Job.Op
let log fmt = OpamConsole.log "CURL" fmt
exception Do... |
693045bb914e53e7b0fe90bdf80d9ace3c368e531d23cf26a6dc43c2767dff58 | cchalmers/diagrams | Model.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeFamilies #
-----------------------------------------------------------------------------
-- |
-- Module : Diagrams.TwoD.Model
Copyright : ( c ) 2016 diagrams team ( see ... | null | https://raw.githubusercontent.com/cchalmers/diagrams/d091a3727817905eea8eeabc1e284105f618db21/src/Diagrams/TwoD/Model.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
---------------------------------------------------------------------------
|
Module : Diagrams.TwoD.Model
License : BSD-style (see LICENSE)
Maintainer :
Tools for visualizing diagrams' internal model: local origins,
envelopes, t... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
Copyright : ( c ) 2016 diagrams team ( see LICENSE )
module Diagrams.TwoD.Model
showOrigin
, showOrigin'
, OriginOpts(..)
, originSize
, showEnvelope
, showEnvelope'
, EnvelopeOpts(..)
, envelopeNumPoints
, envelopeSmooth... |
7177ea4f4d72db98ec1b9e5734ae05f33c49f9711596f5c1027b6f458c1eb7c3 | seanhess/yeti | Signup.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
module Page.Signup where
import Prelude
import Yeti
import Yeti.UI
import App.Color
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.Time.Clock as Time (UTCTime, getCurrentTime)
import Data.Text as Text (Text, len... | null | https://raw.githubusercontent.com/seanhess/yeti/b274dce41b0bf2f9115ea836d585aaff1cd2f5ac/example/Page/Signup.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveAnyClass #
{ message :: Text
, username :: Text
, pass1 :: Text
EXAMPLE of params inside a model. It keeps them easy to separate, no?
Simulated Effects ------------------------------ | # LANGUAGE DeriveGeneric #
module Page.Signup where
import Prelude
import Yeti
import Yeti.UI
import App.Color
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.Time.Clock as Time (UTCTime, getCurrentTime)
import Data.Text as Text (Text, length, any)
import Data.Char (isDigit, isAlpha, isPunctuation, isUppe... |
0c1e791e6ebab7bd33b9dd277bb6dda670407a6ad91ab31167e6d53e97f882f3 | ollef/sixty | Showable.hs | # LANGUAGE DuplicateRecordFields #
{-# LANGUAGE GADTs #-}
# LANGUAGE StandaloneDeriving #
module Core.Domain.Showable where
import Core.Binding (Binding)
import Core.Bindings (Bindings)
import qualified Core.Domain as Domain
import qualified Core.Syntax as Syntax
import Data.Tsil (Tsil)
import qualified Environment
i... | null | https://raw.githubusercontent.com/ollef/sixty/a804c1e2f43dcf22191cf8ba8e5389eb1074a9b3/src/Core/Domain/Showable.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE DuplicateRecordFields #
# LANGUAGE StandaloneDeriving #
module Core.Domain.Showable where
import Core.Binding (Binding)
import Core.Bindings (Bindings)
import qualified Core.Domain as Domain
import qualified Core.Syntax as Syntax
import Data.Tsil (Tsil)
import qualified Environment
import Index
import Lite... |
323353ebce32b83241b4f66a52a91a4d90cef72b2b235bade4926c5cfe9d9a65 | ahrefs/devkit | control.mli | (** Control flow *)
* [ bracket resource destroy k ]
@return [ k resource ] and guarantee that [ resource ] is [ destroy]'ed at the end .
@return [k resource] and guarantee that [resource] is [destroy]'ed at the end. *)
val bracket : 'a -> ('a -> unit) -> ('a -> 'b) -> 'b
* [ wrapped acc result k ]
Com... | null | https://raw.githubusercontent.com/ahrefs/devkit/559c2df8f6eacb091e0eac38f508c45b6567bdd8/control.mli | ocaml | * Control flow
* File IO
* Protected file IO, stdlib interface
* Protected file IO, extlib interface
* Misc. |
* [ bracket resource destroy k ]
@return [ k resource ] and guarantee that [ resource ] is [ destroy]'ed at the end .
@return [k resource] and guarantee that [resource] is [destroy]'ed at the end. *)
val bracket : 'a -> ('a -> unit) -> ('a -> 'b) -> 'b
* [ wrapped acc result k ]
Computation [ k ] accum... |
e937dced5825121b8dbb2fbff453e513f738c61af7838be80831c82bf2b36b1d | deadtrickster/prometheus_rabbitmq_exporter | prometheus_rabbitmq_queues_collector.erl | -module(prometheus_rabbitmq_queues_collector).
-export([register/0,
register/1,
deregister_cleanup/1,
collect_mf/2,
collect_metrics/2]).
-import(prometheus_model_helpers, [create_mf/5,
label_pairs/1,
gauge_metrics... | null | https://raw.githubusercontent.com/deadtrickster/prometheus_rabbitmq_exporter/bd8dbb1bef2d410d95dbadd47f03fc094dbe2cbf/src/collectors/prometheus_rabbitmq_queues_collector.erl | erlang | ====================================================================
Collector API
====================================================================
====================================================================
Private Parts
====================================================================
exclusive_con... | -module(prometheus_rabbitmq_queues_collector).
-export([register/0,
register/1,
deregister_cleanup/1,
collect_mf/2,
collect_metrics/2]).
-import(prometheus_model_helpers, [create_mf/5,
label_pairs/1,
gauge_metrics... |
536bde3c483d4fb865054a09800881ccea469eb97b58daf4fefb9b908fe07795 | lilactown/flex | memo.cljc | (ns town.lilac.flex.memo
(:require
[town.lilac.flex :as flex])
(:refer-clojure :exclude [memoize]))
(defn memoize
"Takes a function `f` which returns a signal. Returns a new function that when
called looks up in a cache whether a signal was previously constructed using
the same args. If it has, and that s... | null | https://raw.githubusercontent.com/lilactown/flex/dae776615426e04dc300c333eb41205ed2660867/src/town/lilac/flex/memo.cljc | clojure | TODO LRU | (ns town.lilac.flex.memo
(:require
[town.lilac.flex :as flex])
(:refer-clojure :exclude [memoize]))
(defn memoize
"Takes a function `f` which returns a signal. Returns a new function that when
called looks up in a cache whether a signal was previously constructed using
the same args. If it has, and that s... |
a3e0b82ede01c6688ef56fbe735d2c2b070782c2261a0955052d0347da72d9f5 | dannypsnl/plt-research | term.rkt | #lang typed/racket
(provide (all-defined-out))
(require "value.rkt")
(define-type checkable-term
(U
inferable-term
t:λ))
(define-type inferable-term
(U
t:annotation
t:*
t:Π
t:bound
t:free
t:app))
(struct t:λ
([checkable : checkable-term])
#:transparent)
(struct t:annotation
([c1 : c... | null | https://raw.githubusercontent.com/dannypsnl/plt-research/6e8c2af4252f418cb84ac1ead49991c89c5f377b/lambda-pi/term.rkt | racket | #lang typed/racket
(provide (all-defined-out))
(require "value.rkt")
(define-type checkable-term
(U
inferable-term
t:λ))
(define-type inferable-term
(U
t:annotation
t:*
t:Π
t:bound
t:free
t:app))
(struct t:λ
([checkable : checkable-term])
#:transparent)
(struct t:annotation
([c1 : c... | |
3f69d5dfd6b6ddef74d607e8c8201539e0db9581f1f7cd7270fda01e2835cfd7 | dyzsr/ocaml-selectml | t350-heapcheck.ml | TEST
include tool - ocaml - lib
flags = " -w -a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
ignore (Gc.stat ());
let x = Array.make 20 "" in
let w = weak_cre... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tool-ocaml/t350-heapcheck.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w -a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
ignore (Gc.stat ());
let x = Array.make 20 "" in
let w = weak_cre... | |
7b25d5f71e9e42a4f9ea9bfb3d976df115a9fd859c49df9b839e8da7c9a9b7c9 | jeffshrager/biobike | bbl-topics-language.lisp | -*- Package : help ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :help)
;;; +=========================================================================+
| Copyright ( c ) 2002 - 2006 JP , , |
;;; | |
;;; ... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Doc/bbl-topics-language.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and as... |
(in-package :help)
| Copyright ( c ) 2002 - 2006 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject to ... |
0f5b3f4a1a0a4d33ce614d7b495b7f530d87f587ef81d609bd34392597023f14 | sysbio-bioinf/avatar | about_dialog.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
Eclipse Public License 2.0 ( -v20.html )
; which can be found in the file LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of ... | null | https://raw.githubusercontent.com/sysbio-bioinf/avatar/cbf9968485f96fb61725aaa7381dba53624d6189/src/clojure/avatar/ui/dialogs/about_dialog.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright ( c ) . All rights reserved .
Eclipse Public License 2.0 ( -v20.html )
(ns avatar.ui.dialogs.about-dialog
(:require [clj-jfx.core :as jfx]
[avatar.ui.tools :as t]
[avatar.version :as v]
[clj-jfx.properties :as props]
[clojure.java.io :as io]
... |
7ba5e0a35a485fa6d4a8e81aa0fdb7990b7062b4b5cbe9b7474d3d43d0ac95d3 | RefactoringTools/wrangler | tree_mapping.erl | %%%------------------------------------------------------------------------
@author Seijas < >
@author < >
( C ) 2015 , ,
%%% @doc
%%% Implementation of the algorithm described in paper:
" diffX : an algorithm to detect changes in multi - version XML documents "
%%% by:
" Raihan Al - Ekram , ... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/behaviour_extraction/tree_mapping.erl | erlang | ------------------------------------------------------------------------
@doc
Implementation of the algorithm described in paper:
by:
@end
------------------------------------------------------------------------
--------------------------------------------------------------------
@doc
@end
-----------------------... | @author Seijas < >
@author < >
( C ) 2015 , ,
" diffX : an algorithm to detect changes in multi - version XML documents "
" Raihan Al - Ekram , and "
Created : 1 Jun 2015 by
-module(tree_mapping).
-export([mapping/2]).
Takes two trees and returns a mapping between their common nod... |
833ec696a46b53ab45f5efc8dc4e5bd01de1ee41eca0610031a943144c40f223 | scarvalhojr/haskellbook | Tests.hs |
module Tests where
import WordNumber (digitToWord, digits, wordNumber)
import Test.Hspec
main :: IO ()
main = hspec $ do
describe "digitToWord" $ do
it "returns zero for 0" $ do
digitToWord 0 `shouldBe` "zero"
it "returns one for 1" $ do
digitToWord 1 `shouldBe` "one"
describe "digits" $ do... | null | https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter14/wordnumber/Tests.hs | haskell |
module Tests where
import WordNumber (digitToWord, digits, wordNumber)
import Test.Hspec
main :: IO ()
main = hspec $ do
describe "digitToWord" $ do
it "returns zero for 0" $ do
digitToWord 0 `shouldBe` "zero"
it "returns one for 1" $ do
digitToWord 1 `shouldBe` "one"
describe "digits" $ do... | |
3b77c75d92e8074a54e1bd6dcecb090be90d5846c2bfd9af18542938990a5596 | cjdev/text-conversions | ConversionsSpec.hs | module Data.Text.ConversionsSpec (spec) where
import Test.Hspec
import Data.Text.Conversions
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
newtype Upper = Upper T.Text deriving (Eq, Show)
newtype Lower = Lower ... | null | https://raw.githubusercontent.com/cjdev/text-conversions/8d02c744f0760c343df4a557339ddc4faf4f2cb4/test/Data/Text/ConversionsSpec.hs | haskell | module Data.Text.ConversionsSpec (spec) where
import Test.Hspec
import Data.Text.Conversions
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
newtype Upper = Upper T.Text deriving (Eq, Show)
newtype Lower = Lower ... | |
6fecf4f65f99a2b08b0958da73cd94d8c0c9400093b3b9fa69667ae5c01a387f | noinia/hgeometry | WSPDBench.hs | # LANGUAGE PartialTypeSignatures #
module WSPDBench where
import Control.DeepSeq
import Control.Lens
import Criterion.Main
import Data.Ext
import Geometry.Point
import Demo.ExpectedPairwiseDistance
readInput' :: FilePath -> Int -> IO [Point 2 Double :+ _]
readInput' fp k = take k <$> readInput fp
benchWSPD :: ... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/benchmark/WSPDBench.hs | haskell | main = defaultMain [ benchWSPD ] | # LANGUAGE PartialTypeSignatures #
module WSPDBench where
import Control.DeepSeq
import Control.Lens
import Criterion.Main
import Data.Ext
import Geometry.Point
import Demo.ExpectedPairwiseDistance
readInput' :: FilePath -> Int -> IO [Point 2 Double :+ _]
readInput' fp k = take k <$> readInput fp
benchWSPD :: ... |
c90367a1345aeaed627c7d55807e276aaeaf3837da52a80bcb84fd15bb492c9d | peak6/mmd_core | sub.erl | Copyright 2012 PEAK6 Investments , L.P.
%%
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
d... | null | https://raw.githubusercontent.com/peak6/mmd_core/f90469ea9eac8cd607aa6ec5b9ad6ff003a35572/src/sub.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2012 PEAK6 Investments , L.P.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author
( C ) 2012 , PEAK6 Investments , L.P.
Created : Thr May 03 08:42:59 CDT 2011
-module(sub).
-export([start_link/0]).
-... |
5202055ee00c545cabe26c794c5b7d3dea9371dc8815bb8957dd8a4ab50146c6 | eslick/cl-stdutils | cache.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; Package : utils -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
Name : cache.lisp
;;;; Purpose: Various cache implementations with generic func interface.
;;;; ... | null | https://raw.githubusercontent.com/eslick/cl-stdutils/4a4e5a4036b815318282da5dee2a22825369137b/src/cache.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 ; Package : utils -*-
*************************************************************************
FILE IDENTIFICATION
Purpose: Various cache implementations with generic func interface.
Uses the element as structure model.
-----------------------------... | Name : cache.lisp
Programmer :
Date Started : September 2004
(in-package :stdutils)
(defclass-exported object-cache-h-q ()
((index :type hash-table :accessor object-cache-h-q-index)
(queue :type list-queue :accessor object-cache-h-q-queue)
(max-size :type fixnum :accessor object-ca... |
387cd21e48eba72d69144ad12efa36ce592948707de0b613acccd5c5b666e157 | kupl/FixML | sub14.ml | type exp = V of var
| P of var * exp
| C of exp * exp
and var = string
let check : exp -> bool =
fun ex ->
let rec var_list : exp -> var list =
fun ex2 ->
match ex2 with
| V v -> [v]
| P(v2, ex3) -> var_list ex3
| C(ex3, ex4) -> (var_list ex3) @ (var_list ex4)
in
let rec p... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/wellformedness/wellformedness/submissions/sub14.ml | ocaml | type exp = V of var
| P of var * exp
| C of exp * exp
and var = string
let check : exp -> bool =
fun ex ->
let rec var_list : exp -> var list =
fun ex2 ->
match ex2 with
| V v -> [v]
| P(v2, ex3) -> var_list ex3
| C(ex3, ex4) -> (var_list ex3) @ (var_list ex4)
in
let rec p... | |
acbec1df3740984ba59a8b4697e16bec07e397f3589c6c3eb1f0ddccc00648a6 | ruhler/smten | Bit.hs |
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE NoImplicitPrelude #
module Smten.Tests.SMT.Bit (smttests) where
import Smten.Prelude
import Smten.Data.Bit
import Smten.Search
import Smten.Tests.SMT.Test
smttests :: SMTTest ()
smttests = do
symtesteq "SMT.Bit.Simple" (Just 0... | null | https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-lib/Smten/Tests/SMT/Bit.hs | haskell | this was a bug in the Bits wrapper
This test case failed for the Bits wrapper
p <- free_Bool
return p
p <- free_Bool
x <- free_Bit
y <- free_Bit
let m = if p then Just x else Just y
guard (y /= 3)
guard (3 == (case m of
Just v ->... |
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE NoImplicitPrelude #
module Smten.Tests.SMT.Bit (smttests) where
import Smten.Prelude
import Smten.Data.Bit
import Smten.Search
import Smten.Tests.SMT.Test
smttests :: SMTTest ()
smttests = do
symtesteq "SMT.Bit.Simple" (Just 0... |
eb59663090b7765235eebc61a1b80f5f690f0330961bd2e4aa3a7e6bb7427013 | openworkload/swm-core | wm_tunnel_SUITE.erl | -module(wm_tunnel_SUITE).
-export([suite/0, all/0, groups/0, init_per_suite/1, end_per_suite/1]).
-export([one_server_two_clients/1]).
-include_lib("common_test/include/ct.hrl").
-define(KEYS_DIR, "/opt/swm/spool/secure/host").
%% ============================================================================
%% Commo... | null | https://raw.githubusercontent.com/openworkload/swm-core/3deab381f3ebce6ddbb4846fc69769e3768aef61/test/wm_tunnel_SUITE.erl | erlang | ============================================================================
Common test callbacks
============================================================================
============================================================================
Tests
=======================================================... | -module(wm_tunnel_SUITE).
-export([suite/0, all/0, groups/0, init_per_suite/1, end_per_suite/1]).
-export([one_server_two_clients/1]).
-include_lib("common_test/include/ct.hrl").
-define(KEYS_DIR, "/opt/swm/spool/secure/host").
-spec suite() -> list().
suite() ->
[{timetrap, {seconds, 60}}].
-spec all() -> li... |
7b6881c3eab2f2d8dc3107a78e2b45343442f94b44ff03ac4a9245263399b55e | ocsigen/ocsimore | forum_client.p.ml |
let switchshow =
fun.client (i1 : string) (i2 : string) ->
Js.Node.set_attribute (Js.get_element_by_id i2) "style" "display:block";
Js.Node.set_attribute (Js.get_element_by_id i1) "style" "display:none"
| null | https://raw.githubusercontent.com/ocsigen/ocsimore/8eeaf043ed6f1f167a96cbdc5f72a5225d9516d5/src/forum/forum_client.p.ml | ocaml |
let switchshow =
fun.client (i1 : string) (i2 : string) ->
Js.Node.set_attribute (Js.get_element_by_id i2) "style" "display:block";
Js.Node.set_attribute (Js.get_element_by_id i1) "style" "display:none"
| |
bf87bb4cb7315012f94bff71a2db69b9fc567f62964a7a10425c0c850aaa6b3f | dannypsnl/plt-research | cutting-out-continuation.rkt | #lang nanopass
(define-language L
(terminals
(integer (int)))
(Expr (expr)
int
[add expr expr1]))
(define-pass eval* : (L Expr) (e c) -> (L Expr) ()
(f : Expr (e) -> Expr ()
[,int (c int)]
[(add ,expr ,expr1)
(eval* expr (next expr1 c))])
(f e))
(define (halt x) x)
(define ... | null | https://raw.githubusercontent.com/dannypsnl/plt-research/8f34b138ee75288caca4e4f076f8b5ec05ee54d0/continuations/cutting-out-continuation.rkt | racket | #lang nanopass
(define-language L
(terminals
(integer (int)))
(Expr (expr)
int
[add expr expr1]))
(define-pass eval* : (L Expr) (e c) -> (L Expr) ()
(f : Expr (e) -> Expr ()
[,int (c int)]
[(add ,expr ,expr1)
(eval* expr (next expr1 c))])
(f e))
(define (halt x) x)
(define ... | |
7adcc285ae07a6605655a358038c53eb631704e4a170ce960b6abff3c9aff9bc | raaz-crypto/raaz | ChaCha20Spec.hs | # OPTIONS_GHC -fno - warn - orphans #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DataKinds #-}
module Raaz.Cipher.ChaCha20Spec where
import Tests.Core
import qualified Tests.Cipher as C
writeZeros :: BYTES Int -> WriteTo
writeZeros = writeBytes 0
ze... | null | https://raw.githubusercontent.com/raaz-crypto/raaz/91799e1ae528e909ad921f6c0d6f51ebd8c7328f/tests/Raaz/Cipher/ChaCha20Spec.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE DataKinds #
Unit test from RFC7539 | # OPTIONS_GHC -fno - warn - orphans #
module Raaz.Cipher.ChaCha20Spec where
import Tests.Core
import qualified Tests.Cipher as C
writeZeros :: BYTES Int -> WriteTo
writeZeros = writeBytes 0
zeroIV :: Nounce ChaCha20
zeroIV = unsafeDecode $ toByteString $ writeZeros 12
zeroKey :: Key ChaCha20
zeroKey = un... |
1bea7fd9b7295bbb0d8b125f97c7f7b2dd4e8f45c475029c4cb26bcf27f2bfc3 | unison-code/unison | UnbundleSingletons.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Transformations/UnbundleSingletons.hs | haskell | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | |
59a0bd2fb6778d98c74c79dd00ea5d42856c57d4a4797fece29cd61cbe305e74 | dfinity/motoko | declaration_index.mli | open Source
open Mo_types
type t
val empty : string -> t
val string_of_index : t -> string
type value_decl = {
name : string;
typ : Type.typ;
definition : region option;
doc_comment : string option;
}
type type_decl = {
name : string;
typ : Type.con;
definition : region option;
doc_comment : string ... | null | https://raw.githubusercontent.com/dfinity/motoko/ed88d7636d7dd1fc1378d7000f0bb5f42d380a86/src/languageServer/declaration_index.mli | ocaml | * The package map for searching package paths
* The aliases for looking up canister ids
* The file that ends up containing the import
* The path to be shortened
* The prefix
* The file in which the results would be imported
* The declaration index
* The project root
* The entry points | open Source
open Mo_types
type t
val empty : string -> t
val string_of_index : t -> string
type value_decl = {
name : string;
typ : Type.typ;
definition : region option;
doc_comment : string option;
}
type type_decl = {
name : string;
typ : Type.con;
definition : region option;
doc_comment : string ... |
7ee40ce1b5c55c7df324d8122f398d5b34307cf2b4fb54b691e7f5e09bb2dbca | Clojure2D/clojure2d-examples | material.clj | (ns rt4.the-next-week.ch07a.material
(:require [rt4.common :as common]
[rt4.the-next-week.ch07a.ray :as ray]
[rt4.the-next-week.ch07a.texture :as texture]
[fastmath.vector :as v]
[fastmath.core :as m]
[fastmath.random :as r])
(:import [fastmath.vector Vec3... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch07a/material.clj | clojure | (ns rt4.the-next-week.ch07a.material
(:require [rt4.common :as common]
[rt4.the-next-week.ch07a.ray :as ray]
[rt4.the-next-week.ch07a.texture :as texture]
[fastmath.vector :as v]
[fastmath.core :as m]
[fastmath.random :as r])
(:import [fastmath.vector Vec3... | |
a1f955d7e18c3edf80756fbd10d3448bb4467b11f776c2548b9e02bab7ea7216 | gtk2hs/gtk2hs | gtk2hsC2hsMain.hs | module Main (main) where
import System.Environment (getArgs)
import Gtk2HsC2Hs (c2hsMain)
main = getArgs >>= c2hsMain
| null | https://raw.githubusercontent.com/gtk2hs/gtk2hs/0f90caa1dae319a0f4bbab76ed1a84f17c730adf/tools/exe/gtk2hsC2hsMain.hs | haskell | module Main (main) where
import System.Environment (getArgs)
import Gtk2HsC2Hs (c2hsMain)
main = getArgs >>= c2hsMain
| |
05fc2c0ad2e0b0cf4d3ff6a089583c2954a53162fc668a21a55cb2f69e789887 | formal-land/coq-of-ocaml | mutual_types.ml | type foo = string
type 'a tree = Tree of 'a node list
and 'a node =
| Leaf of string
| Node of 'a tree
and 'b double = 'b * 'b simple
and 'b simple = 'b
and 'a unrelated = Unrelated of ('a simple) double
type ind =
| Ind of int re
and 'a re = { payload : 'a; message : string }
and re_bis = { bis : unit }
| null | https://raw.githubusercontent.com/formal-land/coq-of-ocaml/c9c86b08eb19d7fd023f48029cc5f9bf53f6a11c/tests/mutual_types.ml | ocaml | type foo = string
type 'a tree = Tree of 'a node list
and 'a node =
| Leaf of string
| Node of 'a tree
and 'b double = 'b * 'b simple
and 'b simple = 'b
and 'a unrelated = Unrelated of ('a simple) double
type ind =
| Ind of int re
and 'a re = { payload : 'a; message : string }
and re_bis = { bis : unit }
| |
94302ef62b37796c674f5da80203d526ad07f76594a9b6b8770985850f1fe9da | TotallyNotChase/valida | Utils.hs | module Utils
( neSingleton
) where
import Data.List.NonEmpty (NonEmpty ((:|)))
neSingleton :: a -> NonEmpty a
neSingleton = (:|[])
| null | https://raw.githubusercontent.com/TotallyNotChase/valida/763e25717b538bc236a63ebbf025b8407c894413/test/Utils.hs | haskell | module Utils
( neSingleton
) where
import Data.List.NonEmpty (NonEmpty ((:|)))
neSingleton :: a -> NonEmpty a
neSingleton = (:|[])
| |
952e1b61c451d9a743c10b84cad42af7949e5b3f1d62ba75e0f2dcd2491ba1f0 | avsm/platform | xml_wrap.ml | TyXML
*
* Copyright ( C ) 2013 < drupyog+ >
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/tyxml.4.3.0/lib/xml_wrap.ml | ocaml | TyXML
*
* Copyright ( C ) 2013 < drupyog+ >
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or... | |
762d841c81194c9e939e035223408c2c003a2cabaf2a1f60f11672f62ec3331d | haskell/cabal | cabal.test.hs | import Test.Cabal.Prelude
Uknown compiler in ` tested - with ` .
main = cabalTest $
fails $ cabal "check" []
| null | https://raw.githubusercontent.com/haskell/cabal/1cfe7c4c7257aa7ae450209d34b4a359e6703a10/cabal-testsuite/PackageTests/Check/ConfiguredPackage/Fields/UnknownCompiler/cabal.test.hs | haskell | import Test.Cabal.Prelude
Uknown compiler in ` tested - with ` .
main = cabalTest $
fails $ cabal "check" []
| |
508c54295766ee542da7d76a781e3f3d087694b6f41dce87a3853586007f6125 | haskell-tools/haskell-tools | B.hs | module B where
import A
y = x | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/daemon/examples/Project/changing-cabal/B.hs | haskell | module B where
import A
y = x | |
cc31d2207b1b63dd8657eef7be6609f769f0fa334dc88848953674569b5f45e5 | TerrorJack/ghc-alter | num010.hs |
module Main(main) where
main = sequence_ [ f x y | x <- [0,
1000,
> 2 ^ 32
> 2 ^ 64
-1000,
< -2 ^ 32
< -2 ^ 64
, y <- [0, -10, 10] ]
f :: Integer -> Int -> IO ()
f x y = do putStrLn "------------------------"
... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/Numeric/num010.hs | haskell |
module Main(main) where
main = sequence_ [ f x y | x <- [0,
1000,
> 2 ^ 32
> 2 ^ 64
-1000,
< -2 ^ 32
< -2 ^ 64
, y <- [0, -10, 10] ]
f :: Integer -> Int -> IO ()
f x y = do putStrLn "------------------------"
... | |
f13cece920b902bca890c85f81474c0fc2b8177fc690e3f8ac4077d82ff5a9e3 | prg-titech/baccaml | opt_const_fold.ml | open Std
open MinCaml
open Asm
open Opt_lib
let rec is_occur var = function
| Let (_, e, t) -> is_occur_exp var e || is_occur var t
| Ans e ->
(match e with
| IfEq (x, V y, t1, t2) | IfLE (x, V y, t1, t2) | IfGE (x, V y, t1, t2) ->
var = x || var = y || is_occur var t1 || is_occur var t2
| IfEq (... | null | https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/opt/opt_const_fold.ml | ocaml | side effect | open Std
open MinCaml
open Asm
open Opt_lib
let rec is_occur var = function
| Let (_, e, t) -> is_occur_exp var e || is_occur var t
| Ans e ->
(match e with
| IfEq (x, V y, t1, t2) | IfLE (x, V y, t1, t2) | IfGE (x, V y, t1, t2) ->
var = x || var = y || is_occur var t1 || is_occur var t2
| IfEq (... |
68a558b2e434239f9125bb301d1ebfd345687d18c688c5d3d655ca63fcde5bfa | tari3x/csec-modex | reduction_bipro.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/proverif1.84/src/reduction_bipro.mli | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | |
f071b22194736c7bf56c9310579d74e3d08f61ef2e604ca2673ddc71a5743a21 | aharisu/Gauche-SDL | mpeg.scm | (use sdl)
(use sdl.mixer)
(use sdl.smpeg)
(define-constant movie-file "res/sample.mpg")
(define screen #f)
(define mpeg #f)
(define (update)
(smpeg-status mpeg)
)
(define (draw)
)
(define (initialize)
(sdl-init SDL_INIT_VIDEO SDL_INIT_AUDIO)
(sdl-wm-set-caption "My SDL Sample SMPEG" #f)
(set! mpeg (s... | null | https://raw.githubusercontent.com/aharisu/Gauche-SDL/29e997dacdb7c6b89e99843f0f0c52266abfee66/sample/mpeg.scm | scheme | (use sdl)
(use sdl.mixer)
(use sdl.smpeg)
(define-constant movie-file "res/sample.mpg")
(define screen #f)
(define mpeg #f)
(define (update)
(smpeg-status mpeg)
)
(define (draw)
)
(define (initialize)
(sdl-init SDL_INIT_VIDEO SDL_INIT_AUDIO)
(sdl-wm-set-caption "My SDL Sample SMPEG" #f)
(set! mpeg (s... | |
a1800832991d37015a909a415da53a8fe989fed59df0684e8e25e7f7ba8fc1bf | ejgallego/dualquery | query.ml | Copyright ( c ) 2013 , The Trustees of the University of Pennsylvania
All rights reserved .
LICENSE : 3 - clause BSD style .
See the LICENSE file for details on licensing .
All rights reserved.
LICENSE: 3-clause BSD style.
See the LICENSE file for details on licensing.
*)
open Attribute
o... | null | https://raw.githubusercontent.com/ejgallego/dualquery/f8355212a760ef77ad3fb07f3bb595e775bf06d2/src/query.ml | ocaml | Note entirely happy with the current query representation, it is a
little bit cumbersome and precludes code reuse
Note we may end up generating the same twice, althought it is not likely
Naive
else
let generate_lin_query n_att n =
let p1 = q1 mod 2 in
NQuery inne... | Copyright ( c ) 2013 , The Trustees of the University of Pennsylvania
All rights reserved .
LICENSE : 3 - clause BSD style .
See the LICENSE file for details on licensing .
All rights reserved.
LICENSE: 3-clause BSD style.
See the LICENSE file for details on licensing.
*)
open Attribute
o... |
584c17b52ef46aed6153a0a996cb52d5e85cc26002b7ab2c1a80fa5085732dd3 | aaltodsg/instans | chbuf.lisp | -*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 ; Package : INSTANS -*-
;;;
Author : ( )
;;;
(in-package #:instans)
(defvar *chbuf* nil)
;;; "A character buffer for the lexical analysis"
(define-class chbuf ()
((contents :accessor chbuf-contents :initarg :contents)
(size :accessor chbuf-size :inita... | null | https://raw.githubusercontent.com/aaltodsg/instans/5ffc90e733e76ab911165f205ba57a7b3b200945/src/parser/chbuf.lisp | lisp | Syntax : COMMON - LISP ; Base : 10 ; Package : INSTANS -*-
"A character buffer for the lexical analysis"
(incf *chbuf-string-length* length) | Author : ( )
(in-package #:instans)
(defvar *chbuf* nil)
(define-class chbuf ()
((contents :accessor chbuf-contents :initarg :contents)
(size :accessor chbuf-size :initarg :size)
(index :accessor chbuf-index :initarg :index)))
(defmethod print-object ((this chbuf) stream)
(format stream "#<~A ~D/~D: ... |
645e9a15464f687595284010c786e8b200d930835b2e51b8335698912fddc3c3 | glondu/belenios | election.ml | (**************************************************************************)
(* BELENIOS *)
(* *)
Copyright © 2012 - 2022
(* ... | null | https://raw.githubusercontent.com/glondu/belenios/d1618b424498fe3a3485ecb60eb3242ba730d809/src/tool/election.ml | ocaml | ************************************************************************
BELENIOS
This program is free softw... | Copyright © 2012 - 2022
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
exemption that compiling , linking , and/or using OpenSSL is allowed .
You should have rece... |
5537c7f4dc40214fa9d5ff3e773f3953efb16435a4700863b84cf81f08f04870 | NelosG/fp-tests | Spec.hs | # LANGUAGE TemplateHaskell , NegativeLiterals , BlockArguments , GeneralizedNewtypeDeriving , DerivingStrategies , FlexibleInstances #
import Control.Monad (unless)
import System.Exit (exitFailure)
import qualified Test.QuickCheck as QC
import Data.Ratio ((%))
import Data.Fixed (Pico, showFixed)
import Numeric.Natural... | null | https://raw.githubusercontent.com/NelosG/fp-tests/2997fc0d4cf08fa17dffa00242369ac039e709aa/hw3/baseTests/T2/Spec.hs | haskell | -------------------------
---- NAME CHECKING ------
-------------------------
-------
-------------------------
---- COMPATIBILITY ------
-------------------------
-------------------------
---- TYPE CHECKING ------
-------------------------
-------------------------
---- PROP CHECKING ------
-------------------------
... | # LANGUAGE TemplateHaskell , NegativeLiterals , BlockArguments , GeneralizedNewtypeDeriving , DerivingStrategies , FlexibleInstances #
import Control.Monad (unless)
import System.Exit (exitFailure)
import qualified Test.QuickCheck as QC
import Data.Ratio ((%))
import Data.Fixed (Pico, showFixed)
import Numeric.Natural... |
a25a273f2ba55ad7aff00514f1ee443b8687dae5e942805d6d57deef24542e95 | thlorenz/WebToInk | HomeTest.hs | module HomeTest
( homeSpecs
) where
import Import
import Yesod.Test
homeSpecs :: Specs
homeSpecs =
describe "These are some example tests" $
it "loads the index and checks it looks right" $ do
get_ "/"
statusIs 200
htmlAllContain "label#url" "Convert URL"
post " / " $ do... | null | https://raw.githubusercontent.com/thlorenz/WebToInk/82e2e340f6f16b83681459fb2acc5e19ea1a76f9/webtoink/tests/HomeTest.hs | haskell | talk about self - reference
talk about self-reference | module HomeTest
( homeSpecs
) where
import Import
import Yesod.Test
homeSpecs :: Specs
homeSpecs =
describe "These are some example tests" $
it "loads the index and checks it looks right" $ do
get_ "/"
statusIs 200
htmlAllContain "label#url" "Convert URL"
post " / " $ do... |
d0e764a2a99947f8cc15102f10d51f338ddac192673b6a1d4e4503052f040a8f | BumblebeeBat/FlyingFox | block_pointers.erl | %this should be redundant between hard drive and ram, that way we can be faster.
-module(block_pointers).
-behaviour(gen_server).
-export([start_link/0,code_change/3,handle_call/3,handle_cast/2,handle_info/2,init/1,terminate/2, read/2,write/2,test/0,height/0,append/1,garbage/1,start/0,set_start/1]).
%-define(file, "blo... | null | https://raw.githubusercontent.com/BumblebeeBat/FlyingFox/0fa039cd2394b08b1a85559f9392086c6be47fa6/src/consensus/finality/block_finality/block_pointers.erl | erlang | this should be redundant between hard drive and ram, that way we can be faster.
-define(file, "block_pointers.db").
-define(start, "pointers_start.db").
T = "temp.db",
timer:sleep(200), | -module(block_pointers).
-behaviour(gen_server).
-export([start_link/0,code_change/3,handle_call/3,handle_cast/2,handle_info/2,init/1,terminate/2, read/2,write/2,test/0,height/0,append/1,garbage/1,start/0,set_start/1]).
-define(file, constants:block_pointers()).
-define(start, constants:pointers_start()).
-define(word,... |
b54d0ee7ec1e49f3917ddb46c2b229b8a056c5931577e8b1890a4741c6693156 | lsrcz/mini-prover | IntrosSpec.hs | # LANGUAGE LambdaCase #
module MiniProver.Proof.Tactics.IntrosSpec where
import Test.Hspec
import Test.Hspec.Megaparsec
import MiniProver.Core.Syntax
import MiniProver.Core.Context
import MiniProver.Proof.HandleTactic
import MiniProver.Proof.ProofDef
import MiniProver.Utils.ContextForTesting
import Data.Either (fromRi... | null | https://raw.githubusercontent.com/lsrcz/mini-prover/0aa4cdf3b495ddf6707f27dcbee810d519b43177/test/MiniProver/Proof/Tactics/IntrosSpec.hs | haskell | # LANGUAGE LambdaCase #
module MiniProver.Proof.Tactics.IntrosSpec where
import Test.Hspec
import Test.Hspec.Megaparsec
import MiniProver.Core.Syntax
import MiniProver.Core.Context
import MiniProver.Proof.HandleTactic
import MiniProver.Proof.ProofDef
import MiniProver.Utils.ContextForTesting
import Data.Either (fromRi... | |
280624c9bad799781c943091dd9f343b183df5ba9442574dd1750db6206e307e | jorgetavares/core-gp | utilities.lisp | (in-package #:core-gp)
;;;
;;; utilities
;;;
(defun copy-array (array)
(let ((dimensions (array-dimensions array)))
(adjust-array
(make-array dimensions
:element-type (array-element-type array)
:displaced-to array)
dimensions)))
(defun bound-random (min max)
"Return a random number between... | null | https://raw.githubusercontent.com/jorgetavares/core-gp/90ec1c4599a19c5a911be1f703f78d5108aee160/src/utilities.lisp | lisp |
utilities
| (in-package #:core-gp)
(defun copy-array (array)
(let ((dimensions (array-dimensions array)))
(adjust-array
(make-array dimensions
:element-type (array-element-type array)
:displaced-to array)
dimensions)))
(defun bound-random (min max)
"Return a random number between min and max."
(+ mi... |
00df19bd4e441d367126eee847f378744904316f849b870c03fc083d4c728144 | rd--/hsc3 | blitB3Tri.help.hs | -- blitB3Tri
X.blitB3Tri ar (xLine kr 1000 20 10 DoNothing) 0.99 0.99 * 0.1
blitB3Tri ; aliasing at higher frequencies ( over 5000Hz or so ) is very beautiful in point scope
let x = mouseX kr 20 8000 Exponential 0.2
y = mouseY kr 0.001 0.99 Linear 0.2
in X.blitB3Tri ar x 0.99 y * 0.1
blitB3Tri ; aliasing at h... | null | https://raw.githubusercontent.com/rd--/hsc3/e1c9377f4985f4cc209a9cb11421bc8f1686c6f2/Help/Ugen/blitB3Tri.help.hs | haskell | blitB3Tri
--- ; drawings | X.blitB3Tri ar (xLine kr 1000 20 10 DoNothing) 0.99 0.99 * 0.1
blitB3Tri ; aliasing at higher frequencies ( over 5000Hz or so ) is very beautiful in point scope
let x = mouseX kr 20 8000 Exponential 0.2
y = mouseY kr 0.001 0.99 Linear 0.2
in X.blitB3Tri ar x 0.99 y * 0.1
blitB3Tri ; aliasing at higher frequen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.