1{-# LANGUAGE FlexibleContexts     #-}
2{-# LANGUAGE UndecidableInstances #-}
3
4data Fix f a = Fix (f (Fix f a))
5
6instance ( Functor f
7           -- FIXME(sandy): Unfortunately, the recursion tactic fails to fire
8           -- on this case. By explicitly adding the @Functor (Fix f)@
9           -- dictionary, we can get Wingman to generate the right definition.
10         , Functor (Fix f)
11         ) => Functor (Fix f) where
12  fmap = _
13
14