On Tue, 16 May 2000, S.D.Mechveliani wrote:
> ghc-4.06:
> T.hs:10: parse error on input `Prelude.+'
However strange it might look, qualified operators still obey the same
rules as unqualified operators: "Prelude.+" is an infix operator and must
be surrounded by parenthesis to make it a function.
An example:
import qualified Prelude
main = Prelude.print ((Prelude.+) 1 2, 1 Prelude.+ 2)
where (+) = (Prelude.*) -- local (+) is not used above
This runs with hugs and compiles with ghc, as it should, and prints (3,3).
Patrik Jansson
PS. Note that the special syntax for pairs can be used unqualified. (As
already mentioned, it cannot be qualified in Haskell 98, and always
means the built-in pairs of Haskell.)