The lazy Show instance for GHC.Generics.U1 is confusing.

Ryan Scott ryan.gl.scott at gmail.com
Mon Nov 28 19:36:47 UTC 2016


I don't quite understand your objection (what is the value you're
showing?). But the Show U1 instance's laziness is deliberate. We
designed all of U1's instances to emulate those of Proxy so that in
the future, we could unify the datatypes in GHC.Generics with more
standard ecosystem definitions (i.e., replace U1 in favor of Proxy,
(:*:) with Product, (:+:) with Sum, etc.) See
https://ghc.haskell.org/trac/ghc/ticket/11650 for the discussion on
this.

Ryan S.


More information about the Libraries mailing list