🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.functional
Article #771

Re: Type Inference in Standard ML

#771
From: Thomas Hallgren
Date: Sun, 13 Jan 1991 00:24
37 lines
1365 bytes
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
Technical Details
Message-ID: <4353@undis.cs.chalmers.se>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!chalmers.se!cs.chalmers.se!hallgren
References: <54161@eerie.acsu.Buffalo.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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