-- | @futhark py@
module Futhark.CLI.Python (main) where

import Futhark.Actions (compilePythonAction)
import Futhark.Compiler.CLI
import Futhark.Passes

-- | Run @futhark py@
main :: String -> [String] -> IO ()
main :: String -> [String] -> IO ()
main = forall {k} cfg (rep :: k).
cfg
-> [CompilerOption cfg]
-> String
-> String
-> Pipeline SOACS rep
-> (FutharkConfig
    -> cfg -> CompilerMode -> String -> Prog rep -> FutharkM ())
-> String
-> [String]
-> IO ()
compilerMain
  ()
  []
  String
"Compile sequential Python"
  String
"Generate sequential Python code from optimised Futhark program."
  Pipeline SOACS SeqMem
sequentialCpuPipeline
  forall a b. (a -> b) -> a -> b
$ \FutharkConfig
fcfg () CompilerMode
mode String
outpath Prog SeqMem
prog ->
    forall {k} (rep :: k). Action rep -> Prog rep -> FutharkM ()
actionProcedure (FutharkConfig -> CompilerMode -> String -> Action SeqMem
compilePythonAction FutharkConfig
fcfg CompilerMode
mode String
outpath) Prog SeqMem
prog