Skip to content

Commit

Permalink
fix traits bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Sep 14, 2023
1 parent f84dcb4 commit 0945d54
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ type SubsI = HashMap VarName InstanceParam
subsIToE :: SubsI -> SubsE
subsIToE = fmap paramToExpression

isTrait :: InfoTable -> InductiveName -> Bool
isTrait tab name = fromJust (HashMap.lookup name (tab ^. infoInductives)) ^. inductiveInfoDef . inductiveTrait
isTrait :: InfoTable -> Name -> Bool
isTrait tab name = maybe False (^. inductiveInfoDef . inductiveTrait) (HashMap.lookup name (tab ^. infoInductives))

resolveTraitInstance ::
(Members '[Error TypeCheckerError, NameIdGen, Inference, Reader LocalVars, Reader InfoTable] r) =>
Expand Down

0 comments on commit 0945d54

Please sign in to comment.