A module to represent text with very basic formatting. Values are of
type [
Text] and shown with
showText.
As an example of the formatting:
[Line "Cooking for hungry people."
,Line "Welcome to my cookery recipe program, I sure hope you enjoy using it!"
,Line ""
,Cols ["Omlette"," A tasty eggy treat."]
,Cols [" -m"," --mushrooms"," Some mushrooms, or in fact any other ingredients you have in the cupboards"]
,Cols [" -e"," --eggs", " But always you need eggs"]
,Line ""
,Cols ["Spagetti Bolognaise", " An Italian delight."]
,Cols [" -s"," --spagetti"," The first word in the name"]
,Cols [" -b"," --bolognaise"," The second word in the name"]
,Cols [" -d"," --dolmio"," The magic ingredient!"]
,Line ""
,Line " The author of this program explicitly disclaims any liability for poisoning people who get their recipes off the internet."]
With
putStrLn (showText (Wrap 50) demo) gives:
Cooking for hungry people.
Welcome to my cookery recipe program, I sure hope
you enjoy using it!
Omlette A tasty eggy treat.
-m --mushrooms Some mushrooms, or in fact
any other ingredients you have
in the cupboards
-e --eggs But always you need eggs
Spagetti Bolognaise An Italian delight.
-s --spagetti The first word in the name
-b --bolognaise The second word in the name
-d --dolmio The magic ingredient!
The author of this program explicitly
disclaims any liability for poisoning people
who get their recipes off the internet.