[GHC] #9636: Function with type error accepted

GHC ghc-devs at haskell.org
Fri Sep 26 19:26:32 UTC 2014


#9636: Function with type error accepted
-------------------------------------+-------------------------------------
              Reporter:  augustss    |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.8.3
            Resolution:              |         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 goldfire):

 Simon and I chatted about this this morning and we thought that your
 program is a little suspect, perhaps, but not type-incorrect. After all,
 `T Bool` is inhabited, by `undefined`. To me, suggesting that `T Bool` is
 unequivocally an error is somewhat like saying `Void` is an error.

 On the other hand, writing `T Bool` is probably a mistake. We thought a
 good solution here would be to report a warning in this case.
 Specifically, warn whenever a closed type family is called on arguments
 that are apart from all the family's left-hand sides. Would that be a good
 solution?

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


More information about the ghc-tickets mailing list