[GHC] #13773: Types are not normalized in instance declarations

GHC ghc-devs at haskell.org
Wed Feb 21 13:42:36 UTC 2018


#13773: Types are not normalized in instance declarations
-------------------------------------+-------------------------------------
        Reporter:  augustss          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by chshersh):

 I actually encountered complex use case and find this issue annoying. I'm
 working on library for type-safe time-units which are represented using
 type level rational numbers. See example here:

 *
 https://github.com/serokell/o-clock/blob/dd5026264c667feee49e2b70396a170c87470c05/src/Time/Units.hs#L89-L99

 And here what I need to write in order to implement nice and pretty show
 instance for those time units:

 *
 https://github.com/serokell/o-clock/blob/dd5026264c667feee49e2b70396a170c87470c05/src/Time/Units.hs#L123-L136

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


More information about the ghc-tickets mailing list