Quite correct, and thank you for pointing it out.  I have known about
this bug for some time.  I've turned it into a sourceforge bug  so we
don't forget it.  But it's a bit awkward to see how to fix it, so I'm
probably not going to do much about it unless more people yell!  (Submit
follow-ups to the sourceforge bug)

https://sourceforge.net/tracker/index.php?func=detail&aid=1362711&group_
id=8032&atid=108032

Simon

| -----Original Message-----
| From: [EMAIL PROTECTED]
[mailto:glasgow-haskell-bugs-
| [EMAIL PROTECTED] On Behalf Of Bulat Ziganshin
| Sent: 16 November 2005 17:20
| To: [email protected]
| Subject: smart recompilation checker fails when only TH functions is
imported
| 
| Hello glasgow-haskell-bugs,
| 
| the following scenario reproduces this error:
| 
| 1) create Main.hs containing code
| 
| module Main where
| import Sub
| main = print $x
| 
| and Sub.hs containing code
| 
| module Sub where
| x = [| 1 |]
| 
| 
| 
| 2) compile them with --make:
| 
| C:\!\Haskell\!>ghc --make -fth Main.hs
| Chasing modules from: Main.hs
| Compiling Sub              ( ./Sub.hs, ./Sub.o )
| Compiling Main             ( Main.hs, Main.o )
| Loading package base-1.0 ... linking ... done.
| Loading package haskell98-1.0 ... linking ... done.
| Loading package template-haskell-1.0 ... linking ... done.
| Linking ...
| 
| C:\!\Haskell\!>main.exe
| 1
| 
| 
| 3) now change Sub.hs to the following code:
| 
| module Sub where
| x = [| 2 |]
| 
| 
| 
| 4) and recompile program:
| 
| C:\!\Haskell\!>ghc --make -fth Main.hs
| Chasing modules from: Main.hs
| Compiling Sub              ( ./Sub.hs, ./Sub.o )
| Skipping  Main             ( Main.hs, Main.o )
| Linking ...
| 
| C:\!\Haskell\!>main.exe
| 1
| 
| 
| As you see, Main.hs is not recompiled despite the fact that definition
| of x is changed and now program must print "2"
| 
| --
| Best regards,
|  Bulat                          mailto:[EMAIL PROTECTED]
| 
| 
| 
| _______________________________________________
| Glasgow-haskell-bugs mailing list
| [email protected]
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to