
Hi, One observation about _E: Haddock does not like it. I once tried to generate documentation from Yhc sources. I had to place cpp directives everywhere _E appeared, like this: #ifndef __HADDOCK__ where ioBind (IO xf) y w = let xe = xf w in case xe of _E xv -> case y xv of IO yf -> yf w #endif This is not really a bug report, nor is it a request for any source code updates. Just a note for everyone who may run into this issue: there is a solution. Thanks. -- Dimitry Golubovsky Anywhere on the Web

Hi
One observation about _E: Haddock does not like it.
And having just checked, neither does GHC. Perhaps we shouldn't be using _E but something else - the definition: data Box a = Box a or data Tup1 a = Tup1 a both look good, and have some slightly obvious meaning. Tom - any reason not to prefer one of these? Thanks Neil

That is no doubt because _E is counted as a lowercase identifier by every other Haskell compiler. The use of _E is historical, that was what it was called in nhc98, and I never got round to changing the name. If someone wants to go through the libraries and rename it that would be fine :) Cheers Tom Neil Mitchell wrote:
Hi
One observation about _E: Haddock does not like it.
And having just checked, neither does GHC. Perhaps we shouldn't be using _E but something else - the definition:
data Box a = Box a
or
data Tup1 a = Tup1 a
both look good, and have some slightly obvious meaning. Tom - any reason not to prefer one of these?
Thanks
Neil

"Neil Mitchell"
One observation about _E: Haddock does not like it. And having just checked, neither does GHC.
The constructor _E was chosen deliberately because it cannot clash with any constructor name defined in Haskell'98: it is not a valid H'98 conid. Whether this is actually a valid concern, given that the symbol can be hidden using the module system instead, is a different policy decision. Regards, Malcolm

Malcolm Wallace wrote:
Whether this is actually a valid concern, given that the symbol can be hidden using the module system instead, is a different policy decision.
If I remember correctly, _E is defined inside the YHC.Primitive module. So unless someone deliberately imports that module (and they have no reason to do so) they will never know of the existence of the data type. Cheers Tom
participants (4)
-
Dimitry Golubovsky
-
Malcolm Wallace
-
Neil Mitchell
-
Tom Shackell