| Just before Section D.1 there is the sentence
|
| When inferring the context for the derived instances, type
| synonyms must be expanded out first.
|
| I don't understand it. Which type synonyms need expansion?
Consider
type Foo a = [a]
data T a = MkT (Foo a) deriving( Eq )
Then we must expand the Foo synonym when inferring the
context of the derived instance decl
instance Eq a => Eq (T a) where ...
I've tried to clarify this by saying instead:
"When inferring the context for the derived instances, type synonyms
in the constructors' argument types must be expanded out first."
| Free names in the declarations d are all defined in the
| Prelude; the qualifier `Prelude.' is implicit here.
|
| Well, `Prelude' does not necessarily refer to the builtin
| prelude. I suppose the sentence should actually be the same
| as the statement at the beginning of Chapter 3 (Expressions).
Good idea. I'll do that.
| Naturally this makes clear that it is actually impossible to
| correctly build a tool like DrIft. There is no safe way in
| Haskell to refer to the builtin prelude...
I guess you could say
import Prelude as DriftPrelude
and then use DriftPrelude.wuggle
Of course, the programmer might be using DriftPrelude, but that would
be surprising.
Simon
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell