Give better parse errors for 0.16 to 0.17 transition
commita9bf3503a9265d80a041e077a5edc083c1c44503
authorEvan Czaplicki <info@elm-lang.org>
dateWed 6 Apr 2016, 12:17 (11 years ago)
parent0ff8a91
src/Parse/Module.hs+8−3
@@ -65,10 +65,15 @@ moduleDecl =
6565 names <- dotSep1 capVar <?> "the name of this module"
6666 whitespace
6767
68− settings <- option Module.emptySettings parseSetting
69− whitespace
68+ settings <-
69+ case tag of
70+ Module.Effect _ ->
71+ parseSetting <* whitespace
72+
73+ _ ->
74+ return Module.emptySettings
7075
71− reserved "exposing"
76+ reserved "exposing" <?> "something like `exposing (..)` which replaced `where` in 0.17"
7277 whitespace
7378
7479 exports <- listing (addLocation value)