Path: utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!chalmers.se!cs.chalmers.se!hallgren From: hallgren@cs.chalmers.se (Thomas Hallgren) Newsgroups: comp.lang.functional Subject: Re: Type Inference in Standard ML Message-ID: <4353@undis.cs.chalmers.se> Date: 13 Jan 91 00:24:07 GMT References: <54161@eerie.acsu.Buffalo.EDU> Sender: news@cs.chalmers.se Organization: Dept. of CS, Chalmers, Sweden Lines: 37 In article <54161@eerie.acsu.Buffalo.EDU> avnaik@sybil.cs.Buffalo.EDU (Ashish V Naik) writes: > > > I would like to draw your attention to an example for which it appears >that the type inference done by ML interpreter is incorrect . > Consider the following session that I had with the Standard Edinburgh >ML interpreter , ... >Can someone please clarify ? Am I missing out something ? > >Thanks , > >Ashish Naik There seems to be a bug in the Edinburgh implementation. Here's another example: - fun equal a b = [a]=[b]; > val equal = fn : 'a -> ('a -> bool) - equal sin sin; > true : bool - equal sin cos; > false : bool - equal sin (fn x => sin x); > false : bool I tried the same thing in the New Jersey implementation of ML, but it seems to work: - fun equal a b = [a]=[b]; val equal = fn : ''a -> ''a -> bool Thomas Hallgren Thomas Hallgren hallgren@cs.chalmers.se