
#14983: Have custom type errors imply Void -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: task | Status: new Priority: lowest | Milestone: Component: Compiler | Version: 8.5 Resolution: | Keywords: | CustomTypeErrors Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by Iceland_jack: Old description:
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 }}}
New description: 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#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler