diff options
author | Kierán Meinhardt <kieran.meinhardt@gmail.com> | 2019-01-29 23:03:22 +0100 |
---|---|---|
committer | Kierán Meinhardt <kieran.meinhardt@gmail.com> | 2019-02-05 20:52:24 +0100 |
commit | fa87fc922cd4c34b46baa32be762dda495ef6a2b (patch) | |
tree | bcd0600a8ba714278a74d210232f2363475d2d06 /src/Blessings | |
parent | e75d0cf94582a5aa6dde781b8428ffff45cf7e76 (diff) |
Blessings: add test
~ change SGR type to Word8
+ add hspec with QuickCheck
Diffstat (limited to 'src/Blessings')
-rw-r--r-- | src/Blessings/Internal.hs | 3 | ||||
-rw-r--r-- | src/Blessings/String.hs | 2 | ||||
-rw-r--r-- | src/Blessings/Text.hs | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/Blessings/Internal.hs b/src/Blessings/Internal.hs index c96a587..0ed5556 100644 --- a/src/Blessings/Internal.hs +++ b/src/Blessings/Internal.hs @@ -1,6 +1,7 @@ module Blessings.Internal where import Data.String (IsString) +import Data.Word (Word8) class (IsString a, Monoid a) => Blessable a where @@ -8,4 +9,4 @@ class (IsString a, Monoid a) => Blessable a where drop :: Int -> a -> a take :: Int -> a -> a intercalate :: a -> [a] -> a - fromInt :: Int -> a + fromWord8 :: Word8 -> a diff --git a/src/Blessings/String.hs b/src/Blessings/String.hs index c2c7273..005cd7b 100644 --- a/src/Blessings/String.hs +++ b/src/Blessings/String.hs @@ -15,4 +15,4 @@ instance Blessable String where drop = L.drop take = L.take intercalate = L.intercalate - fromInt = show + fromWord8 = show diff --git a/src/Blessings/Text.hs b/src/Blessings/Text.hs index 64d261b..1f82c22 100644 --- a/src/Blessings/Text.hs +++ b/src/Blessings/Text.hs @@ -15,4 +15,4 @@ instance Blessable Text where drop = T.drop take = T.take intercalate = T.intercalate - fromInt = T.pack . show + fromWord8 = T.pack . show |