haskeline icon indicating copy to clipboard operation
haskeline copied to clipboard

Expose internals

Open typedrat opened this issue 5 years ago • 7 comments

Fixes #118.

This exposes what you need to write your own backend, as shown by haskeline-brick. Please squash this if it gets merged!

typedrat avatar Sep 08 '19 18:09 typedrat

Exposing these modules only under System.Console.Haskeline.Internal implies that they have an unstable API that can be expected to break compatibility even between minor versions of Haskeline. Is this API not stable enough to retain compatibility for most or all of this functionality across minor versions, and simply bump a major version if any of these change later?

bjartur avatar Sep 13 '19 12:09 bjartur

I don’t know how stable they are, but this sort of thing is Internal in purpose at least, since it should only be used by people who know what they’re doing.

typedrat avatar Sep 15 '19 07:09 typedrat

I've actually came back here to see this pull request to my surprise. I've tested this pull request and it would totally help outsiders to use the API in order to write a widget like the Brick <-> Haskeline widget. Would it be possible to merge this and if not give a hint what would need to happen to expose some of the internals like in this pull request?

romanofski avatar Apr 26 '21 22:04 romanofski

@judah ping. What do you think about this PR? It would be very helpful for purebred and other brick-based terminal programs.

frasertweedale avatar Jul 29 '21 04:07 frasertweedale

Ping @judah, @bgamari. When able, please review and consider merging this PR.

frasertweedale avatar Sep 27 '22 11:09 frasertweedale

Any updates? Ping @judah @bgamari

4eUeP avatar Apr 20 '23 09:04 4eUeP

Also maybe we can add a warning notice like the ByteString package's Data.ByteString.Internal:

-- A module containing semi-public 'ByteString' internals. This exposes the
-- 'ByteString' representation and low level construction functions. As such
-- all the functions in this module are unsafe. The API is also not stable.

4eUeP avatar Apr 20 '23 09:04 4eUeP