Skip to content

Commit d27a9ca

Browse files
committed
Import Data.Text qualified in dhall-lsp-server
1 parent 4729bce commit d27a9ca

File tree

1 file changed

+7
-5
lines changed
  • dhall-lsp-server/src/Dhall/LSP

1 file changed

+7
-5
lines changed

dhall-lsp-server/src/Dhall/LSP/Util.hs

+7-5
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,28 @@ module Dhall.LSP.Util (
77
unlines'
88
) where
99

10-
import Data.List.NonEmpty
11-
import Data.Text
10+
import Data.List.NonEmpty (NonEmpty (..))
11+
import Data.Text (Text)
12+
13+
import qualified Data.Text as Text
1214

1315
-- | Shorthand for @pack . show@. Useful since we are mostly working with Text
1416
-- rather than String.
1517
tshow :: Show a => a -> Text
16-
tshow = pack . show
18+
tshow = Text.pack . show
1719

1820
-- | A variant of @Data.Text.lines@ that does not swallow the last empty. Always
1921
-- returns at least the empty line!
2022
lines' :: Text -> NonEmpty Text
2123
lines' text =
22-
case split (== '\n') text of
24+
case Text.split (== '\n') text of
2325
[] -> "" :| [] -- this case never occurs!
2426
l : ls -> l :| ls
2527

2628
-- | A variant of @Data.Text.unlines@ that is the exact inverse to @lines'@ (and
2729
-- vice-versa).
2830
unlines' :: [Text] -> Text
29-
unlines' = intercalate "\n"
31+
unlines' = Text.intercalate "\n"
3032

3133
rightToMaybe :: Either a b -> Maybe b
3234
rightToMaybe (Right b) = Just b

0 commit comments

Comments
 (0)