Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtk >= 0.13 uses Text instead of String #41

Closed
ghorn opened this issue Aug 4, 2014 · 2 comments
Closed

gtk >= 0.13 uses Text instead of String #41

ghorn opened this issue Aug 4, 2014 · 2 comments

Comments

@ghorn
Copy link
Contributor

ghorn commented Aug 4, 2014

This applies to Chart-gtk. The short term solution is to constrain the upper version, the long-term solution is:

import qualified Data.Text as T

-- do action m for any keypress (except meta keys)
anyKey :: (Monad m) => m a -> GE.Event -> m Bool
anyKey m (GE.Key {GE.eventKeyName=key})
    | any (`T.isPrefixOf` key) ignores = return True
    | otherwise                      = m >> return True
  where
    ignores :: [T.Text]
    ignores = map T.pack ["Shift","Control","Alt",
                          "Super","Meta","Hyper"]
ghorn added a commit to ghorn/haskell-chart that referenced this issue Aug 5, 2014
0.13 introduces a breaking change (String -> Text), see timbod7#41
ghorn added a commit to ghorn/haskell-chart that referenced this issue Aug 5, 2014
@peti
Copy link

peti commented Aug 9, 2014

Any chance we could get a new release on Hackage that includes this fix?

peti added a commit to NixOS/nixpkgs that referenced this issue Aug 9, 2014
@timbod7
Copy link
Owner

timbod7 commented Aug 10, 2014

Fixed released to hackage with version 1.2.4

@timbod7 timbod7 closed this as completed Aug 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants