Closed
Description
Given
import Data.Functor.Compose
data Fix f a = Fix (Compose f (Fix f) a)
instance Functor f => Functor (Fix f) where
fmap f (Fix x) = _
We expect a program equivalent to the following to be synthesized.
instance Functor f => Functor (Fix f) where
fmap f (Fix x) = Fix (fmap f x)
However the tactics engine produces
instance Functor f => Functor (Fix f) where
fmap f (Fix x) = (case x of { (Compose x2) -> Compose x2 })
which is ill-typed.
stderr output
!!!goal: Judgement {_jHypothesis = fromList [(f,HyInfo {hi_provenance = UserPrv, hi_type = a -> b}),(x,HyInfo {hi_provenance = UserPrv, hi_type = Compose f (Fix f) a})], _jBlacklistDestruct = False, _jWhitelistSplit = True, _jIsTopHole = True, _jGoal = Fix f b}
!!!ctx: [(fmap,(a -> b) -> Fix f a -> Fix f b)]
!!!skolems: fromList [f,a,b]
!!!solns: [(known fmap
`- homo
`- destruct x
`- match Compose {x2}
`- Compose
`- assume x2
,case x of { (Compose x2) -> Compose x2 })]