buuka/src/Operations/Insert.hs

17 lines
335 B
Haskell
Raw Normal View History

2020-12-30 23:29:56 +02:00
module Operations.Insert where
import Control.Monad.Buuka
import Control.Monad.State
(modify)
import qualified Data.Buuka as B
2021-01-03 08:33:44 +02:00
import Data.Text
(Text)
insert :: Text -> Maybe Text -> BuukaM ()
2020-12-30 23:29:56 +02:00
insert url title = buukaU (modify (B.insert entry))
where
entry = B.BuukaEntry{ B.url = B.URL url, B.title = title }