
5 Jun
2019
5 Jun
'19
3:47 a.m.
In the instance Show Foo, I mean "showsPrec" rather than "show".
2019년 6월 5일 (수) 16:45, Dannyu NDos
Shouldn't it be laws that "show" must be injective and "read" must be surjective? Without such laws, one could define:
data Foo = Foo instance Show Foo where show _ _ = id instance Read Foo where readPrec = pfail
which should be prevented.