Commit f6ec000b authored by Mike Ledger's avatar Mike Ledger

Merge branch 'master' of gitlab.com:transportengineering/radixtree

parents df72cf7d c7d9945c
Pipeline #55316120 passed with stage
in 3 minutes and 36 seconds
import qualified GHC.HeapView
:def! setPrintHeapDepth \x -> return $ ":def! printHeap \\x -> return $ \"GHC.HeapView.buildHeapGraph (" ++ x ++ ") () (GHC.HeapView.asBox (\" ++ x ++ \")) >>= putStrLn . GHC.HeapView.ppHeapGraph\""
:setPrintHeapDepth 1000
cache:
paths:
- .stack-work
before_script:
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 575159689BEFB442
- echo 'deb http://download.fpcomplete.com/debian jessie main' | tee /etc/apt/sources.list.d/fpco.list
- apt-get update && apt-get install stack -y
- stack setup --stack-yaml stack.yaml
spec:
tests:
image: nixos/nix
before_script:
- nix-env -u
- nix-env -i git
- nix-env -i wget
- nix-env -i bash
script:
- stack test radixtree:radixtree-test --stack-yaml stack.yaml
- nix-env -i cabal-install
- nix-shell -A env --command 'cabal v1-test --show-details=direct'
import Distribution.Simple
main = defaultMain
import ../nix/haskellPackage.nix {
name = "radixtree";
{ nixpkgs ? import <nixpkgs> {}, extra ? {}, drv ? {} }:
let
path = ./.;
}
name = builtins.baseNameOf path;
in
with (nixpkgs.haskell.lib);
with (nixpkgs.haskellPackages);
overrideCabal
(callCabal2nix name path
(if builtins.isFunction extra then extra nixpkgs else extra))
(drv0: (drv0 // {
doCheck = true;
doBenchmark = false;
doHaddock = false;
doCoverage = false;
enableLibraryProfiling = false;
enableExecutableProfiling = false;
}) // drv)
name: radixtree
version: '0.5.0.0'
description: A prefix-tree parsing library
category: Web
author: Mike Ledger
maintainer: mike@quasimal.com
copyright: 2017-2019 Mike Ledger
license: BSD3
homepage: https://gitlab.com/transportengineering/rnd/radixtree
git: https://gitlab.com/tranpsortengineering/rnd/radixtree
dependencies:
- text
library:
source-dirs: src
exposed-modules:
- Data.RadixTree
dependencies:
- base >=4.7 && <5
- containers >=0.5
- vector
- deepseq
- microlens
- parsers >=0.12
- store >=0.4
- mtl >=2.0
tests:
radixtree-test:
main: Spec.hs
source-dirs: test
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- base
- radixtree
- attoparsec
- smallcheck
- tasty
- tasty-smallcheck
benchmarks:
radixtree-parsing:
main: Parsing.hs
source-dirs: bench
ghc-options: -O2
dependencies:
- base
- radixtree
- criterion
- attoparsec
- deepseq
- vector
radixtree-search:
main: Search.hs
source-dirs: bench
ghc-options: -O2
dependencies:
- base
- radixtree
- criterion
- attoparsec
- deepseq
- vector
-- This file has been generated from package.yaml by hpack version 0.28.2.
--
-- see: https://github.com/sol/hpack
--
-- hash: 8255bc497cd8d2d14fe11ccffde96ff9cab05b3bd0f6d264cf26f1789a662c1b
name: radixtree
version: 0.5.0.0
description: A prefix-tree parsing library
category: Web
homepage: https://gitlab.com/transportengineering/rnd/radixtree
author: Mike Ledger
maintainer: mike@quasimal.com
copyright: 2017-2019 Mike Ledger
license: BSD3
license-file: LICENSE
build-type: Simple
cabal-version: >= 1.10
source-repository head
type: git
location: https://gitlab.com/tranpsortengineering/rnd/radixtree
library
exposed-modules:
Data.RadixTree
other-modules:
Paths_radixtree
hs-source-dirs:
src
build-depends:
base >=4.7 && <5
, containers >=0.5
, deepseq
, microlens
, mtl >=2.0
, parsers >=0.12
, store >=0.4
, text
, vector
default-language: Haskell2010
test-suite radixtree-test
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
Paths_radixtree
hs-source-dirs:
test
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
attoparsec
, base
, radixtree
, smallcheck
, tasty
, tasty-smallcheck
, text
default-language: Haskell2010
benchmark radixtree-parsing
type: exitcode-stdio-1.0
main-is: Parsing.hs
other-modules:
Search
Paths_radixtree
hs-source-dirs:
bench
ghc-options: -O2
build-depends:
attoparsec
, base
, criterion
, deepseq
, radixtree
, text
, vector
default-language: Haskell2010
benchmark radixtree-search
type: exitcode-stdio-1.0
main-is: Search.hs
other-modules:
Parsing
Paths_radixtree
hs-source-dirs:
bench
ghc-options: -O2
build-depends:
attoparsec
, base
, criterion
, deepseq
, radixtree
, text
, vector
default-language: Haskell2010
/nix/store/ffg7rspgw6yzd1nv7g87fk6b633al01l-radixtree-0.5.0.0
\ No newline at end of file
......@@ -203,9 +203,9 @@ instance NFData a => NFData (CompressedRadixTree1 a) where
rnf (CompressedRadixAccept ts v a) = ts `seq` rnf a `seq` rnf v
rnf (CompressedRadixSkip v) = rnf v
-- | Compress a 'RadixTree' given a corpus. All values in the tree be findable
-- within the corpus, though the corpus does not have to necessarily be the
-- direct source of the tree
-- | Compress a 'RadixTree' given a corpus. All values in the tree must be
-- findable within the corpus, though the corpus does not have to necessarily be
-- the direct source of the tree
compressBy :: Text -> RadixTree a -> Maybe (CompressedRadixTree a)
compressBy full@(TI.Text arr _ _) rt =
CompressedRadixTree arr <$> recompressT rt
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment