[Haskell-beginners] undefined symbol not allowed?

Brandon Allbery allbery.b at gmail.com
Fri Jul 8 06:54:23 CEST 2011


On Fri, Jul 8, 2011 at 00:42, Christopher Howard
<christopher.howard at frigidcode.com> wrote:
> I tried just defining
>
> ⊥ = undefined
>
> But ghc won't parse that. Why is this? And is there a way to make it work?

The language spec divides characters up as being identifier characters
vs. punctuation, using the rules for Unicode; ⊥ is the latter.  As
such, it can only appear infix or within parentheses, the latter being
the syntax to use an operator as a function; compare (+) and note that
it's the trivial case of section syntax).  So if you're willing to
settle for using it as "(⊥)" everywhere (*including* when defining it)
then you can do it, but bare "⊥" isn't legal.

-- 
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms



More information about the Beginners mailing list