Skip to content

Commit 6a9885a

Browse files
committed
[ re #354 ] Do not check canonicity of erased instances
1 parent afb5392 commit 6a9885a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Agda2Hs/Compile/Utils.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,9 @@ checkInstance u = do
267267
checkInstanceElims = mapM_ checkInstanceElim
268268

269269
checkInstanceElim :: Elim -> C ()
270-
checkInstanceElim (Apply v) = case getHiding v of
271-
Instance{} -> checkInstance $ unArg v
272-
Hidden -> return ()
273-
NotHidden -> return ()
270+
checkInstanceElim (Apply v) =
271+
when (isInstance v && usableQuantity v) $
272+
checkInstance $ unArg v
274273
checkInstanceElim IApply{} = illegalInstance
275274
checkInstanceElim (Proj _ f) =
276275
unlessM (isInstance . defArgInfo <$> getConstInfo f) illegalInstance

0 commit comments

Comments
 (0)