
20 Jan
2007
20 Jan
'07
5:52 a.m.
Lennart Augustsson wrote:
And this is why some of us think that adding polymorphic seq to Haskell was a mistake. :(
To ease the pain, (oca)ML has the same problem/feature: function types are lifted: let rec f (x : int) : int = f x ;; let g y = let x = 1 / 0 in f ;; let const y = 1 ;; # const f ;; - : int = 1 # const (g 1) ;; Exception: Division_by_zero. The reason is, of course, that one cannot be strict in a function argument (taking _|_ = \x -> _|_) because this is undecidable (and nonsense with extensional equality). But because the ML-equivalent of (.) is strict, it still does a correct internalization of morphism composition. Regards, apfelmus