[GHC] #9804: Layering: Suspicious dependency from Parser to TcEvidence

GHC ghc-devs at haskell.org
Mon Nov 17 10:51:55 UTC 2014


#9804: Layering: Suspicious dependency from Parser to TcEvidence
-------------------------------------+-------------------------------------
              Reporter:  rodlogic    |            Owner:
                  Type:  bug         |           Status:  closed
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.8.3
            Resolution:  invalid     |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by rodlogic):

 I see.

 Considering that the typechecker (and possibly the parser and renamer)
 augment the HsSyn syntax tree, there is another option that is not as
 invasive as the ones you mentioned above: separate these typechecker
 decorators into a minimal, lower-level 'TcSyn' module or package. At least
 HsSyn modules can import these decorators without risks.

 Maybe these dependencies are already carefully layered this way? Even if
 they are, the current folder layout gives no indication of this layering
 and cycles are bound to be introduced over time by unsuspecting
 contributors. I raised this issue motivated by the experience of trying to
 run the parser/lexer in isolation (granted, for reasons unrelated to the
 type checker) and suddenly having to compile hundreds of modules when
 conceptually parser and lexer should be fairly lower-level components (I
 am new to the code base so there is also a good chance that part of this
 is my own ignorance).

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


More information about the ghc-tickets mailing list