" I try to use this example ( http://www.haskell.org/haskellwiki/H...">

Problems with the Haskell script. I have this error. PARSE ERROR ON INPUT "->"

I try to use this example ( http://www.haskell.org/haskellwiki/HXT/Practical/Simple2 ), and when I try to start it, this error always appears PARSE ON INPUT "->"

The code in which the problem is this is:

getTeams2 = atTag "LEAGUE" >>>
  proc l -> do
    leagName <- getAttrValue "NAME"       -< l

The line in especific is this:

 proc l -> do

so what kind of problem could it be? How can i fix this?

by the way already deleted all the "tabs" in the script

+3
source share
1 answer
proc l -> do

is a special designation for arrows, and you must enable it with

{-# LANGUAGE Arrows #-} 

at the top of the file.

+1
source

All Articles