Hat bug report: import Prelude hiding ...

Although Hat does support "import Prelude hiding (head)", if you substitute other symbols than "head", in at least some cases it will fail: bash$ cat Bug.hs import Prelude hiding (sin) bash$ hmake -hat Bug hat-trans Bug.hs Wrote Hat/Bug.hs /usr/bin/haskell-compiler -c -package hat -o Hat/Bug.o Hat/Bug.hs Hat/Bug.hs:8: Module `Hat.Prelude' does not export `asin' Fortunately there is a reasonably easy work-around for this one: instead of using "import Prelude hiding ...", you can use "import qualified Prelude" and then explicitly qualify all Prelude symbols. -- Fergus J. Henderson | "I have always known that the pursuit Galois Connections, Inc. | of excellence is a lethal habit" Phone: +1 503 626 6616 | -- the last words of T. S. Garp.

Fergus Henderson
Although Hat does support "import Prelude hiding (head)", if you substitute other symbols than "head", in at least some cases it will fail:
import Prelude hiding (sin)
Hat/Bug.hs:8: Module `Hat.Prelude' does not export `asin'
It seems my patch for imports/exports of class methods was a little over-enthusiastic. Only the worker and wrapper need to be mentioned in the transformed entity list, not the atom, hence the error message. Here is a patch to the patch. Regards, Malcolm Index: src/hattrans/TraceTrans.hs =================================================================== RCS file: /home/cvs/root/hat/src/hattrans/TraceTrans.hs,v retrieving revision 1.66 diff -u -r1.66 TraceTrans.hs --- src/hattrans/TraceTrans.hs 30 Jun 2004 15:35:42 -0000 1.66 +++ src/hattrans/TraceTrans.hs 30 Jun 2004 19:18:21 -0000 @@ -207,8 +207,7 @@ : case arity id of Just a | a > 0 -> [EntityVar pos (nameTraceInfoGlobalVar id) ,EntityVar pos (nameWorker id)] - Just (-1) -> [EntityVar pos (nameTraceInfoGlobalVar id) - ,EntityVar pos (nameShare id)] + Just (-1) -> [EntityVar pos (nameShare id)] _ -> [] tEntity traced (EntityConClsAll pos id) | hasValueInfo id = [] tEntity traced (EntityConClsAll pos id) =
participants (2)
-
Fergus Henderson
-
Malcolm Wallace