diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2017-01-10 17:01:50 +0200 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2017-01-10 17:04:23 +0200 |
commit | 1a6bdca01b7ac214d8aca52927e14547395697e8 (patch) | |
tree | b895b9f72753d2ab662425cc982f2cc533c5a26d | |
parent | a8a714ea6787f5717ca3ddf0f81ebba8d7ccca4d (diff) | |
download | haskell-1a6bdca01b7ac214d8aca52927e14547395697e8.tar.gz |
Make HsIParamTy have a Located HsIPName
To simplify API Annotations.
Updates haddock submodule
-rw-r--r-- | compiler/hsSyn/HsTypes.hs | 2 | ||||
-rw-r--r-- | compiler/parser/Parser.y | 8 | ||||
-rw-r--r-- | compiler/typecheck/TcHsType.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/ghc-api/annotations/T10399.stdout | 1 | ||||
m--------- | utils/haddock | 0 |
5 files changed, 6 insertions, 7 deletions
diff --git a/compiler/hsSyn/HsTypes.hs b/compiler/hsSyn/HsTypes.hs index 53f200fab4..7dc3d1217f 100644 --- a/compiler/hsSyn/HsTypes.hs +++ b/compiler/hsSyn/HsTypes.hs @@ -497,7 +497,7 @@ data HsType name -- For details on above see note [Api annotations] in ApiAnnotation - | HsIParamTy HsIPName -- (?x :: ty) + | HsIParamTy (Located HsIPName) -- (?x :: ty) (LHsType name) -- Implicit parameters as they occur in contexts -- ^ -- > (?x :: ty) diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y index dfb67550b5..fadb8e7b57 100644 --- a/compiler/parser/Parser.y +++ b/compiler/parser/Parser.y @@ -1716,8 +1716,8 @@ ctype :: { LHsType RdrName } >> return (sLL $1 $> $ HsQualTy { hst_ctxt = $1 , hst_body = $3 }) } - | ipvar '::' type {% ams (sLL $1 $> (HsIParamTy (unLoc $1) $3)) - [mj AnnVal $1,mu AnnDcolon $2] } + | ipvar '::' type {% ams (sLL $1 $> (HsIParamTy $1 $3)) + [mu AnnDcolon $2] } | type { $1 } ---------------------- @@ -1741,8 +1741,8 @@ ctypedoc :: { LHsType RdrName } >> return (sLL $1 $> $ HsQualTy { hst_ctxt = $1 , hst_body = $3 }) } - | ipvar '::' type {% ams (sLL $1 $> (HsIParamTy (unLoc $1) $3)) - [mj AnnVal $1,mu AnnDcolon $2] } + | ipvar '::' type {% ams (sLL $1 $> (HsIParamTy $1 $3)) + [mu AnnDcolon $2] } | typedoc { $1 } ---------------------- diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs index 3fa6077456..c69de3ad5d 100644 --- a/compiler/typecheck/TcHsType.hs +++ b/compiler/typecheck/TcHsType.hs @@ -632,7 +632,7 @@ tc_hs_type mode (HsExplicitTupleTy _ tys) exp_kind arity = length tys --------- Constraint types -tc_hs_type mode (HsIParamTy n ty) exp_kind +tc_hs_type mode (HsIParamTy (L _ n) ty) exp_kind = do { MASSERT( isTypeLevel (mode_level mode) ) ; ty' <- tc_lhs_type mode ty liftedTypeKind ; let n' = mkStrLitTy $ hsIPNameFS n diff --git a/testsuite/tests/ghc-api/annotations/T10399.stdout b/testsuite/tests/ghc-api/annotations/T10399.stdout index 612ecfd734..0b37983ab2 100644 --- a/testsuite/tests/ghc-api/annotations/T10399.stdout +++ b/testsuite/tests/ghc-api/annotations/T10399.stdout @@ -10,7 +10,6 @@ ((Test10399.hs:10:1-35,AnnSemi), [Test10399.hs:12:1]), ((Test10399.hs:10:1-35,AnnType), [Test10399.hs:10:1-4]), ((Test10399.hs:10:12-35,AnnDcolon), [Test10399.hs:10:24-25]), -((Test10399.hs:10:12-35,AnnVal), [Test10399.hs:10:12-22]), ((Test10399.hs:12:1-66,AnnEqual), [Test10399.hs:12:8]), ((Test10399.hs:12:1-66,AnnFunId), [Test10399.hs:12:1-6]), ((Test10399.hs:12:1-66,AnnSemi), [Test10399.hs:14:1]), diff --git a/utils/haddock b/utils/haddock -Subproject b34497c36cd01a9c8a08ec3133ec94783642e43 +Subproject b19ea3ababeb231157c4a067c43003e09b1f018 |