[GHC] #9636: Function with type error accepted

GHC ghc-devs at haskell.org
Fri Sep 26 21:43:58 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 dfeuer):

 Replying to [comment:2 augustss]:
 > I don't think a warning is right, I think it's an error.  I view closed
 type families as functions on types, and when you use a function you
 expect it to reduce to a normal form.  With a warning you're saying that T
 x is sometimes equal to some other type and sometimes it's a new type.
 That makes no sense to me.  It has nothing to do with being inhabited,
 uninhabited types are perfectly fine.

 This is not a realm I know anything about, but I agree. `T Bool` is not an
 uninhabited type—it's simply not a type. The situation for data families
 is qualitatively different, and it would probably make sense to offer such
 a warning for those.

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


More information about the ghc-tickets mailing list