Skip to content

Reloading mutually recursive modules gives more errors

Sorry for the not so descriptive title. It seems I'm
tickling several bugs related to mutually recursive
modules with ghci. This time the setup looks like follows:
<file Boot.hs>
{-# OPTIONS -fglasgow-exts #-}
module Boot where

import A

data Data = forall c. Class c => Data c
</file>
<file A.hs>
module A where

import {-# source #-} Boot

class Class a where
  fkn :: a -> a
--  fkn = id
  mkData :: a -> Data

modify :: Class a => a -> a
modify = fkn
</file>
<file Boot.hs-boot>
module Boot where

data Data
</file>

Now do 'ghci A.hs'. That should work alright. Then
uncomment the line in the class declaration in file
A.hs. Type ':r' in ghci. This is seems to confuse ghci
quite a lot:
A.hs:1:0: Circular imports: module `A' depends on itself
Trac metadata
Trac field Value
Version 6.4
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution ResolvedNoReason
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information