Can't compile: No instance for (MonadResource IO) #4

Closed
EvgenijM86 opened this Issue Dec 5, 2012 · 5 comments

Comments

Projects
None yet
2 participants

I tried 0.2.10, 0.2.11 and 0.2.12 versions under GHC 7.4.2 and 7.6.1 and every time they are various error in src/Scion/PersistentBrowser/Query.hs regarding instance of MonadResource IO. I am using Ubuntu 12.04.

For GHC-7.6.1:
0.2.12

[ 6 of 23] Compiling Scion.PersistentBrowser.Query ( src/Scion/PersistentBrowser/Query.hs, dist/build/scion-browser/scion-browser-tmp/Scion/PersistentBrowser/Query.o )

src/Scion/PersistentBrowser/Query.hs:201:40:
    No instance for (MonadResource IO)
      arising from a use of `selectList'
    Possible fix: add an instance declaration for (MonadResource IO)
    In a stmt of a 'do' block:
      consts <- selectList [DbConstructorName ==. name] []
    In the expression:
      do { consts <- selectList [DbConstructorName ==. name] [];
           return $ map entityVal consts }
    In an equation for `constructorsByName':
        constructorsByName name
          = do { consts <- selectList [DbConstructorName ==. name] [];
                 return $ map entityVal consts }
Failed to install scion-browser-0.2.12

0.2.11

[ 8 of 23] Compiling Scion.PersistentBrowser.Query ( src/Scion/PersistentBrowser/Query.hs, dist/build/scion-browser/scion-browser-tmp/Scion/PersistentBrowser/Query.o )

src/Scion/PersistentBrowser/Query.hs:201:40:
    No instance for (MonadResource IO)
      arising from a use of `selectList'
    Possible fix: add an instance declaration for (MonadResource IO)
    In a stmt of a 'do' block:
      consts <- selectList [DbConstructorName ==. name] []
    In the expression:
      do { consts <- selectList [DbConstructorName ==. name] [];
           return $ map entityVal consts }
    In an equation for `constructorsByName':
        constructorsByName name
          = do { consts <- selectList [DbConstructorName ==. name] [];
                 return $ map entityVal consts }
Failed to install scion-browser-0.2.11

0.2.10 - does not install at all, because unsatisfiable dependencies.

For GHC-7.4.2:
0.2.12

[ 6 of 23] Compiling Scion.PersistentBrowser.Query ( src/Scion/PersistentBrowser/Query.hs, dist/build/scion-browser/scion-browser-tmp/Scion/PersistentBrowser/Query.o )

src/Scion/PersistentBrowser/Query.hs:258:58:
    No instance for (MonadResource IO)
      arising from a use of `get'
    Possible fix: add an instance declaration for (MonadResource IO)
    In a stmt of a 'do' block: Just dc <- get declId
    In the expression:
      do { Just dc <- get declId;
           getDbModule dc }
    In an equation for `getDbModule':
        getDbModule (DbConstructor _ _ declId)
          = do { Just dc <- get declId;
                 getDbModule dc }
Failed to install scion-browser-0.2.12

0.2.11

[ 8 of 23] Compiling Scion.PersistentBrowser.Query ( src/Scion/PersistentBrowser/Query.hs, dist/build/scion-browser/scion-browser-tmp/Scion/PersistentBrowser/Query.o )

src/Scion/PersistentBrowser/Query.hs:258:58:
    No instance for (MonadResource IO)
      arising from a use of `get'
    Possible fix: add an instance declaration for (MonadResource IO)
    In a stmt of a 'do' block: Just dc <- get declId
    In the expression:
      do { Just dc <- get declId;
           getDbModule dc }
    In an equation for `getDbModule':
        getDbModule (DbConstructor _ _ declId)
          = do { Just dc <- get declId;
                 getDbModule dc }
Failed to install scion-browser-0.2.11

0.2.10

[13 of 23] Compiling Scion.PersistentBrowser.Query ( src/Scion/PersistentBrowser/Query.hs, dist/build/scion-browser/scion-browser-tmp/Scion/PersistentBrowser/Query.o )

src/Scion/PersistentBrowser/Query.hs:260:58:
    No instance for (MonadResource IO)
      arising from a use of `get'
    Possible fix: add an instance declaration for (MonadResource IO)
    In a stmt of a 'do' block: Just dc <- get declId
    In the expression:
      do { Just dc <- get declId;
           getDbModule dc }
    In an equation for `getDbModule':
        getDbModule (DbConstructor _ _ declId)
          = do { Just dc <- get declId;
                 getDbModule dc }
Failed to install scion-browser-0.2.10

This error probably comes from conduit library:

http://www.haskell.org/pipermail/web-devel/2012/002415.html

It seems only the latest version of conduit (0.5.5) does not let scion-browser-0.2.12 compile. The previous version - 0.5.4.2 - compiles on both compilers:

cabal install scion-browser-0.2.12 --constraint=conduit==0.5.4.2 --force-reinstalls

Owner

JPMoresmau commented Dec 5, 2012

4033b83 should fix it

JPMoresmau closed this May 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment