[GHC] #11967: Custom message when showing functions, comparing functions, ...

GHC ghc-devs at haskell.org
Fri Apr 22 07:50:01 UTC 2016


#11967: Custom message when showing functions, comparing functions, ...
-------------------------------------+-------------------------------------
           Reporter:  Iceland_jack   |             Owner:
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  7.10.3
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 One of the
 [https://ghc.haskell.org/trac/ghc/wiki/Proposal/CustomTypeErrors#Examples
 examples] of type errors:

 {{{#!hs
 instance TypeError (Text "Cannot 'Show' functions." :$$:
                     Text "Perhaps there is a missing argument?")
          => Show (a -> b) where
    showsPrec = error "unreachable"
 }}}

 We already have
 [https://hackage.haskell.org/package/base-4.8.2.0/docs/src/Text.Show.Functions.html
 Text.Show.Functions], is there a place in `base` for this along with `Ord
 (a -> b)` instances and co.

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


More information about the ghc-tickets mailing list