
I want to have Unicode symbols for type operator: {-# LANGUAGE TypeOperators #-} data a ── b = Foo a b But it doesn't work. Any suggestions?

Still
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UnicodeSyntax #-}
data a ── b = Foo a b
leads to
test.hs:4:6: Malformed head of type or class declaration: a ── b
Failed, modules loaded: none.
12.09.2011, 11:56, "Maciej Marcin Piechotka"
On Mon, 2011-09-12 at 11:51 +0400, Grigory Sarnitskiy wrote:
I want to have Unicode symbols for type operator:
{-# LANGUAGE TypeOperators #-}
Add also:
{-# LANGUAGE UnicodeSyntax #-}
data a ── b = Foo a b
But it doesn't work. Any suggestions?
Regards
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

2011/9/12 Grigory Sarnitskiy
Still
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE UnicodeSyntax #-}
data a ── b = Foo a b
leads to
test.hs:4:6: Malformed head of type or class declaration: a ── b Failed, modules loaded: none.
Don't all infix constructors have to start with a colon? -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

2011/9/12 Brandon Allbery
Don't all infix constructors have to start with a colon?
Yes that is true. You can of course use Unicode symbols as infix type variables: (⋙) :: Category ⇝ => (α ⇝ β) -> (β ⇝ γ) -> α ⇝ γ But a constructor must always begin with a capital letter or with a colon. UnicodeSyntax is only required if you want to replace existing Haskell syntax with Unicode.
participants (4)
-
Brandon Allbery
-
Grigory Sarnitskiy
-
Maciej Marcin Piechotka
-
Roel van Dijk