@@ -80,7 +80,12 @@ lambdaExpr = do char '\\' <|> char '\x03BB' <?> "anonymous function"
80 return $ makeFunction args e
80 return $ makeFunction args e
82assignExpr = do
82assignExpr = do
84+ choice [ try $ do v <- PVar <$> lowVar
85+ notFollowedBy (whitespace >> char ':')
86+ (v:) <$> spacePrefix patternTerm
87+ , (:[]) <$> patternExpr
83− patterns <- spaceSep1 (patternTerm <?> "the definition of a variable (x = ...)")
88+ ] <?> "the definition of a variable (x = ...)"
84 whitespace; string "="; whitespace; exp <- expr
89 whitespace; string "="; whitespace; exp <- expr
85 flattenPatterns patterns exp
90 flattenPatterns patterns exp