diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-12-11 16:35:38 +0000 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-12-11 16:35:38 +0000 |
commit | 497cb612ec598aa925fc33042ca0e49e59066af1 (patch) | |
tree | 88f3113cea270420893626971d43a8ff95854a24 /compiler | |
parent | ecd967612877e1965ddebefe9b83acd837bb413a (diff) | |
parent | d68411496b1cad0e2e912875f32457372b5c2fcd (diff) | |
download | haskell-497cb612ec598aa925fc33042ca0e49e59066af1.tar.gz |
Merge branch 'master' of http://darcs.haskell.org/ghc
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/typecheck/TcGenGenerics.lhs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/typecheck/TcGenGenerics.lhs b/compiler/typecheck/TcGenGenerics.lhs index d1746fe473..0109a99e3c 100644 --- a/compiler/typecheck/TcGenGenerics.lhs +++ b/compiler/typecheck/TcGenGenerics.lhs @@ -324,17 +324,15 @@ canDoGenerics1_w rep_tc representable ty = case tcSplitTyConApp_maybe ty of Nothing -> return Nothing -- if it's a type constructor, it has to be representable - Just (tc, tc_args) -> do + Just (tc, _) -> do let n = tyConName tc s <- S.get -- internally assume that recursive occurrences are OK if n `elem` s then return Nothing else do S.put (n : s) - fmap {-maybe-} (\_ -> bad_app tc) -- don't give the message, just name what wasn't representable - `fmap` {-state-} case canDoGenerics tc tc_args of - j@(Just _) -> return j - -- only check Generic1 if it passes Generic - Nothing -> canDoGenerics1_w tc + fmap {-maybe-} (\_ -> bad_app tc) -- don't give the message, just + -- name what wasn't representable + `fmap` {-state-} canDoGenerics1_w tc existential = (ptext . sLit) "must not have existential arguments" covariant = (ptext . sLit) "must not use the last type parameter in a function argument" |