packages feed

ansi-terminal-0.4.0: ansi-terminal.cabal

Name:                ansi-terminal
Version:             0.4.0
Cabal-Version:       >= 1.2
Category:            User Interfaces
Synopsis:            Simple ANSI terminal support, with Windows compatibility
Description:         ANSI terminal support for Haskell: allows cursor movement, screen clearing, color output and showing or hiding the cursor.
                     Compatible with Windows and those Unixes with ANSI terminals, but only GHC is supported as a compiler.
License:             BSD3
License-File:        LICENSE
Extra-Source-Files:  README.textile
Author:              Max Bolingbroke
Maintainer:          batterseapower@hotmail.com
Homepage:            http://github.com/batterseapower/ansi-terminal
Build-Type:          Simple

Extra-Source-Files:     includes/Common-Include.hs
                        includes/Exports-Include.hs

Flag SplitBase
        Description:    Choose the new smaller, split-up base package
        Default:        True

Flag Example
        Description:    Build the example application
        Default:        False

Library
        Exposed-Modules:        System.Console.ANSI
        
        Other-Modules:          System.Console.ANSI.Common
        
        Cpp-Options:            -Iincludes
        
        if os(windows)
                Build-Depends:          Win32 >= 2.0
                Cpp-Options:            -DWINDOWS
                Extra-Libraries:        "kernel32", "msvcrt"
                Other-Modules:          System.Console.ANSI.Windows
                                        System.Console.ANSI.Windows.Foreign
                                        System.Console.ANSI.Windows.Emulator
        else
                -- We assume any non-Windows platform is Unix
                Build-Depends:          unix >= 2.3.0.0
                Cpp-Options:            -DUNIX
                Other-Modules:          System.Console.ANSI.Unix
        
        if flag(splitBase)
                Build-Depends:          base >= 3
        else
                Build-Depends:          base < 3
        
        Extensions:             CPP
                                ForeignFunctionInterface
        
        Ghc-Options:                    -Wall

Executable ansi-terminal-example
        Main-Is:                System/Console/ANSI/Example.hs
        
        Cpp-Options:            -Iincludes
        
        if os(windows)
                Build-Depends:          Win32 >= 2.0
                Cpp-Options:            -DWINDOWS
                Extra-Libraries:        "kernel32", "msvcrt"
                Other-Modules:          System.Console.ANSI.Windows
                                        System.Console.ANSI.Windows.Foreign
                                        System.Console.ANSI.Windows.Emulator
        else
                -- We assume any non-Windows platform is Unix
                Build-Depends:          unix >= 2.3.0.0
                Cpp-Options:            -DUNIX
                Other-Modules:          System.Console.ANSI.Unix
        
        if flag(splitBase)
                Build-Depends:          base >= 3
        else
                Build-Depends:          base < 3
        
        Extensions:             CPP
                                ForeignFunctionInterface
        
        Ghc-Options:            -Wall
        
        if !flag(example)
                Buildable:              False