Hello.
I am having difficulties in compiling mutually recursive
modules involving classes and instances in GHC 4.08.1.
Basicaly I am not finding how to write a .hi-boot where
I want to put classes and instances.
Consider a program with 3 modules: M1, M2 and Main. The
sources are attached to the message. What should go
into M2.hi-boot? Would anyone write M2.hi-boot for me
so that I can learn it.
Thanks.
Romildo
--
Prof. Jos� Romildo Malaquias <[EMAIL PROTECTED]>
Departamento de Computa��o
Universidade Federal de Ouro Preto
Brasil
module M1 where
import {-# SOURCE #-} M2
class C a where
f :: a -> Bool
instance C a => C [a] where
f = or . map f
test = f [ 1 .. 10::Int ]
module M2 where
import M1 ( C )
instance C Int where
f x = mod x 3 == 0
module Main where
import M1 (test)
main = putStrLn (show test)