U75IUKC45YIDO6WBQMJOOX3WZA5VBJDQJJR63TTYMHTDOPXKVUNQC
ZV7PIRTUNQYLWJQWKG73RC2X7MKSUMPGU7HQUW7TIBXB4OSYYDBAC
AT2MY3ZCDSC3IHYVUKVS7HXEJNSLZEWVBM4TMMSYKOL5DLZBA4UQC
MKCGHVY3HLUVIXT6SNU7HS6ZH36MUVK2UH2GLNQYEBKAFDWKW7IQC
CPFJNUSAXIGP4Z5U6YBH7EOCZTS2B77YFOWJCSI72BUVVJR4K46AC
tests = testGroup "Conversions"
tests = testGroup "Conversions and Constructors"
, printableTextSingletonTest
printableTextSingletonTest :: TestTreeprintableTextSingletonTest = testGroup "singleton constructor" [ testCase "Whitespace character" $ Nothing @=? PrintableText.singleton ' ' , testCase "Valid character" $ Just "f" @=? PrintableText.unPrintableText <$> PrintableText.singleton 'f'
printableTextSingletonTest :: TestTree
printableTextSingletonTest = testGroup "singleton constructor"
[ testCase "Whitespace character" $
Nothing @=? PrintableText.singleton ' '
, testCase "Valid character" $
Just "f" @=? PrintableText.unPrintableText <$> PrintableText.singleton 'f'
singleton :: Char -> PrintableTextsingleton = PrintableText . T.singleton
singleton :: Char -> PrintableText
singleton = PrintableText . T.singleton
singleton :: Char -> Maybe PrintableTextsingleton x | isSpace x = Nothing | otherwise = Just . PrintableText . T.singleton $ x
singleton :: Char -> Maybe PrintableText
singleton x
| isSpace x = Nothing
| otherwise = Just . PrintableText . T.singleton $ x