diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2016-06-07 09:15:22 -0400 |
---|---|---|
committer | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2016-06-07 09:16:41 -0400 |
commit | d05dee38c80e862d82e9ba891f3ae5076e376f31 (patch) | |
tree | ae4cc034ff8f54df097af0a97f63e195b4e646fa /compiler/stgSyn/CoreToStg.hs | |
parent | 7fea7121ce195e562a5443c0a8ef3861504ef1b3 (diff) | |
download | haskell-d05dee38c80e862d82e9ba891f3ae5076e376f31.tar.gz |
CoreToStg: Remove hand-written Eq instances of HowBound and LetInfo
Diffstat (limited to 'compiler/stgSyn/CoreToStg.hs')
-rw-r--r-- | compiler/stgSyn/CoreToStg.hs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/compiler/stgSyn/CoreToStg.hs b/compiler/stgSyn/CoreToStg.hs index c275f4d4f3..d2010a83d4 100644 --- a/compiler/stgSyn/CoreToStg.hs +++ b/compiler/stgSyn/CoreToStg.hs @@ -856,10 +856,12 @@ data HowBound Arity -- Its arity (local Ids don't have arity info at this point) | LambdaBound -- Used for both lambda and case + deriving (Eq) data LetInfo = TopLet -- top level things | NestedLet + deriving (Eq) isLetBound :: HowBound -> Bool isLetBound (LetBound _ _) = True @@ -1010,21 +1012,9 @@ plusFVInfo :: (Var, HowBound, StgBinderInfo) -> (Var, HowBound, StgBinderInfo) -> (Var, HowBound, StgBinderInfo) plusFVInfo (id1,hb1,info1) (id2,hb2,info2) - = ASSERT(id1 == id2 && hb1 `check_eq_how_bound` hb2) + = ASSERT(id1 == id2 && hb1 == hb2) (id1, hb1, combineStgBinderInfo info1 info2) --- The HowBound info for a variable in the FVInfo should be consistent -check_eq_how_bound :: HowBound -> HowBound -> Bool -check_eq_how_bound ImportBound ImportBound = True -check_eq_how_bound LambdaBound LambdaBound = True -check_eq_how_bound (LetBound li1 ar1) (LetBound li2 ar2) = ar1 == ar2 && check_eq_li li1 li2 -check_eq_how_bound _ _ = False - -check_eq_li :: LetInfo -> LetInfo -> Bool -check_eq_li NestedLet NestedLet = True -check_eq_li TopLet TopLet = True -check_eq_li _ _ = False - -- Misc. filterStgBinders :: [Var] -> [Var] |