2009/04/17 minh thu <not...@gmail.com>: > 2009/04/17 Michael Mossey <m...@alumni.caltech.edu>: >> 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 _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe