processAccess :: Bool -- ^ Reexporting?
           -> IBCPhase
           -> Archive -> Idris ()
processAccess reexp phase ar = do
    ds <- getEntry [] "ibc_access" ar
    mapM_ (\ (n, a_in) -> do
        let a = if reexp then a_in else Hidden
        logIBC 3 $ "Setting " ++ show (a, n) ++ " to " ++ show a
        updateIState (\i -> i { tt_ctxt = setAccess n a (tt_ctxt i) })

        if (not reexp)
            then do
                logIBC 1 $ "Not exporting " ++ show n
                setAccessibility n Hidden
            else logIBC 1 $ "Exporting " ++ show n
        -- Everything should be available at the REPL from
        -- things imported publicly
        when (phase == IBC_REPL True) $ setAccessibility n Public) ds
processAccess :: Bool -- ^ Reexporting?
           -> IBCPhase
           -> Archive -> Idris ()
processAccess reexp phase ar = do
    ds <- getEntry [] "ibc_access" ar
    mapM_ (\ (n, a_in) -> do
        let a = if reexp then a_in else Hidden
        logIBC 3 $ "Setting " ++ show (a, n) ++ " to " ++ show a
        updateIState (\i -> i { tt_ctxt = setAccess n a (tt_ctxt i) })

        if (not reexp)
            then do
                logIBC 1 $ "Not exporting " ++ show n
                setAccessibility n Hidden
            else logIBC 1 $ "Exporting " ++ show n
        -- Everything should be available at the REPL from
        -- things imported publicly
        when (phase == IBC_REPL True) $ setAccessibility n Public) ds
processAccess reexp phase ar = do
    ds <- getEntry [] "ibc_access" ar
    mapM_ (\ (n, a_in) -> do
        let a = if reexp then a_in else Hidden
        logIBC 3 $ "Setting " ++ show (a, n) ++ " to " ++ show a
        updateIState (\i -> i { tt_ctxt = setAccess n a (tt_ctxt i) })

        if (not reexp)
            then do
                logIBC 1 $ "Not exporting " ++ show n
                setAccessibility n Hidden
            else logIBC 1 $ "Exporting " ++ show n
        -- Everything should be available at the REPL from
        -- things imported publicly
        when (phase == IBC_REPL True) $ setAccessibility n Public) ds