packages feed

ansi-terminal 0.6.1 → 0.6.1.1

raw patch · 4 files changed

+30/−18 lines, 4 filesdep ~base

Dependency ranges changed: base

Files

CHANGELOG.md view
@@ -1,6 +1,11 @@ Changes ======= +Version 0.6.1.1+---------------++Fix to build with GHC 7.8 on Windows+ Version 0.6.1 ------------- 
README.md view
@@ -47,22 +47,24 @@ [available](http://github.com/feuerbach/ansi-terminal/tree/master/System/Console/ANSI/Example.hs), but for a taste of how the library works try the following code: -    import System.Console.ANSI+``` haskell+import System.Console.ANSI -    main = do-        setCursorPosition 5 0-        setTitle "ANSI Terminal Short Example"+main = do+    setCursorPosition 5 0+    setTitle "ANSI Terminal Short Example" -        setSGR [ SetConsoleIntensity BoldIntensity-               , SetColor Foreground Vivid Red-               ]-        putStr "Hello"-        -        setSGR [ SetConsoleIntensity NormalIntensity-               , SetColor Foreground Vivid White-               , SetColor Background Dull Blue-               ]-        putStrLn "World!"+    setSGR [ SetConsoleIntensity BoldIntensity+           , SetColor Foreground Vivid Red+           ]+    putStr "Hello"++    setSGR [ SetConsoleIntensity NormalIntensity+           , SetColor Foreground Vivid White+           , SetColor Background Dull Blue+           ]+    putStrLn "World!"+```  ![](images/example.png) 
System/Console/ANSI/Windows/Foreign.hs view
@@ -45,12 +45,13 @@  import Foreign.StablePtr -import GHC.IOBase (Handle(..), Handle__(..))-import qualified GHC.IOBase as IOBase (FD) -- Just an Int32- #if __GLASGOW_HASKELL__ >= 612+import GHC.IO.Handle.Types (Handle(..), Handle__(..)) import GHC.IO.FD (FD(..)) -- A wrapper around an Int32 import Data.Typeable+#else+import GHC.IOBase (Handle(..), Handle__(..))+import qualified GHC.IOBase as IOBase (FD) -- Just an Int32 #endif  @@ -287,7 +288,11 @@   -- This essential function comes from the C runtime system. It is certainly provided by msvcrt, and also seems to be provided by the mingw C library - hurrah!+#if __GLASGOW_HASKELL__ >= 612+foreign import ccall unsafe "_get_osfhandle" cget_osfhandle :: CInt -> IO HANDLE+#else foreign import ccall unsafe "_get_osfhandle" cget_osfhandle :: IOBase.FD -> IO HANDLE+#endif  -- | This bit is all highly dubious.  The problem is that we want to output ANSI to arbitrary Handles rather than forcing -- people to use stdout.  However, the Windows ANSI emulator needs a Windows HANDLE to work it's magic, so we need to be able
ansi-terminal.cabal view
@@ -1,5 +1,5 @@ Name:                ansi-terminal-Version:             0.6.1+Version:             0.6.1.1 Cabal-Version:       >= 1.6 Category:            User Interfaces Synopsis:            Simple ANSI terminal support, with Windows compatibility