[commit: ghc] ghc-8.0: Store string as parsed in SourceText for CImport (812d9f7)

git at git.haskell.org git at git.haskell.org
Fri Dec 2 16:00:53 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/812d9f7f5882287f0121b8be3b446f3ee7c271ab/ghc

>---------------------------------------------------------------

commit 812d9f7f5882287f0121b8be3b446f3ee7c271ab
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Tue Nov 29 21:06:52 2016 +0200

    Store string as parsed in SourceText for CImport
    
    (cherry picked from commit 36e36227e438d95fae367d10183ea43b4819854f)


>---------------------------------------------------------------

812d9f7f5882287f0121b8be3b446f3ee7c271ab
 compiler/parser/RdrHsSyn.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/parser/RdrHsSyn.hs b/compiler/parser/RdrHsSyn.hs
index d79ac66..5c55127 100644
--- a/compiler/parser/RdrHsSyn.hs
+++ b/compiler/parser/RdrHsSyn.hs
@@ -1288,7 +1288,7 @@ mkImport cconv safety (L loc (StringLiteral esrc entity), v, ty) =
     -- name (cf section 8.5.1 in Haskell 2010 report).
     mkCImport = do
       let e = unpackFS entity
-      case parseCImport cconv safety (mkExtName (unLoc v)) e (L loc e) of
+      case parseCImport cconv safety (mkExtName (unLoc v)) e (L loc esrc) of
         Nothing         -> parseErrorSDoc loc (text "Malformed entity string")
         Just importSpec -> returnSpec importSpec
 



More information about the ghc-commits mailing list