[Haskell-cafe] ∀ lexing in ghc and ghci

Daniel Fischer daniel.is.fischer at web.de
Thu Sep 17 22:00:31 EDT 2009


Am Freitag 18 September 2009 03:51:40 schrieb Sean McLaughlin:
> Hi Daniel,
>   Would you try putting that in a file and loading it in ghci?  Your
> example also works for me.
>
> Prelude> let (∀) = 5
> Prelude> (∀)
> 5
>
> Sean

Sure:
dafis at linux-mkk1:~/Haskell/CafeTesting> cat Forall.hs
module Forall where

(∀) :: Int -> Int -> Int
x ∀ y = x*(y-x)
dafis at linux-mkk1:~/Haskell/CafeTesting> ghci Forall
GHCi, version 6.10.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
[1 of 1] Compiling Forall           ( Forall.hs, interpreted )
Ok, modules loaded: Forall.
*Forall> 7 ∀ 4
-21
*Forall>

Works here.


More information about the Haskell-Cafe mailing list