[GHC] #14983: Have custom type errors imply Void

GHC ghc-devs at haskell.org
Thu Mar 29 04:27:50 UTC 2018


#14983: Have custom type errors imply Void
-------------------------------------+-------------------------------------
           Reporter:  Iceland_jack   |             Owner:  (none)
               Type:  task           |            Status:  new
           Priority:  lowest         |         Milestone:
          Component:  Compiler       |           Version:  8.5
           Keywords:                 |  Operating System:  Unknown/Multiple
  CustomTypeErrors                   |
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 This is a very minor issue, but `TypeError` (CustomTypeErrors) should
 entail a constraint like

 {{{#!hs
 import Data.Void

 class (forall x. x) => No where
   no :: Void
 }}}

 so users don't have to use `undefined` or `error ..`:

 {{{#!hs
 instance TypeError (Text "Can't show functions) => Show (a -> b) where
   show :: (a -> b) -> String
   show = no & absurd
 }}}

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


More information about the ghc-tickets mailing list