> Hi,
> After stripping down my code, I found the following fragments that
> reproduce the error. The code makes no sense though.
>
> Thanks,
> Saswat
>
> --Main.hs
> module Main(main) where
> import Bug
>
> main = buggy "strange"
>
>
> --Bug.hs
> module Bug(buggy) where
>
> buggy :: String -> IO ()
> buggy cs = fun 1 cs
> where
> fun _ [] = return ()
> fun index s = case index of
> 0 -> do print "Wow"
> fun 2 s
> -------------------------------------------------------------
> [saswat@localhost bug]$ touch *.hs
> [saswat@localhost bug]$ ghc -prof -auto-all Bug.hs Main.hs -o Main
> [saswat@localhost bug]$ touch *.hs
> [saswat@localhost bug]$ ghc -O2 Bug.hs Main.hs -o Main
> [saswat@localhost bug]$ touch *.hs
> [saswat@localhost bug]$ ghc -prof -auto-all -O2 Bug.hs Main.hs -o Main
>
> Main.hs:1:
> Failed to find interface decl for `Bug.lit1'
> from module `Bug'
The bug doesn't reproduce here, but I suspect it's due to the old
interface file from the previous compilation. Does it go away if you
also remove the interface files between compilations?
Cheers,
Simon
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs