diff options
author | simonpj@microsoft.com <unknown> | 2010-03-17 12:35:19 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2010-03-17 12:35:19 +0000 |
commit | f69bf6be6101d6b5d7952c384dd5eeb1917b4cdb (patch) | |
tree | 07e1ae35d9fa7d6bd2f9c68f8e8e042986b6a7d2 | |
parent | 1a050f3cff3a93f634d2d929aba779585f39609c (diff) | |
download | haskell-f69bf6be6101d6b5d7952c384dd5eeb1917b4cdb.tar.gz |
Fix Trac #3920: Template Haskell kinds
Fix two places where we were doing foldl instead of foldr
after decomposing a Kind. Strange that the same bug appears
in two quite different places!
-rw-r--r-- | compiler/deSugar/DsMeta.hs | 2 | ||||
-rw-r--r-- | compiler/typecheck/TcSplice.lhs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/deSugar/DsMeta.hs b/compiler/deSugar/DsMeta.hs index f071a172ff..3f7f4d02f8 100644 --- a/compiler/deSugar/DsMeta.hs +++ b/compiler/deSugar/DsMeta.hs @@ -644,7 +644,7 @@ repKind ki = do { let (kis, ki') = splitKindFunTys ki ; kis_rep <- mapM repKind kis ; ki'_rep <- repNonArrowKind ki' - ; foldlM repArrowK ki'_rep kis_rep + ; foldrM repArrowK ki'_rep kis_rep } where repNonArrowKind k | isLiftedTypeKind k = repStarK diff --git a/compiler/typecheck/TcSplice.lhs b/compiler/typecheck/TcSplice.lhs index d67a57bfc6..61ed8c7838 100644 --- a/compiler/typecheck/TcSplice.lhs +++ b/compiler/typecheck/TcSplice.lhs @@ -1119,7 +1119,7 @@ reifyKind ki kis_rep = map reifyKind kis ki'_rep = reifyNonArrowKind ki' in - foldl TH.ArrowK ki'_rep kis_rep + foldr TH.ArrowK ki'_rep kis_rep where reifyNonArrowKind k | isLiftedTypeKind k = TH.StarK | otherwise = pprPanic "Exotic form of kind" |