Python or Perl supports:
python xxx.py
perl xxx.pl
powershell xxx.ps1
Execute the script and quit with an exit code. When I tried GHCi (as ghci xxx.hs
) it seems to load the xxx.hs
file and enter interactive mode, without quiting.
main
function like the GHC compiler does?Use runghc
to get the same behavior. You will indeed need a main :: IO ()
function still.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With