From 7065a8cc1b8b01cd32d4b1d5317b323fec5238bd Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 7 Mar 2017 14:16:21 +0100 Subject: Bump versions --- webgui/src/Main.hs | 11 ++++++----- webgui/thermoprint-webgui.cabal | 6 +++--- webgui/thermoprint-webgui.nix | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'webgui') diff --git a/webgui/src/Main.hs b/webgui/src/Main.hs index 03cd318..65dbfc7 100644 --- a/webgui/src/Main.hs +++ b/webgui/src/Main.hs @@ -40,6 +40,7 @@ import Data.Time import Control.Concurrent import Control.Exception import Control.Monad.Catch +import Control.Monad.Catch.Pure import Control.Applicative import Control.Monad hiding (sequence) @@ -151,9 +152,9 @@ setup Config{..} window (split -> (socketErr, dataUpdate)) = void $ do status <- stepper init statusEvent return (status, triggerStatusChange) - Client{..} = mkClient (hoistNat $ Nat liftIO) server - withFatal :: ExceptT ServantError UI a -> UI a - withFatal a = either (fatal . ("Error while communicating to Thermoprint.Server: " ++) . show) return =<< runExceptT a + Client{..} = (mkClient' server :: Client (CatchT UI)) + withFatal :: CatchT UI a -> UI a + withFatal a = either (fatal . ("Error while communicating to Thermoprint.Server: " ++) . show) return =<< runCatchT a handleEditor selectedPrinter (_, modifyFocusedJobs) = do title <- fatal' "Could not find editor title field" =<< getElementById window "editorTitle" @@ -259,7 +260,7 @@ setup Config{..} window (split -> (socketErr, dataUpdate)) = void $ do enactDeletion <- fatal' "Could not find deletion button" =<< getElementById window "enactDeletion" on UI.click enactDeletion . const $ do cMarking <- currentValue marking - mapM_ (runExceptT . draftDelete) cMarking + mapM_ (runCatchT . draftDelete) cMarking cDraft <- associatedDraft <$> currentValue editorState when (Set.member cDraft $ Set.map Just cMarking) $ changeEditorState (\s -> s { associatedDraft = Nothing } ) updateMarking Set.empty @@ -348,7 +349,7 @@ setup Config{..} window (split -> (socketErr, dataUpdate)) = void $ do (marking, (liftIO .) -> updateMarking) <- stepper' $ Set.empty enactAbortion <- fatal' "Could not find deletion button" =<< getElementById window "enactAbortion" - on UI.click enactAbortion . const $ currentValue marking >>= mapM_ (runExceptT . jobDelete) >> updateMarking Set.empty + on UI.click enactAbortion . const $ currentValue marking >>= mapM_ (runCatchT . jobDelete) >> updateMarking Set.empty (selectedPrinter, updatePrinter) <- do autoselectPrinter <- fatal' "Could not find printer autoselect switch" =<< getElementById window "autoselectPrinter" diff --git a/webgui/thermoprint-webgui.cabal b/webgui/thermoprint-webgui.cabal index 9c67a9c..dcd3c4f 100644 --- a/webgui/thermoprint-webgui.cabal +++ b/webgui/thermoprint-webgui.cabal @@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: thermoprint-webgui -version: 1.0.2 +version: 2.0.0 synopsis: Threepenny interface for thermoprint-spec compliant servers -- description: homepage: http://dirty-haskell.org/tags/thermoprint.html @@ -26,8 +26,8 @@ executable thermoprint-webgui -- other-modules: -- other-extensions: build-depends: base >=4.8 && <5 - , thermoprint-bbcode >=2.0.0 && <3 - , thermoprint-client ==1.0.* + , thermoprint-bbcode >=3.0.0 && <4 + , thermoprint-client ==2.0.* , threepenny-gui >=0.6.0 && <1 , optparse-applicative >=0.12.1 && <1 , bytestring >=0.10.6 && <1 diff --git a/webgui/thermoprint-webgui.nix b/webgui/thermoprint-webgui.nix index d4cafe8..bff836e 100644 --- a/webgui/thermoprint-webgui.nix +++ b/webgui/thermoprint-webgui.nix @@ -5,7 +5,7 @@ }: mkDerivation { pname = "thermoprint-webgui"; - version = "1.0.2"; + version = "2.0.0"; src = ./.; isLibrary = false; isExecutable = true; -- cgit v1.2.3