T12447.script 273 Bytes
Newer Older
1 2 3 4 5 6
:set -XRankNTypes -XConstraintKinds -XTypeApplications

import Data.Typeable

class Deferrable p where deferEither :: proxy p -> (p => r) -> Either String r

7
instance (Typeable a, Typeable b) => Deferrable (a ~ b) where deferEither _ _ = undefined
8 9

:t deferEither @(_ ~ _)