ltk 0.10.0.4 → 0.12.0.0
raw patch · 4 files changed
+43/−41 lines, 4 filesdep +transformersdep −ghcdep −haddockdep ~Cabaldep ~basedep ~filepathPVP ok
version bump matches the API change (PVP)
Dependencies added: transformers
Dependencies removed: ghc, haddock
Dependency ranges changed: Cabal, base, filepath, pretty
API changes (from Hackage documentation)
- Text.PrinterParser: colon :: CharParser st String
- Text.PrinterParser: identifier :: CharParser st String
+ Text.PrinterParser: identifier, colon :: CharParser st String
- Control.Event: class (Monad gamma, Event beta delta) => EventSource alpha beta gamma delta | alpha -> beta, alpha -> gamma
+ Control.Event: class (Monad gamma, Event beta delta) => EventSource alpha beta gamma delta | alpha -> beta, alpha -> gamma where canTriggerEvent _ _ = False triggerEvent o e = if canTriggerEvent o (getSelector e) then do { handlerMap <- getHandlers o; let selector = getSelector e; case selector `lookup` handlerMap of { Nothing -> return e Just l -> foldM (\ e (_, ah) -> ah e) e (reverse l) } } else error $ "Can't trigger event " ++ show (getSelector e) registerEvent o e handler = if canTriggerEvent o e then do { handlerMap <- getHandlers o; unique <- myUnique o; let newHandlers = case e `lookup` handlerMap of { Nothing -> insert e [(unique, handler)] handlerMap Just l -> insert e ((unique, handler) : l) handlerMap }; setHandlers o newHandlers; return (Just unique) } else error $ "Can't register event " ++ show e unregisterEvent o e unique = if canTriggerEvent o e then do { handlerMap <- getHandlers o; let newHandlers = case e `lookup` handlerMap of { Nothing -> handlerMap Just l -> let newList = filter (\ (mu, _) -> mu /= unique) l in insert e newList handlerMap }; setHandlers o newHandlers; return () } else error $ "Can't register event " ++ show e
- Graphics.UI.Frame.Panes: class (Typeable alpha, PaneMonad delta) => Pane alpha delta | alpha -> delta
+ Graphics.UI.Frame.Panes: class (Typeable alpha, PaneMonad delta) => Pane alpha delta | alpha -> delta where paneName b = if getAddedIndex b == 0 then primPaneName b else primPaneName b ++ "(" ++ show (getAddedIndex b) ++ ")" getAddedIndex _ = 0
- Graphics.UI.Frame.Panes: class (Pane alpha delta, Typeable beta, Show beta, Read beta) => RecoverablePane alpha beta delta | beta -> alpha, alpha -> beta
+ Graphics.UI.Frame.Panes: class (Pane alpha delta, Typeable beta, Show beta, Read beta) => RecoverablePane alpha beta delta | beta -> alpha, alpha -> beta where makeActive pane = activateThisPane pane [] closePane = closeThisPane getPane = getThisPane forceGetPane pp = do { mbPane <- getOrBuildPane pp; case mbPane of { Nothing -> error "Can't get pane " Just p -> return p } } getOrBuildPane = getOrBuildThisPane displayPane = displayThisPane getAndDisplayPane pps b = do { mbP <- getOrBuildThisPane pps; case mbP of { Nothing -> return Nothing Just p -> do { displayPane p b; return (Just p) } } } buildPane = buildThisPane
- Text.PrinterParser: class Pretty a
+ Text.PrinterParser: class Pretty a where pretty = prettyPrec 0 prettyPrec _ = pretty
Files
- ltk.cabal +35/−36
- src/Graphics/UI/Frame/Panes.hs +1/−1
- src/Graphics/UI/Frame/ViewFrame.hs +6/−3
- src/Text/PrinterParser.hs +1/−1
ltk.cabal view
@@ -1,36 +1,35 @@-name: ltk-version: 0.10.0.4-cabal-version: >= 1.8-build-type: Simple-license: GPL-license-file: LICENSE-copyright: Juergen "jutaro" Nicklisch-Franken-maintainer: maintainer@leksah.org-homepage: http://www.leksah.org-package-url: http://code.haskell.org/ltk-bug-reports: http://code.google.com/p/leksah/issues/list-synopsis: Leksah tool kit-description: UI Framework used by leksah-category: GUI-author: Juergen "jutaro" Nicklisch-Franken-tested-with: GHC ==6.10 || ==6.12 || ==7.0--Library- build-depends: Cabal >=1.6.0 && <1.11, base >=4.0.0.0 && <4.4,- containers >=0.2 && <0.5, filepath >=1.1.0 && <1.3,- glib >=0.10.0 && <0.13, gtk >=0.10.0 && <0.13,- mtl >=1.1.0.2 && <2.1, parsec >=2.1.0.1 && <3.2,- pretty >=1.0.1.0 && <1.1,- -- Make sure we get the Cabal compaitble with ghc and haddock- haddock <2.10, ghc <7.3- exposed-modules: Default MyMissing Control.Event- Graphics.UI.Editor.Basics Graphics.UI.Editor.Composite- Graphics.UI.Editor.DescriptionPP Graphics.UI.Editor.MakeEditor- Graphics.UI.Editor.Parameters Graphics.UI.Editor.Simple- Graphics.UI.Frame.Panes Graphics.UI.Frame.ViewFrame- Text.PrinterParser- exposed: True- buildable: True- extensions: CPP- hs-source-dirs: src-+name: ltk +version: 0.12.0.0 +cabal-version: >= 1.8 +build-type: Simple +license: GPL +license-file: LICENSE +copyright: Juergen "jutaro" Nicklisch-Franken +maintainer: maintainer@leksah.org +homepage: http://www.leksah.org +package-url: http://code.haskell.org/ltk +bug-reports: http://code.google.com/p/leksah/issues/list +synopsis: Leksah tool kit +description: UI Framework used by leksah +category: GUI +author: Juergen "jutaro" Nicklisch-Franken +tested-with: GHC ==6.10 || ==6.12 || ==7.0 + +Library + build-depends: Cabal >=1.6.0 && <1.15, base >=4.0.0.0 && <4.6, + containers >=0.2 && <0.5, filepath >=1.1.0 && <1.4, + glib >=0.10.0 && <0.13, gtk >=0.10.0 && <0.13, + mtl >=1.1.0.2 && <2.1, parsec >=2.1.0.1 && <3.2, + pretty >=1.0.1.0 && <1.2, transformers >=0.2.2.0 && <0.3 + + exposed-modules: Default MyMissing Control.Event + Graphics.UI.Editor.Basics Graphics.UI.Editor.Composite + Graphics.UI.Editor.DescriptionPP Graphics.UI.Editor.MakeEditor + Graphics.UI.Editor.Parameters Graphics.UI.Editor.Simple + Graphics.UI.Frame.Panes Graphics.UI.Frame.ViewFrame + Text.PrinterParser + exposed: True + buildable: True + extensions: CPP, FlexibleInstances, BangPatterns + hs-source-dirs: src +
src/Graphics/UI/Frame/Panes.hs view
@@ -43,9 +43,9 @@ import Data.Map (Map) import qualified Data.Map as Map import Data.Typeable-import Control.Monad.Trans import Graphics.UI.Editor.Basics (Connection(..), Connection, Connections)+import Control.Monad.IO.Class (MonadIO) -- --------------------------------------------------------------------- -- Panes and pane layout
src/Graphics/UI/Frame/ViewFrame.hs view
@@ -4,7 +4,8 @@ -XFlexibleInstances -XMultiParamTypeClasses -XUndecidableInstances- -XDeriveDataTypeable #-}+ -XDeriveDataTypeable+ -XBangPatterns #-} ----------------------------------------------------------------------------- -- -- Module : IDE.Core.ViewFrame@@ -90,7 +91,6 @@ ) where import Graphics.UI.Gtk hiding (afterToggleOverwrite,onToggleOverwrite)-import Control.Monad.Reader import qualified Data.Map as Map import Data.List import Data.Maybe@@ -122,6 +122,9 @@ import qualified Data.Set as Set (unions, member) import Data.Set (Set(..)) import Graphics.UI.Gtk.Gdk.Events (Event(..))+import Control.Monad.IO.Class (MonadIO(..))+import Control.Monad (when, liftM, foldM)+import qualified Control.Monad.Reader as Gtk (liftIO) --import Debug.Trace (trace) trace a b = b@@ -1021,7 +1024,7 @@ case mbText of Nothing -> return () Just str -> do- liftIO $ func (str,nb)+ Gtk.liftIO $ func (str,nb) return () terminalsWithPanePath :: PaneLayout -> [(PanePath,PaneLayout)]
src/Text/PrinterParser.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -XTypeSynonymInstances #-}+{-# OPTIONS_GHC -XTypeSynonymInstances -XFlexibleInstances #-} -- -- | Module for saving and restoring preferences and settings --