Skip to content

Commit

Permalink
Merge branch 'master' of github.com:NICTA/course
Browse files Browse the repository at this point in the history
  • Loading branch information
tonymorris committed Sep 21, 2015
2 parents 9414bf2 + ee8d1a2 commit eb03a5a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Course/MoreParser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ tok =

-- | Write a function that parses the given char followed by 0 or more spaces.
--
-- >>> parse (charTok 'a') "abc"
-- Result >bc< 'a'
--
-- >>> isErrorResult (parse (charTok 'a') "dabc")
-- True
--
-- /Tip:/ Use `tok` and `is`.
charTok ::
Char
Expand All @@ -67,6 +73,12 @@ charTok =

-- | Write a parser that parses a comma ',' followed by 0 or more spaces.
--
-- >>> parse commaTok ",123"
-- Result >123< ','
--
-- >>> isErrorResult( parse commaTok "1,23")
-- True
--
-- /Tip:/ Use `charTok`.
commaTok ::
Parser Char
Expand Down

0 comments on commit eb03a5a

Please sign in to comment.