Shorthand syntax for default case alternatives
Instead of
Just x <- foo | _ => bar
Can now simply say
Just x <- foo | bar
commit2c8d61c11a0c6672741641a541ee6e4775708a5f
authorEdwin Brady <ecb10@st-andrews.ac.uk>
dateSat 14 Jun 2014, 15:15 (12 years ago)
parent7c0b7e8
src/Idris/ParseExpr.hs+4−3
@@ -1033,9 +1033,10 @@ do_ syn
10331033 <?> "do block expression"
10341034
10351035do_alt syn = do l <- expr' syn
1036− symbol "=>"
1037− r <- expr' syn
1038− return (l, r)
1036+ option (Placeholder, l)
1037+ (do symbol "=>"
1038+ r <- expr' syn
1039+ return (l, r))
10391040
10401041{- | Parses an expression in idiom brackets
10411042@