haskeline.cabal 4.69 KB
Newer Older
judah's avatar
judah committed
1
Name:           haskeline
2
Cabal-Version:  >=1.10
judah's avatar
judah committed
3
Version:        0.7.3.1
judah's avatar
judah committed
4
5
6
7
8
9
10
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
judah's avatar
judah committed
11
Synopsis:       A command-line interface for user input, written in Haskell.
12
Description:
judah's avatar
judah committed
13
14
                Haskeline provides a user interface for line input in command-line
                programs.  This library is similar in purpose to readline, but since
judah's avatar
judah committed
15
                it is written in Haskell it is (hopefully) more easily used in other
judah's avatar
judah committed
16
17
                Haskell programs.
                .
18
                Haskeline runs both on POSIX-compatible systems and on Windows.
19
Homepage:       http://trac.haskell.org/haskeline
judah's avatar
judah committed
20
Bug-Reports:    https://github.com/judah/haskeline/issues
judah's avatar
judah committed
21
Stability:      Stable
22
Build-Type:     Custom
23
extra-source-files: examples/Test.hs Changelog includes/*.h
24

25
source-repository head
26
27
    type: git
    location: git://github.com/judah/haskeline.git
28

judah's avatar
judah committed
29
30
31
32
33
34
-- There are three main advantages to the terminfo backend over the portable,
-- "dumb" alternative.  First, it enables more efficient control sequences
-- when redrawing the input.  Second, and more importantly, it enables us
-- to draw on multiple lines, so we can wrap long input strings.  And third,
-- the backend adds some extra key sequences such as forwards delete.
--
35
36
-- (The "dumb" terminal also allows editing of long input strings, but is
-- restricted to only one line and thus only shows part of the input at once.)
37
38
39
40
flag terminfo
    Description: Use the terminfo package for POSIX consoles.
    Default: True

judah's avatar
judah committed
41
Library
judah's avatar
judah committed
42
43
44
    -- We require ghc>=7.4.1 (base>=4.5) to use the base library encodings, even
    -- though it was implemented in earlier releases, due to GHC bug #5436 which
    -- wasn't fixed until 7.4.1
Ben Gamari's avatar
Ben Gamari committed
45
    Build-depends: base >=4.5 && < 4.11, containers>=0.4 && < 0.6,
46
                   directory>=1.1 && < 1.4, bytestring>=0.9 && < 0.11,
47
48
                   filepath >= 1.2 && < 1.5, transformers >= 0.2 && < 0.6,
                   process >= 1.0 && < 1.5
judah's avatar
judah committed
49
    Default-Language: Haskell98
50
    Default-Extensions:
judah's avatar
judah committed
51
                ForeignFunctionInterface, Rank2Types, FlexibleInstances,
52
                TypeSynonymInstances
53
                FlexibleContexts, ExistentialQuantification
54
                ScopedTypeVariables, GeneralizedNewtypeDeriving
55
                MultiParamTypeClasses, OverlappingInstances
judah's avatar
judah committed
56
                UndecidableInstances
57
                ScopedTypeVariables, CPP, DeriveDataTypeable,
58
                PatternGuards
judah's avatar
judah committed
59
    Exposed-Modules:
60
                System.Console.Haskeline
61
                System.Console.Haskeline.Completion
62
                System.Console.Haskeline.MonadException
63
                System.Console.Haskeline.History
64
                System.Console.Haskeline.IO
65
    Other-Modules:
66
                System.Console.Haskeline.Backend
judah's avatar
judah committed
67
                System.Console.Haskeline.Backend.WCWidth
68
69
70
                System.Console.Haskeline.Command
                System.Console.Haskeline.Command.Completion
                System.Console.Haskeline.Command.History
71
                System.Console.Haskeline.Command.KillRing
judah's avatar
judah committed
72
                System.Console.Haskeline.Directory
73
                System.Console.Haskeline.Emacs
judah's avatar
judah committed
74
                System.Console.Haskeline.InputT
75
                System.Console.Haskeline.Key
76
                System.Console.Haskeline.LineState
77
                System.Console.Haskeline.Monads
78
                System.Console.Haskeline.Prefs
judah's avatar
judah committed
79
                System.Console.Haskeline.Recover
judah's avatar
judah committed
80
                System.Console.Haskeline.RunCommand
81
                System.Console.Haskeline.Term
82
                System.Console.Haskeline.Command.Undo
83
                System.Console.Haskeline.Vi
84
    include-dirs: includes
judah's avatar
judah committed
85
    c-sources: cbits/h_wcwidth.c
86

87
    if os(windows) {
88
        Build-depends: Win32>=2.0
89
        Other-modules: System.Console.Haskeline.Backend.Win32
90
                       System.Console.Haskeline.Backend.Win32.Echo
judah's avatar
judah committed
91
        c-sources: cbits/win_console.c
92
        includes: win_console.h, windows_cconv.h
judah's avatar
judah committed
93
        install-includes: win_console.h
94
95
        cpp-options: -DMINGW
    } else {
96
        Build-depends: unix>=2.0 && < 2.8
97
        Other-modules:
98
                System.Console.Haskeline.Backend.Posix
99
                System.Console.Haskeline.Backend.Posix.Encoder
100
                System.Console.Haskeline.Backend.DumbTerm
101
        if flag(terminfo) {
judah's avatar
judah committed
102
            Build-depends: terminfo>=0.3.1.3 && <0.5
103
104
105
            Other-modules: System.Console.Haskeline.Backend.Terminfo
            cpp-options: -DTERMINFO
        }
106
107
108
        if os(solaris) {
            cpp-options: -DUSE_TERMIOS_H
        }
109
110
    }
    ghc-options: -Wall