Refactor to use text instead of string

This commit is contained in:
2021-01-03 08:33:44 +02:00
parent a921139295
commit a1e67c6387
7 changed files with 53 additions and 35 deletions

View File

@ -23,6 +23,8 @@ import Data.Hashable
import GHC.Generics
(Generic)
import Data.Text
import Control.Monad.Reader
import Control.Monad.State
@ -30,13 +32,13 @@ import Data.ByteString
(ByteString)
import qualified Data.ByteString as B
newtype URL = URL String
newtype URL = URL Text
deriving stock (Show, Eq, Generic, Ord)
deriving newtype (ToJSON, FromJSON, FromJSONKey, ToJSONKey, Hashable)
data BuukaEntry
= BuukaEntry { url :: URL
, title :: Maybe String
, title :: Maybe Text
}
deriving stock (Show, Eq, Generic)
deriving anyclass (ToJSON, FromJSON, Hashable)