processClasses :: Archive -> Idris ()
processClasses ar = do
    cs <- getEntry [] "ibc_classes" ar
    mapM_ (\ (n, c) -> do
        i <- getIState
        -- Don't lose instances from previous IBCs, which
        -- could have loaded in any order
        let is = case lookupCtxtExact n (idris_classes i) of
                    Just (CI _ _ _ _ _ ins _) -> ins
                    _ -> []
        let c' = c { class_instances = class_instances c ++ is }
        putIState (i { idris_classes = addDef n c' (idris_classes i) })) cs
processClasses :: Archive -> Idris ()
processClasses ar = do
    cs <- getEntry [] "ibc_classes" ar
    mapM_ (\ (n, c) -> do
        i <- getIState
        -- Don't lose instances from previous IBCs, which
        -- could have loaded in any order
        let is = case lookupCtxtExact n (idris_classes i) of
                    Just (CI _ _ _ _ _ ins _) -> ins
                    _ -> []
        let c' = c { class_instances = class_instances c ++ is }
        putIState (i { idris_classes = addDef n c' (idris_classes i) })) cs
processClasses ar = do
    cs <- getEntry [] "ibc_classes" ar
    mapM_ (\ (n, c) -> do
        i <- getIState
        -- Don't lose instances from previous IBCs, which
        -- could have loaded in any order
        let is = case lookupCtxtExact n (idris_classes i) of
                    Just (CI _ _ _ _ _ ins _) -> ins
                    _ -> []
        let c' = c { class_instances = class_instances c ++ is }
        putIState (i { idris_classes = addDef n c' (idris_classes i) })) cs