Created
August 2, 2020 13:23
-
-
Save phadej/cc45d5b8f77454574f0dc417891ad3af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# 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