~ubuntu-branches/ubuntu/wily/agda/wily-proposed

« back to all changes in this revision

Viewing changes to src/full/Agda/Syntax/Parser.hs

  • Committer: Package Import Robot
  • Author(s): Iain Lane, d5cf60f
  • Date: 2015-05-20 13:08:33 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20150520130833-cdcmhagwsouna237
Tags: 2.4.2.2-2
[d5cf60f] Depend on ${shlibs:Depends}, to get libc (& maybe other) deps

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
-- Wrapping parse results
33
33
 
34
34
wrap :: ParseResult a -> a
35
 
wrap (ParseOk _ x)      = x
36
 
wrap (ParseFailed err)  = throw err
 
35
wrap (ParseOk _ x)      = x
 
36
wrap (ParseFailed err)  = throw err
37
37
 
38
38
wrapM:: Monad m => m (ParseResult a) -> m a
39
39
wrapM m =
40
 
    do  r <- m
41
 
        case r of
42
 
            ParseOk _ x     -> return x
43
 
            ParseFailed err -> throw err
 
40
    do  r <- m
 
41
        case r of
 
42
            ParseOk _ x     -> return x
 
43
            ParseFailed err -> throw err
44
44
 
45
45
------------------------------------------------------------------------
46
46
-- Parse functions