@@ -13,6 +13,8 @@ import Idris.CmdOptions
1313import Control.Monad.State.Strict
1414import Control.Applicative
1515
16+import System.Info (os)
17+
1618
1719type PParser = StateT PkgDesc IdrisInnerParser
1820
@@ -54,7 +56,10 @@ pClause :: PParser ()
5456pClause = do reserved "executable"; lchar '=';
5557 exec <- iName []
5658 st <- get
57− put (st { execout = Just (show exec) })
59+ put (st { execout = Just (if os `elem` ["win32", "mingw32", "cygwin32"]
60+ then ((show exec) ++ ".exe")
61+ else ( show exec )
62+ ) })
5863 <|> do reserved "main"; lchar '=';
5964 main <- iName []
6065 st <- get