[Haskell-cafe] Problems with Unicode Symbols as Infix Function Names in Propositional Calculus Haskell DSL

Cetin Sert cetin.sert at gmail.com
Wed Jan 9 12:34:53 EST 2008


Neither appending "{-# OPTIONS_GHC -fglasgow-exts -xunicodesyntax #-}" at the beginning of a .hs source file in Visual Haskell nor setting the ghc options from the project properties seems to solve the problem. I keep getting "Error	1	lexical error (UTF-8 decoding error)	C:\Users\Sert\Lab\Haskell\HaskellApp1\HaskellApp1\src\Explogic.hs	Line 25	Column 2	" in the IDE. Maybe this is Visual Haskell-specific o_O!?

-- not
(¬) :: P a => a -> Bool
(¬) a | g a       = False
      | otherwise = True


Best Regards,
Cetin Sert


-----Original Message-----
From: Don Stewart [mailto:dons at galois.com] 
Sent: Mittwoch, 9. Januar 2008 18:24
To: Cetin Sert
Cc: Haskell-Cafe at haskell.org
Subject: Re: [Haskell-cafe] Problems with Unicode Symbols as Infix Function Names in Propositional Calculus Haskell DSL

cetin.sert:
>    I want to design a DSL in Haskell for propositional calculus. But instead
>    of using natural language names for functions like or, and, implies etc. I
>    want to use Unicode symbols as infix functions NOT,  *, *, ->, <-> But I
>    keep getting error messages from the GHC parser. Is there a way to make
>    GHC parse my source files correctly? If it is not possible yet, please
>    consider this as a "feature request".
> 
>    
> 

The "survey of Haskell unicode support" might have some advice,

    http://blog.kfish.org/2007/10/survey-haskell-unicode-support.html

See also -XUnicodeSyntax for enabling unicode keywords for -> <- forall
et al.

This is turning into an FAQ, so clarifying the unicode support in the
GHC user's guide would be a good result.

-- Don



More information about the Haskell-Cafe mailing list