Skip to content

Commit

Permalink
Clean up some pure 'monadic' code
Browse files Browse the repository at this point in the history
  • Loading branch information
JLimperg authored Aug 16, 2021
2 parents 2a99362 + 40f977e commit 36ef0c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Aesop/Rule.lean
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,15 @@ instance : EmptyCollection RuleSet :=
open RuleSetMember' in
def add (rs : RuleSet) : RuleSetMember → RuleSet
| normRule r =>
return { rs with normRules := (← rs.normRules.add r r.indexingMode) }
{ rs with normRules := rs.normRules.add r r.indexingMode }
| normSimpEntries es =>
return { rs with
{ rs with
normSimpLemmas :=
es.foldl (init := rs.normSimpLemmas) SimpLemmas.addSimpEntry }
| unsafeRule r =>
return { rs with unsafeRules := (← rs.unsafeRules.add r r.indexingMode )}
{ rs with unsafeRules := rs.unsafeRules.add r r.indexingMode }
| safeRule r =>
return { rs with safeRules := (← rs.safeRules.add r r.indexingMode) }
{ rs with safeRules := rs.safeRules.add r r.indexingMode }

def addArray (rs : RuleSet) (ra : Array RuleSetMember) : RuleSet :=
ra.foldl add rs
Expand Down

0 comments on commit 36ef0c5

Please sign in to comment.