_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 |
|---|---|---|---|---|---|---|---|---|
a5bda6d18d395d6e64591e2d1248a97e556afedf6bb362db5e2206b252fca6ae | int-index/ether | T8.hs | module Regression.T8 (test8) where
import Ether
import qualified Control.Monad.State as T
import Test.Tasty
import Test.Tasty.QuickCheck
data Foo
data Bar
testMTL1 :: T.MonadState Int m => m ()
testMTL1 = T.modify negate
testMTL2 :: T.MonadState Bool m => m ()
testMTL2 = T.modify not
testEther
:: (MonadState F... | null | https://raw.githubusercontent.com/int-index/ether/84c1d560da241c8111d1a3c98d9a896f0c62087b/test/Regression/T8.hs | haskell | module Regression.T8 (test8) where
import Ether
import qualified Control.Monad.State as T
import Test.Tasty
import Test.Tasty.QuickCheck
data Foo
data Bar
testMTL1 :: T.MonadState Int m => m ()
testMTL1 = T.modify negate
testMTL2 :: T.MonadState Bool m => m ()
testMTL2 = T.modify not
testEther
:: (MonadState F... | |
3aa9bbcf8e73bc1b8b5558f6a806716ba0f3176ba9fbf3ac2b21ca6e9eea5509 | Gandalf-/coreutils | Shuf.hs | {-# OPTIONS_GHC -Wno-unused-binds -Wno-unused-matches #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE LambdaCase #
module Coreutils.Shuf where
import Control.Monad
import GHC.Int (Int64)
import GHC.IO.Handle
import System.Console.GetOpt
impor... | null | https://raw.githubusercontent.com/Gandalf-/coreutils/9ebe7b3897b97ee635d866f8cc651a74338001c8/Coreutils/Shuf.hs | haskell | # OPTIONS_GHC -Wno-unused-binds -Wno-unused-matches #
| Business logic
| IO
maybe change where stdout points so we can just print everywhere else
take the filename, acquire a handle and determine it's size
| Options | # LANGUAGE ExistentialQuantification #
# LANGUAGE LambdaCase #
module Coreutils.Shuf where
import Control.Monad
import GHC.Int (Int64)
import GHC.IO.Handle
import System.Console.GetOpt
import System.Exit
import System.IO
import ... |
50f3e95988eab00262d2083f89a115efe2f9c8d7719cd4fd0d7b568d7e4714f3 | Shimuuar/histogram-fill | Tutorial.hs | -- |
-- Module : Data.Histogram.Tutorial
Copyright : Copyright ( c ) 2009 - 2018 , < >
-- License : BSD3
Maintainer : < >
-- Stability : experimental
--
--
= = 1 .
--
The first example illustrates one of the most common use - cases of a histogram , i.e.
--
-- * uniformly-spaced, equal-weight bin... | null | https://raw.githubusercontent.com/Shimuuar/histogram-fill/3dff15027390cf64e7fc3fbaac34c28ffcdacbd6/histogram-fill/Data/Histogram/Tutorial.hs | haskell | |
Module : Data.Histogram.Tutorial
License : BSD3
Stability : experimental
* uniformly-spaced, equal-weight bins
* binning range equal to the data range
We can write a helper function that populates a 'Histogram' from a
'Foldable' container (e.g. an array, or a 'Vector', or a tree,
etc.) of 'Do... | Copyright : Copyright ( c ) 2009 - 2018 , < >
Maintainer : < >
= = 1 .
The first example illustrates one of the most common use - cases of a histogram , i.e.
* one - dimensional distribuded data
histo : : ( ' Foldable ' v , ' Unbox ' a , a ) = >
- > ' Histogram ' ' BinD ' a
histo n v = ' ... |
6642f7da979c36e9c0a4529164a40823dd4b0630ca0a7bba56640b9f45220fd4 | camlp5/camlp5 | location.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_stuff/4.05.0/parsing/location.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Source code locations ( ranges of positions ) , used in parsetree .
open Format
type t = {
loc_star... |
a9acf722a8f88b792735766d34b507dfc35a9a3bcfd58af283bd1d13d04f7ffd | monadic-xyz/ipfs | Options.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
module Network.IPFS.Git.RemoteHelper.Options where
import Control.Applicative (liftA2, (<|>))
import Control.Exception.Safe (throwString)
import Control.Monad.Trans.Maybe (MaybeT(..))
import... | null | https://raw.githubusercontent.com/monadic-xyz/ipfs/b56c0af905e371c231d52f86f2586d473941afec/git-remote-ipfs/src/Network/IPFS/Git/RemoteHelper/Options.hs | haskell | # LANGUAGE OverloadedStrings #
Default: \":5001\"
this is approximate.
unambiguous documentation on what the actual value is. It may also be
subject to change in the future.
This must happen after 'parseOptions' in order to support per-remote
settings. The @GIT_DIR@ environment variable must be set and point ... | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
module Network.IPFS.Git.RemoteHelper.Options where
import Control.Applicative (liftA2, (<|>))
import Control.Exception.Safe (throwString)
import Control.Monad.Trans.Maybe (MaybeT(..))
import Data.Function (on)
impor... |
e7058815995e2881978064f380813b0f4b4695ce83f0bb559b580fd3ed5b5be0 | Dean177/reason-standard | Comparator.mli | * Comparator provide a way for custom data structures to be used with { ! Map}s and { ! Say we have a module [ Book ] which we want to be able to create a { ! Set } of
{ [
module Book = struct
type t = {
: string ;
title : string ;
}
end
] }
... | null | https://raw.githubusercontent.com/Dean177/reason-standard/74ed165c988eb4a4ea54339e829ff1d59b186d15/bucklescript/src/Comparator.mli | ocaml | * T represents the input for the {!Make} functor
* This just is an alias for {!t}
* The output type of {!Make} and {!make}. | * Comparator provide a way for custom data structures to be used with { ! Map}s and { ! Say we have a module [ Book ] which we want to be able to create a { ! Set } of
{ [
module Book = struct
type t = {
: string ;
title : string ;
}
end
] }
... |
9f697c8186e7546bb7333c1734187441b34f83073a832cb5d7e549fd2881341e | chaoxu/fancy-walks | 43.hs | {-# OPTIONS_GHC -O2 #-}
perm :: [a] -> [[a]]
perm [] = [[]]
perm (x:xs) = concatMap (insertAll x []) $ perm xs
where
insertAll u prev [] = [prev ++ [u]]
insertAll u prev t@(v:vs) = (prev ++ u:t) : insertAll u (prev ++ [v]) vs
checkList = filter ((/=0).head) $ perm [0..9]
arrayToInt = foldl (\x y -> x * 10 ... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/projecteuler.net/43.hs | haskell | # OPTIONS_GHC -O2 # |
perm :: [a] -> [[a]]
perm [] = [[]]
perm (x:xs) = concatMap (insertAll x []) $ perm xs
where
insertAll u prev [] = [prev ++ [u]]
insertAll u prev t@(v:vs) = (prev ++ u:t) : insertAll u (prev ++ [v]) vs
checkList = filter ((/=0).head) $ perm [0..9]
arrayToInt = foldl (\x y -> x * 10 + y) 0
list1 x = map (\... |
e7556c62321cc2d446895ccfe68547659027c8406caaa6a666846d7dc4bca536 | ocaml/ocaml-re | cset.ml |
RE - A regular expression library
Copyright ( C ) 2001
email :
This library 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 ... | null | https://raw.githubusercontent.com/ocaml/ocaml-re/09c2745a2d8d1517b3d597396e82e122903b0017/lib/cset.ml | ocaml | **
** |
RE - A regular expression library
Copyright ( C ) 2001
email :
This library 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 ... |
8e37f2545c938d36fe8a887961509b20e7aaa7b5c2a5f344b03d0b2d1d0982e1 | theosotr/buildfs | executor.ml |
* Copyright ( c ) 2018 - 2020
*
* 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 , version 3 .
*
* This program is distributed in the hope that it will be useful , but
... | null | https://raw.githubusercontent.com/theosotr/buildfs/3cd287da0d1184934c1bcd28d301f2545196f44b/src/executor.ml | ocaml | We should never reach here.
Maybe strace is not installed in the system.
So, we pass the exception to err to the pipe
so that it can be read by the parent process.
We create a child process that is responsible for invoking
strace and run the build script in parallel. |
* Copyright ( c ) 2018 - 2020
*
* 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 , version 3 .
*
* This program is distributed in the hope that it will be useful , but
... |
f67b2ba028fe69b1043050718255d06b819bc53b796256bd206961aaf7b12a20 | pouriya/director | director_table.erl | %%% ------------------------------------------------------------------------------------------------
Director is available for use under the following license , commonly known as the 3 - clause ( or
%%% "modified") BSD license:
%%%
Copyright ( c ) 2018 - 2019 ,
%%% ()
%%% All rights reserved.
%%%
%%% Redistributi... | null | https://raw.githubusercontent.com/pouriya/director/919c30db18c83330290fba9e68de330000978674/src/director_table.erl | erlang | ------------------------------------------------------------------------------------------------
"modified") BSD license:
()
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
conditions and the... | Director is available for use under the following license , commonly known as the 3 - clause ( or
Copyright ( c ) 2018 - 2019 ,
1 . Redistributions of source code must retain the above copyright notice , this list of
2 . Redistributions in binary form must reproduce the above copyright notice , this list of
... |
f914497749597f8db24f238fc0524bf20db0acc8497d33683fe261748e106991 | yallop/ocaml-ctypes | cstubs_c_language.ml |
* Copyright ( c ) 2014 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2014 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
(* C code representation. *)
... | null | https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/src/cstubs/cstubs_c_language.ml | ocaml | C code representation.
We're using an abstract type ([value]) as an argument and return type, so
we'll use the [Function] and [Return] constructors directly. The smart
constructors [@->] and [returning] would reject the abstract type. |
* Copyright ( c ) 2014 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2014 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
open Ctypes_static
let fres... |
afc199257a4fdd655cde6e097f5f81c4e2d69cd045e0088a3a52b3073d4a3d54 | maxima-project-on-github/maxima-packages | meval.lisp | (setf (symbol-function 'prev-meval) (symbol-function 'meval)) ;; traceable
(defun meval (e)
(if (and (consp e) (eq (caar e) '$closure))
(with-lexical-environment (rest (second e)) (prev-meval (third e)))
(prev-meval e)))
| null | https://raw.githubusercontent.com/maxima-project-on-github/maxima-packages/3fbe9e89b091720207ddebda840fdc251744fb5d/robert-dodier/lexical_symbols/meval.lisp | lisp | traceable | (defun meval (e)
(if (and (consp e) (eq (caar e) '$closure))
(with-lexical-environment (rest (second e)) (prev-meval (third e)))
(prev-meval e)))
|
62a05ad716b61f9a914f67888cb01e22e675539d367c3bf7bb9f78f8de5f0e8b | semilin/layoup | fijiki.lisp |
(MAKE-LAYOUT :NAME "fijiki" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL
:KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/fijiki.lisp | lisp |
(MAKE-LAYOUT :NAME "fijiki" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL
:KEYBOARD NIL) | |
5b848f1e107d7eb86ceae127b0c2c0acc8fcb110ed2aba85c11c8ec817fde441 | larskuhtz/ghci-pretty | Colored.hs | -- |
-- Module: IPPrint.Colored
Copyright : Copyright © 2014 < >
License : MIT
Maintainer : < >
-- Stability: experimental
--
-- This module combines the ipprint package and
-- the hscolour package to provide colored pretty-printing
-- in ghci.
--
-- /Usage/
--
Add the following lines to your @ghci.conf@ ... | null | https://raw.githubusercontent.com/larskuhtz/ghci-pretty/ff3c974541abbbc26f0dfdc51e729b66caaf843e/src/Text/Show/Pretty/Colored.hs | haskell | |
Module: IPPrint.Colored
Stability: experimental
This module combines the ipprint package and
the hscolour package to provide colored pretty-printing
in ghci.
/Usage/
> -- Pretty printing of it
> :set -package ghci-pretty
> import Text.Show.Pretty.Colored
> :set -interactive-print=cpprint
> :def cp (\_... | Copyright : Copyright © 2014 < >
License : MIT
Maintainer : < >
Add the following lines to your @ghci.conf@ file :
> : ncp
module Text.Show.Pretty.Colored
( cpprint
) where
import Text.Show.Pretty
import Language.Haskell.HsColour
import Language.Haskell.HsColour.Colourise
import Language.Haskell.HsColo... |
5f753f1e23778b14be86e6c66ce438a9cbe7c8e3df5b628258340e62c3106908 | ghc/packages-Cabal | cabal.test.hs | import Test.Cabal.Prelude
import System.Directory-- (getDirectoryContents, removeFile)
main = cabalTest $ do
cabal "v2-build" ["inplace-dep"]
env <- getTestEnv
liftIO $ removeEnvFiles $ testSourceDir env -- we don't want existing env files to interfere
-- Drop the compiled executable into the temporary ... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/NewBuild/CmdExec/GhcInvocation/cabal.test.hs | haskell | (getDirectoryContents, removeFile)
we don't want existing env files to interfere
Drop the compiled executable into the temporary directory, to avoid cluttering the tree. If compilation succeeds, we've tested what we need to! | import Test.Cabal.Prelude
main = cabalTest $ do
cabal "v2-build" ["inplace-dep"]
env <- getTestEnv
tmpdir <- fmap testTmpDir getTestEnv
let dest = tmpdir </> "a.out"
cabal "v2-exec" ["ghc", "--", "Main.hs", "-o", dest]
TODO external ( store ) deps , once v2 - install is working
copy - pasted fr... |
ab7fbd95fd1612ee04b2a60b6b3203bf1a13d617d58a6aa5ae36e05f1cc1227d | susisu/est-ocaml | term.mli | open Core
type 'a t = Lit of 'a * Value.t
| Var of 'a * string
| Vec of 'a * 'a t list
| App of 'a * 'a t * 'a t
| Let of 'a * string * 'a t * 'a t
val equal : 'a t -> 'a t -> bool
val get_info : 'a t -> 'a
val to_string : 'a t -> string
| null | https://raw.githubusercontent.com/susisu/est-ocaml/e610d07b166a51e5763aa4f7b12449ec0438071c/src/term.mli | ocaml | open Core
type 'a t = Lit of 'a * Value.t
| Var of 'a * string
| Vec of 'a * 'a t list
| App of 'a * 'a t * 'a t
| Let of 'a * string * 'a t * 'a t
val equal : 'a t -> 'a t -> bool
val get_info : 'a t -> 'a
val to_string : 'a t -> string
| |
e0616c960899e028fca8b995eda46a99f2bc3d33da54bb40d0f65cbc86553113 | dscarpetti/coll-pen | search.cljs | (ns coll-pen.search
(:require
[cljs.reader]
[clojure.string :as str]))
#_(defn build-search-fn [search-string]
(let [pattern (try
(re-pattern search-string)
(catch :default e
(println e)
(re-pattern " ")))]
(fn [el]
(when-n... | null | https://raw.githubusercontent.com/dscarpetti/coll-pen/8238a1a19ae79f08e94ec65fce51aa6ec449138f/src/coll_pen/search.cljs | clojure | (ns coll-pen.search
(:require
[cljs.reader]
[clojure.string :as str]))
#_(defn build-search-fn [search-string]
(let [pattern (try
(re-pattern search-string)
(catch :default e
(println e)
(re-pattern " ")))]
(fn [el]
(when-n... | |
ee0334b33b26c9ce2f21d959531997f521308a82a0585bf809f2e015a66a95e9 | macourtney/Dark-Exchange | open_offer_panel.clj | (ns darkexchange.view.main.home.open-offer-panel
(:require [darkexchange.model.terms :as terms]
[darkexchange.view.offer.open-offer-table :as open-offer-table-view]
[seesaw.core :as seesaw-core]))
(defn create-table-header-text []
(terms/open-offers))
(defn create-table-header-buttons []
... | null | https://raw.githubusercontent.com/macourtney/Dark-Exchange/1654d05cda0c81585da7b8e64f9ea3e2944b27f1/src/darkexchange/view/main/home/open_offer_panel.clj | clojure | (ns darkexchange.view.main.home.open-offer-panel
(:require [darkexchange.model.terms :as terms]
[darkexchange.view.offer.open-offer-table :as open-offer-table-view]
[seesaw.core :as seesaw-core]))
(defn create-table-header-text []
(terms/open-offers))
(defn create-table-header-buttons []
... | |
d15eea121fbd9f50bb9081bb2b9e69b7901fc3358217d7dd80fb74625bb0bc6c | dyzsr/ocaml-selectml | t14bad.ml | TEST
flags = " -w -a "
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
flags = " -w -a "
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
Bad - PR 4261
module PR_4261 = stru... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-recmod/t14bad.ml | ocaml | TEST
flags = " -w -a "
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
flags = " -w -a "
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
Bad - PR 4261
module PR_4261 = stru... | |
e3662d29414aadb1b02802afd057d8d4087a92609e93ffa02ee1ba1097c3e02d | wireapp/wire-server | App.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as publ... | null | https://raw.githubusercontent.com/wireapp/wire-server/c27541d7456e3ea07ce5c8991585d0ffc4fac226/services/federator/src/Federator/App.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
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 PARTI... | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the ... |
5613e55e6e80053292b8ab8cb2dde32c59b30d4d4e2956e5b5354f50890ec570 | zotonic/zotonic | mod_ssl_letsencrypt.erl | @author < >
2016 ,
%%
%% @doc Certificate handling for Let's Encrypt
Copyright 2016 ,
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unle... | null | https://raw.githubusercontent.com/zotonic/zotonic/eb2e61a83e11aea79f2cf20fcbd6fd998ddfd4b0/apps/zotonic_mod_ssl_letsencrypt/src/mod_ssl_letsencrypt.erl | erlang |
@doc Certificate handling for Let's Encrypt
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 Li... | @author < >
2016 ,
Copyright 2016 ,
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mod_ssl_letsencrypt).
-mod_title("SSL - Let's Encrypt").
-mod_description("Use SSL Certificate from Let's En... |
fa34f8647ad0421c99cda3e4980ff7e0a6ed4cc0509a5ae7603c8bda971ee22f | armon/teles | teles_app.erl | -module(teles_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
start(_StartType, _StartArgs) ->
teles_sup:star... | null | https://raw.githubusercontent.com/armon/teles/d65db29e69e5bcb83ac0e7adae6c56ad42fd323c/src/teles_app.erl | erlang | Application callbacks
===================================================================
Application callbacks
=================================================================== | -module(teles_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
teles_sup:start_link().
stop(_State) ->
ok.
|
ab682575399211d5644ee81554db0b23792139bf8ca822928b96ad3e6b883855 | 1HaskellADay/1HAD | Solution.hs | module HAD.Y2014.M03.D10.Solution where
import Data.Maybe (listToMaybe)
import Numeric (readDec)
-- $setup
-- >>> import Test.QuickCheck
> > > import Control . Applicative
-- | maybeReadPositiveInt Try to parse a positive Int
-- Can be done point-free (and it's probably funnier this way).
--
--
-- Examples:
--
-- ... | null | https://raw.githubusercontent.com/1HaskellADay/1HAD/3b3f9b7448744f9b788034f3aca2d5050d1a5c73/exercises/HAD/Y2014/M03/D10/Solution.hs | haskell | $setup
>>> import Test.QuickCheck
| maybeReadPositiveInt Try to parse a positive Int
Can be done point-free (and it's probably funnier this way).
Examples:
prop> (==) <$> Just <*> maybeReadPositiveInt . show $ getNonNegative x
Nothing
Nothing | module HAD.Y2014.M03.D10.Solution where
import Data.Maybe (listToMaybe)
import Numeric (readDec)
> > > import Control . Applicative
prop > Nothing = = ( maybeReadPositiveInt . show . negate . getPositive $ x )
> > > maybeReadPositiveInt " foo "
> > > maybeReadPositiveInt " 12 "
maybeReadPositiveInt :: Strin... |
faf84e083bf8b0394980c4105f29124d7d9f241742a50801e5daa8e7d4077d92 | Clojure2D/clojure2d | project.clj | (defproject palettes "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.1"]
[generateme/fastmath "2.0.0-alpha1"]
[scicloj... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d/5cb4dbfe6ed492c8c003f28aea4f1611470484c2/utils/palettes/project.clj | clojure | (defproject palettes "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.1"]
[generateme/fastmath "2.0.0-alpha1"]
[scicloj... | |
45bd49dd1fa83ac395d2036c99d954f7f2f7ede466785ada8706dd8e6e044174 | Verites/verigraph | GGXReader.hs | module XML.GGXReader
( readGrammar
, readGGName
, readName
, readNames
, readTypeGraph
, readRules
, readGraphs
, readSequences
, readSequencesWithObjectFlow
, instantiateRule
, instantiateSpan
, minimalSafetyNacsWithLog
, showMinimalSafetyNacsLog
) where
import Data.Function ... | null | https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/src/library/XML/GGXReader.hs | haskell | We join negative constraints with "and", which is the behaviour of NACs.
Minimal Safety Nacs Logs
| Reads the names of node/edge types and NACs, which are necessary when reexporting this grammar.
the node in the type graph. Lookup of edge types is analogous. | module XML.GGXReader
( readGrammar
, readGGName
, readName
, readNames
, readTypeGraph
, readRules
, readGraphs
, readSequences
, readSequencesWithObjectFlow
, instantiateRule
, instantiateSpan
, minimalSafetyNacsWithLog
, showMinimalSafetyNacsLog
) where
import Data.Function ... |
2e0fddca7f2ad86875a419786783d8a4e68afefcebe2f98d74a6a5240bf0558e | vert-x/mod-lang-clojure | eventbus_test.clj | Copyright 2013 the original author or authors .
;;
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, sof... | null | https://raw.githubusercontent.com/vert-x/mod-lang-clojure/dcf713460b8f46c08d0db6e7bf8537f1dd91f297/api/src/test/clojure/vertx/eventbus_test.clj | clojure |
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 pe... | Copyright 2013 the original author or authors .
distributed under the License is distributed on an " AS IS " BASIS ,
(ns vertx.eventbus-test
(:require [vertx.testtools :as t]
[vertx.core :as core]
[vertx.eventbus :as eb]
[clojure.test :refer [deftest is use-fixtures]])
(:imp... |
1a93af496d0d8aa882e3d5a1f2babc1a5b38a90460cee0d942ad3fba524518ab | mroman42/mikrokosmos | NamedLambda.hs | |
Module : NamedLambda
Description : Lambda expressions with named variables
License : GPL-3
This package deals with lambda expressions containing named variables
instead of DeBruijn indexes . It contains parsing and printing fuctions .
Module: NamedLambda
Description: Lambda expressions with named variabl... | null | https://raw.githubusercontent.com/mroman42/mikrokosmos/fa3f9d5ebd9d62a6be44731ae867d020aa082a69/source/NamedLambda.hs | haskell | Parsing of Lambda Expressions.
The user can input a lambda expression with named variables, of
the form of "\x.x" or "(\a.(\b.a b))". The interpreter will parse
it into an internal representation.
| A lambda expression with named variables.
^ variable
^ lambda abstraction
^ function application
^ pair of expre... | |
Module : NamedLambda
Description : Lambda expressions with named variables
License : GPL-3
This package deals with lambda expressions containing named variables
instead of DeBruijn indexes . It contains parsing and printing fuctions .
Module: NamedLambda
Description: Lambda expressions with named variabl... |
e5c340156ee01910dc4767bb49f301df7e8ec802279de64926ff8592b5766cbd | bakul/s9fes | stat-tools.scm | Scheme 9 from Empty Space , Function Library
By , 2015
; Placed in the Public Domain
;
; Convenience file to load statistics procedures.
(load-from-library "cdf.scm")
(load-from-library "erf.scm")
(load-from-library "mean.scm")
(load-from-library "median.scm")
(load-from-library "mode.scm")
(load-from-library "... | null | https://raw.githubusercontent.com/bakul/s9fes/74c14c0db5f07f5bc6d94131e9e4ee15a29275aa/lib/stat-tools.scm | scheme | Placed in the Public Domain
Convenience file to load statistics procedures. | Scheme 9 from Empty Space , Function Library
By , 2015
(load-from-library "cdf.scm")
(load-from-library "erf.scm")
(load-from-library "mean.scm")
(load-from-library "median.scm")
(load-from-library "mode.scm")
(load-from-library "ndf.scm")
(load-from-library "quartile.scm")
(load-from-library "range.scm")
(load... |
d197d76da212f1aa6e7f3f7dd8c9f463d89de08bf93683ca67b35e06c4b5f82c | ucsd-progsys/liquidhaskell | Multi_pred_app_00.hs | {-@ LIQUID "--expect-any-error" @-}
module Multi_pred_app_00 () where
{-@ bar :: forall < p :: Int -> Bool, q :: Int -> Bool>. Int<p> -> Int<p, q> @-}
bar :: Int -> Int
bar x = x
| null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/Multi_pred_app_00.hs | haskell | @ LIQUID "--expect-any-error" @
@ bar :: forall < p :: Int -> Bool, q :: Int -> Bool>. Int<p> -> Int<p, q> @ | module Multi_pred_app_00 () where
bar :: Int -> Int
bar x = x
|
7a811aaff9015a216f90629a238a6d586a6d76d522005852b03283b765039cbe | ijvcms/chuanqi_dev | team_lib.erl | %%%-------------------------------------------------------------------
%%% @author tuhujia
( C ) 2015 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 07 . 十二月 2015 10:25
%%%-------------------------------------------------------------------
-module(team_lib).
-include("common.hrl").
-include("record.hrl").
-include... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/team/team_lib.erl | erlang | -------------------------------------------------------------------
@author tuhujia
@doc
@end
-------------------------------------------------------------------
API
====================================================================
API functions
===============================================================... | ( C ) 2015 , < COMPANY >
Created : 07 . 十二月 2015 10:25
-module(team_lib).
-include("common.hrl").
-include("record.hrl").
-include("proto.hrl").
-include("cache.hrl").
-include("db_record.hrl").
-include("config.hrl").
-include("uid.hrl").
-include("language_config.hrl").
-include("log_type_config.hrl").
-export... |
dfce5540b52d2754369daa7c4860beac2e903e080fba035adc0103731601234e | andorp/bead | Page.hs | {-# LANGUAGE OverloadedStrings #-}
module Bead.View.Content.Evaluation.Page (
evaluation
, modifyEvaluation
) where
import Control.Monad.IO.Class
import Control.Monad
import Control.Arrow ((&&&))
import Data.Maybe (fromMaybe)
import Data.Monoid
import ... | null | https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/src/Bead/View/Content/Evaluation/Page.hs | haskell | # LANGUAGE OverloadedStrings #
the assignment key as well, the submission key, an evautation key, and
the time converter for the actual user.
If the evaluation key is Nothing means a new evaulation, otherwise
the modification of a given evaulation is done
Reads the evaluation result, from the parameters and determ... | module Bead.View.Content.Evaluation.Page (
evaluation
, modifyEvaluation
) where
import Control.Monad.IO.Class
import Control.Monad
import Control.Arrow ((&&&))
import Data.Maybe (fromMaybe)
import Data.Monoid
import Text.Printf
import Data.... |
1cbf408cce94bbd36b37eb9f5b7f5fb6e361bdfb42998e463d49820a5ed0ad82 | JacquesCarette/Drasil | Choices.hs | | Defines the design language for SCS .
module Language.Drasil.Choices (
Choices(..), Architecture (..), makeArchit, DataInfo(..), makeData, Maps(..),
makeMaps, spaceToCodeType, Constraints(..), makeConstraints, ODE(..), makeODE,
DocConfig(..), makeDocConfig, LogConfig(..), makeLogConfig, OptionalFeatures(..)... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/ec388a0e1690c19f45dd5c166a2796870147edf0/code/drasil-code/lib/Language/Drasil/Choices.hs | haskell | | The instruction indicates how the generated program should be written down.
Full details of Choices documentation -Code-Generator
| Target languages.
Choosing multiple means program will be generated in multiple languages.
| Architecture of the program, include modularity and implementation type
| Data structur... | | Defines the design language for SCS .
module Language.Drasil.Choices (
Choices(..), Architecture (..), makeArchit, DataInfo(..), makeData, Maps(..),
makeMaps, spaceToCodeType, Constraints(..), makeConstraints, ODE(..), makeODE,
DocConfig(..), makeDocConfig, LogConfig(..), makeLogConfig, OptionalFeatures(..)... |
238f0473119b98cc5c848ef4370756c92667b26215dbcfae760077094eedd5cb | haskell-lisp/yale-haskell | command-interface.scm | ;;; csys.scm -- compilation unit definition for the compilation system
(define-compilation-unit command-interface
(source-filename "$Y2/command-interface/")
(require global)
(unit command
(source-filename "command.scm"))
(unit command-utils
(source-filename "command-utils.scm"))
(unit incremental-com... | null | https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/command-interface/command-interface.scm | scheme | csys.scm -- compilation unit definition for the compilation system |
(define-compilation-unit command-interface
(source-filename "$Y2/command-interface/")
(require global)
(unit command
(source-filename "command.scm"))
(unit command-utils
(source-filename "command-utils.scm"))
(unit incremental-compiler
(source-filename "incremental-compiler.scm")))
|
9bdbd823e63aa4c2abb6670b4d6d354196489b6f39a79098d03843e40842975c | facebook/duckling | Rules.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE NoRebindableSyntax #
{-# LANGUAGE OverloadedString... | null | https://raw.githubusercontent.com/facebook/duckling/03c6197283943c595608bb977a88a07c9e997006/Duckling/Time/DE/Rules.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
# LANGUAGE LambdaCase #
# LANGUAGE NoRebindableSyntax #
module Duckling.Time.DE.Rules
( rules
) where
import Prelude
import qualified Data.Text as Text
import Duckling.Dimensions.Types
import Duckling.Duration.Helpers (isGrain)
import Duckling.Numeral.Helpers ... |
690e23dfc06af7893012707ea8a34e0b8b417d0138f478f13ba595e538086278 | sealchain-project/sealchain | UnitsOfMeasure.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE KindSignatures #
module Pos.Util.UnitsOfMeasure
( UnitOfMeasure (..)
, MeasuredIn(..)
) where
import Control.Lens (at, (?~))
import Data.Aeson (FromJSON (..), ToJSON (..), Value (..), object,
withObject, (.:), (.=))
import... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/lib/src/Pos/Util/UnitsOfMeasure.hs | haskell | # LANGUAGE DataKinds #
| A finite sum type representing time units we might want to show to
clients. The idea is that whenever we have a quantity represeting some
form of time, we should render it together with the relevant unit, to
not leave anything to guessing.
| Number of blocks.
| Represent data with a ... | # LANGUAGE KindSignatures #
module Pos.Util.UnitsOfMeasure
( UnitOfMeasure (..)
, MeasuredIn(..)
) where
import Control.Lens (at, (?~))
import Data.Aeson (FromJSON (..), ToJSON (..), Value (..), object,
withObject, (.:), (.=))
import qualified Data.Text.Lazy as T
i... |
fa5d7894cca9b285fd8c9f79274b78ad530f77c89a249d7af2f0ffa5059e6489 | boxer-project/boxer-sunrise | clipboard.lisp | ;;;; Boxer
Copyright 1985 - 2022 Andrea A. diSessa and the Estate of Edward H. Lay
;;;;
Portions of this code may be copyright 1982 - 1985 Massachusetts Institute of Technology . Those portions may be
used for any purpose , including commercial ones , providing that notice of MIT copyright is ... | null | https://raw.githubusercontent.com/boxer-project/boxer-sunrise/93dc8ca848a67f5fd409daf9b2859136d3b81b98/src/boxwin/lw-capi/clipboard.lisp | lisp | Boxer
Licensed under the 3-Clause BSD license. You may not use this file except in compliance with this license.
-3-Clause
+-Data--+
This file is part of the | BOXER | system
+-------+
uncol... | Copyright 1985 - 2022 Andrea A. diSessa and the Estate of Edward H. Lay
Portions of this code may be copyright 1982 - 1985 Massachusetts Institute of Technology . Those portions may be
used for any purpose , including commercial ones , providing that notice of MIT copyright is retained .
ver... |
019b45d6094a4daadfeacd5edb3d2358512e73bea515e568b8c8083cbf150e06 | samsergey/formica | circuit.rkt | #lang formica
(:: sum ((Any -> Num) list? -> Num)
(define (sum f lst)
(apply + (map f lst))))
(:: bisection ((Real -> Real) Real Real -> (∪ Real #f))
(define (bisection f a b)
(and (<= (* (f a) (f b)) 0)
(let ([c (* 0.5 (+ a b))])
(if (< (abs (/ (- b a) c)) 1e-10)
c
... | null | https://raw.githubusercontent.com/samsergey/formica/b4410b4b6da63ecb15b4c25080951a7ba4d90d2c/examples/circuit.rkt | racket | #lang formica
(:: sum ((Any -> Num) list? -> Num)
(define (sum f lst)
(apply + (map f lst))))
(:: bisection ((Real -> Real) Real Real -> (∪ Real #f))
(define (bisection f a b)
(and (<= (* (f a) (f b)) 0)
(let ([c (* 0.5 (+ a b))])
(if (< (abs (/ (- b a) c)) 1e-10)
c
... | |
76b960c8b2e463c6f93d2f1f6489869cd205a90a400246fc2b627931839b002d | yapsterapp/er-cassandra | coerce_value_callback.cljc | (ns er-cassandra.model.callbacks.coerce-value-callback)
(defn coerce-value-callback
[col f]
(fn [r]
(if (contains? r col)
(assoc r col (f (get r col)))
r)))
| null | https://raw.githubusercontent.com/yapsterapp/er-cassandra/1d059f47bdf8654c7a4dd6f0759f1a114fdeba81/src/er_cassandra/model/callbacks/coerce_value_callback.cljc | clojure | (ns er-cassandra.model.callbacks.coerce-value-callback)
(defn coerce-value-callback
[col f]
(fn [r]
(if (contains? r col)
(assoc r col (f (get r col)))
r)))
| |
d8d08a873e5148d644129c1246a0683d48b1132fc1f3b9c1df091afc5b670b92 | rawleyfowler/sluj | core_test.clj | (ns sluj.core-test
(:require
[clojure.test :refer [deftest is testing]]
[sluj.core :refer [sluj]]))
(deftest basic
(testing "Sluggify a given plain text string"
(is (= (sluj "My name is mud") "my-name-is-mud"))
(is (= (sluj "My name is definitley mud!") "my-name-is-definitley-mud")))
(testing "Slug... | null | https://raw.githubusercontent.com/rawleyfowler/sluj/fd32770585a9b8acbc864edd6767d41a988dd8a9/test/sluj/core_test.clj | clojure | This is the default | (ns sluj.core-test
(:require
[clojure.test :refer [deftest is testing]]
[sluj.core :refer [sluj]]))
(deftest basic
(testing "Sluggify a given plain text string"
(is (= (sluj "My name is mud") "my-name-is-mud"))
(is (= (sluj "My name is definitley mud!") "my-name-is-definitley-mud")))
(testing "Slug... |
7228b1fcef6dd51d161db5982c4f8e1a2190a0005dd89f29d5e80fc863b0f5ce | TerrorJack/ghc-alter | hFlush001.hs | -- !!! Flushing
module Main(main) where
import Control.Monad
import System.Directory ( removeFile, doesFileExist )
import System.IO
import System.IO.Error
main = do
hFlush stdin `catchIOError` \ _ -> putStrLn "No can do - flushing read-only handles isn't legal"
putStr "Hello,"
hFlush stdout
putStr "Hello - "
... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/IO/hFlush001.hs | haskell | !!! Flushing | module Main(main) where
import Control.Monad
import System.Directory ( removeFile, doesFileExist )
import System.IO
import System.IO.Error
main = do
hFlush stdin `catchIOError` \ _ -> putStrLn "No can do - flushing read-only handles isn't legal"
putStr "Hello,"
hFlush stdout
putStr "Hello - "
hFlush stderr
... |
1092bf9537f19c0cf6d07f7360058b70cc526672a61455c1b69072082a32396e | aligusnet/mltool | GradientDescentTest.hs | module MachineLearning.Optimization.GradientDescentTest
(
tests
)
where
import Test.Framework (testGroup)
import Test.Framework.Providers.HUnit
import Test.HUnit
import Test.HUnit.Approx
import Test.HUnit.Plus
import qualified Data.Vector.Storable as V
import qualified Numeric.LinearAlgebra as LA
import qualified... | null | https://raw.githubusercontent.com/aligusnet/mltool/92d74c4cc79221bfdcfb76aa058a2e8992ecfe2b/test/MachineLearning/Optimization/GradientDescentTest.hs | haskell | module MachineLearning.Optimization.GradientDescentTest
(
tests
)
where
import Test.Framework (testGroup)
import Test.Framework.Providers.HUnit
import Test.HUnit
import Test.HUnit.Approx
import Test.HUnit.Plus
import qualified Data.Vector.Storable as V
import qualified Numeric.LinearAlgebra as LA
import qualified... | |
8c70dbda4e2d7422c3c55908492d4bdac1d9b78e7df7833550181e2496e16fda | lem-project/lem | package.lisp | (defpackage :lem-base
(:use :cl)
#+sbcl
(:lock t)
;; utils.lisp
(:export
:collect-subclasses
:utf8-bytes
:bests-if
:max-if
:min-if
:find-tree
:do-sequence
:if-push)
;; string-width-utils
(:export :+default-tab-size+
:control-char
:wide-char-p
:char-... | null | https://raw.githubusercontent.com/lem-project/lem/b471ee1881a275323f4839acf0e940ba37e874e4/src/base/package.lisp | lisp | utils.lisp
string-width-utils
errors.lisp
hooks.lisp
var.lisp
editor-variables.lisp
mark.lisp
buffer.lisp
buffer-insert.lisp
buffer-list-manager.lisp
buffers.lisp
point.lisp
basic.lisp
syntax-table.lisp
search.lisp
syntax-scan.lisp
syntax-parser.lisp
tmlanguage.lisp
encodings.lisp
file.lisp
indent.... | (defpackage :lem-base
(:use :cl)
#+sbcl
(:lock t)
(:export
:collect-subclasses
:utf8-bytes
:bests-if
:max-if
:min-if
:find-tree
:do-sequence
:if-push)
(:export :+default-tab-size+
:control-char
:wide-char-p
:char-width
:string-width
... |
590354a1dafad4459185ba7684d2116feb4bd83c7c3eb676f42ad6b4a0a9b85b | rbkmoney/fistful-server | ff_withdrawal_session_handler.erl | -module(ff_withdrawal_session_handler).
-behaviour(ff_woody_wrapper).
-include_lib("fistful_proto/include/ff_proto_withdrawal_session_thrift.hrl").
%% ff_woody_wrapper callbacks
-export([handle_function/3]).
%%
%% ff_woody_wrapper callbacks
%%
-spec handle_function(woody:func(), woody:args(), woody:options()) -> {o... | null | https://raw.githubusercontent.com/rbkmoney/fistful-server/60b964d0e07f911c841903bc61d8d9fb20a32658/apps/ff_server/src/ff_withdrawal_session_handler.erl | erlang | ff_woody_wrapper callbacks
ff_woody_wrapper callbacks
Internals
| -module(ff_withdrawal_session_handler).
-behaviour(ff_woody_wrapper).
-include_lib("fistful_proto/include/ff_proto_withdrawal_session_thrift.hrl").
-export([handle_function/3]).
-spec handle_function(woody:func(), woody:args(), woody:options()) -> {ok, woody:result()} | no_return().
handle_function(Func, Args, Opts... |
3ba640c505aac6310f0a73cf9b6d31766a2c81a302ab279ab72e26d93c5dc386 | parapluu/monadic-typechecker | AST.hs | -- |
-- Module : PhantomPhases.AST
Copyright : © 2019 and
License : MIT
--
-- Stability : experimental
-- Portability : portable
--
-- This module includes functionality for creating an Abstract Syntax Tree (AST),
-- as well as helper functions for checking different
-- aspects of the AS... | null | https://raw.githubusercontent.com/parapluu/monadic-typechecker/9f737a9ed2a3ac4ff5245e2e48deeac7bc2ee73d/artifact/typechecker-oopl/src/PhantomPhases/AST.hs | haskell | |
Module : PhantomPhases.AST
Stability : experimental
Portability : portable
This module includes functionality for creating an Abstract Syntax Tree (AST),
as well as helper functions for checking different
aspects of the AST. The AST abstract over their kind 'Phase', where
type checked.
| Check if... | Copyright : © 2019 and
License : MIT
' Phase ' represent the current state of the AST . For example , after parsing
the AST is of ' ' @Phase@ ; after type checking with ' PhantomFunctors.tcProgram ' the
returned AST is of ' Checked ' @Phase@ , indicating that the AST has been
# LANGUAGE Na... |
edd98650991f9b854d8476dee7e8b01e4425118f93d2e2a2afeb8b18b4dafffe | racket/typed-racket | subst-tests.rkt | #lang racket/base
(require "test-utils.rkt"
typed-racket/rep/type-rep
typed-racket/types/utils
typed-racket/types/abbrev
typed-racket/types/numeric-tower
typed-racket/types/substitute
rackunit)
(provide tests)
(gen-test-main)
(define-syntax-rule (s img var tgt res... | null | https://raw.githubusercontent.com/racket/typed-racket/6ea20bec8d41e1a188d7f831c35423293a89c98e/typed-racket-test/unit-tests/subst-tests.rkt | racket | #lang racket/base
(require "test-utils.rkt"
typed-racket/rep/type-rep
typed-racket/types/utils
typed-racket/types/abbrev
typed-racket/types/numeric-tower
typed-racket/types/substitute
rackunit)
(provide tests)
(gen-test-main)
(define-syntax-rule (s img var tgt res... | |
ef09bf423e393cf69a8bb2a438a7296f93e5936d9ad5f5749892ea8945abf6f1 | uw-unsat/serval-sosp19 | nickel-ni.rkt | #lang rosette/safe
(require
serval/lib/unittest
serval/lib/core
(prefix-in serval: serval/spec/ni)
"state.rkt"
"spec.rkt"
"invariants.rkt"
(only-in racket/base exn:fail? struct-copy string-append parameterize)
(prefix-in certikos: "generated/monitors/certikos/verif/asm-offsets.rkt")
rackunit
rackun... | null | https://raw.githubusercontent.com/uw-unsat/serval-sosp19/175c42660fad84b44e4c9f6f723fd3c9450d65d4/monitors/certikos/verif/nickel-ni.rkt | racket | Any domain except yield can interfere with antiyield
Spawn(parent, child) interferes with
yield(parent) yield(child)
regular(parent) regular(child)
spawn(parent, _) spawn(child, _)
Regular(pid) interferes with
Yield(pid) Regular(pid) Spawn(pid, _) | #lang rosette/safe
(require
serval/lib/unittest
serval/lib/core
(prefix-in serval: serval/spec/ni)
"state.rkt"
"spec.rkt"
"invariants.rkt"
(only-in racket/base exn:fail? struct-copy string-append parameterize)
(prefix-in certikos: "generated/monitors/certikos/verif/asm-offsets.rkt")
rackunit
rackun... |
e78363b10bfec37bff72fe18896c08f3d3829d43d002feabd68d1e4cafb879b8 | OCamlPro/ocp-build | buildOCamlGlobals.ml | (**************************************************************************)
(* *)
(* Typerex Tools *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-build/ocaml/buildOCamlGlobals.ml | ocaml | ************************************************************************
Typerex Tools
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU General Public License version 3 described in the file
open OcpCompat
open BuildTypes
open BuildOCPTypes
open BuildOCamlTypes
open BuildOptions
open BuildOCamlVariables
open BuildValue.TYPES
let list_byte_targets_arg = re... |
70f52b797b225fc5144badb3e10a97e9e9067919c37ffebee0a78a2cb904802c | duct-framework/middleware.buddy | project.clj | (defproject duct/middleware.buddy "0.2.0"
:description "Duct library for Buddy middleware"
:url "-framework/middleware.buddy"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.1"]
[buddy/buddy-auth "2.2.0"]
[duct/co... | null | https://raw.githubusercontent.com/duct-framework/middleware.buddy/f311128af9f18c25f12b24baf5bdc6f91f9e7042/project.clj | clojure | (defproject duct/middleware.buddy "0.2.0"
:description "Duct library for Buddy middleware"
:url "-framework/middleware.buddy"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.1"]
[buddy/buddy-auth "2.2.0"]
[duct/co... | |
5a87e51b6a58c1dbb4a73c819ccab994bbf47cf897f33f174580dee020612cc5 | ragkousism/Guix-on-Hurd | lua.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2014 < >
Copyright © 2014 < >
Copyright © 2014 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2016 doncatnip < >
Copyright © 2016 Clément < >
Copyright © 2016 < >
;;;
;;; This ... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/lua.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
Copyright © 2014 < >
Copyright © 2014 < >
Copyright © 2014 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2016 doncatnip < >
Copyright © 2016 Clément < >
Copyright © 2016 < >
under the terms of the GNU General Public License as published by
... |
fe89123b3692823f35dd4356b0408d61108d6e09c58082a4b44ca9ad767ff1ec | PEZ/rich4clojure | problem_112.clj | (ns rich4clojure.medium.problem-112
(:require [hyperfiddle.rcf :refer [tests]]))
= =
By 4Clojure user :
;; Difficulty: Medium
;; Tags: [seqs]
;;
;; Create a function which takes an integer and a nested
;; collection of integers as arguments. Analyze the
;; elements of the input collection and return a sequen... | null | https://raw.githubusercontent.com/PEZ/rich4clojure/2ccfac041840e9b1550f0a69b9becbdb03f9525b/src/rich4clojure/medium/problem_112.clj | clojure | Difficulty: Medium
Tags: [seqs]
Create a function which takes an integer and a nested
collection of integers as arguments. Analyze the
elements of the input collection and return a sequence
which maintains the nested structure, and which
includes all elements starting from the head whose sum
is less than or e... | (ns rich4clojure.medium.problem-112
(:require [hyperfiddle.rcf :refer [tests]]))
= =
By 4Clojure user :
(def __ :tests-will-fail)
(comment
)
(tests
(__ 10 [1 2 [3 [4 5] 6] 7]) :=
'(1 2 (3 (4)))
(__ 30 [1 2 [3 [4 [5 [6 [7 8]] 9]] 10] 11]) :=
'(1 2 (3 (4 (5 (6 (7))))))
(__ 9 (range)) :=
'... |
cb02b3a82b57e7e1cc70cea30413938615d58febfbbbf7d97e6cad262f21e4b3 | DSiSc/why3 | glob.mli | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/parser/glob.mli | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
open Ident
val flag: Debug.flag
val dummy_id: ident
val def: kind:string -> ident -> unit
val use: kin... |
73649ffbb94fc5a67677ee55eb7aa0c33950aa3d148a068b55bd96aebbe212c9 | haskell/c2hs | Trav.hs | C->Haskell Compiler : traversals of C structure tree
--
Author :
Created : 16 October 99
--
Copyright ( c ) [ 1999 .. 2001 ]
--
-- This file 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 Foundatio... | null | https://raw.githubusercontent.com/haskell/c2hs/7a4da9e93fc0456f01aa7a94e5eea533b171fd1d/src/C2HS/C/Trav.hs | haskell |
This file is free software; you can redistribute it and/or modify
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Publ... | C->Haskell Compiler : traversals of C structure tree
Author :
Created : 16 October 99
Copyright ( c ) [ 1999 .. 2001 ]
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
language : 98
association from ... |
920485ff73f933fdb86e6f965bba59cc4617155c78bc3c4cf7eab8fb3455014a | justinethier/nugget | 00-simplest.scm | (+ 2 1)
| null | https://raw.githubusercontent.com/justinethier/nugget/0c4e3e9944684ea83191671d58b5c8c342f64343/tests/00-simplest.scm | scheme | (+ 2 1)
| |
32b95c6226f8f64b3bd2945c97dd2f64160373c5d2b6e1a63c0bf9931b3d0390 | Gopiandcode/LibreRef | utils.ml | (* * License *)
LibreRef is a free as in freedom digital referencing tool for artists .
Copyright ( C ) < 2021 > < Kiran >
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software... | null | https://raw.githubusercontent.com/Gopiandcode/LibreRef/bf6d35e1838e63e30e9fc2455d567cffc84a7323/utils.ml | ocaml | * License
* Definition |
LibreRef is a free as in freedom digital referencing tool for artists .
Copyright ( C ) < 2021 > < Kiran >
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , ei... |
bfac73886ac567715f1fef65d69579aadd646f385f2d65f08fc9bb8bba1b15ff | full-spectrum/neo4clj | client.clj | (ns neo4clj.client
(:require [clojure.string :as str]
[neo4clj.cypher :as cypher]
[neo4clj.java-interop :as java-interop]
[neo4clj.query-builder :as builder])
(:import [org.neo4j.driver Driver Session QueryRunner SessionConfig Transaction TransactionWork]))
(defrecord Connectio... | null | https://raw.githubusercontent.com/full-spectrum/neo4clj/7dd2466da27cbeccd5494efe4ff20307d83d1153/neo4clj-core/src/neo4clj/client.clj | clojure | (ns neo4clj.client
(:require [clojure.string :as str]
[neo4clj.cypher :as cypher]
[neo4clj.java-interop :as java-interop]
[neo4clj.query-builder :as builder])
(:import [org.neo4j.driver Driver Session QueryRunner SessionConfig Transaction TransactionWork]))
(defrecord Connectio... | |
8253a00f85ca7facdf09c51d4f4cc7e0dd1aa7bc5ea2c80dd44fd42d037a253e | robert-strandh/SICL | defpackage-defmacro.lisp | (cl:in-package #:sicl-package)
(defun check-defpackage-option (option)
(unless (consp option)
(error 'defpackage-option-must-be-a-non-empty-list
:option option))
(unless (cleavir-code-utilities:proper-list-p option)
(error 'defpackage-option-must-be-a-proper-list
:option option))
(u... | null | https://raw.githubusercontent.com/robert-strandh/SICL/b2c3e52fe4c9ce382b35e22e30003d6bf5d928fa/Code/Package/defpackage-defmacro.lisp | lisp | We start by checking that the contents of each option is valid in
that it is well formed, that it is a valid option name, and that
the option arguments are valid for that kind of option type.
a certain type are respected.
For options that can occur more than once, return a list of all
the arguments of all the occ... | (cl:in-package #:sicl-package)
(defun check-defpackage-option (option)
(unless (consp option)
(error 'defpackage-option-must-be-a-non-empty-list
:option option))
(unless (cleavir-code-utilities:proper-list-p option)
(error 'defpackage-option-must-be-a-proper-list
:option option))
(u... |
0121e865e2ce2c0c4a71260e951ae910e4c0b594b31c5ada41831328be09b220 | pfdietz/ansi-test | simple-vector-p.lsp | ;-*- Mode: Lisp -*-
Author :
Created : We d Jan 22 21:23:45 2003
;;;; Contains: Tests for SIMPLE-VECTOR-P
;;; More tests for this are in make-array.lsp
(deftest simple-vector-p.1
(check-type-predicate #'simple-vector-p 'simple-vector)
nil)
(deftest simple-vector-p.2
(notnot-mv (simple-vector-p... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/arrays/simple-vector-p.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for SIMPLE-VECTOR-P
More tests for this are in make-array.lsp
(deftest simple-vector-p.3
nil)
(deftest simple-vector-p.5
nil)
(deftest simple-vector-p.6
(let ((a #(a b c d e g h)))
nil)
Error tests | Author :
Created : We d Jan 22 21:23:45 2003
(deftest simple-vector-p.1
(check-type-predicate #'simple-vector-p 'simple-vector)
nil)
(deftest simple-vector-p.2
(notnot-mv (simple-vector-p (make-array '(10))))
t)
( simple - vector - p ( make - array ' ( 5 ) : fill - pointer t ) )
(deftest si... |
88a79704b31cf7b123d95a275607bd83a183b787168c7ee0041c5e3f51bedee3 | cbaggers/cepl.examples | pre-release-run.lisp | (in-package :cepl.examples)
hacky script to let me run all the tests for a few seconds each so I can
;; spot any potential issues
(defun run-em-all ()
(swank:set-default-directory
(uiop:pathname-directory-pathname
(asdf:system-relative-pathname :cepl.examples "examples/")))
(with-setf (viewport-resolutio... | null | https://raw.githubusercontent.com/cbaggers/cepl.examples/87ac3def3e674632662350c809edf09f4820fbd1/pre-release-run.lisp | lisp | spot any potential issues | (in-package :cepl.examples)
hacky script to let me run all the tests for a few seconds each so I can
(defun run-em-all ()
(swank:set-default-directory
(uiop:pathname-directory-pathname
(asdf:system-relative-pathname :cepl.examples "examples/")))
(with-setf (viewport-resolution (current-viewport)) (v! 800... |
5b87514bc5d74b56beb2229f45a7a277d0835f959a03e5fcb56f98e073a157a3 | emhoracek/smooch | M20220302_add_dolls.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module M20220302_add_dolls where
import Data.String.QQ
import Data.Text (Text)
import qualified Data.Text as T
import Database.Rivet.V0
migrate :: Migration IO ()
migrate = sql up down
up :: Text
up = ... | null | https://raw.githubusercontent.com/emhoracek/smooch/d08ceb7fc65e17c06fd6fc1d3b77fb2f9605cf87/app/migrations/M20220302_add_dolls.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes # | module M20220302_add_dolls where
import Data.String.QQ
import Data.Text (Text)
import qualified Data.Text as T
import Database.Rivet.V0
migrate :: Migration IO ()
migrate = sql up down
up :: Text
up = T.pack $
[s|
DROP TABLE IF EXISTS dolls CASCADE;
CREATE TABLE dolls... |
c4f63cda351abac1d34be7618af35dd8ce44d2d4b5d50e38719dcbf2e06ebeb8 | openbadgefactory/salava | helper.cljs | (ns salava.admin.ui.helper
(:require
[reagent.core :refer [atom cursor create-class]]
[reagent.session :as session]
[salava.core.i18n :refer [t]]
[salava.core.ui.helper :refer [input-valid?]]
[salava.admin.schemas :as schemas]))
(defn valid-item-type? [item]
(input-valid? (:item-type schemas/Url-p... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/admin/ui/helper.cljs | clojure | (ns salava.admin.ui.helper
(:require
[reagent.core :refer [atom cursor create-class]]
[reagent.session :as session]
[salava.core.i18n :refer [t]]
[salava.core.ui.helper :refer [input-valid?]]
[salava.admin.schemas :as schemas]))
(defn valid-item-type? [item]
(input-valid? (:item-type schemas/Url-p... | |
09d0bc87150980a0b880d4464ab2d62ddcbc18bef2b4aa08fd91ad2944905127 | databrary/databrary | AgeTest.hs | # LANGUAGE OverloadedStrings , ScopedTypeVariables #
module Model.AgeTest where
import Data.Aeson
import Data.Time
import Test.Tasty.HUnit
import Model.Age
import Model.TypeOrphans ()
unit_age_toJSON :: Assertion
unit_age_toJSON =
encode (Age 10) @?= "10"
-- possible property:
-- d + ageTime(age d (d2)) = d2
... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/test/Model/AgeTest.hs | haskell | possible property:
d + ageTime(age d (d2)) = d2
example
edge cases
should return nothing instead
example | # LANGUAGE OverloadedStrings , ScopedTypeVariables #
module Model.AgeTest where
import Data.Aeson
import Data.Time
import Test.Tasty.HUnit
import Model.Age
import Model.TypeOrphans ()
unit_age_toJSON :: Assertion
unit_age_toJSON =
encode (Age 10) @?= "10"
unit_age :: Assertion
unit_age = do
age (jan2000day... |
402375fccae14a54196a55d0cad69cd19eb9197cacff4f54cadcb1cd71905ef5 | OCamlPro/typerex-lint | lintParsing_Syntaxerr.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/plugins/ocp-lint-plugin-parsing/lintParsing_Syntaxerr.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1997 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module Location = LintParsing_Location
type error =
Unclosed of Location.t * string * Location.t * ... |
4bc8f4037999b8441c2f179b806283eb2ffd66d986dc056e07e1ac1908eefc9a | GaloisInc/ivory | SizeOf.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE QuasiQuotes #
# LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
# OPTIONS_GHC -fno - warn - orphans #
module SizeOf where
import Ivory.Language
[ivory|
struct foo
{ f1 :: Stored Uint8
; f2 :: Stored Uint32
}
|]
test :: Def ('[] ':-> Uint8)
test = proc "sizeof_tes... | null | https://raw.githubusercontent.com/GaloisInc/ivory/53a0795b4fbeb0b7da0f6cdaccdde18849a78cd6/ivory-examples/examples/SizeOf.hs | haskell | # LANGUAGE FlexibleInstances #
# LANGUAGE QuasiQuotes #
# LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
# OPTIONS_GHC -fno - warn - orphans #
module SizeOf where
import Ivory.Language
[ivory|
struct foo
{ f1 :: Stored Uint8
; f2 :: Stored Uint32
}
|]
test :: Def ('[] ':-> Uint8)
test = proc "sizeof_tes... | |
f5d8bb1b34a3c7f095cecde95bc9b29b985ae92aab4ddc099a877dc4d8e8dfd5 | zyrolasting/polyglot | functional.rkt | #lang racket/base
(require racket/file
racket/function
rackunit
polyglot/functional
polyglot/txexpr
polyglot/paths)
(require/expose polyglot/functional
(group-scripts!
script-info-path
script-info-predicate
... | null | https://raw.githubusercontent.com/zyrolasting/polyglot/d27ca7fe90fd4ba2a6c5bcd921fce89e72d2c408/polyglot-test/tests/polyglot/functional.rkt | racket | #lang racket/base
(require racket/file
racket/function
rackunit
polyglot/functional
polyglot/txexpr
polyglot/paths)
(require/expose polyglot/functional
(group-scripts!
script-info-path
script-info-predicate
... | |
c36033d168e0120f0c30464989e1bc72b21d6852a722ee6bbf8e18da98b9c163 | ocurrent/ocluster | log.ml | let src = Logs.Src.create "worker" ~doc:"ocluster-scheduler worker agent"
include (val Logs.src_log src : Logs.LOG)
| null | https://raw.githubusercontent.com/ocurrent/ocluster/43c14b56e1a35cdab6f772f921b6f1f7bed96bbd/worker/log.ml | ocaml | let src = Logs.Src.create "worker" ~doc:"ocluster-scheduler worker agent"
include (val Logs.src_log src : Logs.LOG)
| |
27af92dd997d11edbbe7558b7168f8bdeefcfacc82995869425af7eb877e505d | camlspotter/ocamloscope.2 | t1.ml | let x = 1
type t = Foo
type u = { l : int }
module M = struct
let y = 1
end
let z = Foo
let w = { l = 3 }
| null | https://raw.githubusercontent.com/camlspotter/ocamloscope.2/49b5977a283cdd373021d41cb3620222351a2efe/tests/t1.ml | ocaml | let x = 1
type t = Foo
type u = { l : int }
module M = struct
let y = 1
end
let z = Foo
let w = { l = 3 }
| |
31f7ffd52d4df14dac91290462d826fb79dd0826de1b1720daa58ba0b7eacba1 | gordonguthrie/pometo | interpreter_complex_no_tests.erl | -module(interpreter_complex_no_tests).
-compile([export_all]).
-include_lib("eunit/include/eunit.hrl").
%% Tests
basic_one_line_complex_no_test_() ->
Str = "MyVariable ← 1J3\nMyVariable + 2",
%0123456789012345678901234567890123456789
Got = pometo:interpret_TEST(Str),
Exp = "3J3",
% ?debugFm... | null | https://raw.githubusercontent.com/gordonguthrie/pometo/5a4ff0c61272ba5ad85adec6605b5c676543975f/test/interpreter_complex_no_tests.erl | erlang | Tests
0123456789012345678901234567890123456789
?debugFmt("in basic_one_line_format_test_~nGot ~p~nExp ~p~n", [Got, Exp]), | -module(interpreter_complex_no_tests).
-compile([export_all]).
-include_lib("eunit/include/eunit.hrl").
basic_one_line_complex_no_test_() ->
Str = "MyVariable ← 1J3\nMyVariable + 2",
Got = pometo:interpret_TEST(Str),
Exp = "3J3",
?_assertEqual(Exp, Got). |
4d1a9e8a0f0f76b0e078d9c3db2dcb3bd40260ecffd0cd4eabfbf96a6b849d98 | tek/chiasma | LensTest.hs | module Chiasma.Test.LensTest where
import Chiasma.Data.Ident (Ident(Str))
import Chiasma.Lens.Tree (leafByIdent, modifyLeafByIdent, treesAndSubs)
import Chiasma.Ui.Data.View (
Pane(Pane),
PaneView,
Tree(Tree),
TreeSub(TreeNode, TreeLeaf),
View(View),
ViewTree,
ViewTreeSub,
consLayout,
consPane,
)
i... | null | https://raw.githubusercontent.com/tek/chiasma/51751e19a416a9afe12f7797df8a67990b266240/packages/test/test/Chiasma/Test/LensTest.hs | haskell | module Chiasma.Test.LensTest where
import Chiasma.Data.Ident (Ident(Str))
import Chiasma.Lens.Tree (leafByIdent, modifyLeafByIdent, treesAndSubs)
import Chiasma.Ui.Data.View (
Pane(Pane),
PaneView,
Tree(Tree),
TreeSub(TreeNode, TreeLeaf),
View(View),
ViewTree,
ViewTreeSub,
consLayout,
consPane,
)
i... | |
eb737e66bb898384f99011f19b3b1b4289ea60c6bfbd0377d6818d0e02ef755a | racket/web-server | base64.rkt | #lang racket/base
(require racket/contract
web-server/stuffers/stuffer
net/base64)
(define base64-stuffer
(make-stuffer (λ (x) (base64-encode x #"")) base64-decode))
(provide/contract
[base64-stuffer (stuffer/c bytes? bytes?)])
| null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/stuffers/base64.rkt | racket | #lang racket/base
(require racket/contract
web-server/stuffers/stuffer
net/base64)
(define base64-stuffer
(make-stuffer (λ (x) (base64-encode x #"")) base64-decode))
(provide/contract
[base64-stuffer (stuffer/c bytes? bytes?)])
| |
99df7f43396ec44f44c37df40a64458720164265154d18c8f0547d67e5052c04 | acid-state/acid-state | Prelude.hs | module Benchmark.Prelude
(
module Prelude,
module Control.Monad,
module Control.Applicative,
module Control.Arrow,
module Data.Monoid,
module Data.Foldable,
module Data.Traversable,
module Data.Maybe,
module Data.List,
module Data.Data,
mtl
module Control.Monad.State,
... | null | https://raw.githubusercontent.com/acid-state/acid-state/1a9290570bcb48373bfa5f9de16cc694068c4d01/benchmarks/loading/Benchmark/Prelude.hs | haskell | exceptions
exceptions | module Benchmark.Prelude
(
module Prelude,
module Control.Monad,
module Control.Applicative,
module Control.Arrow,
module Data.Monoid,
module Data.Foldable,
module Data.Traversable,
module Data.Maybe,
module Data.List,
module Data.Data,
mtl
module Control.Monad.State,
... |
83dac90796e85f6543ca1182158bbe2f2fda40f074defc479e5f1280b966aae5 | pangloss/pattern | post_process.clj | (ns pattern.r3.post-process
(:require [pattern.r3.rule :refer [->Rule rule-name
*post-processor* *identity-rule-post-processor*]]
[pattern.util :refer [meta?]])
(:import (pattern.r3.rule Rule)))
(defn with-post-processor
"Change the rule to use the given post proc... | null | https://raw.githubusercontent.com/pangloss/pattern/79a7068dad0c83808c6117f46623caccd64dddb8/src/pattern/r3/post_process.clj | clojure | (ns pattern.r3.post-process
(:require [pattern.r3.rule :refer [->Rule rule-name
*post-processor* *identity-rule-post-processor*]]
[pattern.util :refer [meta?]])
(:import (pattern.r3.rule Rule)))
(defn with-post-processor
"Change the rule to use the given post proc... | |
af5ea8e953fe38aa3f52b94cd11343eaaaf587826fdb2360cb13180704633266 | aryx/ocamltarzan | pa_type_conv.ml | pp camlp4orf
File : pa_type_conv.ml
Copyright ( C ) 2005-
Jane Street Holding , LLC
Author :
email : mmottl\@janestcapital.com
WWW :
This file is derived from file " pa_tywith.ml " of version 0.45 of the
library " " .
is Copyright ( C ) 2004 , 2005 by
... | null | https://raw.githubusercontent.com/aryx/ocamltarzan/4140f5102cee83a2ca7be996ca2d92e9cb035f9c/pa/old/pa_type_conv.ml | ocaml | Pa_type_conv: Preprocessing Module for Registering Type Conversions
Utility functions
Module/File path management
Reference storing the path to the currently preprocessed module
Get path to the currently preprocessed module
Set path to the currently preprocessed module
impossible
Generator registration
... | pp camlp4orf
File : pa_type_conv.ml
Copyright ( C ) 2005-
Jane Street Holding , LLC
Author :
email : mmottl\@janestcapital.com
WWW :
This file is derived from file " pa_tywith.ml " of version 0.45 of the
library " " .
is Copyright ( C ) 2004 , 2005 by
... |
9b3d38f479a8672f8150a91c11131d5370076fc095324507dfe202c13f0171d3 | microsoft/SLAyer | NSPolySet.mli | Copyright ( c ) Microsoft Corporation . All rights reserved .
open NSLib
(** Sets of ordered values. See also standard
{{:file:../../../doc/ocaml%20manual/libref/Set.html}Set}. *)
module PolySet : sig
module type S = sig
type 'a elt
type 'a t
val empty : 'a t
val is_empty : 'a t -> bool
... | null | https://raw.githubusercontent.com/microsoft/SLAyer/6f46f6999c18f415bc368b43b5ba3eb54f0b1c04/src/Library/NSPolySet.mli | ocaml | * Sets of ordered values. See also standard
{{:file:../../../doc/ocaml%20manual/libref/Set.html}Set}.
val take : ('a elt -> bool) -> 'a t -> 'a elt option | Copyright ( c ) Microsoft Corporation . All rights reserved .
open NSLib
module PolySet : sig
module type S = sig
type 'a elt
type 'a t
val empty : 'a t
val is_empty : 'a t -> bool
val add : 'a elt -> 'a t -> 'a t
val singleton : 'a elt -> 'a t
val iter : ('a elt -> unit) -> 'a t ->... |
52439d0bea031edd5088a1c8946776a5b0cd8c14e09e13c92530495516c54c3e | Gandalf-/coreutils | MkdirSpec.hs | module MkdirSpec where
import Control.Exception
import Control.Monad
import Coreutils.Mkdir
import Data.Bits
import Data.Either
import System.Directory
import Test.Hspec
spec :: Spec
spec = do
describe "bits" $
it "works" $ do
... | null | https://raw.githubusercontent.com/Gandalf-/coreutils/d76bd5a2698e9dc8f548698cded1a873a196a4dc/test/MkdirSpec.hs | haskell | module MkdirSpec where
import Control.Exception
import Control.Monad
import Coreutils.Mkdir
import Data.Bits
import Data.Either
import System.Directory
import Test.Hspec
spec :: Spec
spec = do
describe "bits" $
it "works" $ do
... | |
86295cd06f91316d5f2bffc27d3f3ab94882dcfacd7eb5a2aa28182c6ff1ccc7 | crategus/cl-cffi-gtk | package.lisp | (defpackage :gtk-widget-factory
(:use :gtk :gdk :gdk-pixbuf :gobject
:glib :gio :pango :cairo :cffi :common-lisp)
(:export #:gtk-widget-factory))
(in-package :gtk-widget-factory)
(defun rel-path (filename)
(let ((system-path (asdf:system-source-directory :gtk-widget-factory)))
(princ-to-string (merge-pat... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/22156e3e2356f71a67231d9868abcab3582356f3/demo/gtk-widget-factory/package.lisp | lisp | (defpackage :gtk-widget-factory
(:use :gtk :gdk :gdk-pixbuf :gobject
:glib :gio :pango :cairo :cffi :common-lisp)
(:export #:gtk-widget-factory))
(in-package :gtk-widget-factory)
(defun rel-path (filename)
(let ((system-path (asdf:system-source-directory :gtk-widget-factory)))
(princ-to-string (merge-pat... | |
e9d55d6a3f79c62a0d2010c17aba21e3097c091d33684ecfc82dfa36b0011958 | gebi/jungerl | ssh_xfer.erl | %%% File : ssh_xfer.erl
Author : < >
%%% Description : SSH File transfer protocol
Created : 23 Aug 2004 by < >
-module(ssh_xfer).
-vsn("$Revision$ ").
-rcsid("$Id$\n").
-compile(export_all).
-include("../include/ssh.hrl").
-include("../include/ssh_xfer.hrl").
-import(lists, [foldl/3, reverse/1]).
-... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/ssh/src/ssh_xfer.erl | erlang | File : ssh_xfer.erl
Description : SSH File transfer protocol
Remove a file
Rename a file/directory
Create directory
Remove a directory
Stat file
Stat file - follow symbolic links
Stat open file
Read a symbolic link
Create a symbolic link
Convert a path into a 'canonical' form
Encode rename flags
... | Author : < >
Created : 23 Aug 2004 by < >
-module(ssh_xfer).
-vsn("$Revision$ ").
-rcsid("$Id$\n").
-compile(export_all).
-include("../include/ssh.hrl").
-include("../include/ssh_xfer.hrl").
-import(lists, [foldl/3, reverse/1]).
-define(is_set(F, Bits),
((F) band (Bits)) == (F)).
-define(XFER_PACKET... |
c26e119c3de07224414d4a20b8864ae673d07bf2581aaaa781ab3fefdd9c5825 | webnf/dwn | classloader.clj | (ns webnf.jvm.classloader
(:require [clojure.string :as str]
[webnf.jvm.enumeration :refer [empty-enumeration seq-enumeration]]
[clojure.tools.logging :as log])
(:import (java.net URL URLClassLoader)
(webnf.jvm.classloader IClassLoader CustomClassLoader)))
(defn filtering-classlo... | null | https://raw.githubusercontent.com/webnf/dwn/31ae2b016d2e2978a4f08c0201572225dc72eb53/src/clj/webnf/jvm/classloader.clj | clojure | version compiles to a series of else ifs and .startsWith's
unused
compiles to a regex match
(log/debug clj-fn args " =>" res) | (ns webnf.jvm.classloader
(:require [clojure.string :as str]
[webnf.jvm.enumeration :refer [empty-enumeration seq-enumeration]]
[clojure.tools.logging :as log])
(:import (java.net URL URLClassLoader)
(webnf.jvm.classloader IClassLoader CustomClassLoader)))
(defn filtering-classlo... |
5e6f805836c78a88489be540c67e9d2826428ae200fef377f8cf4375ddc42fa1 | onedata/op-worker | events_reliability_test_base.erl | %%%--------------------------------------------------------------------
@author
( C ) 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%--------------------------------------------------------------------
%%% @doc This module holds base cases for tes... | null | https://raw.githubusercontent.com/onedata/op-worker/4b5d0bec945485800fb17a4b6674ce0dc9892edf/test_distributed/events_reliability_test_base.erl | erlang | --------------------------------------------------------------------
@end
--------------------------------------------------------------------
@doc This module holds base cases for tests of reliability of events.
@end
--------------------------------------------------------------------
export for ct
tests
=========... | @author
( C ) 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(events_reliability_test_base).
-author("Bartosz Walkowicz").
-include("fuse_test_utils.hrl").
-include("global_definitions.hrl").
-include("proto/common/clproto_message_id.hrl").
-include("... |
f0701d0e65a1a9064518e34ba5e12894d902f8ef4034fc41da26ffd55e60f555 | cubicle-model-checker/cubicle | smt.mli | (**************************************************************************)
(* *)
Cubicle
(* *)
... | null | https://raw.githubusercontent.com/cubicle-model-checker/cubicle/00f09bb2d4bb496549775e770d7ada08bc1e4866/smt/smt.mli | ocaml | ************************************************************************
... | Cubicle
Copyright ( C ) 2011 - 2014
and
Universite Paris - Sud 11
This file is distributed under the terms ... |
adcd64fbd7676e21fa1af3b88c4c09cea7c8fa22a04449e39171912cf5351303 | bobot/FetedelascienceINRIAsaclay | test_ppm.ml | open Printf
open Graphics
let snapshot_file = "/Users/marku/Desktop/ocaml.ppm"
(* let snapshot_file = "/tmp/ocaml.ppm" *)
let take_snapshot () =
Sys.command ("gqcam -w 0 -c 128 -b 255 --type PPM --dump " ^ snapshot_file)
let rgb_components c =
float((c lsr 16) land 0xFF),
float((c lsr 8) land 0xFF),
float(c... | null | https://raw.githubusercontent.com/bobot/FetedelascienceINRIAsaclay/87765db9f9c7211a26a09eb93e9c92f99a49b0bc/2010/robot/examples_mindstorm_lab/rubik/test_ppm.ml | ocaml | let snapshot_file = "/tmp/ocaml.ppm"
take_snapshot(); | open Printf
open Graphics
let snapshot_file = "/Users/marku/Desktop/ocaml.ppm"
let take_snapshot () =
Sys.command ("gqcam -w 0 -c 128 -b 255 --type PPM --dump " ^ snapshot_file)
let rgb_components c =
float((c lsr 16) land 0xFF),
float((c lsr 8) land 0xFF),
float(c land 0xFF)
let rgb (r, g, b) =
((trunca... |
5ca4c52f30a46443c7b665fcac1ed2d6580186625830147fb5cc3ea13a1e205e | nasa/PRECiSA | Expression.hs | -- Notices:
--
Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved .
-- Disclaimers
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTOR... | null | https://raw.githubusercontent.com/nasa/PRECiSA/4f72e50d75528ce81cf0858ca9bf58b352e4f4b9/PRECiSA/src/Kodiak/Expression.hs | haskell | Notices:
Disclaimers | Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved .
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , INCLUDING , BUT NOT LIMITE... |
6617351205c4425aa85d31c8c1cb78dfdb059c8b5442f8da8a97d01ccb304137 | fossas/fossa-cli | Docs.hs | module App.Docs (
userGuideUrl,
newIssueUrl,
fossaYmlDocUrl,
strategyLangDocUrl,
platformDocUrl,
fossaSslCertDocsUrl,
fossaContainerScannerUrl,
) where
import App.Version (versionOrBranch)
import Data.Text (Text)
sourceCodeUrl :: Text
sourceCodeUrl = "-cli"
guidePathOf :: Text -> Text -> Text
guidePath... | null | https://raw.githubusercontent.com/fossas/fossa-cli/62c25adda99bab2c80ef78ee78206a14ad0ab0fa/src/App/Docs.hs | haskell | module App.Docs (
userGuideUrl,
newIssueUrl,
fossaYmlDocUrl,
strategyLangDocUrl,
platformDocUrl,
fossaSslCertDocsUrl,
fossaContainerScannerUrl,
) where
import App.Version (versionOrBranch)
import Data.Text (Text)
sourceCodeUrl :: Text
sourceCodeUrl = "-cli"
guidePathOf :: Text -> Text -> Text
guidePath... | |
31fdec47eecc0ab71cc5d317bea2eac4789ff985a8231a8b4935408bc0f7195a | cyverse-archive/DiscoveryEnvironmentBackend | c189_2014070701.clj | (ns facepalm.c189-2014070701
(:use [korma.core]))
(def ^:private version
"The destination database version."
"1.8.9:20140707.01")
(defn- convert-avus-table-user-cols
[]
(println "\t* updating user columns in the avus table")
(exec-raw "ALTER TABLE avus DROP CONSTRAINT avus_unique")
(exec-raw "ALTER TABL... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/databases/metadata/src/main/conversions/c189_2014070701.clj | clojure | (ns facepalm.c189-2014070701
(:use [korma.core]))
(def ^:private version
"The destination database version."
"1.8.9:20140707.01")
(defn- convert-avus-table-user-cols
[]
(println "\t* updating user columns in the avus table")
(exec-raw "ALTER TABLE avus DROP CONSTRAINT avus_unique")
(exec-raw "ALTER TABL... | |
76b0b2db2739893bf253e965c8c2b3c4f648f272efda6a097f89a2038957ce48 | Opetushallitus/ataru | input_fields_with_lang_component.cljs | (ns ataru.virkailija.editor.components.input-fields-with-lang-component
(:require [clojure.string :as string]))
(defn- add-multi-lang-class [field-spec]
(let [multi-lang-class "editor-form__text-field-wrapper--with-label"]
(if (map? (last field-spec))
(assoc-in field-spec [(dec (count field-spec)) :class... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/cljs/ataru/virkailija/editor/components/input_fields_with_lang_component.cljs | clojure | (ns ataru.virkailija.editor.components.input-fields-with-lang-component
(:require [clojure.string :as string]))
(defn- add-multi-lang-class [field-spec]
(let [multi-lang-class "editor-form__text-field-wrapper--with-label"]
(if (map? (last field-spec))
(assoc-in field-spec [(dec (count field-spec)) :class... | |
80175c0e46c1dc2bc931b50b3e9fabfa85ebc96af4449f662c54158d85e9bbfd | ocaml-obuild/obuild | test_dag.ml | open Obuild
let err = ref 0
simple dag : a - > b - > c
let d1 =
let d = Dag.init () in
Dag.addEdge "A" "B" d;
Dag.addEdge "B" "C" d;
d
DAG with a fork
*
* A - > B - > C - > D - > E - > F
* \ > C'- > D'-/
*
* A -> B -> C -> D -> E -> F
* \> C'-> D'-/
*)
let d2 =
... | null | https://raw.githubusercontent.com/ocaml-obuild/obuild/28252e8cee836448e85bfbc9e09a44e7674dae39/tests/test_dag.ml | ocaml | open Obuild
let err = ref 0
simple dag : a - > b - > c
let d1 =
let d = Dag.init () in
Dag.addEdge "A" "B" d;
Dag.addEdge "B" "C" d;
d
DAG with a fork
*
* A - > B - > C - > D - > E - > F
* \ > C'- > D'-/
*
* A -> B -> C -> D -> E -> F
* \> C'-> D'-/
*)
let d2 =
... | |
da74053173dd38dadd81bb9c12e941d8f403bce1fc42807f7debf9b635472f8b | melange-re/melange | listLabels.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/melange-re/melange/13edf6108d884e64cd510bce077ef2ce73de6a97/jscomp/stdlib-412/stdlib_modules/listLabels.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* List operations .
Some functions are flagged as not tail - recursive . A tail - recursive
... |
03ffeecc5d5e857675999f7f4dab5bf7ae74986189ff6fc0c95d8813c00b176d | ocaml-multicore/multicoretests | lin_tests_dsl_thread.ml | (* ********************************************************************** *)
(* Tests of in and out channels *)
(* ********************************************************************** *)
open Lin_tests_dsl_common_io.Lin_tests_dsl_common
module IC_thread = Lin_thread.Make(IC... | null | https://raw.githubusercontent.com/ocaml-multicore/multicoretests/01300b78f680544f490d4975b5d57f779f907a58/src/io/lin_tests_dsl_thread.ml | ocaml | **********************************************************************
Tests of in and out channels
********************************************************************** |
open Lin_tests_dsl_common_io.Lin_tests_dsl_common
module IC_thread = Lin_thread.Make(ICConf) [@@alert "-experimental"]
module OC_thread = Lin_thread.Make(OCConf) [@@alert "-experimental"]
let _ =
QCheck_base_runner.run_tests_main [
IC_thread.neg_lin_test ~count:1000 ~name:"Lin DSL In_channel test with Thread";... |
3fb20fdc0b12765bacfefb0a681ed0bf63a596dcb1e8ffd7e9bbeba123d0faeb | MattWindsor91/travesty | or_error.mli | This file is part of ' travesty ' .
Copyright ( c ) 2018 , 2019 by
Permission is hereby granted , free of charge , to any person obtaining a
copy of this software and associated documentation files ( the " Software " ) ,
to deal in the Software without restriction , including without limitatio... | null | https://raw.githubusercontent.com/MattWindsor91/travesty/3f4da33830cc928ad879077e690277088de1f836/base_exts/test/or_error.mli | ocaml | * This interface intentionally left blank. | This file is part of ' travesty ' .
Copyright ( c ) 2018 , 2019 by
Permission is hereby granted , free of charge , to any person obtaining a
copy of this software and associated documentation files ( the " Software " ) ,
to deal in the Software without restriction , including without limitatio... |
0ead58d63a62cef0072d6988cb3f0c0d70c8689a86342c7099106a3a01aa834f | engagor/clj-vw | offline.clj | Copyright ( c ) 2014 Engagor
;;
;; The use and distribution terms for this software are covered by the
;; BSD License (-2-Clause)
;; 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 m... | null | https://raw.githubusercontent.com/engagor/clj-vw/ff03de8005495349652cd5f0f2f3f3e0f08a6964/src/clj_vw/offline.clj | clojure |
The use and distribution terms for this software are covered by the
BSD License (-2-Clause)
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, fro... | Copyright ( c ) 2014 Engagor
(ns ^{:doc "Higher level helper functions for interfacing to a local vowpal wabbit installation."}
clj-vw.offline
(:require [clj-vw.core :refer :all]
[clojure.java.io :refer (as-file)])
(:import [java.util UUID]))
(defn- maybe-write-data-file
"Like write-data-file b... |
9ecd70eb77b315a15ffce174b4ffbb8856d47bd59cabcbffce9b1d170b8a6a58 | informatimago/lisp | peek-stream-test.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : peek-stream-test.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Tests peek-stream.lisp.
;;;;
... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/common-lisp/cesarum/peek-stream-test.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Tests peek-stream.lisp.
LEGAL
This program is free software: you can redistribute it and/or modify
(at your option) any later version.... | FILE : peek-stream-test.lisp
USER - INTERFACE :
< PJB > < >
MODIFICATIONS
2015 - 02 - 25 < PJB > Extracted from .
AGPL3
Copyright 2015 - 2016
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either ver... |
ace08a29a9aebc266cb741d4c6f72d4b5b2b646dc696afeeb3a0eae2b5be09fa | kakao/hbase-packet-inspector | core.clj | (ns load-generator.core
(:import
org.apache.hadoop.hbase.TableName
[org.apache.hadoop.hbase.client ConnectionFactory Connection Put Scan]
[org.hbase.async HBaseClient AtomicIncrementRequest])
(:gen-class))
(def ^String table-name "t")
(def ^String cf "d")
(defn asynchbase-batch-increment
[]
(let [asy... | null | https://raw.githubusercontent.com/kakao/hbase-packet-inspector/a62ca478c5f59123155377f2a983b7a69dcdd522/dev-resources/load-generator/src/load_generator/core.clj | clojure | (ns load-generator.core
(:import
org.apache.hadoop.hbase.TableName
[org.apache.hadoop.hbase.client ConnectionFactory Connection Put Scan]
[org.hbase.async HBaseClient AtomicIncrementRequest])
(:gen-class))
(def ^String table-name "t")
(def ^String cf "d")
(defn asynchbase-batch-increment
[]
(let [asy... | |
b638ab364cc8555744d633759dbcdd9c5d5ef07ce392a90454ffa1ac95bba9e1 | sbcl/sbcl | sb-rotate-byte.impure.lisp | (require :sb-rotate-byte)
(load "../contrib/sb-rotate-byte/rotate-byte-tests.lisp")
| null | https://raw.githubusercontent.com/sbcl/sbcl/fbd46c52ea5ea4b3ba98a14ebdd4991d35989c6d/tests/sb-rotate-byte.impure.lisp | lisp | (require :sb-rotate-byte)
(load "../contrib/sb-rotate-byte/rotate-byte-tests.lisp")
| |
a17ff18a658094ca2cec885c29db2ee3a0e6931ca6ec537b779bd63d51bb2b7b | haskell-tools/haskell-tools | MultiMatchGuarded_res.hs | module Refactor.InlineBinding.MultiMatchGuarded where
b u v = (case (u, v) of (x, y) | x == y -> x
(x, y) -> x ++ y) | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/InlineBinding/MultiMatchGuarded_res.hs | haskell | module Refactor.InlineBinding.MultiMatchGuarded where
b u v = (case (u, v) of (x, y) | x == y -> x
(x, y) -> x ++ y) | |
184d0ebf813adcaf1094546e964af5f80050929da36991501a780fbce99cb0c4 | Gbury/archsat | pipe.mli | This file is free software , part of Archsat . See file " LICENSE " for more details .
(** Top-level operations
This module defines top-level operators, i.e functions to act
on top-level statements. *)
(** {2 Types} *)
type 'a tr_stmt = {
contents : 'a;
implicit : Term.id list;
}
(* Used for wrapping ... | null | https://raw.githubusercontent.com/Gbury/archsat/322fbefa4a58023ddafb3fa1a51f8199c25cde3d/src/middle/pipe.mli | ocaml | * Top-level operations
This module defines top-level operators, i.e functions to act
on top-level statements.
* {2 Types}
Used for wrapping translated contents with implicit declarations
* Wrapper around statements. It records implicit type declarations.
* The type of top-level type declarations.
* The t... | This file is free software , part of Archsat . See file " LICENSE " for more details .
type 'a tr_stmt = {
contents : 'a;
implicit : Term.id list;
}
type +'a stmt = {
id : Dolmen.Id.t;
contents : 'a;
loc : Dolmen.ParseLocation.t option;
}
type executed = [
| `Executed
]
type type... |
f0976369568c02b0bc2aeb2a99592dc414b8b128e9500bfc28b18eaf735cdd04 | ramalho/lc-with-redex | church-numerals.scm | #lang scheme
(require redex)
(define (number->Church-numeral n)
(define (f^n f n) (if (zero? n) (λ (x) x) (λ (x) ((f^n f (sub1 n)) (f x)))))
(λ (f) (λ (x) ((f^n f n) x))))
(define (Church-numeral->number Ch-n) ((Ch-n add1) 0))
(define (test Church-numeral number)
(test-equal (Church-numeral->number Chur... | null | https://raw.githubusercontent.com/ramalho/lc-with-redex/506190bce2b8309192823b4c824e0b3758f29e46/church-numerals.scm | scheme | #lang scheme
(require redex)
(define (number->Church-numeral n)
(define (f^n f n) (if (zero? n) (λ (x) x) (λ (x) ((f^n f (sub1 n)) (f x)))))
(λ (f) (λ (x) ((f^n f n) x))))
(define (Church-numeral->number Ch-n) ((Ch-n add1) 0))
(define (test Church-numeral number)
(test-equal (Church-numeral->number Chur... | |
a677cb13c3dd4a3fb6d728882b1e0fafc53139963251b4dedcf64197fd496a60 | nojb/llvm-min-caml | main.ml | let limit = ref 1000
let rec iter n e = (* 最適化処理をくりかえす (caml2html: main_iter) *)
Format.eprintf "iteration %d@." n;
if n = 0 then e else
let e' = Elim.f (ConstFold.f (Inline.f (Assoc.f (Beta.f e)))) in
if e = e' then e else
iter (n - 1) e'
let lexbuf outchan l = (* バッファをコンパイルしてチャンネルへ出力する (caml2html: main_le... | null | https://raw.githubusercontent.com/nojb/llvm-min-caml/68703b905f8292cb2e20b41bbd90cfea85ca2a19/main.ml | ocaml | 最適化処理をくりかえす (caml2html: main_iter)
バッファをコンパイルしてチャンネルへ出力する (caml2html: main_lexbuf)
文字列をコンパイルして標準出力に表示する (caml2html: main_string)
ファイルをコンパイルしてファイルに出力する (caml2html: main_file)
ここからコンパイラの実行が開始される (caml2html: main_entry) | let limit = ref 1000
Format.eprintf "iteration %d@." n;
if n = 0 then e else
let e' = Elim.f (ConstFold.f (Inline.f (Assoc.f (Beta.f e)))) in
if e = e' then e else
iter (n - 1) e'
Id.counter := 0;
Typing.extenv := M.empty;
Emit.f outchan
(Gc.f
(Closure.f
(iter !limit
(Alpha.f
... |
5673ddcdccd6206a9ef1cfb8b3a6abd143ea73a23c4b815603eb620701c6b8fb | mflatt/shrubbery-rhombus-0 | lex.rkt | #lang racket/base
(require parser-tools/lex
(for-syntax racket/base)
(prefix-in : parser-tools/lex-sre)
"private/property.rkt"
"private/peek-port.rkt")
(provide lex/status
lex-all
token-name
;; 'identifier
;; 'literal
;; 'comment
... | null | https://raw.githubusercontent.com/mflatt/shrubbery-rhombus-0/cfe1b1450cfaef393fc7f33bef4d0aaf5f1837fe/shrubbery/lex.rkt | racket | 'identifier
'literal
'comment
'whitespace
'operator
'block-operator
'continue-operator
'bar-operator
'opener
'closer
'comma-operator
'semicolon-operator
's-exp
'fail
For case insensitivity
does not constrain to avoid surrogates:
disallows a number that starts +, -, or "."
doesn't ma... | #lang racket/base
(require parser-tools/lex
(for-syntax racket/base)
(prefix-in : parser-tools/lex-sre)
"private/property.rkt"
"private/peek-port.rkt")
(provide lex/status
lex-all
token-name
' EOF
token?
token-value
token-e
... |
ed92e7e12c6a49c1b0d043df8a14cef32303c5ef22967a5d2d69e23788301b5e | noprompt/meander | epsilon.cljc | (ns meander.specs.epsilon
(:require [meander.match.syntax.epsilon :as r.match.syntax]
[meander.syntax.specs.epsilon :as r.syntax.specs]
[clojure.spec.alpha :as s]))
(s/fdef meander.epsilon/defsyntax
:args ::r.syntax.specs/defsyntax-args)
(s/fdef meander.epsilon/rewrite
:args (s/cat :x a... | null | https://raw.githubusercontent.com/noprompt/meander/8c0e9457befea5eee71a94a6d8726ed5916875dc/src/meander/specs/epsilon.cljc | clojure | (ns meander.specs.epsilon
(:require [meander.match.syntax.epsilon :as r.match.syntax]
[meander.syntax.specs.epsilon :as r.syntax.specs]
[clojure.spec.alpha :as s]))
(s/fdef meander.epsilon/defsyntax
:args ::r.syntax.specs/defsyntax-args)
(s/fdef meander.epsilon/rewrite
:args (s/cat :x a... | |
d83e84a52a82ecaa596c87459aa251c95e8903748425dcf134c9b09d8337159f | input-output-hk/project-icarus-importer | Functions.hs | # LANGUAGE RankNTypes #
# LANGUAGE TypeFamilies #
-- | Pending transactions utils.
module Pos.Wallet.Web.Pending.Functions
( ptxPoolInfo
, isPtxActive
, isPtxInBlocks
, mkPendingTx
, isReclaimableFailure
, usingPtxCoords
) where
import Universum
import Formatting (... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet/src/Pos/Wallet/Web/Pending/Functions.hs | haskell | | Pending transactions utils.
| Whether transaction is claimed to be once created.
later after specified error.
We consider all cases explicitly here to prevent changing
constructors set blindly | # LANGUAGE RankNTypes #
# LANGUAGE TypeFamilies #
module Pos.Wallet.Web.Pending.Functions
( ptxPoolInfo
, isPtxActive
, isPtxInBlocks
, mkPendingTx
, isReclaimableFailure
, usingPtxCoords
) where
import Universum
import Formatting (build, sformat, (%))
import ... |
a7da61ebdbd02126c129650f0b5fa854e02c8e0ef7721bb4a2a5277f1ee0c8a0 | gorillalabs/sparkling | validation_test.clj | (ns sparkling.ml.validation-test
(:require [clojure.test :as t]
[sparkling.conf :as conf]
[sparkling.api :as s]
[sparkling.ml.core :as mlc]
[clojure.java.io :as io]
[sparkling.ml.classification :as cl]
[sparkling.ml.validation :as v])
(:import ... | null | https://raw.githubusercontent.com/gorillalabs/sparkling/ffedcc70fd46bf1b48405be8b1f5a1e1c4f9f578/test/sparkling/ml/validation_test.clj | clojure | (ns sparkling.ml.validation-test
(:require [clojure.test :as t]
[sparkling.conf :as conf]
[sparkling.api :as s]
[sparkling.ml.core :as mlc]
[clojure.java.io :as io]
[sparkling.ml.classification :as cl]
[sparkling.ml.validation :as v])
(:import ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.