diff options
Diffstat (limited to 'testsuite/tests/simplCore/should_run/T13429a.hs')
-rw-r--r-- | testsuite/tests/simplCore/should_run/T13429a.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/testsuite/tests/simplCore/should_run/T13429a.hs b/testsuite/tests/simplCore/should_run/T13429a.hs index 6a838cb79c..1c394888d6 100644 --- a/testsuite/tests/simplCore/should_run/T13429a.hs +++ b/testsuite/tests/simplCore/should_run/T13429a.hs @@ -3,7 +3,9 @@ {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} -module T13429a where -- Orignally FingerTree.hs from the ticket +module T13429a where -- Originally FingerTree.hs from the ticket + +import Data.Semigroup (Semigroup(..)) class (Monoid v) => Measured v a | a -> v where measure :: a -> v @@ -32,9 +34,11 @@ instance Foldable (FingerTree v) where foldMap f (Deep _ pr m sf) = foldMap f pr `mappend` foldMap (foldMap f) m `mappend` foldMap f sf +instance Measured v a => Semigroup (FingerTree v a) where + (<>) = (><) + instance Measured v a => Monoid (FingerTree v a) where mempty = empty - mappend = (><) empty :: Measured v a => FingerTree v a empty = Empty |