summaryrefslogtreecommitdiff
path: root/compiler/deSugar/DsForeign.lhs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2014-11-21 11:20:06 -0600
committerAustin Seipp <austin@well-typed.com>2014-11-21 11:26:10 -0600
commit7927658ed1dcf557c7dd78e4b9844100521391c8 (patch)
tree16a5978453233ba0889af5fa3e59a60b42bc0bfc /compiler/deSugar/DsForeign.lhs
parentcfa574cea30b411080de5d641309bdf135ed9be5 (diff)
downloadhaskell-7927658ed1dcf557c7dd78e4b9844100521391c8.tar.gz
AST changes to prepare for API annotations, for #9628
Summary: AST changes to prepare for API annotations Add locations to parts of the AST so that API annotations can then be added. The outline of the whole process is captured here https://ghc.haskell.org/trac/ghc/wiki/GhcAstAnnotations This change updates the haddock submodule. Test Plan: sh ./validate Reviewers: austin, simonpj, Mikolaj Reviewed By: simonpj, Mikolaj Subscribers: thomie, goldfire, carter Differential Revision: https://phabricator.haskell.org/D426 GHC Trac Issues: #9628
Diffstat (limited to 'compiler/deSugar/DsForeign.lhs')
-rw-r--r--compiler/deSugar/DsForeign.lhs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/deSugar/DsForeign.lhs b/compiler/deSugar/DsForeign.lhs
index 311069ec67..660cbf0231 100644
--- a/compiler/deSugar/DsForeign.lhs
+++ b/compiler/deSugar/DsForeign.lhs
@@ -107,7 +107,8 @@ dsForeigns' fos = do
traceIf (text "fi end" <+> ppr id)
return (h, c, [], bs)
- do_decl (ForeignExport (L _ id) _ co (CExport (CExportStatic ext_nm cconv))) = do
+ do_decl (ForeignExport (L _ id) _ co
+ (CExport (L _ (CExportStatic ext_nm cconv)) _)) = do
(h, c, _, _) <- dsFExport id co ext_nm cconv False
return (h, c, [id], [])
\end{code}
@@ -142,8 +143,8 @@ dsFImport :: Id
-> Coercion
-> ForeignImport
-> DsM ([Binding], SDoc, SDoc)
-dsFImport id co (CImport cconv safety mHeader spec) = do
- (ids, h, c) <- dsCImport id co spec cconv safety mHeader
+dsFImport id co (CImport cconv safety mHeader spec _) = do
+ (ids, h, c) <- dsCImport id co spec (unLoc cconv) (unLoc safety) mHeader
return (ids, h, c)
dsCImport :: Id