Core lint error with defer-typed-holes and coerce
{-# Options_GHC -dcore-lint -fdefer-typed-holes #-}
{-# Language FlexibleInstances, UndecidableInstances, MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
import Data.Traversable
import Control.Lens.Indexed
import Control.Lens.Fold (ifoldMapOf)
import Control.Lens.Setter (iover)
newtype Foo a = F (WrapITraversable [] a)
newtype WrapITraversable f a = WIT (f a)
instance TraversableWithIndex i f => Functor (WrapITraversable f) where
fmap = fmapDefault
instance TraversableWithIndex i f => Foldable (WrapITraversable f) where
foldMap = foldMapDefault
instance TraversableWithIndex i f => Traversable (WrapITraversable f) where
traverse = itraverse . const
instance TraversableWithIndex i f => FoldableWithIndex i (WrapITraversable f) where
ifoldMap = ifoldMapOf itraversed
instance TraversableWithIndex i f => FunctorWithIndex i (WrapITraversable f) where
imap = iover itraversed
instance TraversableWithIndex i f => TraversableWithIndex i (WrapITraversable f) where
itraverse = coerce itraverse
causes with lens 4.14
or 4.15.1
, GHC 8.0.1.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |