---------------------------------------------------------------------
---Module      :   Properties  
--             a place to state some algebraic laws
--             used in tests 
-- compare with Data.Zero 
----------------------------------------------------------------------
-- {-# LANGUAGE FlexibleContexts #-}
-- {-# LANGUAGE MultiParamTypeClasses #-}
-- {-# LANGUAGE DefaultSignatures #-}
-- {-# LANGUAGE TypeOperators #-}

{-# OPTIONS -Wall #-}

module Uniform.Properties
  ( module Uniform.Properties
  )
where

import           Algebra.Laws             as Law
--import           Test.Framework
import           Test.Invariant           as Rule
prop_zero_mknull :: (Monoid a, Eq a)  => a -> Bool
prop_zero_mknull :: forall a. (Monoid a, Eq a) => a -> Bool
prop_zero_mknull a
a = forall a. Eq a => (a -> a -> a) -> a -> a -> Bool
Law.zero forall a. Monoid a => a -> a -> a
mappend a
a forall a. Monoid a => a
mempty

prop_assoz :: (Monoid a, Eq a)  => a -> a ->  a -> Bool
prop_assoz :: forall a. (Monoid a, Eq a) => a -> a -> a -> Bool
prop_assoz a
a a
b a
c = forall a. Eq a => (a -> a -> a) -> a -> a -> a -> Bool
Rule.associative forall a. Monoid a => a -> a -> a
mappend a
a a
b a
c

prop_concat :: (Monoid a, Eq a) => [a] -> Bool
prop_concat :: forall a. (Monoid a, Eq a) => [a] -> Bool
prop_concat [a]
as =    forall a. Monoid a => [a] -> a
mconcat [a]
as forall a. Eq a => a -> a -> Bool
== forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr forall a. Monoid a => a -> a -> a
mappend forall a. Monoid a => a
mempty [a]
as



--prop_s2lat :: String -> Bool  -- will fail ? fails
--prop_s2lat = inverts lat2s s3lat

    --prop_s2latin :: String -> Bool     -- why does this always work?  (is the intermediate result ok?)
--prop_s2latin = inverts latin2s s2latin

--prop_s3latin :: String -> Bool     --inverts with reasonable intermediate value
--prop_s3latin s = inverts latin2s s2latin (convertLatin s)

--