JQ7UT7FELK3N6YWOMHTSGUA6AWRLVFTG3PT5MBZPLGVTLAAGQQRQC
DYEZ6CABMQQZD5GZR2DPR7NTHQH3GVT2ZI5ALX2YMEDWPS3YRNKQC
TIHPXFMJ4GG7E5P5U4BX5A6T6DLKX2HRFHV33QOFR3LFZETXD7QQC
C5YXBVXHVYE5WZMMRMYFKJFXNRDVFZUQOZB27TZIMPOIEFWBWUPAC
B2JWXIEPCMVVITDJDR2SACY4VHITXGH7ZM6A5RWN6E7OKTO43TUAC
UJSPCZEQ5H5RKBLFM2SEJJTSKANJ7NKSM7DDWDWQ743ZPHMECROQC
B4RNRGRBVB3JUDYQGXVT5F6YE45O2HGRLNPTWDMKPQCTA72KQGEAC
import AlBhed (Primer)
import AlBhed.Index (Index, toDoc)
import Data.JSON (fromJson)
import AlBhed (Primer (..))
import AlBhed.Index (Index, addLocation, toDoc)
import Data.JSON (fromJson, toJson)
liftIO . print . toDoc $ primers
case command of
(Primer.Add vol loc) -> undefined
(Primer.New vol from to loc) ->
let index = addLocation (Primer vol from to) loc primers
in saveIndex index
Primer.List -> liftIO . print . toDoc $ primers