3
모나드 변압기의 파생 인스턴스를 만들 수 없습니다 서면 그러나내가 <code>newtype</code> 다음 한
• Can't make a derived instance of ‘MonadTrans Wrap’
(even with cunning GeneralizedNewtypeDeriving):
cannot eta-reduce the representation type enough
• In the newtype declaration for ‘Wrap’
을 MonadTrans
의 간단한 인스턴스는 잘 작동합니다.
instance MonadTrans Wrap where
lift = Wrap
이러한 오류 메시지의 이유는 무엇입니까?
이 컨텍스트에서 "클래스의 기본 인스턴스"는 무엇을 의미합니까? –
'MonadTrans'에 대한 간단한 인스턴스를 파생시킬 수있는 방법이 있습니까? –
거의 1 년 후 [동일한 벽을 계속 밟고있는 것 같습니다] (https://stackoverflow.com/questions/47579216/doing-dependency-injection-using-monad-stacks). –