on master help sign in
Fix coverage again, add comment.
6e04313Matus Tejiscak
src/IRTS/Compiler.hs+4−3
@@ -264,11 +264,12 @@ instance ToIR (TT Name) where
264 | (P _ n _, args) <- unApply tm = do
264 | (P _ n _, args) <- unApply tm = do
265 ist <- getIState
265 ist <- getIState
266 case lookup n (idris_scprims ist) of
266 case lookup n (idris_scprims ist) of
267+ -- if it's a primitive which is already saturated,
267− -- if it's a primitive, compile to the corresponding op
268+ -- compile to the corresponding op here already to save work
268 Just (arity, op) | length args == arity
269 Just (arity, op) | length args == arity
269 -> LOp op <$> mapM (ir' env) args
270 -> LOp op <$> mapM (ir' env) args
270−
271+
271− Nothing
272+ _
272 -- if it's collapsible, compile to LNothing
273 -- if it's collapsible, compile to LNothing
273 | (collapsible <$> lookupCtxtExact n (idris_optimisation ist)) == Just True
274 | (collapsible <$> lookupCtxtExact n (idris_optimisation ist)) == Just True
274 -> return LNothing
275 -> return LNothing