buuka/src/Operations/Insert.hs

14 lines
307 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
insert :: String -> Maybe String -> BuukaM ()
insert url title = buukaU (modify (B.insert entry))
where
entry = B.BuukaEntry{ B.url = B.URL url, B.title = title }