Commit f0f46826 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #12867

parent c1b4b769
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
module T12866 where
type Test2 a = (Eq (TestM a))
class Test a where
type TestM :: *
T12867.hs:7:21: error:
• Expecting one fewer arguments to ‘TestM’
Expected kind ‘k0 -> *’, but ‘TestM’ has kind ‘*’
• In the first argument of ‘Eq’, namely ‘TestM a’
In the type ‘Eq (TestM a)’
In the type declaration for ‘Test2’
T12867.hs:9:1: error:
• The associated type ‘TestM’
mentions none of the type or kind variables of the class ‘Test a’
• In the class declaration for ‘Test’
......@@ -139,3 +139,4 @@ test('T7788', normal, compile_fail, [''])
test('T11450', normal, compile_fail, [''])
test('T12041', normal, compile_fail, [''])
test('T12522a', normal, compile_fail, [''])
test('T12867', normal, compile_fail, [''])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment