
#13237: Extend TH with addModCStub -------------------------------------+------------------------------------- Reporter: | Owner: facundo.dominguez | facundo.dominguez Type: feature request | Status: patch Priority: normal | Milestone: 8.2.1 Component: Template Haskell | Version: 8.0.1 Resolution: | Keywords: inline-c Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D3106 Wiki Page: | -------------------------------------+------------------------------------- Comment (by facundo.dominguez): Suppose we compile this module. {{{ module A where do addCStub "#include \"header.h\"" return [] }}} How does GHC know to recompile `A.hs` when `header.h` changes. Yes, the hash in `A.hi` includes the old contents in `header.h`, but that doesn't seem to cause GHC to notice that `header.h` changed. For the use case of inline-c, `addCStub` doesn't need to do more. The user won't call it directly. But if you know of other use cases it would be great to learn of them. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13237#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler