Re: Type family stopped compiling on upgrade from GHC 7.6.3 to 7.8.3

2014-07-26 Thread cheater00 .
Thanks all for the conversation, it seems that Simon fixed the bug before I could even report it, displaying his expectably excellent programming abilities. On Wed, Jul 23, 2014 at 5:22 PM, Richard Eisenberg wrote: > This seems to be a bug in GHC. I can write the Show instance manually: > > insta

Re: Type family stopped compiling on upgrade from GHC 7.6.3 to 7.8.3

2014-07-23 Thread Richard Eisenberg
This seems to be a bug in GHC. I can write the Show instance manually: instance (Show c, Show d) => Show (CmpInterval (V c) (V d)) where show (c `Interval` d) = show c ++ " `Interval` " ++ show d Perhaps you should file a bug report -- your code looks sensible to me. Richard On Jul 23, 2014,

Re: Type family stopped compiling on upgrade from GHC 7.6.3 to 7.8.3

2014-07-23 Thread cheater00 .
Dear all, while still not understanding kinds and type families well enough, my random explorations have led me to finding syntax which currently is accepted in 7.8.3 but seems to be surprising as well. This is to mean the code is probably bogus, but GHC somehow manages not to notice. If I write:

RE: Type family stopped compiling on upgrade from GHC 7.6.3 to 7.8.3

2014-07-22 Thread cheater00 .
Indeed, I hadn't come to use that at the type level; the original code used my own types which ended up holding LocalTime; I used Float as a simplification as it displayed the same weird behaviour. I guess in the act of randomly walking parseable type family code I have inadvertently unearthed a b

RE: Type family stopped compiling on upgrade from GHC 7.6.3 to 7.8.3

2014-07-22 Thread Simon Peyton Jones
I don't know why 7.6.3 accepts it. 'Float' is a valid type but not a valid kind. For it to be a useful kind we'd need float literal at the type level, and we have no such thing. You can use Nat instead, which does exist at the type level. Simon | -Original Message- | From: Glasgow-h