Re: visibility of instances (was: Bug in compiling large projects ?)

2005-01-04 Thread Martin Erwig
On Dec 15, 2004, at 8:30 AM, Simon Peyton-Jones wrote:
OK, I understand this.
1.  You really do have overlapping instances, exactly as reported in 
the error message.

2.  The instance in Data.Graph.Inductive.Graph looks like this
	instance ... = Eq (gr a b)
 This is, as you say, crazy, because it overlaps with every 
arity-2 type constructor.
 In particular, it overlaps with Eq (a,b)

 I'm copying Martin Erwig, who is, I think the maintainer of the 
fgl/ package, because
 it seems to me that it should be fixed.
I will probably have some time in January 2005 to work on this and a 
couple of other
issues in the FGL.

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


GHC panic/loop (mdo)

2005-01-04 Thread Iavor Diatchki
Hello,
the following program makes GHC 6.2.2 loop forever (testLoop) or panic
(testPanic).
I tried to derive small examples that illustrate the problem.
The problem seems to be related to the use of 'mdo', and it looks like it is
important that the expressoin 'f x' is repeated.

 import Control.Monad.Fix
 main   :: IO ()
 main= return ()


This makes the compiler loop.

 testLoop _  = mdo x - mapM undefined (f x)
   let f _ = []
   return (f x)

This makes the compiler panic.

 testPanic _ = mdo x - f x
   let f _ = return ()
   f x

Hope this helps
Iavor
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Runtime system doesn't notice changed file descriptor status

2005-01-04 Thread Volker Wysk
Hi

I'm building a program which converts file names from ISO8859-1 to UTF-8. It 
calls the recode program to do the actual conversion. This part does the 
work:

   pfade - fmap lines getContents

   pipe_to (unlines pfade)
   (execp recode [-f, latin1..utf8]
   -|= (do pfade_utf8 - fmap lines getContents   --XX error here
   mapM_ (\(pfad, pfad_utf8) - do 
 ...
 )
 (zip pfade pfade_utf8)
   )
   )

pipe_to and (-|=) fork two processes, connected through a pipe. I get this 
error at the marked point:

In child process, part of a pipe:
IO-Error
   Error type:   illegal operation
   Location: hGetContents
   Description:  handle is closed
   File name:stdin

The problem is, the call of getContents at the beginning closes the main 
process' standard input. It is replaced in the child with the pipe from 
recode, but the runtime system doesn't notice that stdin is open again. The 
openness state seems to be duplicated in stdin's file handle.

It works when replacing the marked line with the following.

   h - fdToHandle 0  -- from hslibs
   pfade_utf8 - fmap lines (hGetContents h)

I'm using only functions from the System.Posix library (e.g. dupTo), so I 
think the runtime system should notice.

Apart from that, is there any way to notify the runtime system that the file 
descriptor 0 has changed?

But in the first place, it should be avoided to duplicate the file 
descriptor's state in the handle, if possible.

I'm running Linux and GHC 6.2.2.

Greetings,
V.W.

-- 
http://www.volker-wysk.de
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: ghc.exe: panic! (the `impossible' happened, GHC version 6.3): urk

2005-01-04 Thread Lemmih
Greetings,

I encountered the same problem and tracked it to 
ghc/compiler/simplCore/Simplify.lhs, line 1504: 
... coreRefineTys tvs' (error urk) ...
and
ghc/compiler/types/Unify.lhs, line 209:
... coreRefineTys ex_tvs subst@(TvSubst in_scope orig_env) ...
which performs a strict pattern match on its second argument.

On Wed, 29 Dec 2004 05:05:06 -0800, Satnam Singh [EMAIL PROTECTED] wrote:
  
  
 
 I was trying to build GHC 6.3 for Windows and got the following error: 
 
   
 
 elapsed) :ghc 
 
 (cd Text/ParserCombinators/Parsec/Language_split  /c/MinGW/bin/ld -r -x -o
 ../ 
 
 Language.o *.o); 
 
 rm -f Text/ParserCombinators/Parsec/Perm.o; if [ ! -d
 Text/ParserCombinators/Par 
 
 sec/Perm_split ]; then mkdir Text/ParserCombinators/Parsec/Perm_split; else
 /usr 
 
 /bin/find Text/ParserCombinators/Parsec/Perm_split -name '*.o' -print |
 xargs rm 
 
  -f __rm_food; fi; 
 
 ../../ghc/compiler/ghc-inplace -H16m -O -fglasgow-exts -ignore-package
 parsec -O 
 
  -Rghc-timing  -package base -split-objs-c
 Text/ParserCombinators/Parsec/Per 
 
 m.hs -o Text/ParserCombinators/Parsec/Perm.o  -ohi
 Text/ParserCombinators/Parsec 
 
 /Perm.hi 
 
 ghc.exe: panic! (the `impossible' happened, GHC version 6.3): 
 
 urk 
 
   
 
 Please report it as a compiler bug to glasgow-haskell-bugs@haskell.org, 
 
 or http://sourceforge.net/projects/ghc/. 
 
   
 
 ghc: 29176908 bytes, 7 GCs, 1359038/262 avg/max bytes residency (2
 samples 
 
 ), 16M in use, 0.01 INIT (0.00 elapsed), 0.13 MUT (0.14 elapsed), 0.05 GC
 (0.05 
 
 elapsed) :ghc 
 
 make[2]: *** [Text/ParserCombinators/Parsec/Perm.o] Error 1 
 
 make[1]: *** [all] Error 1 
 
 make[1]: Leaving directory `/c/src/ghc/fptools/libraries' 
 
 make: *** [build] Error 1 
 
 satnams-thinkpad 
 
   
 
 Which asked me to report this as a compiler bug. 
 
   
 
 Cheers, 
 
 
  Satnam 
 
   
  
  
 
 Satnam Singh
  Microsoft
  One Microsoft Way
  Redmond
  Washington 98052-6399
  USA 
 
 Email: [EMAIL PROTECTED]
  Telephone: +1 425 705 8208
  Cell: +1 408 718 2588
  Pager:  [EMAIL PROTECTED] 
  eFax: +1 815 550 4055 
 
   
 ___
 Glasgow-haskell-bugs mailing list
 Glasgow-haskell-bugs@haskell.org
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
 
 
 


-- 
Friendly,
  Lemmih
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


RE: ghc.exe: panic! (the `impossible' happened, GHC version 6.3): urk

2005-01-04 Thread Simon Peyton-Jones
Now fixed... my fault (Xmas distracted me...)

Simon

| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:glasgow-haskell-bugs-
| [EMAIL PROTECTED] On Behalf Of Lemmih
| Sent: 04 January 2005 14:18
| To: Satnam Singh
| Cc: glasgow-haskell-bugs@haskell.org
| Subject: Re: ghc.exe: panic! (the `impossible' happened,GHC version
6.3): urk
| 
| Greetings,
| 
| I encountered the same problem and tracked it to
| ghc/compiler/simplCore/Simplify.lhs, line 1504:
| ... coreRefineTys tvs' (error urk) ...
| and
| ghc/compiler/types/Unify.lhs, line 209:
| ... coreRefineTys ex_tvs subst@(TvSubst in_scope orig_env) ...
| which performs a strict pattern match on its second argument.
| 
| On Wed, 29 Dec 2004 05:05:06 -0800, Satnam Singh
[EMAIL PROTECTED] wrote:
| 
| 
| 
|  I was trying to build GHC 6.3 for Windows and got the following
error:
| 
| 
| 
|  elapsed) :ghc
| 
|  (cd Text/ParserCombinators/Parsec/Language_split  /c/MinGW/bin/ld
-r -x -o
|  ../
| 
|  Language.o *.o);
| 
|  rm -f Text/ParserCombinators/Parsec/Perm.o; if [ ! -d
|  Text/ParserCombinators/Par
| 
|  sec/Perm_split ]; then mkdir
Text/ParserCombinators/Parsec/Perm_split; else
|  /usr
| 
|  /bin/find Text/ParserCombinators/Parsec/Perm_split -name '*.o'
-print |
|  xargs rm
| 
|   -f __rm_food; fi;
| 
|  ../../ghc/compiler/ghc-inplace -H16m -O -fglasgow-exts
-ignore-package
|  parsec -O
| 
|   -Rghc-timing  -package base -split-objs-c
|  Text/ParserCombinators/Parsec/Per
| 
|  m.hs -o Text/ParserCombinators/Parsec/Perm.o  -ohi
|  Text/ParserCombinators/Parsec
| 
|  /Perm.hi
| 
|  ghc.exe: panic! (the `impossible' happened, GHC version 6.3):
| 
|  urk
| 
| 
| 
|  Please report it as a compiler bug to
glasgow-haskell-bugs@haskell.org,
| 
|  or http://sourceforge.net/projects/ghc/.
| 
| 
| 
|  ghc: 29176908 bytes, 7 GCs, 1359038/262 avg/max bytes
residency (2
|  samples
| 
|  ), 16M in use, 0.01 INIT (0.00 elapsed), 0.13 MUT (0.14 elapsed),
0.05 GC
|  (0.05
| 
|  elapsed) :ghc
| 
|  make[2]: *** [Text/ParserCombinators/Parsec/Perm.o] Error 1
| 
|  make[1]: *** [all] Error 1
| 
|  make[1]: Leaving directory `/c/src/ghc/fptools/libraries'
| 
|  make: *** [build] Error 1
| 
|  satnams-thinkpad
| 
| 
| 
|  Which asked me to report this as a compiler bug.
| 
| 
| 
|  Cheers,
| 
| 
|   Satnam
| 
| 
|   
| 
| 
|  Satnam Singh
|   Microsoft
|   One Microsoft Way
|   Redmond
|   Washington 98052-6399
|   USA
| 
|  Email: [EMAIL PROTECTED]
|   Telephone: +1 425 705 8208
|   Cell: +1 408 718 2588
|   Pager:  [EMAIL PROTECTED]
|   eFax: +1 815 550 4055
| 
| 
|  ___
|  Glasgow-haskell-bugs mailing list
|  Glasgow-haskell-bugs@haskell.org
|  http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
| 
| 
| 
| 
| 
| --
| Friendly,
|   Lemmih
| ___
| Glasgow-haskell-bugs mailing list
| Glasgow-haskell-bugs@haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


RE: GHC panic/loop (mdo)

2005-01-04 Thread Simon Peyton-Jones
Excellent point.  A genuine bug in 6.2, I fear. 

I've fixed the HEAD, and added a test (mdo006)

Thanks for boiling this down, Iavor.

Simon

| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:glasgow-haskell-bugs-
| [EMAIL PROTECTED] On Behalf Of Iavor Diatchki
| Sent: 23 December 2004 19:19
| To: glasgow-haskell-bugs@haskell.org
| Subject: GHC panic/loop (mdo)
| 
| Hello,
| the following program makes GHC 6.2.2 loop forever (testLoop) or panic
| (testPanic).
| I tried to derive small examples that illustrate the problem.
| The problem seems to be related to the use of 'mdo', and it looks like
it is
| important that the expressoin 'f x' is repeated.
| 
|  import Control.Monad.Fix
|  main   :: IO ()
|  main= return ()
| 
| 
| This makes the compiler loop.
| 
|  testLoop _  = mdo x - mapM undefined (f x)
|let f _ = []
|return (f x)
| 
| This makes the compiler panic.
| 
|  testPanic _ = mdo x - f x
|let f _ = return ()
|f x
| 
| Hope this helps
| Iavor
| ___
| Glasgow-haskell-bugs mailing list
| Glasgow-haskell-bugs@haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[ ghc-Bugs-1096068 ] Problems with binary linux distribution

2005-01-04 Thread SourceForge.net
Bugs item #1096068, was opened at 2005-01-04 14:05
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=108032aid=1096068group_id=8032

Category: Documentation
Group: 6.2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Problems with binary linux distribution

Initial Comment:
Problems with documentation when installing from binary
linux distribution of GHC 6.2.2, for glibc 2.2:
ghc-6.2.2-i386-linux-glibc2.2.tar.bz2

Missing directories: 

ghc-6.2.2/share/ps/
ghc-6.2.2/share/html/users_guide/
ghc-6.2.2/share/html/hslibs/

./configure worked fine. Make install worked for some
time but bailed out when attempting to copy .ps files
from ghc-6.2.2/share/ps/.

The installed GHC seems to work, though (at least some
simple tests with ghci). But I suppose some
documentation is not in place.

I suggest you recreate the tar file as to include the
full distribution.

Björn Lisper
[EMAIL PROTECTED]


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=108032aid=1096068group_id=8032
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs