basic hierarchy in place

This commit is contained in:
Stephen Diehl
2016-12-10 12:46:48 +00:00
parent c28fa6b00c
commit b32c80d0bb
11 changed files with 261 additions and 146 deletions
+48 -4
View File
@@ -1,14 +1,58 @@
Strings
=======
```haskell
import qualified Data.Text as T
import qualified Data.Text.Lazy as L
```
Text
~~~~
----
The Text type represents Unicode character strings, in a time and space-efficient manner. This package provides text processing capabilities that are optimized for performance critical use, both in terms of large data quantities and high speed.
LText
~~~~
-----
Bytestring
~~~~~~~~~~
----------
LBytestring
~~~~~~~~~~~
-----------
Conversion
----------
```haskell
class StringConv a b where
strConv :: Leniency -> a -> b
data Leniency = Lenient | Strict
```
```haskell
toS :: StringConv a b => a -> b
```
```haskell
toSL :: StringConv a b => a -> b
```
*Example*:
```haskell
a :: LByteString
a = "Einstein"
b :: Text
b = "Feynmann"
c :: ByteString
c = "Schrödinger"
example1 :: ByteString
example1 = toS b
example2 :: Bool
example2 = (a == toS b) && (toS b == c)
```