
31 May
2007
31 May
'07
1:43 p.m.
Tomasz Zielonka wrote:
On Wed, May 30, 2007 at 11:21:45PM +0200, Roberto Zunino wrote:
($!) Data.List.repeat -- ;-) unbounded types
You got me - I'm not sure how to respond to that. Let's try: this function doesn't preserve computable equality.
Ah, silly me! I checked that inequality was preserved, but forgot that (==) diverges on infinite list! Indeed, strictly speaking, Eq [] does not satisfy the Eq invariant x==x.
BTW, why so many exclamation marks in your code? Are they essential?
Only strict g's are allowed in parametericity, IIUC. Otherwise: let g = \x -> (x,4) f (map g []) == g (f []) iff f [] == g bottom iff bottom == (bottom,4) which is false. Zun.