summaryrefslogtreecommitdiff
path: root/compiler/parser
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/parser')
-rw-r--r--compiler/parser/Parser.y.pp4
-rw-r--r--compiler/parser/RdrHsSyn.lhs10
2 files changed, 7 insertions, 7 deletions
diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp
index bb370978c4..62fdeddf28 100644
--- a/compiler/parser/Parser.y.pp
+++ b/compiler/parser/Parser.y.pp
@@ -741,8 +741,8 @@ tycl_hdr :: { Located (Maybe (LHsContext RdrName), LHsType RdrName) }
| type { L1 (Nothing, $1) }
capi_ctype :: { Maybe CType }
-capi_ctype : '{-# CTYPE' STRING STRING '#-}' { Just (CType (Just (getSTRING $2)) (getSTRING $3)) }
- | '{-# CTYPE' STRING '#-}' { Just (CType Nothing (getSTRING $2)) }
+capi_ctype : '{-# CTYPE' STRING STRING '#-}' { Just (CType (Just (Header (getSTRING $2))) (getSTRING $3)) }
+ | '{-# CTYPE' STRING '#-}' { Just (CType Nothing (getSTRING $2)) }
| { Nothing }
-----------------------------------------------------------------------------
diff --git a/compiler/parser/RdrHsSyn.lhs b/compiler/parser/RdrHsSyn.lhs
index 56c643d190..890c3794d1 100644
--- a/compiler/parser/RdrHsSyn.lhs
+++ b/compiler/parser/RdrHsSyn.lhs
@@ -916,7 +916,7 @@ mkImport :: CCallConv
mkImport cconv safety (L loc entity, v, ty)
| cconv == PrimCallConv = do
let funcTarget = CFunction (StaticTarget entity Nothing)
- importSpec = CImport PrimCallConv safety nilFS funcTarget
+ importSpec = CImport PrimCallConv safety Nothing funcTarget
return (ForD (ForeignImport v ty noForeignImportCoercionYet importSpec))
| otherwise = do
@@ -936,11 +936,11 @@ parseCImport cconv safety nm str =
parse = do
skipSpaces
r <- choice [
- string "dynamic" >> return (mk nilFS (CFunction DynamicTarget)),
- string "wrapper" >> return (mk nilFS CWrapper),
+ string "dynamic" >> return (mk Nothing (CFunction DynamicTarget)),
+ string "wrapper" >> return (mk Nothing CWrapper),
optional (string "static" >> skipSpaces) >>
- (mk nilFS <$> cimp nm) +++
- (do h <- munch1 hdr_char; skipSpaces; mk (mkFastString h) <$> cimp nm)
+ (mk Nothing <$> cimp nm) +++
+ (do h <- munch1 hdr_char; skipSpaces; mk (Just (Header (mkFastString h))) <$> cimp nm)
]
skipSpaces
return r