Skip to content

Commit

Permalink
eg/alga: remove uneeded definitions
Browse files Browse the repository at this point in the history
... that are provided by LeanCheck v0.6.6
  • Loading branch information
rudymatela committed Dec 11, 2017
1 parent 7334f21 commit acde760
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
14 changes: 0 additions & 14 deletions eg/alga.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@ import Test.FitSpec
import Test.LeanCheck.Tiers
import Algebra.Graph

-- TODO: The three following functions should be ported to LeanCheck soon.
-- So, we'll not need to declare them here.
discardLaterT :: (a -> a -> Bool) -> [[a]] -> [[a]]
discardLaterT d [] = []
discardLaterT d ([]:xss) = [] : discardLaterT d xss
discardLaterT d ((x:xs):xss) = [[x]]
\/ discardLaterT d (discardT (`d` x) (xs:xss))

discardT :: (a -> Bool) -> [[a]] -> [[a]]
discardT p = filterT (not . p)

nubT :: Ord a => [[a]] -> [[a]]
nubT = discardLaterT (==)

instance (Listable a, Ord a) => Listable (Graph a) where
tiers = nubT
$ cons0 Empty
Expand Down
2 changes: 1 addition & 1 deletion fitspec.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ library
, Test.FitSpec.Utils
, Test.FitSpec.PrettyPrint
other-modules: Test.FitSpec.Dot
build-depends: base >= 4 && < 5, leancheck >= 0.6, cmdargs, template-haskell
build-depends: base >= 4 && < 5, leancheck >= 0.6.6, cmdargs, template-haskell
hs-source-dirs: src
default-language: Haskell2010

Expand Down

0 comments on commit acde760

Please sign in to comment.