diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2015-12-30 18:51:53 +0200 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2015-12-31 11:52:52 +0200 |
commit | 25e4556d97429e95ddb5972f6e7e6599ef902e9c (patch) | |
tree | 1a17292a9fcf9f91e0dce42d1d70f4e6bded12d7 | |
parent | bb7f2e33197e667eb694bd1243f125c722a0a868 (diff) | |
download | haskell-25e4556d97429e95ddb5972f6e7e6599ef902e9c.tar.gz |
Various API Annotations fixes
- Export unicodeAnn from GHC
- unicodeAnn for Annlarrowtail was wrong
- Use actual source for a CImport SourceText
-rw-r--r-- | compiler/main/GHC.hs | 1 | ||||
-rw-r--r-- | compiler/parser/ApiAnnotation.hs | 2 | ||||
-rw-r--r-- | compiler/parser/RdrHsSyn.hs | 2 | ||||
-rw-r--r-- | 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 0ac1331d26..666ff49c3b 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 b5214c17b3..73490e4fc5 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 f423c6e71b..0f380862a4 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 ac32549858..011867e0d8 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]), |