summaryrefslogtreecommitdiff
path: root/compiler/deSugar/DsCCall.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2015-06-01 14:16:41 +0200
committerAlan Zimmerman <alan.zimm@gmail.com>2015-06-01 14:16:41 +0200
commite6191d1cc37e98785af8b309100ea840084fa3ba (patch)
tree94af94a1d98cf4bd5f7efd8bfc5d9696d3b02821 /compiler/deSugar/DsCCall.hs
parent7dd0ea7428379df848e3d13528921b39b7bf5b95 (diff)
downloadhaskell-e6191d1cc37e98785af8b309100ea840084fa3ba.tar.gz
ApiAnnotations : strings in warnings do not return SourceText
Summary: The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. This patch now deals with all remaining instances of getSTRING to bring in a SourceText for each. This updates the haddock submodule as well, for the AST change. Test Plan: ./validate Reviewers: hvr, austin, goldfire Reviewed By: austin Subscribers: bgamari, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D907 GHC Trac Issues: #10313
Diffstat (limited to 'compiler/deSugar/DsCCall.hs')
-rw-r--r--compiler/deSugar/DsCCall.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/deSugar/DsCCall.hs b/compiler/deSugar/DsCCall.hs
index 90121a0f5f..19ac062ce9 100644
--- a/compiler/deSugar/DsCCall.hs
+++ b/compiler/deSugar/DsCCall.hs
@@ -37,6 +37,7 @@ import TysPrim
import TyCon
import TysWiredIn
import BasicTypes
+import FastString ( unpackFS )
import Literal
import PrelNames
import VarSet
@@ -95,7 +96,7 @@ dsCCall lbl args may_gc result_ty
uniq <- newUnique
dflags <- getDynFlags
let
- target = StaticTarget lbl Nothing True
+ target = StaticTarget (unpackFS lbl) lbl Nothing True
the_fcall = CCall (CCallSpec target CCallConv may_gc)
the_prim_app = mkFCall dflags uniq the_fcall unboxed_args ccall_result_ty
return (foldr ($) (res_wrapper the_prim_app) arg_wrappers)