Of course Auto and pretend are not mutually exclusive, ie using your defn of show the following works just fine
(pretend show) $ Person { name: "Joe" }
Of course Auto and pretend are not mutually exclusive, ie using your defn of show the following works just fine
(pretend show) $ Person { name: "Joe" }
Something very weird is going on here with instance selection:
> :t pretend identity (Person { name: "Joe"})
forall o. AutoNewtype Person o => o
> :t pretend (identity :: _ -> _) (Person { name: "Joe"})
forall t5. AutoNewtype Person t5 => t5
> :t pretend (\x -> x) (Person { name: "Joe"})
{ name :: String
}
Shame that bug exists, as I expect it’d be too easy to accidentally select the instance without realising when using something like Data.Show.show
inside pretend’s f
Anyway, I’ve made a repo for the solution