Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
f9853a3e
Commit
f9853a3e
authored
Feb 20, 2003
by
simonpj
Browse files
[project @ 2003-02-20 13:01:20 by simonpj]
Eliminate brain-dead outputC pattern-match failure
parent
5b7c931a
Changes
2
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/deSugar/DsForeign.lhs
View file @
f9853a3e
...
...
@@ -66,6 +66,8 @@ type Binding = (Id, CoreExpr) -- No rec/nonrec structure;
dsForeigns :: [TypecheckedForeignDecl]
-> DsM (ForeignStubs, [Binding])
dsForeigns []
= returnDs (NoStubs, [])
dsForeigns fos
= foldlDs combine (ForeignStubs empty empty [] [], []) fos
where
...
...
ghc/compiler/main/CodeOutput.lhs
View file @
f9853a3e
...
...
@@ -104,7 +104,7 @@ doOutput filenm io_action = bracket (openFile filenm WriteMode) hClose io_action
\begin{code}
outputC dflags filenm flat_absC
(stub_h_exists, _) dependencies
(F
oreign
S
tubs
_ _ ffi_decl_headers _ )
(stub_h_exists, _) dependencies
f
oreign
_s
tubs
= do dumpIfSet_dyn dflags Opt_D_dump_realC "Real C" (dumpRealC flat_absC)
-- figure out which header files to #include in the generated .hc file:
...
...
@@ -120,6 +120,10 @@ outputC dflags filenm flat_absC
c_includes <- getPackageCIncludes pkg_configs
let cmdline_includes = cmdlineHcIncludes dflags -- -#include options
ffi_decl_headers = case foreign_stubs of
NoStubs -> []
ForeignStubs _ _ fdhs _ -> fdhs
all_headers = c_includes
++ reverse cmdline_includes
++ reverse (map unpackFS ffi_decl_headers)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment