[commit: ghc] master: Various API Annotations fixes (25e4556)
git at git.haskell.org
git at git.haskell.org
Thu Dec 31 09:51:59 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/25e4556d97429e95ddb5972f6e7e6599ef902e9c/ghc
>---------------------------------------------------------------
commit 25e4556d97429e95ddb5972f6e7e6599ef902e9c
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date: Wed Dec 30 18:51:53 2015 +0200
Various API Annotations fixes
- Export unicodeAnn from GHC
- unicodeAnn for Annlarrowtail was wrong
- Use actual source for a CImport SourceText
>---------------------------------------------------------------
25e4556d97429e95ddb5972f6e7e6599ef902e9c
compiler/main/GHC.hs | 1 +
compiler/parser/ApiAnnotation.hs | 2 +-
compiler/parser/RdrHsSyn.hs | 2 +-
testsuite/tests/ghc-api/annotations/T11018.stdout | 2 +-
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs
index 0ac1331..666ff49 100644
--- a/compiler/main/GHC.hs
+++ b/compiler/main/GHC.hs
@@ -272,6 +272,7 @@ module GHC (
ApiAnns,AnnKeywordId(..),AnnotationComment(..),
getAnnotation, getAndRemoveAnnotation,
getAnnotationComments, getAndRemoveAnnotationComments,
+ unicodeAnn,
-- * Miscellaneous
--sessionHscEnv,
diff --git a/compiler/parser/ApiAnnotation.hs b/compiler/parser/ApiAnnotation.hs
index b5214c1..73490e4 100644
--- a/compiler/parser/ApiAnnotation.hs
+++ b/compiler/parser/ApiAnnotation.hs
@@ -324,7 +324,7 @@ unicodeAnn AnnDcolon = AnnDcolonU
unicodeAnn AnnLarrow = AnnLarrowU
unicodeAnn AnnRarrow = AnnRarrowU
unicodeAnn AnnDarrow = AnnDarrowU
-unicodeAnn Annlarrowtail = AnnLarrowtailU
+unicodeAnn Annlarrowtail = AnnlarrowtailU
unicodeAnn Annrarrowtail = AnnrarrowtailU
unicodeAnn AnnLarrowtail = AnnLarrowtailU
unicodeAnn AnnRarrowtail = AnnRarrowtailU
diff --git a/compiler/parser/RdrHsSyn.hs b/compiler/parser/RdrHsSyn.hs
index f423c6e..0f38086 100644
--- a/compiler/parser/RdrHsSyn.hs
+++ b/compiler/parser/RdrHsSyn.hs
@@ -1268,7 +1268,7 @@ mkImport (L lc cconv) (L ls safety) (L loc (StringLiteral esrc entity), v, ty)
| cconv == PrimCallConv = do
let funcTarget = CFunction (StaticTarget esrc entity Nothing True)
importSpec = CImport (L lc PrimCallConv) (L ls safety) Nothing funcTarget
- (L loc (unpackFS entity))
+ (L loc esrc)
return (ForD (ForeignImport { fd_name = v, fd_sig_ty = ty
, fd_co = noForeignImportCoercionYet
, fd_fi = importSpec }))
diff --git a/testsuite/tests/ghc-api/annotations/T11018.stdout b/testsuite/tests/ghc-api/annotations/T11018.stdout
index ac32549..011867e 100644
--- a/testsuite/tests/ghc-api/annotations/T11018.stdout
+++ b/testsuite/tests/ghc-api/annotations/T11018.stdout
@@ -142,7 +142,7 @@
((Test11018.hs:43:11-17,AnnOpenP), [Test11018.hs:43:11]),
((Test11018.hs:43:12,AnnComma), [Test11018.hs:43:13]),
((Test11018.hs:43:14,AnnComma), [Test11018.hs:43:15]),
-((Test11018.hs:43:22-34,AnnLarrowtailU), [Test11018.hs:43:30]),
+((Test11018.hs:43:22-34,AnnlarrowtailU), [Test11018.hs:43:30]),
((Test11018.hs:43:32-34,AnnVal), [Test11018.hs:43:33]),
((Test11018.hs:45:1-36,AnnDcolon), [Test11018.hs:45:5-6]),
((Test11018.hs:45:1-36,AnnSemi), [Test11018.hs:46:1]),
More information about the ghc-commits
mailing list