Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{-# LANGUAGE DeriveFunctor #-}
-- This are are fine
newtype F a = F ((a -> Bool) -> Bool) deriving Functor
newtype T a = T (a,a,a) deriving Functor
-- but if we define
newtype Fun a b = Fun (a -> b) -- and
data Tri a b c = Tri a b c
-- and try to
newtype F' a = F' (Fun (Fun a Bool) Bool) deriving Functor
newtype T' a = T' (Tri a a a) deriving Functor
-- then that will fail.
-- Meh.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment