hpage 0.8.6 → 0.9.0
raw patch · 2 files changed
+19/−17 lines, 2 files
Files
- hpage.cabal +1/−1
- src/HPage/GUI/FreeTextWindow.hs +18/−16
hpage.cabal view
@@ -1,5 +1,5 @@ name: hpage-version: 0.8.6+version: 0.9.0 cabal-version: >=1.6 build-type: Custom license: BSD3
src/HPage/GUI/FreeTextWindow.hs view
@@ -3,7 +3,8 @@ FlexibleInstances, FlexibleContexts, FunctionalDependencies,- UndecidableInstances #-}+ UndecidableInstances,+ ScopedTypeVariables #-} module HPage.GUI.FreeTextWindow ( gui ) where @@ -15,7 +16,7 @@ import System.Directory import System.IO.Error hiding (try, catch) import System.Exit-import GHC.Paths+import System.Cmd import Data.List import Data.Bits import Data.Char (toLower)@@ -70,7 +71,7 @@ getDataFileName $ "res" </> "help" </> "about.html" data GUIBottom = GUIBtm { bottomDesc :: String,- bottomSource :: String }+ _bottomSource :: String } data GUIResults = GUIRes { resButton :: Button (), resLabel :: StaticText (),@@ -105,21 +106,13 @@ SS.step ssh 0 "Checking installation..." - ghcInstalled <- doesFileExist ghc+ checkResult <- catch (rawSystem "cabal" ["--version"])+ (\(_ :: SomeException) -> return $ ExitFailure 1) - debugIO $ "ghc: " ++ ghc+ debugIO ("result", checkResult) - if not ghcInstalled- then do- SS.step ssh 100 "failed"- set win [visible := True]- shutdownTimer <- timer win [on command := do- errorDialog win "Error" "Seems like you don't have GHC installed.\nPlease install the Haskelll Platform from http://hackage.haskell.org/platform/"- wxcAppExit- exitWith $ ExitFailure 1]- timerStart shutdownTimer 50 True- return ()- else do+ case checkResult of+ ExitSuccess -> do SS.step ssh 10 "Starting the hint-server..." -- Server context@@ -387,6 +380,15 @@ set win [visible := True] set txtCode [font := fontFixed] -- again just to be sure focusOn txtCode+ errRes -> do+ SS.step ssh 100 "failed"+ set win [visible := True]+ shutdownTimer <- timer win [on command := do+ errorDialog win "Error" "Seems like you don't have Cabal installed.\nPlease install the Haskelll Platform from http://hackage.haskell.org/platform/"+ wxcAppExit+ exitWith errRes]+ timerStart shutdownTimer 50 True+ return () -- PROCESSES ------------------------------------------------------------------- charFiller :: GUIContext -> Process String ()