diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-04-14 09:21:00 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-04-14 09:22:02 +0100 |
commit | 25f2d68849288a57ae4c6ce492f9e0bdd6df83bb (patch) | |
tree | 8e79b5d59df0e39ce0373de1b878d2059c8efe08 | |
parent | d261d4cbcc867405f71d7c9580628f52978e2267 (diff) | |
download | haskell-25f2d68849288a57ae4c6ce492f9e0bdd6df83bb.tar.gz |
Comments only
-rw-r--r-- | compiler/hsSyn/HsTypes.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/compiler/hsSyn/HsTypes.hs b/compiler/hsSyn/HsTypes.hs index 8c7a5243b9..ebd3bd4847 100644 --- a/compiler/hsSyn/HsTypes.hs +++ b/compiler/hsSyn/HsTypes.hs @@ -417,7 +417,7 @@ After renaming Qualified currently behaves exactly as Implicit, but it is deprecated to use it for implicit quantification. In this case, GHC 7.10 gives a warning; see -Note [Context quantification] and Trac #4426. +Note [Context quantification] in RnTypes, and Trac #4426. In GHC 7.12, Qualified will no longer bind variables and this will become an error. @@ -506,7 +506,12 @@ data HsTupleSort = HsUnboxedTuple | HsBoxedOrConstraintTuple deriving (Data, Typeable) -data HsExplicitFlag = Qualified | Implicit | Explicit deriving (Data, Typeable) +data HsExplicitFlag + = Explicit -- An explicit forall, eg f :: forall a. a-> a + | Implicit -- No explicit forall, eg f :: a -> a, or f :: Eq a => a -> a + | Qualified -- A *nested* occurrences of (ctxt => ty), with no explicit forall + -- e.g. f :: (Eq a => a -> a) -> Int + deriving (Data, Typeable) type LConDeclField name = Located (ConDeclField name) -- ^ May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when @@ -571,6 +576,8 @@ Qualified `plus` Qualified = Qualified Explicit `plus` _ = Explicit _ `plus` Explicit = Explicit _ `plus` _ = Implicit + -- NB: Implicit `plus` Qualified = Implicit + -- so that f :: Eq a => a -> a ends up Implicit hsExplicitTvs :: LHsType Name -> [Name] -- The explicitly-given forall'd type variables of a HsType |