Skip to content

Commit

Permalink
Only run performSpecial' once, since its idempotent
Browse files Browse the repository at this point in the history
  • Loading branch information
ndmitchell committed Mar 28, 2020
1 parent 61ab3f0 commit 61bd876
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Hint/Match.hs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ matchIdea' sb declName HintRule{..} parent x = do
tpl <- pure (performSpecial' tpl)
u <- pure (removeParens noParens u)

let res = addBracketTy' (addBracket' parent $ performSpecial' $ fst $ substitute' u $ unqualify' sa sb rhs')
let res = addBracketTy' (addBracket' parent $ fst $ substitute' u $ unqualify' sa sb rhs')
guard $ (freeVars' e Set.\\ Set.filter (not . isUnifyVar . occNameString) (freeVars' rhs')) `Set.isSubsetOf` freeVars' x
-- Check no unexpected new free variables.

Expand Down

0 comments on commit 61bd876

Please sign in to comment.