Skip to content

Commit

Permalink
Fix Trac #3066: checking argument types in foreign calls
Browse files Browse the repository at this point in the history
When checking argument types in a foreign call we were stupidly
looking through foralls.  The fix is easy.

Merge to 6.10.2
  • Loading branch information
simonpj@microsoft.com committed Mar 3, 2009
1 parent 22eefb5 commit 371d661
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compiler/typecheck/TcType.lhs
Expand Up @@ -1268,8 +1268,9 @@ checkRepTyCon :: (TyCon -> Bool) -> Type -> Bool
-- newtype T = MkT (Ptr T)
-- and wanted it to work...
checkRepTyCon check_tc ty
| Just (tc,_) <- splitTyConApp_maybe (repType ty) = check_tc tc
| otherwise = False
| Just (ty', _) <- splitNewTypeRepCo_maybe ty = checkRepTyCon check_tc ty'
| Just (tc,_) <- splitTyConApp_maybe ty = check_tc tc
| otherwise = False
checkRepTyConKey :: [Unique] -> Type -> Bool
-- Like checkRepTyCon, but just looks at the TyCon key
Expand Down

0 comments on commit 371d661

Please sign in to comment.