clear binders after each definition (!!!)
This commit is contained in:
parent
9afa90d3af
commit
58168e461d
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue