concept detail in category haskell

This is an excerpt from Manning's book Haskell in Depth.
Now we read the filename from the command line without worrying too much about incorrect user input. This is done in the first line of the
mainfunction. The modulesData.TextandData.Text.IOare usually imported with qualifiers to avoid name clashes withPrelude(the module that is imported by default). They come with thetextpackage. This package will be installed when we build the project, because it’s listed as a dependency in the description of thevocab1executable in the configuration of thehid-examplespackage. Look at thepackage.yamlfile and search for thevocab1entry in there if you are interested in details. We’ll get back to dependencies management in Chapter 4.
Here we apply the
RWSTmonad transformer to theIOmonad. The plan now is to take theIOmonad, apply theStateTtransformer to it, then apply theWriterTtransformer, and then complete the stack with theReaderTtransformer. This is usually done innewtypedefinitions. This allows to hide details from a user. The second step is to make sure that this newly built monad stack implements theMonadReader,MonadWriter, andMonadStatetype classes so that we can use such functions asget,ask,tell, etc. We should also make sure that we are able to do theliftIOcalls (this is a method from theMonadIOtype class). Last but not least, this monad stack should also implement theFunctor,Applicative, andMonadtype classes, it is a monad after all!