Neil Rutland <neilrutland2 <at> hotmail.com> writes:

[snip]
> type Bob = [(Int, Int)]
> newLine :: Bob
> newLine = [(1,4)]
> 
> i have tried to use the follwing but it returns the error below it.
> 
> newLine !! 0 - (so that should give it the newLine list and try and return 
> the 1st element of the list)
> 
> the error reads thus
> 
> ERROR file:.\VicotriaLine.txt:107 - Type error in final generator
> *** Term           : newLine !! 0
> *** Type           : (Int,Int)
> *** Does not match : IO a

newLine is already defined -- call it 'x' instead and !! will do what you 
expect.

Tom


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

Reply via email to