Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check whether binder is free in eliminateEta #420

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Language/Fixpoint/Solver/Sanitize.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import qualified Data.HashSet as S
import qualified Data.List as L
import qualified Data.Text as T
import Data.Maybe (isNothing, mapMaybe, fromMaybe)
import Control.Monad ((>=>))
import Control.Monad ((>=>), guard)
import Text.PrettyPrint.HughesPJ

type SanitizeM a = Either E.Error a
Expand Down Expand Up @@ -127,6 +127,7 @@ eliminateEta cfg si

fapp' :: F.Expr -> Maybe (F.Expr, [F.Symbol])
fapp' (F.EApp e0 (F.EVar arg)) = do
guard (arg `notElem` F.syms e0)
(fvar, args) <- fapp' e0
splitApp (fvar, arg:args)
fapp' e = pure (e, [])
Expand Down