projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8ad206
)
Allow spaces at either end of the C import spec (#3742)
author
Simon Marlow
<marlowsd@gmail.com>
Thu, 10 Dec 2009 12:45:37 +0000
(12:45 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Thu, 10 Dec 2009 12:45:37 +0000
(12:45 +0000)
compiler/parser/RdrHsSyn.lhs
patch
|
blob
|
history
diff --git
a/compiler/parser/RdrHsSyn.lhs
b/compiler/parser/RdrHsSyn.lhs
index
fdf97bc
..
49a0946
100644
(file)
--- a/
compiler/parser/RdrHsSyn.lhs
+++ b/
compiler/parser/RdrHsSyn.lhs
@@
-1002,13
+1002,17
@@
parseCImport cconv safety nm str =
listToMaybe $ map fst $ filter (null.snd) $
readP_to_S parse str
where
- parse = choice [
+ parse = do
+ skipSpaces
+ r <- choice [
string "dynamic" >> return (mk nilFS (CFunction DynamicTarget)),
string "wrapper" >> return (mk nilFS CWrapper),
optional (string "static" >> skipSpaces) >>
(mk nilFS <$> cimp nm) +++
(do h <- munch1 hdr_char; skipSpaces; mk (mkFastString h) <$> cimp nm)
- ]
+ ]
+ skipSpaces
+ return r
mk = CImport cconv safety