Here’s a small example, which, when compiled, gives an error. Why?
{-# LANGUAGE FlexibleInstances, ImpredicativeTypes,
TemplateHaskell #-}
import Control.Lens
class Item a where
name :: a - String
instance Item (String, Int) where
name = fst
You can't write that lens by hand, so it isn't surprising that the template
haskell can't generate it either. =)
ImpredicativeTypes don't work all that well.
-Edward
On Sun, Sep 8, 2013 at 9:49 AM, Artyom Kazak y...@artyom.me wrote:
Here’s a small example, which, when compiled, gives an