Hi Amit,
Are you sure about the type of a?
It looks like you are using the "monad" wrapper, described here:
http://www.haskell.org/alex/doc/html/wrappers.html
If that is true, then:
alexGetInput :: Alex AlexInput
and
type AlexInput = (AlexPosn, Char, String)
>From that we can infer from your code:
getEndPosition :: Alex AlexPosn
and thus:
a :: AlexPosn
If you want to manipulate the value bound to a, you can simply apply a
function to it in the body of getEndPosition, and return the result of
that application (still inside the Alex type). Or you can use the
function:
runAlex :: String -> Alex a -> Either String a
Cheers,
Bernie.
_______________________________________________
Haskell-Cafe mailing list
Haskel...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe