From 67a764dce70b3e33e7ae486b6d1cfc9f795a57c2 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 18 Jan 2009 19:02:08 +0000 Subject: [PATCH] need to omit the vty dependency and ui command on windows --- hledger.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hledger.hs b/hledger.hs index fa45c10d4..53415f23d 100644 --- a/hledger.hs +++ b/hledger.hs @@ -1,4 +1,5 @@ -#!/usr/bin/env runhaskell +-- #!/usr/bin/env runhaskell +{-# OPTIONS_GHC -cpp #-} {-| hledger - a ledger-compatible text-based accounting tool. @@ -39,7 +40,10 @@ module Main ( module BalanceCommand, module PrintCommand, module RegisterCommand, +#ifndef mingw32_HOST_OS +-- the ui command requires vty which is not available on windows module UICommand, +#endif ) where import Control.Monad.Error @@ -52,7 +56,9 @@ import Options import BalanceCommand import PrintCommand import RegisterCommand +#ifndef mingw32_HOST_OS import UICommand +#endif import Tests @@ -67,7 +73,9 @@ main = do | cmd `isPrefixOf` "balance" = parseLedgerAndDo opts args balance | cmd `isPrefixOf` "print" = parseLedgerAndDo opts args print' | cmd `isPrefixOf` "register" = parseLedgerAndDo opts args register +#ifndef mingw32_HOST_OS | cmd `isPrefixOf` "ui" = parseLedgerAndDo opts args ui +#endif | cmd `isPrefixOf` "test" = runtests opts args >> return () | otherwise = putStr $ usage