Name:           haskeline
Cabal-Version:  >=1.6
Version:        0.6.2.2
Category:       User Interfaces
License:        BSD3
License-File:   LICENSE
Copyright:      (c) Judah Jacobson
Author:         Judah Jacobson
Maintainer:     Judah Jacobson <judah.jacobson@gmail.com>
Category:       User Interfaces
Synopsis:       A command-line interface for user input, written in Haskell.
Description:    
                Haskeline provides a user interface for line input in command-line
                programs.  This library is similar in purpose to readline, but since
                it is written in Haskell it is (hopefully) more easily used in other
                Haskell programs.
                .
                Haskeline runs both on POSIX-compatible systems and on Windows.
Homepage:       http://trac.haskell.org/haskeline
Stability:      Experimental
Build-Type:     Custom
extra-source-files: examples/Test.hs CHANGES

flag base2
    Description: Use the base packages from before version 6.8

flag terminfo
    Description: Use the terminfo package for POSIX consoles.
    Default: True

flag libiconv
    Description: Explicitly link against the libiconv library.
    Default: False

Library
    if flag(base2) {
        Build-depends: base == 2.*
        cpp-options:    -DOLD_BASE
    }
    else {
        if impl(ghc>=6.11) {
            Build-depends: base >=4.1 && < 4.3, containers>=0.1 && < 0.4, directory==1.0.*,
                           bytestring==0.9.*
        }
        else {
            Build-depends: base>=3 && <4.1 , containers>=0.1 && < 0.3, directory==1.0.*,
                           bytestring==0.9.*
        }
    }
    Build-depends:  filepath==1.1.*, mtl==1.1.*,
                    utf8-string==0.3.* && >=0.3.6,
                    extensible-exceptions==0.1.* && >=0.1.1.0
    Extensions:     ForeignFunctionInterface, Rank2Types, FlexibleInstances,
                TypeSynonymInstances
                FlexibleContexts, ExistentialQuantification
                ScopedTypeVariables, GeneralizedNewtypeDeriving
                MultiParamTypeClasses, OverlappingInstances
                UndecidableInstances
                PatternSignatures, CPP, DeriveDataTypeable,
                PatternGuards
    Exposed-Modules:
                System.Console.Haskeline
                System.Console.Haskeline.Completion
                System.Console.Haskeline.Encoding
                System.Console.Haskeline.MonadException
                System.Console.Haskeline.History
                System.Console.Haskeline.IO
    Other-Modules:
                System.Console.Haskeline.Backend
                System.Console.Haskeline.Command
                System.Console.Haskeline.Command.Completion
                System.Console.Haskeline.Command.History
                System.Console.Haskeline.Command.KillRing
                System.Console.Haskeline.Directory
                System.Console.Haskeline.Emacs
                System.Console.Haskeline.InputT
                System.Console.Haskeline.Key
                System.Console.Haskeline.LineState
                System.Console.Haskeline.Monads
                System.Console.Haskeline.Prefs
                System.Console.Haskeline.RunCommand
                System.Console.Haskeline.Term
                System.Console.Haskeline.Command.Undo
                System.Console.Haskeline.Vi
    include-dirs: includes
    if os(windows) {
        Build-depends: Win32>=2.0
        Other-modules: System.Console.Haskeline.Backend.Win32
        c-sources: cbits/win_console.c
        includes: win_console.h
        install-includes: win_console.h
        cpp-options: -DMINGW
    } else {
        Build-depends: unix>=2.0 && < 2.5
                        -- unix-2.3 doesn't build on ghc-6.8.1 or earlier
        c-sources: cbits/h_iconv.c
        includes: h_iconv.h
        install-includes: h_iconv.h
        Other-modules: 
                System.Console.Haskeline.Backend.Posix
                System.Console.Haskeline.Backend.IConv
                System.Console.Haskeline.Backend.DumbTerm
        if flag(terminfo) {
            Build-depends: terminfo>=0.3.1.1 && <0.4
            Other-modules: System.Console.Haskeline.Backend.Terminfo
            cpp-options: -DTERMINFO
        }
        if os(solaris) {
            cpp-options: -DUSE_TERMIOS_H
        }
    }
    ghc-options: -Wall
