I am tryng to use this example (http://www.haskell.org/haskellwiki/HXT/Practical/Simple2) and when I try to run it always appear this PARSE ERROR ON INPUT "->"
The code where is the problem is this:
getTeams2 = atTag "LEAGUE" >>>
proc l -> do
leagName <- getAttrValue "NAME" -< l
the line in especific is this:
proc l -> do
so which problem can be?? How can i fix it?
by the way already remove all the "tabs" in the script
{-# LANGUAGE Arrows #-}set? When I try it in GHCi I get "The last statement in a do block in an arrow command must be an expression", and if I addreturn leagNameafterleagName <- getAttrValue ..., it tells me that the expressiongetAttrValuewas found where an arrow command was expected.{-# LANGUAGE Arrows #-}. This arrows pragma is absolutely essential to be able to run the code you show, because theproc <something> -> <something>is called "arrow notation" and it is not part of standard Haskell, but rather an extension you can enable in GHC with the arrows pragma. Make sure you also have{-# LANGUAGE Arrows #-}.