Skip to content

Instantly share code, notes, and snippets.

@Lysxia
Created October 12, 2017 11:37
Show Gist options
  • Save Lysxia/7b3d9f4ef6c20c45781aaf4ed0fa1e12 to your computer and use it in GitHub Desktop.
Save Lysxia/7b3d9f4ef6c20c45781aaf4ed0fa1e12 to your computer and use it in GitHub Desktop.
{-# 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