[GHC] #9252: Generalize hs-boot files to be more like module signatures

GHC ghc-devs at haskell.org
Mon Jun 30 15:52:07 UTC 2014


#9252: Generalize hs-boot files to be more like module signatures
------------------------------------+-------------------------------------
       Reporter:  ezyang            |             Owner:  ezyang
           Type:  feature request   |            Status:  new
       Priority:  normal            |         Milestone:
      Component:  Compiler          |           Version:  7.8.2
       Keywords:  backpack          |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+-------------------------------------
 Right now, `hs-boot` is used solely to support mutually recursive modules.
 However, as [wiki:Backpack Backpack] has shown, signatures are an
 essential part of separate modular development, and since hs-boot files
 are essentially module signatures, it would be good to move away from "hs-
 boot as a technical mechanism to make mutual recursion to work" to "hsig
 as a module signature useful for separate modular development and mutual
 recursion."

 Here are some of the things that this would entail:

 1. Introduce hsig as a valid alternate file suffix to hs-boot (similarly
 have hisig for hi-boot; the plan being to eventually deprecate the hs-boot
 prefix)

 2. Given an hsig file corresponding to a module in the current package
 database (but not from the currently being compiled package), check if the
 corresponding module implements the signature (this is the reverse of the
 current check we do for hs-boot files, which occurs when we typecheck the
 module, as opposed to the hs-boot file.)

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


More information about the ghc-tickets mailing list