concept Text type in category haskell
appears as: Text type, Text types, The Text type

This is an excerpt from Manning's book Get Programming with Haskell.
Use Data.Text.Lazy and Data.Text.Lazy.IO to rewrite the lazy I/O section from lesson 22 by using the Text type.
Listing 26.1. The necessary imports for marc_to_html.hs
{-# LANGUAGE OverloadedStrings #-} #1 import qualified Data.ByteString as B #2 import qualified Data.Text as T #3 import qualified Data.Text.IO as TIO #4 import qualified Data.Text.Encoding as E #5 import Data.Maybe #6 #1 Your OverloadStrings LANGUAGE pragma so you can use string literals for all string types #2 Because you’re working with binary data, you need a way to manipulate bytes. #3 Anytime you’re working with text, especially Unicode, you need the Text type. #4 The IO functions for Text are imported separately. #5 Part of working with Unicode is safely encoding and decoding it to and from binary data. #6 You’ll be using Maybe types, as the isJust function from the Maybe package is useful. !@%STYLE%@! {"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":0,\"ch\":56},{\"line\":0,\"ch\":58}],[{\"line\":7,\"ch\":0},{\"line\":7,\"ch\":2}],[{\"line\":1,\"ch\":56},{\"line\":1,\"ch\":58}],[{\"line\":8,\"ch\":0},{\"line\":8,\"ch\":2}],[{\"line\":2,\"ch\":56},{\"line\":2,\"ch\":58}],[{\"line\":9,\"ch\":0},{\"line\":9,\"ch\":2}],[{\"line\":3,\"ch\":56},{\"line\":3,\"ch\":58}],[{\"line\":10,\"ch\":0},{\"line\":10,\"ch\":2}],[{\"line\":4,\"ch\":56},{\"line\":4,\"ch\":58}],[{\"line\":11,\"ch\":0},{\"line\":11,\"ch\":2}],[{\"line\":5,\"ch\":56},{\"line\":5,\"ch\":58}],[{\"line\":12,\"ch\":0},{\"line\":12,\"ch\":2}]]"} !@%STYLE%@!