initPersistent 的 Snaplet 持久性问题

Snaplet-persistent problems with initPersistent

我是 Haskell 的初学者,正在尝试使用 snaplet-persistent。试图按照文档进行操作,但它不起作用,出现的问题:

src/Site.hs:120:32:
    No instance for (MonadBaseControl
                       IO (Initializer App PersistState))
      arising from a use of ‘initPersist’
    In the second argument of ‘($)’, namely
      ‘initPersist (runMigrationUnsafe migrateAuth)’
    In a stmt of a 'do' block:
      d <- nestSnaplet "db" db
           $ initPersist (runMigrationUnsafe migrateAuth)
    In the second argument of ‘($)’, namely
      ‘do { h <- nestSnaplet "" heist $ heistInit "templates";
            s <- nestSnaplet "sess" sess
                 $ initCookieSessionManager "site_key.txt" "sess" (Just 3600);
            d <- nestSnaplet "db" db
                 $ initPersist (runMigrationUnsafe migrateAuth);
            a <- nestSnaplet "auth" auth
                 $ initPersistAuthManager sess (persistPool $ view snapletValue d);
            .... }’

运行 来自 github 的 snaplet-persistent。

已解决in github by eryx67