[clean-list] Serious bug in the type system
Cristian Baboi
cristi at ot.onrc.ro
Mon Dec 17 07:51:40 MET 2007
module t
import StdEnv
ohoh :: *{#Char} -> ( {#Char}, {#Char} )
ohoh arr #! arr1=arr
#! arr2=(update arr 0 'a')
=(arr1, arr2)
Start = ohoh "xyz"
The above return the same result.
On Sat, 15 Dec 2007 15:10:23 +0200, Edsko de Vries <devriese at cs.tcd.ie>
wrote:
> Hi,
>
> I was working on the background section to my thesis and was exploring
> how the
> single-threaded polymorphic lambda calculus deals with strict
> application, and
> how this cannot really be properly dealt with in uniquenes typing or
> linear
> logic (we need some hacks to make it work). This got me thinking about
> exactly
> which hacks we need, and it turns out that the mechanism that is used in
> Clean
> is not good enough! The following program is referentially opaque (not
> referentially transparent) *but passes the typechecker*:
>
> module t
>
> import StdEnv
>
> ohoh :: *{#Char} -> *(*{#Char}, {#Char})
> ohoh arr
> #! arr` = arr
> = (update arr 0 'a', arr`)
> Start = ohoh {'x', 'y', 'z'}
>
> The output of this program is
>
> ("ayz", "ayz")
>
> Edsko
> _______________________________________________
> clean-list mailing list
> clean-list at science.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/clean-list
>
>
> ________ Information from NOD32 ________
> This message was checked by NOD32 Antivirus System for Linux Mail
> Servers.
> part000.txt - is OK
> http://www.eset.com
________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Servers.
part000.txt - is OK
http://www.eset.com
More information about the clean-list
mailing list