Re: GHC.Prim problem

2007-05-31 Thread Ben Sinclair
On Tue, May 29, 2007 at 04:05:49PM +0100, Simon Marlow wrote:
 Ben Sinclair wrote:
 Hello, I've had a problem with GHC.Prim when compiling the darcs HEAD
 lately. When I compile it in the normal way with no special options
 
 Main.hs:3:0:
 Failed to load interface for `GHC.Prim':
   locations searched:
 GHC/Prim.hs
 GHC/Prim.lhs
 
 It works for me, with last night's HEAD build.  Are you running GHC from 
 the build tree, or installing it first?  (not that it ought to make a 
 difference). If you say 'ghc-pkg describe base', does it list GHC.Prim as 
 exposed?

I tried again with a source tree fresh from darcs get --partial and
got the same result as before. ghc-pkg describe base doesn't mention
GHC.Prim, but it does mention GHC.PrimopWrappers, I don't know if
that's helpful. The documentation for GHC.Prim does get built.

I wouldn't think it would matter, but I'm compiling with GHC 6.6 from
Debian, which does have GHC.Prim exposed in the base package.

Thanks,

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


Re: GHC.Prim problem

2007-05-31 Thread Simon Marlow

Ben Sinclair wrote:

On Tue, May 29, 2007 at 04:05:49PM +0100, Simon Marlow wrote:

Ben Sinclair wrote:

Hello, I've had a problem with GHC.Prim when compiling the darcs HEAD
lately. When I compile it in the normal way with no special options


Main.hs:3:0:
   Failed to load interface for `GHC.Prim':
 locations searched:
GHC/Prim.hs
GHC/Prim.lhs
It works for me, with last night's HEAD build.  Are you running GHC from 
the build tree, or installing it first?  (not that it ought to make a 
difference). If you say 'ghc-pkg describe base', does it list GHC.Prim as 
exposed?


I tried again with a source tree fresh from darcs get --partial and
got the same result as before. ghc-pkg describe base doesn't mention
GHC.Prim, but it does mention GHC.PrimopWrappers, I don't know if
that's helpful. The documentation for GHC.Prim does get built.

I wouldn't think it would matter, but I'm compiling with GHC 6.6 from
Debian, which does have GHC.Prim exposed in the base package.


We know what the problem is - GHC.Prim is being filtered out of the module list 
during installation.  Ian is working on overhauling binary distributions, and 
will fix this at the same time.


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


Re: GHC.Prim problem

2007-05-29 Thread Simon Marlow

Ben Sinclair wrote:

Hello, I've had a problem with GHC.Prim when compiling the darcs HEAD
lately. When I compile it in the normal way with no special options


sh boot  ./configure  make  make install


it compiles correctly, but if I attempt to compile


module Main where

import GHC.Prim

main :: IO ()
main = return ()


then I get this output:


$ ghc --make Main.hs -fglasgow-exts -v



Main.hs:3:0:
Failed to load interface for `GHC.Prim':
  locations searched:
GHC/Prim.hs
GHC/Prim.lhs


It works for me, with last night's HEAD build.  Are you running GHC from the 
build tree, or installing it first?  (not that it ought to make a difference). 
If you say 'ghc-pkg describe base', does it list GHC.Prim as exposed?


While importing GHC.Prim should work, the right way is to import GHC.Exts 
instead.

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


Re: GHC.Prim problem

2007-05-29 Thread Alec Berryman
Simon Marlow on 2007-05-29 16:05:49 +0100:

 Ben Sinclair wrote:
 Hello, I've had a problem with GHC.Prim when compiling the darcs HEAD
 lately. When I compile it in the normal way with no special options
 
 sh boot  ./configure  make  make install
 

 It works for me, with last night's HEAD build.  Are you running GHC from
 the build tree, or installing it first?  (not that it ought to make a
 difference). If you say 'ghc-pkg describe base', does it list GHC.Prim as
 exposed?

I built a clean HEAD from today and installed it with 'make install'.
It works well enough to compile libraries like zlib and binary as well
as applications like xmonad.

When I try to compile the example file Ben gave using the installed ghc,
it fails as Ben described - no GHC.Prim.  'ghc-pkg describe base' does
not list GHC.Prim as exported, even though base's cabal file does.  When
I use the GHC from the build tree, it compiles fine.

 While importing GHC.Prim should work, the right way is to import GHC.Exts
 instead.

GHC.Exts doesn't appear to export unsafeCoerce#, which hs-plugins and
gtk2hs both want.
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: GHC.Prim problem

2007-05-29 Thread Stefan O'Rear
On Tue, May 29, 2007 at 09:58:38PM -0400, Alec Berryman wrote:
 Simon Marlow on 2007-05-29 16:05:49 +0100:
 
  Ben Sinclair wrote:
  Hello, I've had a problem with GHC.Prim when compiling the darcs HEAD
  lately. When I compile it in the normal way with no special options
  
  sh boot  ./configure  make  make install
  
 
  It works for me, with last night's HEAD build.  Are you running GHC from
  the build tree, or installing it first?  (not that it ought to make a
  difference). If you say 'ghc-pkg describe base', does it list GHC.Prim as
  exposed?
 
 I built a clean HEAD from today and installed it with 'make install'.
 It works well enough to compile libraries like zlib and binary as well
 as applications like xmonad.
 
 When I try to compile the example file Ben gave using the installed ghc,
 it fails as Ben described - no GHC.Prim.  'ghc-pkg describe base' does
 not list GHC.Prim as exported, even though base's cabal file does.  When
 I use the GHC from the build tree, it compiles fine.
 
  While importing GHC.Prim should work, the right way is to import GHC.Exts
  instead.
 
 GHC.Exts doesn't appear to export unsafeCoerce#, which hs-plugins and
 gtk2hs both want.

I'd like to point out one other major application which depends on the
availability of GHC.Prim:

GHC

(As of 20070518) GHC HEAD cannot compile itself for exactly this reason.

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


GHC.Prim problem

2007-05-25 Thread Ben Sinclair
Hello, I've had a problem with GHC.Prim when compiling the darcs HEAD
lately. When I compile it in the normal way with no special options

 sh boot  ./configure  make  make install

it compiles correctly, but if I attempt to compile

 module Main where
 
 import GHC.Prim
 
 main :: IO ()
 main = return ()

then I get this output:

 $ ghc --make Main.hs -fglasgow-exts -v
 Glasgow Haskell Compiler, Version 6.7.20070524, for Haskell 98, compiled by 
 GHC version 6.7.20070524
 Using package config file: /usr/local/lib/ghc-6.7.20070524/package.conf
 wired-in package base mapped to base-2.1
 wired-in package rts mapped to rts-1.0
 wired-in package haskell98 mapped to haskell98-1.0
 wired-in package template-haskell mapped to template-haskell-0.1
 Hsc static flags: -static
 *** Chasing dependencies:
 Chasing modules from: Main.hs
 Stable obj: []
 Stable BCO: []
 Ready for upsweep
   [NONREC
   ModSummary {
ms_hs_date = Sat May 26 01:11:06 EST 2007
ms_mod = main:Main,
ms_imps = []
ms_srcimps = []
   }]
 compile: input file Main.hs
 Created temporary directory: /tmp/ghc19188_0
 *** Checking old interface for main:Main:
 [1 of 1] Compiling Main ( Main.hs, Main.o )
 *** Parser:
 *** Renamer/typechecker:
 
 Main.hs:3:0:
 Failed to load interface for `GHC.Prim':
   locations searched:
   GHC/Prim.hs
   GHC/Prim.lhs
 *** Deleting temp files:
 Deleting: /tmp/ghc19188_0/ghc19188_0.s
 Warning: deleting non-existent /tmp/ghc19188_0/ghc19188_0.s
 Upsweep partially successful.
 *** Deleting temp files:
 Deleting: 
 link(batch): upsweep (partially) failed OR
Main.main not exported; not linking.
 *** Deleting temp files:
 Deleting: 
 *** Deleting temp dirs:
 Deleting: /tmp/ghc19188_0

Is there anything I should be doing to make this work? Thanks for any
advice,

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