On Wed, Jul 25, 2007 at 09:35:38PM +0400, Bulat Ziganshin wrote:
> Hello Jon,
> 
> Wednesday, July 25, 2007, 8:07:57 PM, you wrote:
> >> Q: how to see operators precedence in GHCi?
> >>     In the definition of `it': it = showParen $ (2 + (3 * 4))
> 
> > Hmm, OK, but not that much quicker than going
> >    Prelude> :info (*)
> 
> it just my poor english :)  i mean - "how to see how Haskell will
> parse some expression?". it will be too slow to look up each
> precedence and parse expression by hand :)

Much easier:

[EMAIL PROTECTED]:~$ ghci
GHCi, version 6.7.20070712: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
Prelude> :set -ddump-parsed
Prelude> 2 + 3 * 4

==================== Parser ====================
Just (2 + 3) * 4


14
Prelude> 

Stefan

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to