Re: bug (?) in type checking of record update

Ross Paterson <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.bugs
Message-ID <[email protected]>
On Tue, Feb 04, 2003 at 11:00:16AM +0100, Johannes Waldmann wrote:
> wanna see a large Int in hugs? I mean Int, not Integer. 
> the program below gives this nice result:
> 
> Main> contents bug
> 1000000000000000000000000000000 :: Int
> 
> data Container a = 
>      Container   { contents :: a
> 		 , info :: String
> 		 } 
> 
> bug :: Container Int
> bug = let xs = 10^30
> 	  a = Container {  contents = xs , info = "foo" }
>       in  a { info = "bar" }

Definitely a bug in typing of record updates:

Bug> :t Container { contents = True , info = "foo" } { info = "bar" }
Container{contents = True, info = "foo"}{info = "bar"} :: Container a
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.