packages feed

ansi-terminal-0.2: ansi-terminal.cabal

Name:           ansi-terminal
Version:        0.2
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.
License:        BSD3
License-File:   LICENSE
Author:         Max Bolingbroke
Maintainer:     batterseapower@hotmail.com
Homepage:       http://bsp.lighthouseapp.com/projects/16235-hs-ansi-terminal/overview
Build-Type:     Simple

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"
                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"
                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