Skip to content

Instantly share code, notes, and snippets.

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