|
GHC confused by hi-boot files: msg#00058lang.haskell.glasgow.bugs
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 Glasgow-haskell-bugs@xxxxxxxxxxx http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-1025941 ] Big problems running ghc and ghci, SourceForge.net |
|---|---|
| Next by Date: | Template Haskell and boot files, George Russell |
| Previous by Thread: | -fwarn-unused-imports confused by hi-boot files, George Russell |
| Next by Thread: | Template Haskell and boot files, George Russell |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |