diff options
author | Jose Pedro Magalhaes <jpm@cs.ox.ac.uk> | 2013-04-24 13:03:55 +0100 |
---|---|---|
committer | Jose Pedro Magalhaes <jpm@cs.ox.ac.uk> | 2013-04-24 13:03:55 +0100 |
commit | 4ff74138a4b6e81c5e28b0f8ad23e3ce20466566 (patch) | |
tree | 2695a110294ddadfbeeac2368483c99a9ebdf1cb /compiler | |
parent | be0b1dffb0a3aa73720b4de8887b837430bffcce (diff) | |
download | haskell-4ff74138a4b6e81c5e28b0f8ad23e3ce20466566.tar.gz |
Allow deriving Generic for polykinded phantom types
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/typecheck/TcGenGenerics.lhs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/typecheck/TcGenGenerics.lhs b/compiler/typecheck/TcGenGenerics.lhs index b058c283d7..c737a5f320 100644 --- a/compiler/typecheck/TcGenGenerics.lhs +++ b/compiler/typecheck/TcGenGenerics.lhs @@ -213,10 +213,10 @@ canDoGenerics tc tc_args (if (not (null (tyConStupidTheta tc))) then (Just (tc_name <+> text "must not have a datatype context")) else Nothing) : - -- The type should not be instantiated (see #5939) + -- The type arguments should not be instantiated (see #5939) -- Data family indices can be instantiated; the `tc_args` here are the -- representation tycon args - (if (all isTyVarTy tc_args) + (if (all isTyVarTy (filterOut isKindTy tc_args)) then Nothing else Just (tc_name <+> text "must not be instantiated;" <+> text "try deriving `" <> tc_name <+> tc_tys <> |