Skip to content

Commit 4ad9ad5

Browse files
committed
Re-export Text, pack and unpack so that downstream libraries that should not have a dependency on text package can use these exports instead
1 parent 6cafb52 commit 4ad9ad5

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

prettyprinter/prettyprinter.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ library
3636
, Prettyprinter.Render.Util.SimpleDocTree
3737
, Prettyprinter.Render.Util.StackMachine
3838
, Prettyprinter.Util
39+
, Prettyprinter.Util.TextCompat
3940

4041
, Prettyprinter.Symbols.Unicode
4142
, Prettyprinter.Symbols.Ascii
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-- | Re-exports of the Text type and pack and unpack functions to allow downstream libraries
2+
-- have a policy of not having a direct dependency on the text package can easily avoid the
3+
-- dependency by using these re-exports.
4+
5+
module Prettyprinter.Util.TextCompat (
6+
Text,
7+
8+
pack,
9+
unpack,
10+
) where
11+
12+
import Data.Text (Text, pack, unpack)

0 commit comments

Comments
 (0)