summaryrefslogtreecommitdiff
path: root/Biz
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-06-01 22:22:13 -0700
committerBen Sima <ben@bsima.me>2020-06-02 11:35:19 -0700
commit78774e835ac0c564cf52a5e6dd0bf22b56761c4d (patch)
tree942c1a591c2e8792e7bf9b1a16eccbecf52b0efa /Biz
parent6aa4f1890a4e1327b5eabfb19386c94750223cbe (diff)
Initialize Hero database
Diffstat (limited to 'Biz')
-rw-r--r--Biz/Ibb/Keep.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Biz/Ibb/Keep.hs b/Biz/Ibb/Keep.hs
index 8ee1228..c7dabb0 100644
--- a/Biz/Ibb/Keep.hs
+++ b/Biz/Ibb/Keep.hs
@@ -11,6 +11,7 @@
-- like `$(keep ''MyType)`.
module Biz.Ibb.Keep where
+import Alpha
import Biz.Ibb.Core (Book (..), Person (..))
import qualified Biz.Ibb.Influencers as Influencers
import Control.Monad.Reader (ask)
@@ -61,7 +62,7 @@ instance Indexable Person where
-- | updates the `IbbKeep` with a new `Person`
newPerson :: Text -> Text -> Update IbbKeep Person
newPerson name blurb = do
- k <- get
+ keep <- get
put $
k
{ _people = IxSet.insert p (_people k)
@@ -79,7 +80,7 @@ newPerson name blurb = do
}
getPeople :: Int -> Acid.Query IbbKeep [Person]
-getPeople n = take n $ IxSet.toList $ _people keep </ ask
+getPeople n = ask /> _people /> IxSet.toList /> take n
-- * Index @Book@