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

Tristan Allwood tora at zonetora.co.uk
Wed Jan 9 12:33:59 EST 2008


Hi,

Attached works fine for me (ghc 6.8.2)

You'll have trouble with → though, as ghc steals that symbol for type
signature declarations.  

A ghc expert could probably shed more light;

Cheers,

Tris

GHCi also doesn't (at least for me) print symbol names correctly, but
that's a different issue.

>ghci Bloop.hs 
GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
[1 of 1] Compiling Main             ( Bloop.hs, interpreted )
Ok, modules loaded: Main.
*Main> :browse
(�) :: Bool -> Bool
(� :: Bool -> Bool -> Bool
(� :: Bool -> Bool -> Bool
(�) :: Bool -> Bool -> Bool
*Main> False ˅ True
True



On Wed, Jan 09, 2008 at 06:17:13PM +0100, Cetin Sert wrote:
> 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 ¬, ˅, ˄, →, ↔ 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”.
> 
>  
> 
> Best Regards,
> 
> Cetin Sert
> 
> INF 521, 4-6-2
> 
> 69120 Heidelberg
> 
> Germany
> 
>  
> 
> http://www.corsis.de
> 

> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe


-- 
Tristan Allwood
PhD Student
Department of Computing
Imperial College London
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bloop.hs
Type: text/x-haskell
Size: 207 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080109/5756709a/Bloop.bin


More information about the Haskell-Cafe mailing list