From da792fdfec7b46447ce624fabb3c3d8a8b7a5ba6 Mon Sep 17 00:00:00 2001 From: mrkkrp Date: Wed, 21 Dec 2016 15:15:20 +0300 Subject: [PATCH] =?UTF-8?q?Hide=20=E2=80=98Text.Inflections.Types=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Text/Inflections.hs | 13 +++++++++++++ inflections.cabal | 2 +- test/Text/Inflections/DasherizeSpec.hs | 3 +-- test/Text/Inflections/HumanizeSpec.hs | 3 +-- test/Text/Inflections/TitleizeSpec.hs | 3 +-- test/Text/Inflections/UnderscoreSpec.hs | 3 +-- 6 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Text/Inflections.hs b/Text/Inflections.hs index cebcfde..202d1b3 100644 --- a/Text/Inflections.hs +++ b/Text/Inflections.hs @@ -87,6 +87,15 @@ module Text.Inflections , ordinalize , parseSnakeCase , parseCamelCase + -- * Types and helpers + , Word + , WordType (..) + , mkWord + , mkAcronym + , unWord + , SomeWord (..) + , unSomeWord + , InflectionException (..) -- * Often used combinators , toUnderscore , toDashed @@ -110,6 +119,10 @@ import Text.Inflections.Types import Text.Inflections.Underscore (underscore) import Text.Megaparsec +#if MIN_VERSION_base(4,8,0) +import Prelude hiding (Word) +#endif + -- | Transforms CamelCasedString to snake_cased_string_with_underscores. In -- case of failed parsing 'InflectionException' is thrown. -- diff --git a/inflections.cabal b/inflections.cabal index c21a1fd..7ed9b17 100644 --- a/inflections.cabal +++ b/inflections.cabal @@ -29,7 +29,6 @@ flag dev library exposed-modules: Text.Inflections - , Text.Inflections.Types other-modules: Text.Inflections.Data , Text.Inflections.Camelize @@ -41,6 +40,7 @@ library , Text.Inflections.Parse.SnakeCase , Text.Inflections.Titleize , Text.Inflections.Transliterate + , Text.Inflections.Types , Text.Inflections.Underscore if flag(dev) diff --git a/test/Text/Inflections/DasherizeSpec.hs b/test/Text/Inflections/DasherizeSpec.hs index 050629c..7b3d514 100644 --- a/test/Text/Inflections/DasherizeSpec.hs +++ b/test/Text/Inflections/DasherizeSpec.hs @@ -7,8 +7,7 @@ where import Test.Hspec -import Text.Inflections (dasherize) -import Text.Inflections.Types +import Text.Inflections #if !MIN_VERSION_base(4,8,0) import Control.Applicative diff --git a/test/Text/Inflections/HumanizeSpec.hs b/test/Text/Inflections/HumanizeSpec.hs index 7b742c7..a31ece5 100644 --- a/test/Text/Inflections/HumanizeSpec.hs +++ b/test/Text/Inflections/HumanizeSpec.hs @@ -5,8 +5,7 @@ module Text.Inflections.HumanizeSpec (spec) where import Test.Hspec -import Text.Inflections (humanize) -import Text.Inflections.Types +import Text.Inflections #if !MIN_VERSION_base(4,8,0) import Control.Applicative diff --git a/test/Text/Inflections/TitleizeSpec.hs b/test/Text/Inflections/TitleizeSpec.hs index 4359ff2..6218cf2 100644 --- a/test/Text/Inflections/TitleizeSpec.hs +++ b/test/Text/Inflections/TitleizeSpec.hs @@ -4,8 +4,7 @@ module Text.Inflections.TitleizeSpec (spec) where import Test.Hspec -import Text.Inflections (titleize) -import Text.Inflections.Types +import Text.Inflections #if !MIN_VERSION_base(4,8,0) import Control.Applicative diff --git a/test/Text/Inflections/UnderscoreSpec.hs b/test/Text/Inflections/UnderscoreSpec.hs index c128299..9e21cfa 100644 --- a/test/Text/Inflections/UnderscoreSpec.hs +++ b/test/Text/Inflections/UnderscoreSpec.hs @@ -4,8 +4,7 @@ module Text.Inflections.UnderscoreSpec (spec) where import Test.Hspec -import Text.Inflections (underscore) -import Text.Inflections.Types +import Text.Inflections #if !MIN_VERSION_base(4,8,0) import Control.Applicative