summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndor Penzes <andor.penzes@gmail.com>2016-01-22 21:13:57 +0100
committerAndor Penzes <andor.penzes@gmail.com>2016-01-22 21:13:57 +0100
commitf93b133a9ec6e7167faec54eb4778df62fcdb58f (patch)
tree97fd699527c93a38632066cc94604ae78f6e9511 /src
parent698955435b0241c6c075b3cd99e59287b03ee6ac (diff)
Add more Monoid tests.
Diffstat (limited to 'src')
-rw-r--r--src/LambdaCube/Compiler/Infer.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/LambdaCube/Compiler/Infer.hs b/src/LambdaCube/Compiler/Infer.hs
index 39935073..8ef9704e 100644
--- a/src/LambdaCube/Compiler/Infer.hs
+++ b/src/LambdaCube/Compiler/Infer.hs
@@ -18,7 +18,7 @@ module LambdaCube.Compiler.Infer
18 , downE 18 , downE
19 , litType 19 , litType
20 , expType_, initEnv, Env(..), pattern EBind2 20 , expType_, initEnv, Env(..), pattern EBind2
21 , FreshVars, Infos, listInfos, ErrorMsg(..), PolyEnv(..), ErrorT, throwErrorTCM, parseLC, joinPolyEnvs, filterPolyEnv, inference_ 21 , FreshVars, Infos(..), listInfos, ErrorMsg(..), PolyEnv(..), ErrorT, throwErrorTCM, parseLC, joinPolyEnvs, filterPolyEnv, inference_
22 , ImportItems (..) 22 , ImportItems (..)
23 , removeEscs 23 , removeEscs
24-- TEST Exports 24-- TEST Exports
@@ -515,6 +515,7 @@ instance Eq Exp where
515 515
516newtype MaxDB = MaxDB {getMaxDB{-, getMaxDB' -} :: Maybe Int} 516newtype MaxDB = MaxDB {getMaxDB{-, getMaxDB' -} :: Maybe Int}
517 517
518-- TODO: Fix monoid laws
518instance Monoid MaxDB where 519instance Monoid MaxDB where
519 mempty = MaxDB Nothing --0 0 520 mempty = MaxDB Nothing --0 0
520 MaxDB a `mappend` MaxDB a' = MaxDB $ Just $ max (fromMaybe 0 a) (fromMaybe 0 a') -- (max b b') 521 MaxDB a `mappend` MaxDB a' = MaxDB $ Just $ max (fromMaybe 0 a) (fromMaybe 0 a') -- (max b b')