need to omit the vty dependency and ui command on windows

This commit is contained in:
Simon Michael 2009-01-18 19:02:08 +00:00
parent 96f1b7d6a7
commit 67a764dce7

View File

@ -1,4 +1,5 @@
#!/usr/bin/env runhaskell -- #!/usr/bin/env runhaskell
{-# OPTIONS_GHC -cpp #-}
{-| {-|
hledger - a ledger-compatible text-based accounting tool. hledger - a ledger-compatible text-based accounting tool.
@ -39,7 +40,10 @@ module Main (
module BalanceCommand, module BalanceCommand,
module PrintCommand, module PrintCommand,
module RegisterCommand, module RegisterCommand,
#ifndef mingw32_HOST_OS
-- the ui command requires vty which is not available on windows
module UICommand, module UICommand,
#endif
) )
where where
import Control.Monad.Error import Control.Monad.Error
@ -52,7 +56,9 @@ import Options
import BalanceCommand import BalanceCommand
import PrintCommand import PrintCommand
import RegisterCommand import RegisterCommand
#ifndef mingw32_HOST_OS
import UICommand import UICommand
#endif
import Tests import Tests
@ -67,7 +73,9 @@ main = do
| cmd `isPrefixOf` "balance" = parseLedgerAndDo opts args balance | cmd `isPrefixOf` "balance" = parseLedgerAndDo opts args balance
| cmd `isPrefixOf` "print" = parseLedgerAndDo opts args print' | cmd `isPrefixOf` "print" = parseLedgerAndDo opts args print'
| cmd `isPrefixOf` "register" = parseLedgerAndDo opts args register | cmd `isPrefixOf` "register" = parseLedgerAndDo opts args register
#ifndef mingw32_HOST_OS
| cmd `isPrefixOf` "ui" = parseLedgerAndDo opts args ui | cmd `isPrefixOf` "ui" = parseLedgerAndDo opts args ui
#endif
| cmd `isPrefixOf` "test" = runtests opts args >> return () | cmd `isPrefixOf` "test" = runtests opts args >> return ()
| otherwise = putStr $ usage | otherwise = putStr $ usage