diff --git a/lib/Parser.hs b/lib/Parser.hs index f272648..c4d5c44 100644 --- a/lib/Parser.hs +++ b/lib/Parser.hs @@ -66,7 +66,7 @@ pVar :: Parser Expr pVar = label "variable" $ lexeme $ do name <- pIdentifier binders <- view bindsL <$> get - pure (Var name . fromIntegral <$> elemIndex name binders ?: Free name) + pure $ Var name . fromIntegral <$> elemIndex name binders ?: Free name defChoice :: NonEmpty Text -> Parser () defChoice options = lexeme $ label (T.unpack $ head options) $ void $ choice $ fmap chunk options @@ -179,7 +179,7 @@ pBody params ident ascription = do eat ";" pDef :: Parser () -pDef = lexeme $ label "definition" $ do +pDef = lexeme $ label "definition" $ withBinders $ do skipSpace ident <- pIdentifier params <- pManyParams