darcs-mirrors/haskeline.git
5 years agoFix Windows Build. master
Judah Jacobson [Sat, 12 Oct 2013 18:11:32 +0000 (18:11 +0000)] 
Fix Windows Build.
Manual merge from git.haskell.org/packages/haskeline.git
Original patch by Edward Z. Yang <ezyang@mit.edu>

5 years agoFollow unix's version bump
Judah Jacobson [Sat, 12 Oct 2013 18:09:30 +0000 (18:09 +0000)] 
Follow unix's version bump
Manual merge from git.haskell.org/packages/haskeline.git
Original patch by Ian Lynagh <ian@well-typed.com>

5 years agoAvoid shadowing `handlers` variable in `catches`
Judah Jacobson [Sat, 12 Oct 2013 18:08:33 +0000 (18:08 +0000)] 
Avoid shadowing `handlers` variable in `catches`
Manual merge from git.haskell.org/packages/haskeline.git
Original patch by Herbert Valerio Riedel <hvr@gnu.org>

5 years agoFix build on Win64
Judah Jacobson [Sat, 12 Oct 2013 18:06:11 +0000 (18:06 +0000)] 
Fix build on Win64
Manual merge from git.haskell.org/packages/haskeline.git
Original patch by Ian Lynagh

5 years agoAdd 'catches' to MonadException. Patch from Håkan Thörngren.
Judah Jacobson [Thu, 15 Aug 2013 02:17:26 +0000 (02:17 +0000)] 
Add 'catches' to MonadException.  Patch from Håkan Thörngren.

6 years agoInclude termios.h on Android because winsize is defined in it.
Judah Jacobson [Tue, 29 Jan 2013 14:39:42 +0000 (14:39 +0000)] 
Include termios.h on Android because winsize is defined in it.

Patch from Nathan Hüsken.

6 years agoFix build on ghc-6.12.3.
Judah Jacobson [Sun, 20 Jan 2013 19:31:35 +0000 (19:31 +0000)] 
Fix build on ghc-6.12.3.

6 years agoAllow building with base-4.7. Patch from Ian Lynagh.
Judah Jacobson [Sat, 1 Dec 2012 06:19:28 +0000 (06:19 +0000)] 
Allow building with base-4.7.  Patch from Ian Lynagh.

6 years agoBump version to 0.7.0.4.
Judah Jacobson [Sat, 1 Dec 2012 06:17:47 +0000 (06:17 +0000)] 
Bump version to 0.7.0.4.

6 years agoBump version to 0.7.0.3. 0_7_0_3
Judah Jacobson [Fri, 7 Sep 2012 02:40:54 +0000 (02:40 +0000)] 
Bump version to 0.7.0.3.

6 years agoRefactor terminal unit tests.
Judah Jacobson [Sun, 26 Aug 2012 20:37:55 +0000 (20:37 +0000)] 
Refactor terminal unit tests.

Previously we used the "script" command-line utility to capture output from
programs that expected to be run in a terminal.
Now, we use openpty and other C function (as wrapped by the unix library) to
run them directly from Haskell.

As a related change, we now return the individual chunks of bytes that were
output from the process that we're testing.  This lets us test its behavior
more specifically, in particular in the "file style" tests with an incomplete
byte sequence at EOF.

6 years agoDon't use Control.Exception.Extensible in Setup.hs.
Judah Jacobson [Sun, 26 Aug 2012 00:07:04 +0000 (00:07 +0000)] 
Don't use Control.Exception.Extensible in Setup.hs.

This fixes the build on ghc>=7.6.1, which no longer provides the
extensible-exceptions package by default.  (Haskeline's own
dependency on extensible-exceptions was removed in haskeline-0.7.0.0.)

6 years agoBump build-depends to allow directory-1.2.
Judah Jacobson [Tue, 14 Aug 2012 15:34:28 +0000 (15:34 +0000)] 
Bump build-depends to allow directory-1.2.
Patch from Paolo Capriotti.

6 years agoAdd CHANGES for 0.7.0.2. 0_7_0_2
Judah Jacobson [Thu, 26 Jul 2012 05:42:04 +0000 (05:42 +0000)] 
Add CHANGES for 0.7.0.2.

6 years agoBump version to 0.7.0.2.
Judah Jacobson [Thu, 26 Jul 2012 05:36:48 +0000 (05:36 +0000)] 
Bump version to 0.7.0.2.

6 years agoFix build on Windows with ghc>=7.4.1.
Judah Jacobson [Thu, 26 Jul 2012 05:33:24 +0000 (05:33 +0000)] 
Fix build on Windows with ghc>=7.4.1.

6 years agoTAG 0.7.0.1
Judah Jacobson [Wed, 25 Jul 2012 15:11:53 +0000 (15:11 +0000)] 
TAG 0.7.0.1

6 years agoCHANGES for 0.7.0.1.
Judah Jacobson [Wed, 25 Jul 2012 15:09:11 +0000 (15:09 +0000)] 
CHANGES for 0.7.0.1.

6 years agoBump version to 0.7.0.1.
Judah Jacobson [Wed, 25 Jul 2012 04:03:20 +0000 (04:03 +0000)] 
Bump version to 0.7.0.1.

6 years agoRemove Haskell comment on #endif line; it breaks the GHC build.
Judah Jacobson [Wed, 25 Jul 2012 04:02:00 +0000 (04:02 +0000)] 
Remove Haskell comment on #endif line; it breaks the GHC build.

6 years agoEdits to the MonadException haddocks. 0_7_0_0
Judah Jacobson [Sun, 22 Jul 2012 22:33:16 +0000 (22:33 +0000)] 
Edits to the MonadException haddocks.

6 years agoAdd test folder for unit-testing file completion.
Judah Jacobson [Sun, 22 Jul 2012 22:14:08 +0000 (22:14 +0000)] 
Add test folder for unit-testing file completion.

6 years agoUpdate CHANGES.
Judah Jacobson [Sun, 22 Jul 2012 22:02:01 +0000 (22:02 +0000)] 
Update CHANGES.

6 years agoUse the base package's IO encoding/decoding on ghc>=7.4.1.
Judah Jacobson [Sun, 22 Jul 2012 21:45:47 +0000 (21:45 +0000)] 
Use the base package's IO encoding/decoding on ghc>=7.4.1.

This removes the dependency on the utf8-string package (except for ghc<7.4.1).
A few minor encoding/decoding corner cases were also fixed.

6 years agoAdd unit tests for general input/output and encoding/decoding behavior.
Judah Jacobson [Sun, 22 Jul 2012 20:44:59 +0000 (20:44 +0000)] 
Add unit tests for general input/output and encoding/decoding behavior.

6 years agoFix guessing window size from terminfo.
Judah Jacobson [Sat, 21 Jul 2012 16:45:43 +0000 (16:45 +0000)] 
Fix guessing window size from terminfo.

6 years agoChange new version number to fully qualified "0.7.0.0"
Judah Jacobson [Thu, 19 Jul 2012 01:29:12 +0000 (01:29 +0000)] 
Change new version number to fully qualified "0.7.0.0"

6 years agoAdd current finished changes for haskeline-0.7
Judah Jacobson [Thu, 19 Jul 2012 01:27:13 +0000 (01:27 +0000)] 
Add current finished changes for haskeline-0.7

6 years agoPrevent crash on Windows when writing many characters at once.
Judah Jacobson [Wed, 18 Jul 2012 21:03:25 +0000 (21:03 +0000)] 
Prevent crash on Windows when writing many characters at once.

A couple cases which are known to have triggered this are:
- Entering a long (>2^15) input line
- Tab-completing a folder containing many files, with completionPaging:False

6 years agoFix ctrl-L on Windows with large console window sizes (GHC ticket #4415).
Judah Jacobson [Wed, 18 Jul 2012 20:59:56 +0000 (20:59 +0000)] 
Fix ctrl-L on Windows with large console window sizes (GHC ticket #4415).

Here "large" means an area of >2^15 cells, e.g., 200x200.
Original patch by fryguybob@gmail.com.

6 years agoWin32: Don't pass invalid arguments to SetPosition for long input lines.
Judah Jacobson [Wed, 18 Jul 2012 20:36:23 +0000 (20:36 +0000)] 
Win32: Don't pass invalid arguments to SetPosition for long input lines.

6 years agoTypo fix in type synonym.
Judah Jacobson [Wed, 18 Jul 2012 18:48:15 +0000 (18:48 +0000)] 
Typo fix in type synonym.

7 years agoUpdate CHANGES for 0.6.4.7.
Judah Jacobson [Sun, 13 May 2012 18:32:45 +0000 (18:32 +0000)] 
Update CHANGES for 0.6.4.7.

6 years agoAdd back wrap/handleInterrupt.
Judah Jacobson [Tue, 17 Jul 2012 18:53:00 +0000 (18:53 +0000)] 
Add back wrap/handleInterrupt.

Although GHC provides similar functionality by default, it will
terminate the program the second time that ctrl-c is pressed.  In contrast,
wrapInterrupt will throw an exception on every ctrl-c, which is better
behavior for the types of programs that use haskeline.

6 years agoRemember the current history or kill ring state after ctrl-c (or other exception).
Judah Jacobson [Tue, 17 Jul 2012 19:39:05 +0000 (19:39 +0000)] 
Remember the current history or kill ring state after ctrl-c (or other exception).

6 years agoAllow unix-2.6 as a dependency, in preparation for ghc-7.6.1.
Judah Jacobson [Thu, 12 Jul 2012 16:19:44 +0000 (16:19 +0000)] 
Allow unix-2.6 as a dependency, in preparation for ghc-7.6.1.

6 years agoBump dependencies to base-4.6.
Judah Jacobson [Tue, 19 Jun 2012 22:52:42 +0000 (22:52 +0000)] 
Bump dependencies to base-4.6.

Also remove "import Prelude hiding (catch)" for ghc>=7.5, since
Prelude.catch will be removed from base>=4.6.

7 years agoChange the MonadException class to be more general.
Judah Jacobson [Mon, 21 May 2012 23:50:20 +0000 (23:50 +0000)] 
Change the MonadException class to be more general.

This patch switches our MonadException implementation to an approach
based on the monad-control package.

The main immediate benefit is that we no longer get warnings from the deprecated
block/unblock functions, since we now call Control.Exception.{bracket,finally,etc}
directly instead of reimplementing them from more primitive operations.

7 years agoAdd .gitignore for GHC build.
Paolo Capriotti [Wed, 7 Mar 2012 16:41:35 +0000 (16:41 +0000)] 
Add .gitignore for GHC build.

7 years agoFix issues with previous Win64 patch.
Judah Jacobson [Sat, 19 May 2012 22:41:53 +0000 (22:41 +0000)] 
Fix issues with previous Win64 patch.

7 years agoChange foreign imports to use ccall for Win64.
Judah Jacobson [Wed, 16 May 2012 19:17:42 +0000 (19:17 +0000)] 
Change foreign imports to use ccall for Win64.

This prevents warnings about the stdcall calling convention on Win64.
This patch was submitted by Ian Lynagh.

7 years agoDon't make InputT an instance of our internal MonadState/Reader classes.
Judah Jacobson [Fri, 18 May 2012 18:20:55 +0000 (18:20 +0000)] 
Don't make InputT an instance of our internal MonadState/Reader classes.

Haddock displays those instances (which are in actually hidden to the user).
This makes it seem like InputT implements MonadState/Reader from the mtl
package.

7 years agoDon't depend on mtl; instead, depend directly on transformers (>=0.2 && <0.4).
Judah Jacobson [Sun, 13 May 2012 20:52:43 +0000 (20:52 +0000)] 
Don't depend on mtl; instead, depend directly on transformers (>=0.2 && <0.4).

7 years agoRemove commented-out line.
Judah Jacobson [Sat, 5 May 2012 23:25:40 +0000 (23:25 +0000)] 
Remove commented-out line.

This was also  preventing Haddock from parsing the code.

7 years agoWorkaround for Cabal ticket #944.
Judah Jacobson [Sat, 28 Apr 2012 23:05:54 +0000 (23:05 +0000)] 
Workaround for Cabal ticket #944.

This patch is a modified version of one submitted
by Paul van der Walt.
It adds a "haskeline_" prefix to all of Haskeline's
C symbol names.  This avoids clashing symbol names with other
packages that implement the same C functions.
(In particular, it prevents a clash with vty on "mk_wcswidth".)

7 years agoAllow building with mtl-2.1.
Judah Jacobson [Sat, 28 Apr 2012 20:56:35 +0000 (20:56 +0000)] 
Allow building with mtl-2.1.

7 years agoAdd back a utf8-string dependency, for now.
Judah Jacobson [Sat, 28 Apr 2012 20:42:31 +0000 (20:42 +0000)] 
Add back a utf8-string dependency, for now.

7 years agoFix bug in Windows line redrawing.
Judah Jacobson [Sat, 28 Apr 2012 20:26:58 +0000 (20:26 +0000)] 
Fix bug in Windows line redrawing.

7 years agoFix Windows build from previous patch (Term refactor).
Judah Jacobson [Sat, 28 Apr 2012 20:24:59 +0000 (20:24 +0000)] 
Fix Windows build from previous patch (Term refactor).

7 years agoRefactor Term to make the backends more modular.
Judah Jacobson [Sun, 25 Mar 2012 14:24:47 +0000 (14:24 +0000)] 
Refactor Term to make the backends more modular.

The main benefit is to move all encoding-related functions
to the Posix module.

NOTE: This patch breaks the build on Windows, for now.

7 years agoRefactor: move all terminfo output encoding into a single place.
Judah Jacobson [Fri, 23 Mar 2012 18:59:45 +0000 (18:59 +0000)] 
Refactor: move all terminfo output encoding into a single place.

7 years agoUse a writer monad in the Terminfo backend.
Judah Jacobson [Fri, 23 Mar 2012 18:36:40 +0000 (18:36 +0000)] 
Use a writer monad in the Terminfo backend.

The main benefit, besides simplifying the code, is that we
now draw all parts of a line change in one terminal action.
This prevents "flicker" from the cursor appearing briefly
in an intermediate state.

7 years agoRemove the Encoding module.
Judah Jacobson [Fri, 23 Mar 2012 17:36:38 +0000 (17:36 +0000)] 
Remove the Encoding module.

This change is in preparation for using ghc>=7.4's encodings.

7 years agoUse ghc>=7.4 encoding when reading/writing the history file.
Judah Jacobson [Fri, 23 Mar 2012 17:26:58 +0000 (17:26 +0000)] 
Use ghc>=7.4 encoding when reading/writing the history file.

7 years ago#117: Implement mapInputT.
Judah Jacobson [Fri, 23 Mar 2012 16:54:47 +0000 (16:54 +0000)] 
#117: Implement mapInputT.

7 years agoDon't use MonadState to expose the History API.
Judah Jacobson [Fri, 24 Feb 2012 23:46:53 +0000 (23:46 +0000)] 
Don't use MonadState to expose the History API.

Instead, provide explicit get/put/modifyHistory actions.
This makes it easier to use InputT in a stack of monad transformers.

7 years agoBump upper version limits for containers and bytestring.
Judah Jacobson [Wed, 22 Feb 2012 18:11:39 +0000 (18:11 +0000)] 
Bump upper version limits for containers and bytestring.

7 years agoRemove the wrap/handleInterrupt functions.
Judah Jacobson [Mon, 20 Feb 2012 00:14:09 +0000 (00:14 +0000)] 
Remove the wrap/handleInterrupt functions.

GHC has provided ctrl-c handling since ghc-6.10.  So that functionality
is now redundant.

7 years agoAdd a source-repository flag to the .cabal file.
Judah Jacobson [Sun, 19 Feb 2012 23:49:21 +0000 (23:49 +0000)] 
Add a source-repository flag to the .cabal file.

7 years agoUse ScopedTypeVariables instead of the (deprecated) PatternSignatures flag.
Judah Jacobson [Sun, 19 Feb 2012 23:46:53 +0000 (23:46 +0000)] 
Use ScopedTypeVariables instead of the (deprecated) PatternSignatures flag.

That flag was introduced in ghc-6.10.1, so it's OK to require.

7 years agoRemove the "base2" flag now that we require ghc>=6.10.1.
Judah Jacobson [Sun, 19 Feb 2012 23:45:11 +0000 (23:45 +0000)] 
Remove the "base2" flag now that we require ghc>=6.10.1.

7 years agoDon't use the extensible-exceptions package.
Judah Jacobson [Sun, 19 Feb 2012 23:40:25 +0000 (23:40 +0000)] 
Don't use the extensible-exceptions package.

This bumps up haskeline's requirements to ghc-6.10.1 or later.

7 years agoBump version to 0.7.
Judah Jacobson [Sun, 19 Feb 2012 23:25:24 +0000 (23:25 +0000)] 
Bump version to 0.7.

7 years agoUpdate version to 0.6.4.6, plus CHANGES.
Judah Jacobson [Sun, 19 Feb 2012 23:24:07 +0000 (23:24 +0000)] 
Update version to 0.6.4.6, plus CHANGES.

7 years agobuild with ghc 7.4.1-rc1
Mark Wright [Sat, 24 Dec 2011 00:51:59 +0000 (00:51 +0000)] 
build with ghc 7.4.1-rc1

7 years agoBump version to 0.6.4.5.
Judah Jacobson [Wed, 19 Oct 2011 17:38:34 +0000 (17:38 +0000)] 
Bump version to 0.6.4.5.

7 years agoBump version to 0.6.4.4.
Judah Jacobson [Fri, 14 Oct 2011 08:10:17 +0000 (08:10 +0000)] 
Bump version to 0.6.4.4.

7 years agoBump version to 0.6.4.3.
Judah Jacobson [Sat, 13 Aug 2011 23:58:25 +0000 (23:58 +0000)] 
Bump version to 0.6.4.3.

7 years agoBump version to 0.6.4.2, since someone uploaded a buggy 0.6.4.1 to Hackage without...
Judah Jacobson [Fri, 12 Aug 2011 16:13:32 +0000 (16:13 +0000)] 
Bump version to 0.6.4.2, since someone uploaded a buggy 0.6.4.1 to Hackage without my consent.

7 years agoBump version to 0.6.4.1.
Judah Jacobson [Fri, 12 Aug 2011 15:59:33 +0000 (15:59 +0000)] 
Bump version to 0.6.4.1.

7 years agoUpdate CHANGES.
Judah Jacobson [Wed, 19 Oct 2011 17:40:38 +0000 (17:40 +0000)] 
Update CHANGES.

7 years agoFix #116: type signature of wcwidth foreign call.
Judah Jacobson [Wed, 19 Oct 2011 17:27:52 +0000 (17:27 +0000)] 
Fix #116: type signature of wcwidth foreign call.
Patch by Peter Herecek.
This fixes a hang when the prompt contains an escape character.

7 years agoUpdate CHANGES.
Judah Jacobson [Mon, 17 Oct 2011 01:05:35 +0000 (01:05 +0000)] 
Update CHANGES.

7 years agoDon't require NondecreasingIndentation.
Judah Jacobson [Mon, 17 Oct 2011 01:03:46 +0000 (01:03 +0000)] 
Don't require NondecreasingIndentation.
There was only one place in the source that required it.

7 years agoUpdate the CHANGES file.
Judah Jacobson [Mon, 17 Oct 2011 00:02:51 +0000 (00:02 +0000)] 
Update the CHANGES file.

7 years agoFix #73, again. (Pasting multiple lines might drop some characters.)
Judah Jacobson [Sun, 16 Oct 2011 23:38:24 +0000 (23:38 +0000)] 
Fix #73, again.  (Pasting multiple lines might drop some characters.)
I think the regression occured when I fixed #106.

7 years agoFix #115: make the "df" and "dt" commands behave as in vim and readline.
Judah Jacobson [Sun, 16 Oct 2011 21:28:29 +0000 (21:28 +0000)] 
Fix #115: make the "df" and "dt" commands behave as in vim and readline.

7 years agoFix bug on ghc-7.2.1 with tab-completion of Unicode filenames.
Judah Jacobson [Sun, 14 Aug 2011 00:01:00 +0000 (00:01 +0000)] 
Fix bug on ghc-7.2.1 with tab-completion of Unicode filenames.

This was due to the changed behavior of getDirectoryContents.
(It now uses the locale to decode filenames.)

7 years agoRelax base dependency
Ian Lynagh [Thu, 7 Jul 2011 18:51:56 +0000 (18:51 +0000)] 
Relax base dependency

7 years agoRelax a dependency
Ian Lynagh [Wed, 6 Jul 2011 19:27:34 +0000 (19:27 +0000)] 
Relax a dependency

8 years agoUse CAString functions to marshal locale names
Max Bolingbroke [Mon, 11 Apr 2011 21:16:21 +0000 (21:16 +0000)] 
Use CAString functions to marshal locale names

8 years agoTAG 0.6.4
Judah Jacobson [Thu, 17 Mar 2011 06:07:52 +0000 (06:07 +0000)] 
TAG 0.6.4

8 years agoRecord getInputLineWithInitial in CHANGES.
Judah Jacobson [Thu, 17 Mar 2011 06:04:07 +0000 (06:04 +0000)] 
Record getInputLineWithInitial in CHANGES.

8 years agoAdd new function getInputLineWithInitial.
Judah Jacobson [Mon, 21 Feb 2011 23:26:28 +0000 (23:26 +0000)] 
Add new function getInputLineWithInitial.
This function lets the user specify initial "default" text for the prompt.
Adapted from a patch by Robert Massaioli.

8 years agoBump version to 0.6.4.0.
Judah Jacobson [Mon, 21 Feb 2011 23:02:19 +0000 (23:02 +0000)] 
Bump version to 0.6.4.0.

8 years agoFix issues with the "#81 Attempts" patch.
Judah Jacobson [Sat, 11 Dec 2010 07:13:20 +0000 (07:13 +0000)] 
Fix issues with the "#81 Attempts" patch.

8 years agoAttempt to fix #81 on Windows.
Judah Jacobson [Mon, 6 Dec 2010 21:55:48 +0000 (21:55 +0000)] 
Attempt to fix #81 on Windows.

8 years agoAdd NondecreasingIndentation extension for GHC >= 7.1
Ian Lynagh [Mon, 17 Jan 2011 19:22:23 +0000 (19:22 +0000)] 
Add NondecreasingIndentation extension for GHC >= 7.1

8 years agoBump version to 0.6.3.3.
Judah Jacobson [Mon, 6 Dec 2010 21:50:29 +0000 (21:50 +0000)] 
Bump version to 0.6.3.3.

8 years agoBump version to 0.6.3.2 and update CHANGES. 0_6_3_2
Judah Jacobson [Thu, 4 Nov 2010 17:12:30 +0000 (17:12 +0000)] 
Bump version to 0.6.3.2 and update CHANGES.

8 years agoIncrease build-depends: allow mtl-2.0.
Judah Jacobson [Wed, 27 Oct 2010 21:37:20 +0000 (21:37 +0000)] 
Increase build-depends: allow mtl-2.0.

8 years agoTAG 0.6.3.1
Judah Jacobson [Mon, 20 Sep 2010 19:44:20 +0000 (19:44 +0000)] 
TAG 0.6.3.1

8 years agoCHANGES for 0.6.3.1.
Judah Jacobson [Mon, 20 Sep 2010 17:07:37 +0000 (17:07 +0000)] 
CHANGES for 0.6.3.1.

8 years agoBump version to 0.6.3.1.
Judah Jacobson [Mon, 20 Sep 2010 17:06:32 +0000 (17:06 +0000)] 
Bump version to 0.6.3.1.

8 years agoFix build on ghc-6.10.
Judah Jacobson [Mon, 20 Sep 2010 17:02:33 +0000 (17:02 +0000)] 
Fix build on ghc-6.10.

8 years agoTAG 0.6.3
Judah Jacobson [Wed, 15 Sep 2010 18:12:57 +0000 (18:12 +0000)] 
TAG 0.6.3

8 years agoRemove unnecessary "forall" in getInputLine's type.
Judah Jacobson [Tue, 14 Sep 2010 00:50:22 +0000 (00:50 +0000)] 
Remove unnecessary "forall" in getInputLine's type.

8 years agoAdd ^L to getPassword.
Judah Jacobson [Mon, 13 Sep 2010 20:39:06 +0000 (20:39 +0000)] 
Add ^L to getPassword.

8 years agoTweak docs for preferTerm.
Judah Jacobson [Mon, 13 Sep 2010 20:11:41 +0000 (20:11 +0000)] 
Tweak docs for preferTerm.

8 years agoRename "Mode" to "Behavior".
Judah Jacobson [Mon, 13 Sep 2010 20:03:31 +0000 (20:03 +0000)] 
Rename "Mode" to "Behavior".
The former is already used by several other APIs; and the terminology "mode" is
already used elsewhere in Haskeline itself.