@@ -13,6 +13,8 @@ import Idris.CmdOptions
13import Control.Monad.State.Strict
13import Control.Monad.State.Strict
14import Control.Applicative
14import Control.Applicative
16+import System.Info (os)
17type PParser = StateT PkgDesc IdrisInnerParser
19type PParser = StateT PkgDesc IdrisInnerParser
@@ -54,7 +56,10 @@ pClause :: PParser ()
54pClause = do reserved "executable"; lchar '=';
56pClause = do reserved "executable"; lchar '=';
55 exec <- iName []
57 exec <- iName []
57− put (st { execout = Just (show exec) })
59+ put (st { execout = Just (if os `elem` ["win32", "mingw32", "cygwin32"]
60+ then ((show exec) ++ ".exe")
58 <|> do reserved "main"; lchar '=';
63 <|> do reserved "main"; lchar '=';
59 main <- iName []
64 main <- iName []