@@ -264,11 +264,12 @@ instance ToIR (TT Name) where
264264 | (P _ n _, args) <- unApply tm = do
265265 ist <- getIState
266266 case lookup n (idris_scprims ist) of
267− -- if it's a primitive, compile to the corresponding op
267+ -- if it's a primitive which is already saturated,
268+ -- compile to the corresponding op here already to save work
268269 Just (arity, op) | length args == arity
269270 -> LOp op <$> mapM (ir' env) args
270−
271− Nothing
271+
272+ _
272273 -- if it's collapsible, compile to LNothing
273274 | (collapsible <$> lookupCtxtExact n (idris_optimisation ist)) == Just True
274275 -> return LNothing