Skip to content

Commit

Permalink
[ re agda#354 ] Do not check canonicity of erased instances
Browse files Browse the repository at this point in the history
  • Loading branch information
jespercockx committed Sep 10, 2024
1 parent 03c9aae commit a610207
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Agda2Hs/Compile/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,9 @@ checkInstance u = do
checkInstanceElims = mapM_ checkInstanceElim

checkInstanceElim :: Elim -> C ()
checkInstanceElim (Apply v) = case getHiding v of
Instance{} -> checkInstance $ unArg v
Hidden -> return ()
NotHidden -> return ()
checkInstanceElim (Apply v) =
when (isInstance v && usableQuantity v) $
checkInstance $ unArg v
checkInstanceElim IApply{} = illegalInstance
checkInstanceElim (Proj _ f) =
unlessM (isInstance . defArgInfo <$> getConstInfo f) illegalInstance
Expand Down

0 comments on commit a610207

Please sign in to comment.