packages feed

netwire-input 0.0.1 → 0.0.2

raw patch · 2 files changed

+13/−2 lines, 2 filesdep ~base

Dependency ranges changed: base

Files

lib/FRP/Netwire/Input.hs view
@@ -151,6 +151,17 @@     then return (Right x)     else return (Left mempty) +-- | Behaves like the identity wire when the key is not pressed+-- and inhibits otherwise+-- +-- * Inhibits: when the key is pressed+keyNotPressed :: (Monoid e, MonadKeyboard k m) => k -> Wire s e m a a+keyNotPressed key = mkGen_ $ \x -> do+  pressed <- keyIsPressed key+  if pressed+    then return (Left mempty)+    else return (Right x)+ -- | Behaves like the identity wire for a signle instant when the key -- is pressed and otherwise inhibits -- 
netwire-input.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                netwire-input-version:             0.0.1+version:             0.0.2 synopsis:            Input handling abstractions for netwire description:         This package contains a collection of Monad typeclasses that support                      interaction with input devices such as keyboard and mice. Moreover, these@@ -29,7 +29,7 @@   default-extensions:  FunctionalDependencies                        MultiParamTypeClasses   exposed-modules:     FRP.Netwire.Input-  build-depends:       base >=4.7 && <4.8,+  build-depends:       base >=4.6 && <4.8,                        netwire >= 5   hs-source-dirs:      lib   default-language:    Haskell2010