@@ -1049,14 +1049,14 @@ process fn Execute
10491049 (\e -> getIState >>= iRenderError . flip pprintErr e)
10501050 where fc = fileFC "main"
10511051process fn (Compile codegen f)
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
1052+ | map toLower (takeExtension f) `elem` [".idr", ".lidr", ".idc"] =
1053+ iPrintError $ "Invalid filename for compiler output \"" ++ f ++"\""
1054+ | otherwise = 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
10601060 where fc = fileFC "main"
10611061process fn (LogLvl i) = setLogLevel i
10621062-- Elaborate as if LHS of a pattern (debug command)