Hi,

This is a little pedantic, but maybe you like to know. I have two
modules A and B, where B imports A. When I get the name of B wrong in
the module header, ghc panics.

file A.hs contains

> module A
> where
> type X = Int


and file B.hs contains

> module A  -- clearly should be `B'
> where
> import A
> type Y = X


A compiles fine, but on B, ghc sais:


> B.hs:1: Warning:
>     Compiler tried to import decl from interface file with same name as module.
>     (possible cause: module name clashes with interface file already in scope.)
>     Interface: `A' , name: `X' , desired at: B.hs:6

Ok, this is reasonable and I corrected my mistake.

> panic! (the `impossible' happened):
>         tcLookupTyCon: A.X{-r3q,n-}
>
> Please report it as a compiler bug to [EMAIL PROTECTED]

Ok, here you are.


 /matthias



-- 
Max-Planck-Institut f�r Informatik  |  Deutsches Forschungszentrum f�r KI
[EMAIL PROTECTED]                   |                    [EMAIL PROTECTED]
http://www.mpi-sb.mpg.de/~fis       |

Reply via email to