
On Feb 19, 2008 4:15 PM, Wolfgang Jeltsch
Am Dienstag, 19. Februar 2008 18:26 schrieben Sie:
[…]
However, I was told this: ~> a b is a ~> b, but if I write c a b and wish the effect of a `c` b. This would not work. ~> as an infix operator has a special place in GHC. It is not "just a type variable".
Sorry, but I don't understand fully what you mean. :-( But nevertheless, a ~> b is not the same as ~> a b but as (~>) a b. It's just like with ordinary operators where a + b is the same as (+) a b.
Note that some (all?) versions of GHC will incorrectly print "a ~> b"
as "~> a b".
http://hackage.haskell.org/trac/ghc/ticket/1930
Prelude> :t undefined :: a + b
undefined :: a + b :: forall (+ :: * -> * -> *) a b. + a b
It mostly gets infix type constructors right, although there are
apparently problems with precedence and associativity.
--
Dave Menendez