[ ghc-Bugs-1025941 ] Big problems running ghc and ghci

2004-09-17 Thread SourceForge.net
Bugs item #1025941, was opened at 2004-09-10 15:57
Message generated for change (Comment added) made by simonmar
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=108032aid=1025941group_id=8032

Category: Compiler
Group: 6.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Big problems running ghc and ghci

Initial Comment:
When I try to run ghci this is what happens:

[EMAIL PROTECTED] ghc-6.2.1]# ghci
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version
6.2.1, for Haskell 98.
/ /_\/ __ / /___| | http://www.haskell.org/ghc/
\/\/ /_/\/|_| Type :? for help.


interactive:1:
Could not find interface file for `GHC.Exception'
(use -v to see a list of the files searched for)

interactive:1:
Could not find interface file for `GHC.Handle'
(use -v to see a list of the files searched for)

interactive:1:
Could not find interface file for `GHC.IO'
(use -v to see a list of the files searched for)

interactive:1:
Could not find interface file for `System.IO.Error'
(use -v to see a list of the files searched for)

interactive:1:
Failed to load interface for `GHC.Base':
Could not find interface file for `GHC.Base'
(use -v to see a list of the files searched for)
ghc-6.2.1: panic! (the `impossible' happened, GHC
version 6.2.1):
interactiveUI:setBuffering

Please report it as a compiler bug to
[EMAIL PROTECTED],
or http://sourceforge.net/projects/ghc/.

Ok. I am running Linux Mandrake 10.0 OE
I got the rpm from www.haskell.org
I cannot compile programs that I know work on other
systems. I can't remember the exact error that I get
from ghc, but it has something to do with Error
checking and the libraries.
I have hugs and it works absolutely perfectly!
I am desperate for a fix for this problem!!
I can be contacted at: 
[EMAIL PROTECTED]
Thanks in advance
Josh

--

Comment By: Simon Marlow (simonmar)
Date: 2004-09-17 09:19

Message:
Logged In: YES 
user_id=48280

It looks like the directory that should be called GHC is
called ghc, and this is causing your problem.

What kind of filesystem are you using?  Would it be a
case-insenstive filesystem by any chance?

Try renaming /usr/local/lib/ghc-6.2.1/imports/ghc to
/usr/local/lib/ghc-6.2.1/imports/GHC, and see if that helps.

--

Comment By: Josh (joshrenton)
Date: 2004-09-16 11:55

Message:
Logged In: YES 
user_id=1122339

Yes, in /usr/local/lib/ghc-6.2.1/imports/
there are quite a few .hi files
also in  /usr/local/lib/ghc-6.2.1/imports/ghc/
 Exception.hi 
is there even though it says that it cant find.

I remember checking this the first time it gave me the
error. anyway here is the contents of
/usr/local/lib/ghc-6.2.1/imports/

Array.hi* Debug/MarshalAlloc.hi*   
Ptr.p_hi*
Array.p_hi* Directory.hi* MarshalAlloc.p_hi*  Random.hi*
Bits.hi*   Directory.p_hi*   MarshalArray.hi*   
Random.p_hi*
Bits.p_hi*Foreign/  MarshalArray.p_hi* 
Ratio.hi*
CError.hi*Foreign.hi*   MarshalError.hi*   
Ratio.p_hi*
CError.p_hi*Foreign.p_hi* MarshalError.p_hi* 
StablePtr.hi*
CForeign.hi*ForeignPtr.hi*MarshalUtils.hi*   
StablePtr.p_hi*
CForeign.p_hi*  ForeignPtr.p_hi*  MarshalUtils.p_hi* 
Storable.hi*
Char.hi*ghc/  Maybe.hi*  
Storable.p_hi*
Char.p_hi* Int.hi*   Maybe.p_hi* System/
Complex.hi*Int.p_hi* Monad.hi*  
System.hi*
Complex.p_hi* IO.hi*Monad.p_hi*
System.p_hi*
Control/ IO.p_hi*  Network/Text/
CPUTime.hi*   Ix.hi*Network.hi* Time.hi*
CPUTime.p_hi*   Ix.p_hi*  Network.p_hi*   Time.p_hi*
CString.hi* Language/ Numeric.hi*
Word.hi*
CString.p_hi* List.hi*  Numeric.p_hi*  
Word.p_hi*
CTypes.hi*List.p_hi*Prelude.hi*
CTypes.p_hi*Locale.hi*Prelude.p_hi*
Data/   Locale.p_hi*  Ptr.hi*

and here is the contents of
/usr/local/lib/ghc-6.2.1/imports/ghc/

Arr.hi*  Float.hi* Pack.hi*  ST.hi*
Arr.p_hi*Float.p_hi*   Pack.p_hi*   
Storable.hi*
Base.hi* ForeignPtr.hi*PArr.hi* 
Storable.p_hi*
Base.p_hi*   ForeignPtr.p_hi*  PArr.p_hi*   
ST.p_hi*
Conc.hi* Handle.hi*PrimopWrappers.hi*   
STRef.hi*
Conc.p_hi*   Handle.p_hi*  PrimopWrappers.p_hi* 
STRef.p_hi*
Dotnet.hi*   Int.hi*   Ptr.hi*  
TopHandler.hi*
Dotnet.p_hi* Int.p_hi* Ptr.p_hi*
TopHandler.p_hi*
Enum.hi* IOBase.hi*Read.hi* 
Unicode.hi*
Enum.p_hi*   IOBase.p_hi*  Read.p_hi*   
Unicode.p_hi*
Err.hi*  IO.hi*Real.hi* 
Weak.hi*

GHC confused by hi-boot files

2004-09-17 Thread George Russell
With both ghc6.2 and 6.2.20040915 on Linux, ghc --make cannot compile
the attached files and produces a confusing error message.
 # ghc --make View.hs
Chasing modules from: View.hs
Compiling ViewType ( ./ViewType.hs, ./ViewType.o )
Compiling VersionGraphClient ( ./VersionGraphClient.hs, ./VersionGraphClient.o 
)Compiling View ( View.hs, View.o )
View.hs:14:
Couldn't match `VersionGraphClient' against `VersionGraphClient'
Expected type: VersionGraphClient
Inferred type: VersionGraphClient
In the `graphClient1' field of a record
In the record construction: View {graphClient1 = graphClient}
However ghc without make has no problems.
# ghc -c ViewType.hs
# ghc -c VersionGraphClient.hs
# ghc -c View.hs
best wishes to all Simons!

module VersionGraphClient where

data VersionGraphClient
module VersionGraphClient(
   VersionGraphClient,

   ) where

import ViewType

newtype VersionGraphClient = VersionGraphClient Int
-- | This module defines the fundamental structure of the (untyped) 
-- objects in a repository. 
-- 
-- We depend circularly on CodedValue.hs.  This module is compiled
-- first and uses CodedValue.hi-boot.
module View(
   ) where

import ViewType
import VersionGraphClient

createView :: VersionGraphClient - IO View
createView graphClient =
   do
  return (View {
 graphClient1 = graphClient
 })
module ViewType(

   View(..),
   ) where


import {-# SOURCE #-} VersionGraphClient

data View = View {
   graphClient1 :: VersionGraphClient
   }

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Template Haskell and boot files

2004-09-17 Thread George Russell
Hello GHC bug fixers,
I just sent a program which ghc --make couldn't compile but
individual ghc -c commands could.
Now I have just tried to work around this, using Template Haskell
to use a data rather than newtype declaration for ghc6.2
Unfortunately the new code has the opposite problem!  It breaks
ghc -c, but ghc --make works.  This is also for both ghc6.2
and ghc6.2.20040915
with -c it doesn't work:
# ghc -c -fglasgow-exts ViewType.hs
# ghc -c -fglasgow-exts VersionGraphClient.hs
tcLookup: `VersionGraphClient.VersionGraphClient' is not in scope
In the data type declaration for `View'
with --make it does work:
# ghc --make -fglasgow-exts VersionGraphClient.hs
Chasing modules from: VersionGraphClient.hs
Compiling ViewType ( ./ViewType.hs, ./ViewType.o )
Compiling VersionGraphClient ( VersionGraphClient.hs, VersionGr
Loading package base ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package haskell-src ... linking ... done.


module VersionGraphClient where

data VersionGraphClient
module ViewType(

   View(..),
   ) where


import {-# SOURCE #-} VersionGraphClient

data View = View {
   graphClient1 :: VersionGraphClient
   }

module VersionGraphClient(
   VersionGraphClient,

   ) where

import ViewType

data Foo = Foo View

$(if False
   then
  [d|
 newtype VersionGraphClient = VersionGraphClient [Foo]
  |]
   else
  [d|
 data VersionGraphClient = VersionGraphClient [Foo]
  |]
   )___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs