{-# LANGUAGE OverloadedStrings #-}
module MyBooks where
import qualified Data. Text. Lazy as T
import qualified Data. Time. Calendar as C
data Publisher = OReilly
| Manning
| Pragmatic_ Bookshelf
| Apress
| Packt_ Pub
| Leanpub
| Ohm_ sha
| Tatsujin
| OReilly_ JP
| Gihyo
data BookCat a = Algorithms a
| Language a
| DataScience a
| Math a
| Science
| Other a
data BookInfo = BookInfo { title :: T. Text
, publisher
:: Maybe Publisher
, bookCats
:: Maybe [ BookCat T
. Text
] , downloadedVersion
:: Maybe T
. Text
, downloadedDate
:: Maybe C
. Day
defaultBookInfo :: BookInfo
defaultBookInfo = BookInfo{ title = ""
, author = Nothing
, publisher = Nothing
, bookCats = Nothing
, downloadedVersion = Nothing
, downloadedDate = Nothing
}
myBook = defaultBookInfo { title = "Java8" , author = Just "java" }
ey0jIExBTkdVQUdFIE92ZXJsb2FkZWRTdHJpbmdzICMtfQptb2R1bGUgTXlCb29rcyB3aGVyZQoKaW1wb3J0IHF1YWxpZmllZCBEYXRhLlRleHQuTGF6eSBhcyBUCmltcG9ydCBxdWFsaWZpZWQgRGF0YS5UaW1lLkNhbGVuZGFyIGFzIEMKCgpkYXRhIFB1Ymxpc2hlciA9IE9SZWlsbHkKICAgICAgICAgICAgICAgfCBNYW5uaW5nCiAgICAgICAgICAgICAgIHwgUHJhZ21hdGljX0Jvb2tzaGVsZgogICAgICAgICAgICAgICB8IEFwcmVzcwogICAgICAgICAgICAgICB8IFBhY2t0X1B1YgogICAgICAgICAgICAgICB8IExlYW5wdWIKICAgICAgICAgICAgICAgfCBPaG1fc2hhCiAgICAgICAgICAgICAgIHwgVGF0c3VqaW4KICAgICAgICAgICAgICAgfCBPUmVpbGx5X0pQCiAgICAgICAgICAgICAgIHwgR2loeW8KICAgICAgICAgICAgICAgZGVyaXZpbmcoU2hvdywgRXEsIE9yZCkKCmRhdGEgQm9va0NhdCBhID0gQWxnb3JpdGhtcyBhCiAgICAgICAgICAgICAgIHwgTGFuZ3VhZ2UgYQogICAgICAgICAgICAgICB8IERhdGFTY2llbmNlIGEKICAgICAgICAgICAgICAgfCBNYXRoIGEKICAgICAgICAgICAgICAgfCBTY2llbmNlCiAgICAgICAgICAgICAgIHwgT3RoZXIgYQogICAgICAgICAgICAgICBkZXJpdmluZyhTaG93LCBFcSkKCmRhdGEgQm9va0luZm8gPSBCb29rSW5mbyB7dGl0bGUgICAgICAgICAgICAgICAgIDo6IFQuVGV4dAogICAgICAgICAgICAgICAgICAgICAgICAgICwgYXV0aG9yICAgICAgICAgICAgICA6OiBNYXliZSBULlRleHQKICAgICAgICAgICAgICAgICAgICAgICAgICAsIHB1Ymxpc2hlciAgICAgICAgICAgOjogTWF5YmUgUHVibGlzaGVyCiAgICAgICAgICAgICAgICAgICAgICAgICAgLCBib29rQ2F0cyAgICAgICAgICAgIDo6IE1heWJlIFtCb29rQ2F0IFQuVGV4dF0KICAgICAgICAgICAgICAgICAgICAgICAgICAsIGRvd25sb2FkZWRWZXJzaW9uICAgOjogTWF5YmUgVC5UZXh0CiAgICAgICAgICAgICAgICAgICAgICAgICAgLCBkb3dubG9hZGVkRGF0ZSAgICAgIDo6IE1heWJlIEMuRGF5CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZGVyaXZpbmcgKFNob3csIEVxKQpkZWZhdWx0Qm9va0luZm8gOjogQm9va0luZm8KZGVmYXVsdEJvb2tJbmZvID0gQm9va0luZm97dGl0bGUgICAgICAgICAgICA9ICIiCiAgICAgICAgICAgICAgICAgICAgICAgICwgYXV0aG9yICAgICAgICAgICAgPSBOb3RoaW5nCiAgICAgICAgICAgICAgICAgICAgICAgICwgcHVibGlzaGVyICAgICAgICAgPSBOb3RoaW5nCiAgICAgICAgICAgICAgICAgICAgICAgICwgYm9va0NhdHMgICAgICAgICAgPSBOb3RoaW5nCiAgICAgICAgICAgICAgICAgICAgICAgICwgZG93bmxvYWRlZFZlcnNpb24gPSBOb3RoaW5nCiAgICAgICAgICAgICAgICAgICAgICAgICwgZG93bmxvYWRlZERhdGUgICAgPSBOb3RoaW5nCiAgICAgICAgICAgICAgICAgICAgICAgICB9CgoKbXlCb29rID0gZGVmYXVsdEJvb2tJbmZvIHt0aXRsZSA9ICJKYXZhOCIsIGF1dGhvciA9IEp1c3QgImphdmEifQoKbWFpbiA9IHByaW50IG15Qm9vawoKCgo=