Skip to content

Reloading edited mutually recursive modules gives error

Given two modules which are mutually recursive, for
instance the following:
<file Boot.hs>
module Boot where

import A

data Data = forall n. Class n => D n
</file>
<file Boot.hs-boot>
module Boot where

data Data
</file>
<file A.hs>
module A where

import {-# source #-} Boot

class Class a where
  method :: a -> Data -> a
</file>

Now, if I do 'ghci Boot.hs' this will correctly cause
an error because Boot.hs needs -fglasgow-exts. So I add
{-# OPTIONS -fglasgow-exts #-} in the beginning of
Boot.hs. Finally I do ':r' in ghci. This yields the
following error:
*** Exception: expectJust upsweep_mod:old_linkable
Trac metadata
Trac field Value
Version 6.4
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution ResolvedFixed
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