[GHC] #9636: Function with type error accepted

GHC ghc-devs at haskell.org
Wed Oct 1 09:03:29 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 simonpj):

 So, to be concrete, if I write:
 {{{
 foo :: Either (T a) a -> a
 foo (Right x) = x
 }}}
 then you would like `(foo (Right True))` to signal a type error.

 Simon

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


More information about the ghc-tickets mailing list