Created
October 12, 2017 11:37
-
-
Save Lysxia/7b3d9f4ef6c20c45781aaf4ed0fa1e12 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 PolyKinds #-} | |
{-# LANGUAGE DefaultSignatures #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE TypeFamilies #-} | |
import Data.Proxy | |
import Data.Type.Equality | |
data Void | |
data Void1 a | |
class Test (a :: k) b where | |
test :: b -> Proxy a | |
default test :: (a ~~ Void, Test a b) => b -> Proxy a | |
test = undefined | |
instance Test Void1 b where test = undefined | |
instance Test Void b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment