
________________________________________ De : Beginners [beginners-bounces@haskell.org] de la part de Francesco Ariis [fa-ml@ariis.it] Envoyé : vendredi 14 décembre 2018 13:00 À : beginners@haskell.org Objet : Re: [Haskell-beginners] MonadThrow, MonadReader and shake 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? Yes exactly data SomeDataCollection where SomeDataCollection :: SCollectType t -> SCollectSourceFormat f -> DataCollection t f -> SomeDataCollection data CollectType = Collect | Caracterization deriving Show data SCollectType a where SCollect :: SCollectType 'Collect SCaracterization :: SCollectType 'Caracterization data CollectSourceFormat = Cbf | Hdf5 | Hdf5' deriving Show data SCollectSourceFormat a where SCbf :: SCollectSourceFormat 'Cbf SHdf5 :: SCollectSourceFormat 'Hdf5 SHdf5' :: SCollectSourceFormat 'Hdf5' With All these extensions. {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UnicodeSyntax #-} sorry I do not have a public branch with the current modifications. Cheers Frederic