Type function under a forall type

2011-06-21 Thread Stefan Holdermans
Simon, Tom,

I hit this type-error message in GHC 7.0.3:

  Cannot deal with a type function under a forall type:
  forall e. El e u

Is there a fundamental reason why type functions under a forall type are a bad 
idea? Of is it just something that hasn't been implemented/thought about yet?

Cheers,

  Stefan
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Testsuite failures and some easy fixes

2011-06-21 Thread Daniel Fischer
Today's HEAD produced 49 unexpected failures, most of which are caused by 
trivia.

- tcrun006 and tcrun029 use datatype contexts which were removed from HEAD 
(7 ways each), can be fixed by adding a language pragma
(cf. also http://hackage.haskell.org/trac/ghc/ticket/5229)

- ghcpk01.stdout hasn't yet been updated to include the new trusted field

- ffi005 fails to compile (7 ways) due to an ambiguous occurrence of 
unsafePerformIO (Foreign and System.IO.Unsafe)

- cg005 and T4059 have unexpected stderr due to a warning about 
unsafePerformIO going to be removed from Foreign

- T4437 fails to compile due to a type change:
T4437.hs:9:39:
Couldn't match expected type `(String,
   CmdLineParser.FlagSafety,
   ExtensionFlag,
   DynFlags.TurnOnFlag - DynFlags.DynP 
())'
with actual type `(t0, t1, t2)'
In the pattern: (ext, _, _)
In a stmt of a list comprehension: (ext, _, _) - xFlags
In the expression: [ext | (ext, _, _) - xFlags]

Those are easily fixed by the attached patches (but some may need a more 
principled fix).

Further, 17 unexpected failures are due to hpc output being formatted 
differently from the expectation (5x hpc_fork, 6x hpc001, 6x tough).

Two unexpected failures (T4809, cgrun068) are due to mtl not being built 
the dyn way.

The remaining 5 are
- T4801 (allocating too little because there are fewer Generic instances 
for tuples)
- dph-diophantine-opt (3 ways)
- dph-words-opt

On my 32-bit box, also T3294 unexpectedly fails since about a week ago due 
to too little allocation (a bit below 690M, minimum allowed 800M).
If that's reproducible and not known to be temporary, the bounds should be 
adjusted.

Cheers,
Daniel
From 92dbf9a5b4516d27fc0d389f842e21b4d3df5e5e Mon Sep 17 00:00:00 2001
From: Daniel Fischer daniel.is.fisc...@googlemail.com
Date: Tue, 21 Jun 2011 14:32:13 +0200
Subject: [PATCH 1/7] DatatypeContexts for tcrun006

---
 tests/ghc-regress/typecheck/should_run/tcrun006.hs |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/ghc-regress/typecheck/should_run/tcrun006.hs b/tests/ghc-regress/typecheck/should_run/tcrun006.hs
index c55ef88..4c84331 100644
--- a/tests/ghc-regress/typecheck/should_run/tcrun006.hs
+++ b/tests/ghc-regress/typecheck/should_run/tcrun006.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DatatypeContexts #-}
 -- !!! Selectors for data and newtypes with contexts
 
 -- This program, reported in Aug'00 by Jose Emilio Labra Gayo
@@ -8,8 +9,8 @@
 
 module Main where
 
-newtype (Eq f) = NewT  f = NewIn  { newout  :: f } 
-data(Eq f) = DataT f = DataIn { dataout :: f } 
+newtype (Eq f) = NewT  f = NewIn  { newout  :: f }
+data(Eq f) = DataT f = DataIn { dataout :: f }
 
 main = print (newout (NewIn ok new) ++ dataout (DataIn  ok data))
 
-- 
1.7.3.4

From 890b8504052a7debcca0a221db0d4543a328004f Mon Sep 17 00:00:00 2001
From: Daniel Fischer daniel.is.fisc...@googlemail.com
Date: Tue, 21 Jun 2011 14:33:15 +0200
Subject: [PATCH 2/7] DatatypeContexts for tcrun029

---
 tests/ghc-regress/typecheck/should_run/tcrun029.hs |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/ghc-regress/typecheck/should_run/tcrun029.hs b/tests/ghc-regress/typecheck/should_run/tcrun029.hs
index 53c67e5..f25a401 100644
--- a/tests/ghc-regress/typecheck/should_run/tcrun029.hs
+++ b/tests/ghc-regress/typecheck/should_run/tcrun029.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE DatatypeContexts #-}
 -- Killed GHC 5.02.3
 
 -- Confusion about whether the wrapper for a data constructor
@@ -6,11 +7,11 @@
 
 module Main where
 
-data Color = Red 
+data Color = Red
 	   | Black
 	 deriving Show
 
-data Ord k = Tree k d = None 
+data Ord k = Tree k d = None
 		   | Node{color::Color,
 			  key::k,
 			  item::d,
-- 
1.7.3.4

From a5ed55598fa0044e1f548dbe09cd8811f7ba796e Mon Sep 17 00:00:00 2001
From: Daniel Fischer daniel.is.fisc...@googlemail.com
Date: Tue, 21 Jun 2011 14:34:56 +0200
Subject: [PATCH 3/7] Use System.IO.unsafePerformIO in ffi005

---
 tests/ghc-regress/ffi/should_run/ffi005.hs |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/ghc-regress/ffi/should_run/ffi005.hs b/tests/ghc-regress/ffi/should_run/ffi005.hs
index 1496922..12b71ba 100644
--- a/tests/ghc-regress/ffi/should_run/ffi005.hs
+++ b/tests/ghc-regress/ffi/should_run/ffi005.hs
@@ -4,7 +4,7 @@
 import Foreign
 import Foreign.C
 import Control.Exception
-import System.IO.Unsafe
+import System.IO.Unsafe as U
 import Prelude hiding (read)
 import System.IO (hFlush, stdout)
 
@@ -40,7 +40,7 @@ main = do
 
   putStrLn \nTesting sin==IO wrapped_sin (should return lots of Trues)
   sin_addr2 - wrapIO (return . sin)
-  print (testSin sin (unsafePerformIO . (dyn_sinIO sin_addr2)))
+  print (testSin sin (U.unsafePerformIO . (dyn_sinIO sin_addr2)))
   freeHaskellFunPtr sin_addr2
 
   putStrLn \nTesting sin==Id wrapped_sin (should 

gitweb on darcs.haskell.org?

2011-06-21 Thread Iavor Diatchki
Hello,

Do we have an instance of gitweb for the various ghc related repos running
somewhere?  If not, I'd be happy to setup an instance, would anyone object?
  gitweb is a web-interface which makes it easy to get a quick overview of
what's going on with a collection of repositories.  It shows commits,
branches, tags, etc. Also, it provides RSS/Atom feeds, which makes it easy
to subscribe to changes for repos of interest.

-Iavor
PS:  you can try it out locally by typing git instaweb in a git
repository.
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: gitweb on darcs.haskell.org?

2011-06-21 Thread Edward Z. Yang
All of the GHC repos are mirrored to Github, which offers similar
facilities.  Of course, it wouldn't be too much work to setup
gitweb on darcs.haskell.org, I don't think.

Edward

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: gitweb on darcs.haskell.org?

2011-06-21 Thread austin seipp
I am also a fan of cgit:

http://hjemli.net/git/cgit/about/

As it's very very fast and has a pleasant UI, but I'm not partial
either way (gitweb is probably more than robust enough to handle a
repo of GHC's size I'm sure.)

On Tue, Jun 21, 2011 at 12:09 PM, Iavor Diatchki
iavor.diatc...@gmail.com wrote:
 Hello,
 Do we have an instance of gitweb for the various ghc related repos running
 somewhere?  If not, I'd be happy to setup an instance, would anyone object?
   gitweb is a web-interface which makes it easy to get a quick overview of
 what's going on with a collection of repositories.  It shows commits,
 branches, tags, etc. Also, it provides RSS/Atom feeds, which makes it easy
 to subscribe to changes for repos of interest.
 -Iavor
 PS:  you can try it out locally by typing git instaweb in a git
 repository.

 ___
 Glasgow-haskell-users mailing list
 Glasgow-haskell-users@haskell.org
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users





-- 
Regards,
Austin

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users