packages feed

geni-gui 0.24.1 → 0.25

raw patch · 5 files changed

+28/−17 lines, 5 filesdep ~graphvizdep ~wx

Dependency ranges changed: graphviz, wx

Files

geni-gui.cabal view
@@ -1,5 +1,5 @@ Name:           geni-gui-Version:        0.24.1+Version:        0.25 License:        GPL License-file:   LICENSE Author:         Carlos Areces and Eric Kow@@ -8,11 +8,19 @@ Homepage:       http://projects.haskell.org/GenI Maintainer:     geni-users@loria.fr Build-Type:     Custom-Cabal-Version: >=1.14+Cabal-Version: >=1.24 Extra-source-files:             macstuff/Info.plist,             macstuff/wxmac.icns +Custom-Setup+  setup-depends: base+               , Cabal+               , cabal-macosx  == 0.2.*+               , directory+               , filepath+               , process+ Library   Exposed-Modules:                 NLP.GenI.BuilderGui@@ -43,10 +51,10 @@                , mtl                , process                , transformers-               , wx       >= 0.12+               , wx       >= 0.92                , wxcore                , text-               , graphviz >= 2999.16 && < 2999.17+               , graphviz >= 2999.16   Default-language: Haskell2010  Executable     geni-gui
src/NLP/GenI/GraphvizShow.hs view
@@ -281,4 +281,4 @@  -- | Node names can't have hyphens in them gvMunge :: T.Text -> TL.Text-gvMunge = TL.fromChunks . T.split (`elem` ":-") . T.replace "." "x"+gvMunge = TL.fromChunks . T.split (`elem` [':', '-']) . T.replace "." "x"
src/NLP/GenI/Gui.hs view
@@ -26,14 +26,14 @@ import           Control.Applicative       ((<$>)) import           Control.Exception         (SomeException, catch, try) import           Control.Monad             (unless)-import           Control.Monad.Trans.Error+import           Control.Monad.Trans.Except import           Data.IORef                (modifyIORef, readIORef) import           Data.List                 (delete, findIndex, nub) import           Data.Maybe                (catMaybes, fromMaybe) import           Data.Text                 (Text) import qualified Data.Text                 as T import           Data.Version              (showVersion)-import           Prelude                   hiding (catch)+import           Prelude import           System.Directory import           System.Exit               (ExitCode (ExitSuccess), exitWith) import           System.FilePath           (makeRelative)@@ -520,7 +520,7 @@     minput <- do         set sembox [ text :~ trim ]         loadEverything   pstRef wrangler-        customSemParser wrangler . T.pack <$> get sembox text+        customSemParser wrangler . unautocorrect . T.pack <$> get sembox text     case minput of       Left e -> errorDialog f "Please give me better input" (show e)       Right semInput -> do@@ -537,6 +537,10 @@         case getBuilderType (pa pst) of             SimpleBuilder         -> a simpleGui2p             SimpleOnePhaseBuilder -> a simpleGui1p+    unautocorrect = T.replace "©" "(C)"+    -- sigh! Cocoa text boxes do autocorrection, which messes up this common+    -- bit of semantics; ideally I'd just figure out how to turn this off+    -- programmatically  resultsGui :: BG.BuilderGui -> ProgState -> CustomSem sem -> TestCase sem -> IO () resultsGui builderGui pst wrangler semInput = do@@ -642,10 +646,10 @@            notebookSetSelection nb oldCount >> return ()     --     -- generation step 1-    minit <- runErrorT $ initGeni pst wrangler (tcSem tc)+    minit <- runExceptT $ initGeni pst wrangler (tcSem tc)     case minit of         Left err -> do-           msgPnl <- messageGui nb err+           msgPnl <- messageGui nb (T.pack err)            addTabs [ tab "error" msgPnl ]         Right x  -> guiRest nb addTabs x (tcParams tc)   where
src/NLP/GenI/GuiHelper.hs view
@@ -18,7 +18,6 @@ {-# LANGUAGE FlexibleContexts      #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns        #-}-{-# LANGUAGE OverlappingInstances  #-} {-# LANGUAGE OverloadedStrings     #-} {-# LANGUAGE RankNTypes            #-} {-# LANGUAGE RecordWildCards       #-}@@ -35,7 +34,7 @@ import           Data.Text                     (Text) import qualified Data.Text                     as T import qualified Data.Text.IO                  as T-import           Prelude                       hiding (catch)+import           Prelude import           System.Directory import           System.FilePath               (dropExtensions, (<.>), (</>)) import           System.Process                (runProcess)@@ -294,7 +293,7 @@ -- ----------------------------------------------------------------------  -- | Calls Yannick Parmentier's handy visualisation tool ViewTAG.-viewTagWidgets :: (GraphvizShow (GvItem Bool t), XMGDerivation t)+viewTagWidgets :: (XMGDerivation t)                => Window a -- ^ parent window                -> GraphvizGuiRef st (GvItem Bool t)                -> Params@@ -758,7 +757,7 @@ -- | Set a selection widget's selection reactor --   We assume you've already populated it (radio boxes cannot be added to, --   so we have to let you do it manually on initialisation)-setSelection :: (Selecting w, Selection w, Items w String)+setSelection :: (Selecting w, Selection w)              => w                    -- ^ widget              -> [a]                  -- ^ items              -> Int                  -- ^ initial selection
src/NLP/GenI/Simple/SimpleGui.hs view
@@ -22,7 +22,7 @@  import           Control.Applicative               ((<$>)) import           Control.Arrow                     ((***))-import           Control.Monad.Trans.Error+import           Control.Monad.Trans.Except import           Data.IORef import           Data.List                         (partition, sort) import qualified Data.Map                          as Map@@ -95,12 +95,12 @@            -> TestCase sem            -> IO ([GeniResult], Statistics, Layout, Layout) resultsPnl twophase pst wrangler f tc = do-    mresults <- runErrorT $+    mresults <- runExceptT $         runGeni pst wrangler (simpleBuilder twophase) tc     case mresults of         Left err  -> do             (resultsL, _, _) <- realisationsGui pst f []-            summaryL         <- messageGui f err+            summaryL         <- messageGui f (T.pack err)             return ([], emptyStats, summaryL, resultsL)         Right (gresults, finalSt) -> do             let sentences = grResults    gresults