Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  MonadThrow, MonadReader and shake (PICCA Frederic-Emmanuel)
   2. Re:  MonadThrow, MonadReader and shake (PICCA Frederic-Emmanuel)
   3. Re:  MonadThrow, MonadReader and shake (Francesco Ariis)


----------------------------------------------------------------------

Message: 1
Date: Thu, 13 Dec 2018 13:33:55 +0000
From: PICCA Frederic-Emmanuel
        <frederic-emmanuel.pi...@synchrotron-soleil.fr>
To: "The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell" <beginners@haskell.org>
Subject: Re: [Haskell-beginners] MonadThrow, MonadReader and shake
Message-ID:
        
<a2a20ec3b8560d408356cac2fc148e53015b364...@sun-dag3.synchrotron-soleil.fr>
        
Content-Type: text/plain; charset="Windows-1252"

> Using LiftIO should work fine!

I endup with this error

src/XdsMe.hs:214:31-52: error:
    • Could not deduce (Control.Monad.Reader.Class.MonadReader
                          Beamline IO)
        arising from a use of ‘toRuchePath’
      from the context: t ~ 'Collect
        bound by a pattern with constructor:
                   SCollect :: SCollectType 'Collect,
                 in an equation for ‘xdsme'’
        at src/XdsMe.hs:183:30-37
      or from: f ~ 'ISPyB.DataCollection.Hdf5
        bound by a pattern with constructor:
                   SHdf5 :: SCollectSourceFormat 'ISPyB.DataCollection.Hdf5,
                 in an equation for ‘xdsme'’
        at src/XdsMe.hs:183:39-43
    • In the second argument of ‘($)’, namely ‘toRuchePath attachment’
      In a stmt of a 'do' block:
        attachment' <- liftIO $ toRuchePath attachment
      In the expression:
        do { need [toFilePath xml];
             container <- liftIO . fromFile . toFilePath $ xml;
             let attachment
                   = _autoProcProgramAttachment . _autoProcProgramContainer
                     $ container;
             attachment' <- liftIO $ toRuchePath attachment;
             .... }

Here the signature of the function

xdsme' :: SomeDataCollection
       -> Maybe Cell
       -> Maybe SpaceGroup
       -> GZiped
       -> [Path Abs File]
       -> ReaderT Beamline IO ()
xdsme' c@(SomeDataCollection SCollect SHdf5 _) cell sg z is = do


------------------------------

Message: 2
Date: Fri, 14 Dec 2018 11:29:20 +0000
From: PICCA Frederic-Emmanuel
        <frederic-emmanuel.pi...@synchrotron-soleil.fr>
To: "The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell" <beginners@haskell.org>
Subject: Re: [Haskell-beginners] MonadThrow, MonadReader and shake
Message-ID:
        
<a2a20ec3b8560d408356cac2fc148e53015b364...@sun-dag3.synchrotron-soleil.fr>
        
Content-Type: text/plain; charset="Windows-1252"

Hello,

In fact I do not understand this error message, and thus I do not understand 
how to fix this ?
How Can I give hint to ghc in order to fix this compilation error.

thanks for your help.

Frederic

src/XdsMe.hs:214:31-52: error:
    • Could not deduce (Control.Monad.Reader.Class.MonadReader
                          Beamline IO)
        arising from a use of ‘toRuchePath’
      from the context: t ~ 'Collect
        bound by a pattern with constructor:
                   SCollect :: SCollectType 'Collect,
                 in an equation for ‘xdsme'’
        at src/XdsMe.hs:183:30-37
      or from: f ~ 'ISPyB.DataCollection.Hdf5
        bound by a pattern with constructor:
                   SHdf5 :: SCollectSourceFormat 'ISPyB.DataCollection.Hdf5,
                 in an equation for ‘xdsme'’
        at src/XdsMe.hs:183:39-43
    • In the second argument of ‘($)’, namely ‘toRuchePath attachment’
      In a stmt of a 'do' block:
        attachment' <- liftIO $ toRuchePath attachment
      In the expression:
        do { need [toFilePath xml];
             container <- liftIO . fromFile . toFilePath $ xml;
             let attachment
                   = _autoProcProgramAttachment . _autoProcProgramContainer
                     $ container;
             attachment' <- liftIO $ toRuchePath attachment;
             .... }

Here the signature of the function

xdsme' :: SomeDataCollection
       -> Maybe Cell
       -> Maybe SpaceGroup
       -> GZiped
       -> [Path Abs File]
       -> ReaderT Beamline IO ()
xdsme' c@(SomeDataCollection SCollect SHdf5 _) cell sg z is = do


------------------------------

Message: 3
Date: Fri, 14 Dec 2018 13:00:02 +0100
From: Francesco Ariis <fa...@ariis.it>
To: beginners@haskell.org
Subject: Re: [Haskell-beginners] MonadThrow, MonadReader and shake
Message-ID: <20181214120002.pagbsxgh655mj...@x60s.casa>
Content-Type: text/plain; charset=utf-8

On Fri, Dec 14, 2018 at 11:29:20AM +0000, PICCA Frederic-Emmanuel wrote:
> src/XdsMe.hs:214:31-52: error:
>     • Could not deduce (Control.Monad.Reader.Class.MonadReader
>                           Beamline IO)
>         arising from a use of ‘toRuchePath’
>       from the context: t ~ 'Collect

Are you by chance using existential quantification or gadts?

I might need a self contained example to load on ghci.


------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


------------------------------

End of Beginners Digest, Vol 126, Issue 11
******************************************

Reply via email to