@@ -1049,12 +1049,14 @@ process fn Execute
10491049 (\e -> getIState >>= iRenderError . flip pprintErr e)
10501050 where fc = fileFC "main"
10511051process fn (Compile codegen f)
1052− = do (m, _) <- elabVal recinfo ERHS
1053− (PApp fc (PRef fc (sUN "run__IO"))
1054− [pexp $ PRef fc (sNS (sUN "main") ["Main"])])
1055− ir <- compile codegen f m
1056− i <- getIState
1057− runIO $ generate codegen (head (idris_imported i)) ir
1052+ = if map toLower (takeExtension f) `elem` [".idr", ".idc"]
1053+ then runIO $ putStrLn ("Will not compile to " ++ f)
1054+ else do (m, _) <- elabVal recinfo ERHS
1055+ (PApp fc (PRef fc (sUN "run__IO"))
1056+ [pexp $ PRef fc (sNS (sUN "main") ["Main"])])
1057+ ir <- compile codegen f m
1058+ i <- getIState
1059+ runIO $ generate codegen (head (idris_imported i)) ir
10581060 where fc = fileFC "main"
10591061process fn (LogLvl i) = setLogLevel i
10601062-- Elaborate as if LHS of a pattern (debug command)