Re: Forall and type synonyms in GHC 7.0

2010-11-01 Thread Bas van Dijk
On Mon, Nov 1, 2010 at 4:30 AM, Mario Blažević mblaze...@stilo.com wrote:     Before uploading a new version of my project on Hackage, I decided to future-proof it against GHC 7.0. I ran into several compile errors caused by the changes in let generalization, but these were easy to fix by

RE: Type error in GHC-7 but not in GHC-6.12.3

2010-11-01 Thread Simon Peyton-Jones
| foo :: (forall s. ST s a) - a | foo st = ($) runST st This is a motivating example for type inference that can deal with impredicative types. Consider the type of ($): ($) :: forall p q. (p-q) - p - q In the example we need to instantiate 'p' with (forall s. ST s a), and that's what

RE: Type error in GHC-7 but not in GHC-6.12.3

2010-11-01 Thread Simon Peyton-Jones
OK now I see. You are using impredicative polymorphism. As I mentioned in my last message I've simplified the treatment of impredicativity to follow (more or less) QML: http://research.microsoft.com/en-us/um/people/crusso/qml/ In the call to useWhich useWhich devs withDevice p f

Re: Wadler space leak

2010-11-01 Thread Simon Marlow
On 28/10/2010 14:21, Bertram Felgenhauer wrote: Hi, let (first,rest) = break (const False) input in print (length (first ++ rest)) When I compile this program using -O2 and use a large text file as input the code runs in constant space. If I understand correctly, the program runs in

haskell98 package not linked by default in 7.0.1 (was: Re: making 7.01-pre)

2010-11-01 Thread Simon Marlow
On 30/10/2010 16:52, David Fox wrote: On Sat, Oct 30, 2010 at 4:43 AM, Serge D. Mechvelianimech...@botik.ru wrote: Dear GHC developers, I am testing this fresh ghc-7.0.0.20101028 on Debian Linux, i386-family. Making it from source by ghc-6.12.3 is all right. Then, making it from source by

Re: new-www

2010-11-01 Thread Brent Yorgey
On Sat, Oct 30, 2010 at 01:08:50PM +0400, Serge D. Mechveliani wrote: People, what is, in short, the relation between www.haskell.org and new-www.haskell.org ? Which one do I need to use for looking for the Haskell materials, for GHC materials? As far as I can tell, new-www is just a

Re: Forall and type synonyms in GHC 7.0

2010-11-01 Thread Mario Blažević
I had the exact same problem in my regional-pointers package in the withArray function: withArray ∷ (Storable α, MonadCatchIO pr) ⇒ [α] → (∀ s. RegionalPtr α (RegionT s pr) → RegionT s pr β) → pr β I had to replace the original: withArray vals =

Re: Wadler space leak

2010-11-01 Thread Jan Christiansen
On 01.11.2010, at 10:38, Simon Marlow wrote: On 28/10/2010 14:21, Bertram Felgenhauer wrote: Right. The optimization works by producing special thunks for tuple selectors which the garbage collector can recognize and evaluate during GC. However the implementation in GHC is quite brittle.

GHC.Types consturctors with #

2010-11-01 Thread Larry Evans
http://www.haskell.org/ghc/docs/6.10.2/html/libraries/ghc-prim/GHC-Types.html contains: data Int = I# Int# What does I# Int# mean? I've tried a simple interpretation: Prelude GHC.Types I# 5# interactive:1:5: parse error (possibly incorrect indentation) Prelude GHC.Types but obviously

Re: GHC.Types consturctors with #

2010-11-01 Thread David Peixotto
Hi Larry, GHC allows you to work with unboxed types. Int# is the type of unboxed ints. I# is a normal data constructor. So we can see that GHC represents a (boxed) Int as a normal algebraic data type data Int = I# Int# which says that an Int is a type with a single constructor (I#) that wraps

Re: ANNOUNCE: GHC 7.0.1 Release Candidate 2

2010-11-01 Thread Christian Maeder
Am 29.10.2010 20:38, schrieb Ian Lynagh: We are pleased to announce the second release candidate for GHC 7.0.1: http://new-www.haskell.org/ghc/dist/7.0.1-rc2/ Works fine for me. I need a higher -fcontext-stack of 31 (instead of 20) and the compile time without optimization increased

Unicode windows console output.

2010-11-01 Thread David Sankel
Hello all, I'm attempting to output some Unicode on the windows console. I set my windows console code page to utf-8 using chcp 65001. The program: -- Test.hs main = putStr λ.x→x The output of `runghc Test.hs`: λ.x→ From within ghci, typing `main`: λ*** Exception: stdout: hPutChar:

Re: Unicode windows console output.

2010-11-01 Thread David Sankel
On Mon, Nov 1, 2010 at 10:20 PM, David Sankel cam...@gmail.com wrote: Hello all, I'm attempting to output some Unicode on the windows console. I set my windows console code page to utf-8 using chcp 65001. The program: -- Test.hs main = putStr λ.x→x The output of `runghc Test.hs`: