keycode 0.2.2 → 0.2.3
raw patch · 5 files changed
+27/−44 lines, 5 filesdep ~basedep ~template-haskellPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base, template-haskell
API changes (from Hackage documentation)
- Web.KeyCode: instance GHC.Arr.Ix Web.KeyCode.Key
+ Web.KeyCode: instance GHC.Ix.Ix Web.KeyCode.Key
Files
- CHANGELOG.md +3/−0
- LICENSE +1/−1
- README.md +1/−1
- keycode.cabal +17/−13
- src/Web/KeyCode.hs +5/−29
CHANGELOG.md view
@@ -1,3 +1,6 @@+### 0.2.3 [2024.10.22]+* Drop support for pre-8.0 versions of GHC.+ ### 0.2.2 * Add `isKeyCode` function [ryantrinkle]
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2015-2016, Ryan Scott+Copyright (c) 2015-2017, Ryan Scott All rights reserved.
README.md view
@@ -3,7 +3,7 @@ [](http://packdeps.haskellers.com/reverse/keycode) [][Haskell.org] [][tl;dr Legal: BSD3]-[](https://travis-ci.org/RyanGlScott/keycode)+[](https://github.com/RyanGlScott/keycode/actions?query=workflow%3AHaskell-CI) [Hackage: keycode]: http://hackage.haskell.org/package/keycode
keycode.cabal view
@@ -1,5 +1,5 @@ name: keycode-version: 0.2.2+version: 0.2.3 synopsis: Maps web browser keycodes to their corresponding keyboard keys description: Keyboard events in web browsers are often represented as keycodes, which (1) are difficult to remember, and (2) sometimes vary from@@ -12,18 +12,23 @@ license-file: LICENSE author: Ryan Scott maintainer: Ryan Scott <ryan.gl.scott@gmail.com>-copyright: (C) 2015-2016 Ryan Scott+copyright: (C) 2015-2017 Ryan Scott stability: Experimental category: Web build-type: Simple extra-source-files: CHANGELOG.md, README.md-tested-with: GHC == 7.0.4- , GHC == 7.2.2- , GHC == 7.4.2- , GHC == 7.6.3- , GHC == 7.8.4- , GHC == 7.10.3- , GHC == 8.0.1+tested-with: GHC == 8.0.2+ , GHC == 8.2.2+ , GHC == 8.4.4+ , GHC == 8.6.5+ , GHC == 8.8.4+ , GHC == 8.10.7+ , GHC == 9.0.2+ , GHC == 9.2.8+ , GHC == 9.4.8+ , GHC == 9.6.6+ , GHC == 9.8.2+ , GHC == 9.10.1 cabal-version: >=1.10 source-repository head@@ -32,11 +37,10 @@ library exposed-modules: Web.KeyCode- build-depends: base >= 3 && < 5+ build-depends: base >= 4.9 && < 5 , containers , ghc-prim- if impl(ghc >= 8.0)- build-depends: template-haskell >= 2.11 && < 2.12+ , template-haskell >= 2.11 && < 2.23 hs-source-dirs: src- default-language: Haskell98+ default-language: Haskell2010 ghc-options: -Wall
src/Web/KeyCode.hs view
@@ -1,20 +1,10 @@-{-# LANGUAGE CPP #-}--#if __GLASGOW_HASKELL__ >= 700 {-# LANGUAGE DeriveDataTypeable #-}-#endif--#if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE DeriveGeneric #-}-#endif--#if __GLASGOW_HASKELL__ >= 800 {-# LANGUAGE DeriveLift #-}-#endif {-| Module: Web.KeyCode-Copyright: (C) 2015-2016 Ryan Scott+Copyright: (C) 2015-2017 Ryan Scott License: BSD-style (see the file LICENSE) Maintainer: Ryan Scott Stability: Experimental@@ -29,18 +19,11 @@ -} module Web.KeyCode (Key(..), KeyCode, keyCodeLookup, keyCodeMap, isKeyCode) where +import Data.Data (Data) import Data.IntMap (IntMap, findWithDefault, fromAscList) import Data.Ix (Ix)--#if __GLASGOW_HASKELL__ >= 700-import Data.Data (Data, Typeable)-#endif-#if __GLASGOW_HASKELL__ >= 702 import GHC.Generics (Generic)-#endif-#if __GLASGOW_HASKELL__ >= 800 import Language.Haskell.TH.Syntax (Lift)-#endif -- | A numeric code representing the value of a pressed 'Key'. Note that a particular -- 'Key' may not uniquely map to a particular 'KeyCode', as the implementation of@@ -159,22 +142,15 @@ | Apostrophe -- ^ Without Shift: @\'@. With Shift: @"@. | UnknownKey deriving ( Bounded+ , Data , Enum , Eq+ , Generic , Ix+ , Lift , Ord , Read , Show-#if __GLASGOW_HASKELL__ >= 700- , Data- , Typeable-#endif-#if __GLASGOW_HASKELL__ >= 702- , Generic-#endif-#if __GLASGOW_HASKELL__ >= 800- , Lift-#endif ) -- | Determine the 'Key' that a 'KeyCode' represents. If one cannot be found,