summaryrefslogtreecommitdiff
path: root/Alpha.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Alpha.hs')
-rw-r--r--Alpha.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Alpha.hs b/Alpha.hs
index e53474b..ba35e5b 100644
--- a/Alpha.hs
+++ b/Alpha.hs
@@ -83,7 +83,7 @@ import qualified Data.List as List
import Data.String
import qualified Data.Text as Text
import qualified Data.Text.Lazy as LazyText
-import Protolude as X hiding (list, ($), (&), (.), (>>=))
+import Protolude as X hiding (list, toS, ($), (&), (.), (>>=))
import Protolude.Conv
import qualified Prelude
@@ -248,7 +248,10 @@ wrap lim = Text.words .> wrap_ 0 .> Text.unwords
-- | Automatically convert any string-like type into any other string-like type,
-- using types to infer the appropriate conversion.
str :: (StringConv a b) => a -> b
-str = Protolude.Conv.toS
+str = toS
+
+instance StringConv Int String where
+ strConv _ = show
tshow :: Show a => a -> Text
tshow = show