"Lower case" infix type operator variables

I spent a few moments confused by the fact the TypeOperators was insufficient to allow the following type to be parsed constA :: Arrow (~>) => b -> (a ~> b) My current intuition is that since I *can* write things like newtype (~>) a b = A (a -> b) there is clashing in the type operator space for “upper case” and “lower case” identifiers. Is it possible or advisable to mitigate this clash and provide some syntax for “type operator variables”? Joseph

Hi Joseph,
The type operator type variable used to be possible, but this was
changed in (I think) 7.8. See the discussion in threads [0] and [1].
There were some proposals for alternate syntax for operator type
variables, but I don't think any of them were implemented. Currently,
the best you can do is infix textual names, something like:
constA :: Arrow arr => b -> (a `arr` b)
Erik
[0] http://www.haskell.org/pipermail/glasgow-haskell-users/2012-January/021611.h...
[1] http://www.haskell.org/pipermail/glasgow-haskell-users/2012-September/022845...
On Wed, Sep 3, 2014 at 8:03 AM, Joseph Abrahamson
I spent a few moments confused by the fact the TypeOperators was insufficient to allow the following type to be parsed
constA :: Arrow (~>) => b -> (a ~> b)
My current intuition is that since I *can* write things like
newtype (~>) a b = A (a -> b)
there is clashing in the type operator space for “upper case” and “lower case” identifiers. Is it possible or advisable to mitigate this clash and provide some syntax for “type operator variables”? Joseph
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

it was changed in 7.6 even!
On Wed, Sep 3, 2014 at 9:19 AM, Erik Hesselink
Hi Joseph,
The type operator type variable used to be possible, but this was changed in (I think) 7.8. See the discussion in threads [0] and [1]. There were some proposals for alternate syntax for operator type variables, but I don't think any of them were implemented. Currently, the best you can do is infix textual names, something like:
constA :: Arrow arr => b -> (a `arr` b)
Erik
[0] http://www.haskell.org/pipermail/glasgow-haskell-users/2012-January/021611.h... [1] http://www.haskell.org/pipermail/glasgow-haskell-users/2012-September/022845...
On Wed, Sep 3, 2014 at 8:03 AM, Joseph Abrahamson
wrote: I spent a few moments confused by the fact the TypeOperators was insufficient to allow the following type to be parsed
constA :: Arrow (~>) => b -> (a ~> b)
My current intuition is that since I *can* write things like
newtype (~>) a b = A (a -> b)
there is clashing in the type operator space for “upper case” and “lower case” identifiers. Is it possible or advisable to mitigate this clash and provide some syntax for “type operator variables”? Joseph
_______________________________________________ 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
participants (3)
-
Adam Bergmark
-
Erik Hesselink
-
Joseph Abrahamson