diff --git a/hindent.cabal b/hindent.cabal index 86df2ff02..ca79ec974 100644 --- a/hindent.cabal +++ b/hindent.cabal @@ -92,7 +92,6 @@ library , regex-tdfa , split , syb - , text , transformers , unicode-show , utf8-string @@ -137,7 +136,6 @@ library hindent-internal , regex-tdfa , split , syb - , text , transformers , unicode-show , utf8-string @@ -181,7 +179,6 @@ executable hindent , regex-tdfa , split , syb - , text , transformers , unicode-show , utf8-string @@ -229,7 +226,6 @@ test-suite hindent-test , regex-tdfa , split , syb - , text , transformers , unicode-show , utf8-string @@ -277,7 +273,6 @@ benchmark hindent-bench , regex-tdfa , split , syb - , text , transformers , unicode-show , utf8-string diff --git a/package.yaml b/package.yaml index 1783fada1..5cfd4c4e5 100644 --- a/package.yaml +++ b/package.yaml @@ -41,7 +41,6 @@ dependencies: - regex-tdfa - split - syb - - text - transformers - unicode-show - utf8-string diff --git a/src/HIndent/CommandlineOptions.hs b/src/HIndent/CommandlineOptions.hs index 66fbcc428..9fbc96988 100644 --- a/src/HIndent/CommandlineOptions.hs +++ b/src/HIndent/CommandlineOptions.hs @@ -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 @@ -40,8 +39,7 @@ options config = fmap getExtensions (many - (T.pack <$> - strOption + (strOption (short 'X' <> help "Language extension" <> metavar "GHCEXT"))) indentSpaces = option diff --git a/src/HIndent/LanguageExtension.hs b/src/HIndent/LanguageExtension.hs index 6b8f7afae..c7eb1c08a 100644 --- a/src/HIndent/LanguageExtension.hs +++ b/src/HIndent/LanguageExtension.hs @@ -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 @@ -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 =