If ~> does not have any special meaning and it could be ### or xyz, then how does GHC know to print a ~> b, but not ~> a b a ### b, but not ### a b xyz a b, but not a `xyz` b
Simply because xyz is alphanumeric? On Wed, Feb 20, 2008 at 12:34 AM, David Menendez <[EMAIL PROTECTED]> wrote: > On Feb 19, 2008 4:15 PM, Wolfgang Jeltsch <[EMAIL PROTECTED]> wrote: > > 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 <[EMAIL PROTECTED]> > <http://www.eyrie.org/~zednenem/> > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe >
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe