[GHC] #2258: ghc --cleanup

GHC ghc-devs at haskell.org
Mon Jan 4 14:05:22 UTC 2016


#2258: ghc --cleanup
-------------------------------------+-------------------------------------
        Reporter:  claus             |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  lowest            |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  6.8.2
      Resolution:                    |             Keywords:  newcomer
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #4114             |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by thomie):

 > Also, have I missed something?

 Maybe. Check out:
  * -dynamic
  * -dynamic-too
  * -dyno
  * -dynosuf

 * Should intermediate files also get deleted when using `--cleanup` to
 create shared libraries
 (https://downloads.haskell.org/~ghc/7.10.3/docs/html/users_guide/using-
 shared-libs.html)?

 * What happens on compilation failures. Say `A.hs` contains a syntax
 error, and imports `B.hs`. When running `ghc --cleanup A.hs`, `B.hs` gets
 compiled first, creating `B.hi` and `B.o`. Then `A.hs` fails to compile,
 because of the syntax error. Should `B.hi` and `B.o` get deleted?

 * Is `ghc --make --cleanup` allowed? Maybe the command line interface
 should be something like `ghc --make -cleanup` (so `-cleanup` would not be
 a mode flag, but a regular flag, just like for example `-keep-tmp-files`
 and `-outputdir`.).

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/2258#comment:27>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list