Recompiling a module fails

Jeroen Weijers jeroenweijers at gmail.com
Tue Oct 9 14:33:08 CEST 2012


I'm currently having a problem with compiling modules.

I have two files Data.hs and Class.hs (Class depends on Data). When I
compile Class.hs (ghc --make Class.hs) the ghc does what it should do.
When I now make a change to Class.hs (add a newline to the end of the
file for example) and try to run ghc --make Class.hs again the ghc
gets stuck on recompiling Class.hs.

I think this is a bug in the GHC, can anybody confirm this? (it only
occurs in GHC-7.6.1 both x86 and i386 versions, GHC-7.4 doesn't have
this problem, I only tried it on OS X). Or did I miss something else?

It doesn't happen when the Exp data type in Data.hs only has one constructor.

Contents of the two module involved:
Class.hs
>{-# LANGUAGE GADTs, TypeFamilies #-}
>module Class where
>
>import Data
>
>data Q a where
>    Q :: QA a => Exp (F a) -> Q a
>
>class QA a where
>  type F a

Data.hs
>{-# LANGUAGE GADTs #-}
>module Data where
>
>data Exp a where
>  LamE      :: (Exp a -> Exp b) -> Exp (Exp a -> Exp b)
>  VarE      :: Integer -> Exp a

Cheers,

Jeroen



More information about the Glasgow-haskell-users mailing list