[GHC] #9636: Function with type error accepted

GHC ghc-devs at haskell.org
Tue Oct 14 12:39:24 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):

 There may be a very easy solution to this problem.

 At the end of every closed type family, we could just automatically add an
 equation {{{Foo x y z = Error "Pattern match failure in closed type family
 `Foo'"}}}, where `Error` is the type-level error function from #9637. I
 think that would work quite well here.

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


More information about the ghc-tickets mailing list