Commit 54c309c0 authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.
Browse files

Some more ASSERTs

Wed Sep 20 02:52:00 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
  * Some more ASSERTs
parent defa8d16
......@@ -368,7 +368,8 @@ data LookupTyVarResult -- The result of a lookupTcTyVar call
lookupTcTyVar :: TcTyVar -> TcM LookupTyVarResult
lookupTcTyVar tyvar
= case details of
= ASSERT( isTcTyVar tyvar )
case details of
SkolemTv _ -> return (DoneTv details)
MetaTv _ ref -> do { meta_details <- readMutVar ref
; case meta_details of
......
......@@ -399,6 +399,7 @@ mkKindName unique = mkSystemName unique kind_var_occ
kindVarRef :: KindVar -> IORef MetaDetails
kindVarRef tc =
ASSERT ( isTcTyVar tc )
case tcTyVarDetails tc of
MetaTv TauTv ref -> ref
other -> pprPanic "kindVarRef" (ppr tc)
......@@ -472,7 +473,8 @@ pprSkolTvBinding :: TcTyVar -> SDoc
-- Print info about the binding of a skolem tyvar,
-- or nothing if we don't have anything useful to say
pprSkolTvBinding tv
= ppr_details (tcTyVarDetails tv)
= ASSERT ( isTcTyVar tv )
ppr_details (tcTyVarDetails tv)
where
ppr_details (MetaTv TauTv _) = quotes (ppr tv) <+> ptext SLIT("is a meta type variable")
ppr_details (MetaTv BoxTv _) = quotes (ppr tv) <+> ptext SLIT("is a boxy type variable")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment