
17 Apr
2009
17 Apr
'09
10:55 a.m.
2009/04/17 minh thu
2009/04/17 Michael Mossey
: I wonder how I can get the manyTill to be happy with eof before finding the //? I tried
parseText = manyTill anyChar (try (string "//") <|> eof)
but got a type error.
You can use 'notFollowedBy' [...]
You get a type error because `string "//"` parses to a `String` while `eof` parses to a `()`. Instead you might use: parseText = manyTill anyChar (try (string "//" >> return ()) <|> eof) -- Jason Dusek