Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the text dependency #725

Merged
merged 2 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions hindent.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ library
, regex-tdfa
, split
, syb
, text
, transformers
, unicode-show
, utf8-string
Expand Down Expand Up @@ -137,7 +136,6 @@ library hindent-internal
, regex-tdfa
, split
, syb
, text
, transformers
, unicode-show
, utf8-string
Expand Down Expand Up @@ -181,7 +179,6 @@ executable hindent
, regex-tdfa
, split
, syb
, text
, transformers
, unicode-show
, utf8-string
Expand Down Expand Up @@ -229,7 +226,6 @@ test-suite hindent-test
, regex-tdfa
, split
, syb
, text
, transformers
, unicode-show
, utf8-string
Expand Down Expand Up @@ -277,7 +273,6 @@ benchmark hindent-bench
, regex-tdfa
, split
, syb
, text
, transformers
, unicode-show
, utf8-string
Expand Down
1 change: 0 additions & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ dependencies:
- regex-tdfa
- split
- syb
- text
- transformers
- unicode-show
- utf8-string
Expand Down
4 changes: 1 addition & 3 deletions src/HIndent/CommandlineOptions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module HIndent.CommandlineOptions
) where

import Data.Maybe
import qualified Data.Text as T
import HIndent.Config
import HIndent.LanguageExtension
import HIndent.LanguageExtension.Types
Expand Down Expand Up @@ -40,8 +39,7 @@ options config =
fmap
getExtensions
(many
(T.pack <$>
strOption
(strOption
(short 'X' <> help "Language extension" <> metavar "GHCEXT")))
indentSpaces =
option
Expand Down
5 changes: 2 additions & 3 deletions src/HIndent/LanguageExtension.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import Data.Char
import Data.List
import Data.List.Split
import Data.Maybe
import qualified Data.Text as T
import qualified GHC.Driver.Session as GLP
import qualified GHC.LanguageExtensions as GLP
import HIndent.LanguageExtension.Conversion
Expand Down Expand Up @@ -48,8 +47,8 @@ collectLanguageExtensionsFromSource =
collectLanguageExtensionsFromSourceViaOptionsPragma

-- | Consume an extensions list from arguments.
getExtensions :: [T.Text] -> [Extension]
getExtensions = foldr (f . T.unpack) defaultExtensions
getExtensions :: [String] -> [Extension]
getExtensions = foldr f defaultExtensions
where
f "Haskell98" _ = []
f x a =
Expand Down