@@ -113,7 +113,7 @@ loadIBC reexport fp
113113 Nothing -> True
114114 Just p -> not p && reexport
115115 when redo $
116− do logCodeGen 1 $ "Loading ibc " ++ fp ++ " " ++ show reexport
116+ do logIBC 1 $ "Loading ibc " ++ fp ++ " " ++ show reexport
117117 archiveFile <- runIO $ B.readFile fp
118118 case toArchiveOrFail archiveFile of
119119 Left _ -> ifail $ fp ++ " isn't loadable, it may have an old ibc format.\n"
@@ -189,7 +189,7 @@ writeArchive fp i = do let a = L.foldl (\x y -> addEntryToArchive y x) emptyArch
189189
190190writeIBC :: FilePath -> FilePath -> Idris ()
191191writeIBC src f
192− = do logCodeGen 1 $ "Writing ibc " ++ show f
192+ = do logIBC 1 $ "Writing ibc " ++ show f
193193 i <- getIState
194194-- case (Data.List.map fst (idris_metavars i)) \\ primDefs of
195195-- (_:_) -> ifail "Can't write ibc when there are unsolved metavariables"
@@ -198,8 +198,8 @@ writeIBC src f
198198 ibcf <- mkIBC (ibc_write i) (initIBC { sourcefile = src })
199199 idrisCatch (do runIO $ createDirectoryIfMissing True (dropFileName f)
200200 writeArchive f ibcf
201− logCodeGen 1 "Written")
202− (\c -> do logCodeGen 1 $ "Failed " ++ pshow i c)
201+ logIBC 1 "Written")
202+ (\c -> do logIBC 1 $ "Failed " ++ pshow i c)
203203 return ()
204204
205205-- Write a package index containing all the imports in the current IState
@@ -208,20 +208,20 @@ writePkgIndex :: FilePath -> Idris ()
208208writePkgIndex f
209209 = do i <- getIState
210210 let imps = map (\ (x, y) -> (True, x)) $ idris_imported i
211− logCodeGen 1 $ "Writing package index " ++ show f ++ " including\n" ++
211+ logIBC 1 $ "Writing package index " ++ show f ++ " including\n" ++
212212 show (map snd imps)
213213 resetNameIdx
214214 let ibcf = initIBC { ibc_imports = imps }
215215 idrisCatch (do runIO $ createDirectoryIfMissing True (dropFileName f)
216216 writeArchive f ibcf
217− logCodeGen 1 "Written")
218− (\c -> do logCodeGen 1 $ "Failed " ++ pshow i c)
217+ logIBC 1 "Written")
218+ (\c -> do logIBC 1 $ "Failed " ++ pshow i c)
219219 return ()
220220
221221mkIBC :: [IBCWrite] -> IBCFile -> Idris IBCFile
222222mkIBC [] f = return f
223223mkIBC (i:is) f = do ist <- getIState
224− logCodeGen 5 $ show i ++ " " ++ show (L.length is)
224+ logIBC 5 $ show i ++ " " ++ show (L.length is)
225225 f' <- ibc ist i f
226226 mkIBC is f'
227227
@@ -319,7 +319,7 @@ process :: Bool -- ^ Reexporting
319319process reexp i fn = do
320320 ver <- getEntry 0 "ver" i
321321 when (ver /= ibcVersion) $ do
322− logCodeGen 1 "ibc out of date"
322+ logIBC 1 "ibc out of date"
323323 let e = if ver < ibcVersion
324324 then " an earlier " else " a later "
325325 ifail $ "Incompatible ibc version.\nThis library was built with"
@@ -416,10 +416,10 @@ pImports reexp fs
416416 putIState (i { imported = f : imported i })
417417 case fp of
418418 LIDR fn -> do
419− logCodeGen 1 $ "Failed at " ++ fn
419+ logIBC 1 $ "Failed at " ++ fn
420420 ifail "Must be an ibc"
421421 IDR fn -> do
422− logCodeGen 1 $ "Failed at " ++ fn
422+ logIBC 1 $ "Failed at " ++ fn
423423 ifail "Must be an ibc"
424424 IBC fn src -> loadIBC (reexp && re) fn)
425425 fs
@@ -517,13 +517,13 @@ pDefs reexp ds
517517 do d' <- updateDef d
518518 case d' of
519519 TyDecl _ _ -> return ()
520− _ -> do logCodeGen 1 $ "SOLVING " ++ show n
520+ _ -> do logIBC 1 $ "SOLVING " ++ show n
521521 solveDeferred n
522522 updateIState (\i -> i { tt_ctxt = addCtxtDef n d' (tt_ctxt i) })
523523-- logLvl 1 $ "Added " ++ show (n, d')
524− if (not reexp) then do logCodeGen 1 $ "Not exporting " ++ show n
524+ if (not reexp) then do logIBC 1 $ "Not exporting " ++ show n
525525 setAccessibility n Hidden
526− else logCodeGen 1 $ "Exporting " ++ show n) ds
526+ else logIBC 1 $ "Exporting " ++ show n) ds
527527 where
528528 updateDef (CaseOp c t args o s cd)
529529 = do o' <- mapM updateOrig o
@@ -588,7 +588,7 @@ pAccess :: Bool -- ^ Reexporting?
588588pAccess reexp ds
589589 = mapM_ (\ (n, a_in) ->
590590 do let a = if reexp then a_in else Hidden
591− logCodeGen 3 $ "Setting " ++ show (a, n) ++ " to " ++ show a
591+ logIBC 3 $ "Setting " ++ show (a, n) ++ " to " ++ show a
592592 updateIState (\i -> i { tt_ctxt = setAccess n a (tt_ctxt i) })) ds
593593
594594pFlags :: [(Name, [FnOpt])] -> Idris ()