packages feed

paramtree 0.1.1.1 → 0.1.2

raw patch · 3 files changed

+18/−28 lines, 3 filesdep ~basedep ~bytestringdep ~containers

Dependency ranges changed: base, bytestring, containers, tasty

Files

ParamTree.hs view
@@ -8,7 +8,7 @@ ------------------------------------------------------------------------------- -- | -- Module      :  ParamTree--- Copyright   :  (C) 2017 Merijn Verstraaten+-- Copyright   :  (C) 2017-2023 Merijn Verstraaten -- License     :  BSD-style (see the file LICENSE) -- Maintainer  :  Merijn Verstraaten <merijn@inconsistent.nl> -- Stability   :  experimental@@ -29,29 +29,21 @@     , paramSets     ) where +import Data.Kind (Type) import Data.Map (Map) import qualified Data.Map as M-#if !MIN_VERSION_base(4,8,0)-import Data.Monoid (mconcat)-#endif import Data.Monoid (Endo(..))  -- | Type family that converts a type level list into a function type: -- -- @'ParamFun' ['Char', 'Int', 'Bool'] r@ = -- @'Char' -> 'Int' -> 'Bool' -> 'String' -> r@-#if MIN_VERSION_base(4,7,0)-type family ParamFun (l :: [*]) r where+type family ParamFun (l :: [Type]) r where     ParamFun '[] r = String -> r     ParamFun (h ': t) r = h -> ParamFun t r-#else-type family ParamFun (l :: [*]) r-type instance ParamFun '[] r = String -> r-type instance ParamFun (h ': t) r = h -> ParamFun t r-#endif  -- | Sets of parameters to generate the tree from.-data Params :: [*] -> * where+data Params :: [Type] -> Type where     Nil :: Params '[]     Sets :: [Params l] -> Params l     Param :: Eq r@@ -62,7 +54,7 @@           -> Params l           -> Params (r ': l) -data Tree :: [*] -> * where+data Tree :: [Type] -> Type where     None :: Tree '[]     Empty :: Tree l     Grouped :: Eq r@@ -138,7 +130,7 @@ -- The result is \"axy\" being used in groups where the \"Bool\" parameter is -- @True@, if the \"Bool\" parameter is @False@ only \"a\" is used. paramSets :: [Params r -> Params l] -> Params r -> Params l-paramSets prefixes rest = Sets $ map ($rest) prefixes+paramSets prefixes rest = Sets $ map ($ rest) prefixes  trim :: [Tree l] -> Tree l trim [] = Empty
README.md view
@@ -2,6 +2,7 @@ ========= [![BSD3](https://img.shields.io/badge/License-BSD-blue.svg)](https://en.wikipedia.org/wiki/BSD_License) [![Hackage](https://img.shields.io/hackage/v/paramtree.svg)](https://hackage.haskell.org/package/paramtree)+[![hackage-ci](https://matrix.hackage.haskell.org/api/v2/packages/paramtree/badge)](https://matrix.hackage.haskell.org/#/package/paramtree) [![Build Status](https://travis-ci.org/merijn/paramtree.svg)](https://travis-ci.org/merijn/paramtree)  **ParamTree** library for generating labelled test/benchmark trees from sets of@@ -18,9 +19,9 @@ genTestCase :: Int -> Bool -> Char -> String -> TestTree genTestCase i b c name = testCase name $ {- your code here -} -params = 'simpleParam' \"Int\" [1,2]-       . 'simpleParam' \"Bool\" [True]-       . 'simpleParam' \"Char\" "xyz"+params = simpleParam "Int" [1,2]+       . simpleParam "Bool" [True]+       . simpleParam "Char" "xyz"  main :: IO () main = defaultMain $ testTree genTestCase params
paramtree.cabal view
@@ -1,12 +1,12 @@ Name:               paramtree-Version:            0.1.1.1+Version:            0.1.2  Homepage:           https://github.com/merijn/paramtree Bug-Reports:        https://github.com/merijn/paramtree/issues  Author:             Merijn Verstraaten Maintainer:         Merijn Verstraaten <merijn@inconsistent.nl>-Copyright:          Copyright © 2017 Merijn Verstraaten+Copyright:          Copyright © 2017-2023 Merijn Verstraaten  License:            BSD3 License-File:       LICENSE@@ -14,8 +14,9 @@ Category:           Development, Benchmarking, Testing Cabal-Version:      >= 1.10 Build-Type:         Simple-Tested-With:        GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2,-                    GHC == 8.2.2, GHC == 8.4.3, GHC == 8.6.1+Tested-With:        GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5,+                    GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.8,+                    GHC == 9.4.5, GHC == 9.6.2  Extra-Source-Files: README.md tests/*.golden @@ -40,7 +41,7 @@                         TypeFamilies                         TypeOperators -  Build-Depends:        base >= 4.6 && < 5+  Build-Depends:        base >= 4.9 && < 5                ,        containers >= 0.4 && < 0.7  Test-Suite test@@ -53,8 +54,8 @@                         DataKinds   Build-Depends:        base                ,        paramtree-               ,        bytestring >= 0.10 && < 0.11-               ,        tasty >= 0.11 && < 1.2+               ,        bytestring >= 0.10 && < 0.13+               ,        tasty >= 0.11 && < 1.5                ,        tasty-golden >= 2.0 && < 2.4                ,        tasty-hunit >= 0.9 && < 0.11                ,        temporary >= 1.2 && < 1.4@@ -62,7 +63,3 @@ Source-Repository head   Type:     git   Location: ssh://github.com:merijn/paramtree.git--Source-Repository head-  Type:     mercurial-  Location: https://bitbucket.org/merijnv/paramtree