Infix typeconstructors shown as prefix

Simon Peyton-Jones simonpj at microsoft.com
Fri Feb 25 08:05:43 EST 2005


Ive fixed this to print the parens round the type constructor anyway.
But it won't print infix.  Doing the right thing requires knowledge of
fixities, which isn't (yet) plumbed to the right place

S

| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org
[mailto:glasgow-haskell-users-
| bounces at haskell.org] On Behalf Of Remi Turk
| Sent: 20 February 2005 22:00
| To: glasgow-haskell-users at haskell.org
| Subject: Infix typeconstructors shown as prefix
| 
| Hi,
| 
| with the following definitions
| 
| {-# OPTIONS -fglasgow-exts #-}
| data a :++: b
| class a :--: b
| 
| ghci prints the infix type(classe)s as prefix:
| 
| *Main> :i :++:
| data :++: a b 	-- Defined at foo.hs:2:7
| 
| *Main> :i :--:
| class :--: a b where 	-- Defined at foo.hs:3:8
| 
| or (a "real-world" example):
| 
| *Main> :t fac (One:@Zero:@Zero)
| fac (One:@Zero:@Zero) :: :@ (:@ (:@ (:@ One One) Zero) Zero) Zero
| 
| Is this a bug, a feature or just Not Implemented Yet(TM)?
| 
| Groeten,
| Remi
| 
| P.S. Are infix class-names a documented extension at all?
| 
| --
| Nobody can be exactly like me. Even I have trouble doing it.
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


More information about the Glasgow-haskell-users mailing list