Created
October 12, 2017 11:16
-
-
Save tomsmalley/eec3b2c793c080fd7d51f8e0b84197a4 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
[1 of 1] Compiling Main ( polykinds.hs, polykinds.o ) | |
polykinds.hs:14:24: error: | |
• Expected kind ‘k’, but ‘Void’ has kind ‘*’ | |
• In the first argument of ‘Test’, namely ‘Void’ | |
In the type signature: | |
test :: Test Void b => b -> Proxy a | |
In the class declaration for ‘Test’ |
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 #-} | |
import Data.Proxy | |
data Void | |
data Void1 a | |
class Test (a :: k) b where | |
test :: b -> Proxy a | |
default test :: Test Void b => b -> Proxy a | |
test = undefined | |
instance Test Void1 b | |
instance Test Void b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment