Modulinos: Difference between revisions
Content added Content deleted
(Simplified compilation process) |
|||
Line 229:
Haskell has scripted main, but getting scripted main to work with compiled scripts is tricky.
<lang sh>$
Main: The meaning of life is 42
$ ghc -o scriptedmain -main-is ScriptedMain scriptedmain.hs▼
$ runhaskell test.hs
Test: The meaning of life is 42
▲$ ghc -fforce-recomp -o scriptedmain -main-is ScriptedMain scriptedmain.hs
$ ./scriptedmain
Main: The meaning of life is 42
$
$ ./test
Test: The meaning of life is 42</lang>
scriptedmain.
<lang haskell>#!/usr/bin/env runhaskell
Line 244 ⟶ 246:
-- Compile:
--
--
module ScriptedMain where
Line 261 ⟶ 262:
-- Compile:
--
--
module Test where
|