echo 0.1 → 0.1.1
raw patch · 6 files changed
+32/−15 lines, 6 filesdep ~Win32PVP ok
version bump matches the API change (PVP)
Dependency ranges changed: Win32
API changes (from Hackage documentation)
Files
- CHANGELOG.md +3/−1
- LICENSE +1/−1
- echo.cabal +21/−10
- example/Password.hs +1/−1
- src/System/IO/Echo.hs +1/−1
- src/System/IO/Echo/Internal.hs +5/−1
CHANGELOG.md view
@@ -1,3 +1,5 @@-## 0.1 [2016-12-22]+### 0.1.1 [2017-01-07]+* Use `System.Win32.MinTTY` from `Win32-2.5` or later if possible. +## 0.1 [2016-12-22] * First version.
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2016, Ryan Scott <ryan.gl.scott@gmail.com>+Copyright (c) 2016-2017, Ryan Scott <ryan.gl.scott@gmail.com> All rights reserved.
echo.cabal view
@@ -1,5 +1,5 @@ name: echo-version: 0.1+version: 0.1.1 synopsis: A cross-platform, cross-console way to handle echoing terminal input description: The @base@ library exposes the @hGetEcho@ and @hSetEcho@ functions for querying and setting echo status, but unfortunately, neither@@ -20,7 +20,7 @@ author: Ryan Scott maintainer: Ryan Scott <ryan.gl.scott@gmail.com> stability: Provisional-copyright: (C) 2016 Ryan Scott+copyright: (C) 2016-2017 Ryan Scott category: System build-type: Simple extra-source-files: CHANGELOG.md, README.md, include/*.h@@ -30,6 +30,10 @@ type: git location: https://github.com/RyanGlScott/echo +flag Win32-2-5+ description: Use Win32-2.5.0.0 or later.+ default: True+ flag example description: Build the bundled example program. default: False@@ -38,16 +42,22 @@ exposed-modules: System.IO.Echo System.IO.Echo.Internal - build-depends: base >= 4.3 && < 5, process+ build-depends: base >= 4.3 && < 5+ , process if os(windows)- build-depends: filepath, Win32- build-tools: hsc2hs- include-dirs: include- includes: windows_cconv.h, winternl_compat.h cpp-options: "-DWINDOWS"- other-modules: System.IO.Echo.MinTTY- extra-libraries: ntdll + if flag(Win32-2-5)+ build-depends: Win32 >= 2.5+ else+ build-depends: filepath+ , Win32 < 2.5+ build-tools: hsc2hs+ include-dirs: include+ includes: windows_cconv.h, winternl_compat.h+ other-modules: System.IO.Echo.MinTTY+ extra-libraries: ntdll+ hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall@@ -57,7 +67,8 @@ buildable: False main-is: Password.hs- build-depends: base >= 4.3 && < 5, echo+ build-depends: base >= 4.3 && < 5+ , echo hs-source-dirs: example default-language: Haskell2010 ghc-options: -Wall
example/Password.hs view
@@ -1,6 +1,6 @@ {-| Module: Password-Copyright: (C) 2016 Ryan Scott+Copyright: (C) 2016-2017 Ryan Scott License: BSD-style (see the file LICENSE) Maintainer: Ryan Scott Stability: Provisional
src/System/IO/Echo.hs view
@@ -6,7 +6,7 @@ {-| Module: System.IO.Echo-Copyright: (C) 2016 Ryan Scott+Copyright: (C) 2016-2017 Ryan Scott License: BSD-style (see the file LICENSE) Maintainer: Ryan Scott Stability: Provisional
src/System/IO/Echo/Internal.hs view
@@ -14,7 +14,7 @@ {-| Module: System.IO.Echo.Internal-Copyright: (C) 2016 Ryan Scott+Copyright: (C) 2016-2017 Ryan Scott License: BSD-style (see the file LICENSE) Maintainer: Ryan Scott Stability: Provisional@@ -57,7 +57,11 @@ #if defined(WINDOWS) import Graphics.Win32.Misc (getStdHandle, sTD_INPUT_HANDLE) +# if MIN_VERSION_Win32(2,5,0)+import System.Win32.MinTTY (isMinTTYHandle)+# else import System.IO.Echo.MinTTY (isMinTTYHandle)+# endif import System.IO.Unsafe (unsafePerformIO) #endif