Refactor to use text instead of string
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user