File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
dhall-lsp-server/src/Dhall/LSP Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff 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.
1517tshow :: 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!
2022lines' :: Text -> NonEmpty Text
2123lines' 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).
2830unlines' :: [Text ] -> Text
29- unlines' = intercalate " \n "
31+ unlines' = Text. intercalate " \n "
3032
3133rightToMaybe :: Either a b -> Maybe b
3234rightToMaybe (Right b) = Just b
You can’t perform that action at this time.
0 commit comments