Some more questions concerning some constructs in Haskell:

   What if (the appropriate parts of) the standard prelude is
explicitly *not* imported:

        import Prelude ()
or
        import Prelude hiding(map)

(see section 5.4.3).

   Are then the hidden parts of the standard prelude still available via
n+k patterns, list comprehensions etc.?  (Via some unseen and unhidable
intermediary module.) Or are constructs that use hidden parts of the
standard prelude (according to their translations given in the report)
not available?

   By the way, what about other special syntax constructs, like [...]
for lists and (...,...,...) for tuples. Are these still available even
if the standard prelude is not imported?  Apparently lists and tuples
cannot be selectively hidden, but the entire standard prelude can be
hidden.  Or, to rephrase the question, are such special syntax constructs
reexported by the unseen and unhidable intermediary module mentioned
in the previous paragraph?  If so, then I think that the unhidable
intermediary module for special syntax constructs should be made
explicit (but, of course, still not codable in Haskell itself, due
to the special syntax).

                        Asking strange questions
                        /kent k

P.S. (Apropos Lennarts quiz)
I think that the function names in "funlhs"es (in each let/where)
should not be allowed to be rebound by some pattern whithin one of
the "funlhs"es.  I.e.  id id = id should not be a definition of the identity
function (while still allowing the definition id = \id.id).  This would
just naturally extend the "linearity restriction" in section 4.4.2, which
disallows e.g. f x x = ... and f = \x x->... but allows f = \x->\x->... .
(I don't dare go as far as proposing to ban "shadowing" completely.)

                        /kn


Reply via email to