projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4beee1c
)
Assert
author
simonpj@microsoft.com
<unknown>
Thu, 2 Sep 2010 07:36:42 +0000
(07:36 +0000)
committer
simonpj@microsoft.com
<unknown>
Thu, 2 Sep 2010 07:36:42 +0000
(07:36 +0000)
compiler/types/Type.lhs
patch
|
blob
|
history
diff --git
a/compiler/types/Type.lhs
b/compiler/types/Type.lhs
index
8817222
..
4cea101
100644
(file)
--- a/
compiler/types/Type.lhs
+++ b/
compiler/types/Type.lhs
@@
-468,7
+468,8
@@
splitFunTys ty = split [] ty ty
splitFunTysN :: Int -> Type -> ([Type], Type)
-- ^ Split off exactly the given number argument types, and panics if that is not possible
splitFunTysN 0 ty = ([], ty)
-splitFunTysN n ty = case splitFunTy ty of { (arg, res) ->
+splitFunTysN n ty = ASSERT2( isFunTy ty, int n <+> ppr ty )
+ case splitFunTy ty of { (arg, res) ->
case splitFunTysN (n-1) res of { (args, res) ->
(arg:args, res) }}