projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
replace several 'fromJust's with 'expectJust's
[ghc-hetmet.git]
/
ghc
/
compiler
/
typecheck
/
TcUnify.lhs
diff --git
a/ghc/compiler/typecheck/TcUnify.lhs
b/ghc/compiler/typecheck/TcUnify.lhs
index
187f055
..
23cc9e2
100644
(file)
--- a/
ghc/compiler/typecheck/TcUnify.lhs
+++ b/
ghc/compiler/typecheck/TcUnify.lhs
@@
-67,7
+67,7
@@
import VarSet ( emptyVarSet, mkVarSet, unitVarSet, unionVarSet, elemVarSet, var
import VarEnv
import Name ( Name, isSystemName )
import ErrUtils ( Message )
import VarEnv
import Name ( Name, isSystemName )
import ErrUtils ( Message )
-import Maybes ( fromJust, isNothing )
+import Maybes ( expectJust, isNothing )
import BasicTypes ( Arity )
import UniqSupply ( uniqsFromSupply )
import Util ( notNull, equalLength )
import BasicTypes ( Arity )
import UniqSupply ( uniqsFromSupply )
import Util ( notNull, equalLength )
@@
-1197,7
+1197,8
@@
checkTauTvUpdate orig_tv orig_ty
; case mb_tys' of
Just tys' -> return (TyConApp tc tys')
-- Retain the synonym (the common case)
; case mb_tys' of
Just tys' -> return (TyConApp tc tys')
-- Retain the synonym (the common case)
- Nothing -> go (fromJust (tcView (TyConApp tc tys)))
+ Nothing -> go (expectJust "checkTauTvUpdate"
+ (tcView (TyConApp tc tys)))
-- Try again, expanding the synonym
}
\end{code}
-- Try again, expanding the synonym
}
\end{code}