lines package:relude

lines takes Text and splits it into the list by lines. Actual type of this function is the following:
lines :: Text -> [Text]
but it was given a more complex type to provide friendlier compile time errors.
>>> lines ""
[]

>>> lines "one line"
["one line"]

>>> lines "line 1\nline 2"
["line 1","line 2"]

>>> lines ("string line" :: String)
...
... 'lines' works with 'Text', not 'String'.
Possible fixes:
1. Make sure OverloadedStrings extension is enabled.
2. Apply 'toText' to a single value.
3. Apply 'map toText' to the list value.
...

>>> lines True
...
... 'lines' works with 'Text'
But given: 'Bool'
...
unlines takes list of Text values and joins them with line separator. Actual type of this function is the following:
unlines :: [Text] -> Text
but it was given a more complex type to provide friendlier compile time errors.
>>> unlines []
""

>>> unlines ["line 1"]
"line 1\n"

>>> unlines ["first line", "second line"]
"first line\nsecond line\n"

>>> unlines (["line 1", "line 2"] :: [String])
...
... 'unlines' works with 'Text', not 'String'.
Possible fixes:
1. Make sure OverloadedStrings extension is enabled.
2. Apply 'toText' to a single value.
3. Apply 'map toText' to the list value.
...

>>> unlines [True, False]
...
... 'unlines' works with 'Text'
But given: 'Bool'
...