We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afb5392 commit 6a9885aCopy full SHA for 6a9885a
src/Agda2Hs/Compile/Utils.hs
@@ -267,10 +267,9 @@ checkInstance u = do
267
checkInstanceElims = mapM_ checkInstanceElim
268
269
checkInstanceElim :: Elim -> C ()
270
- checkInstanceElim (Apply v) = case getHiding v of
271
- Instance{} -> checkInstance $ unArg v
272
- Hidden -> return ()
273
- NotHidden -> return ()
+ checkInstanceElim (Apply v) =
+ when (isInstance v && usableQuantity v) $
+ checkInstance $ unArg v
274
checkInstanceElim IApply{} = illegalInstance
275
checkInstanceElim (Proj _ f) =
276
unlessM (isInstance . defArgInfo <$> getConstInfo f) illegalInstance
0 commit comments