Commit 6f6d1050 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Add test for Trac #14580

parent 6eb32579
{-# LANGUAGE PolyKinds, DataKinds, TypeInType, TypeOperators #-}
module T14580 where
import Data.Kind
type Cat ob = ob -> ob -> Type
data ISO' :: Cat i -> i -> i -> Type
type ISO cat a b = ISO' cat a b -> Type
type (a <--> b) iso cat = ISO (iso :: cat a b)
T14580.hs:8:31: error:
• Expected kind ‘Cat a’, but ‘(iso :: cat a b)’ has kind ‘cat a b’
• In the first argument of ‘ISO’, namely ‘(iso :: cat a b)’
In the type ‘ISO (iso :: cat a b)’
In the type declaration for ‘<-->’
......@@ -181,4 +181,5 @@ test('T11203', normal, compile_fail, [''])
test('T14555', normal, compile_fail, [''])
test('T14563', normal, compile_fail, [''])
test('T14561', normal, compile_fail, [''])
test('T14580', normal, compile_fail, [''])
Markdown is supported
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