on master help sign in
Give better parse errors for 0.16 to 0.17 transition
a9bf350Evan Czaplicki
src/Parse/Module.hs+8−3
@@ -65,10 +65,15 @@ moduleDecl =
65 names <- dotSep1 capVar <?> "the name of this module"
65 names <- dotSep1 capVar <?> "the name of this module"
66 whitespace
66 whitespace
67
67
68− settings <- option Module.emptySettings parseSetting
68+ settings <-
69+ case tag of
70+ Module.Effect _ ->
69− whitespace
71+ parseSetting <* whitespace
72+
73+ _ ->
74+ return Module.emptySettings
70
75
71− reserved "exposing"
76+ reserved "exposing" <?> "something like `exposing (..)` which replaced `where` in 0.17"
72 whitespace
77 whitespace
73
78
74 exports <- listing (addLocation value)
79 exports <- listing (addLocation value)