Commit 487c90ed authored by Simon Peyton Jones's avatar Simon Peyton Jones

Add a test for Trac #10806

parent a870738a
{-# LANGUAGE GADTs, ExplicitNamespaces, TypeOperators, DataKinds #-}
module T10806 where
import GHC.TypeLits (Nat, type (<=))
data Q a where
Q :: (a <= b, b <= c) => proxy a -> proxy b -> Q c
triggersLoop :: Q b -> Q b -> Bool
triggersLoop (Q _ _) (Q _ _) = print 'x' 'y'
T10806.hs:11:32: error:
Couldn't match expected type ‘Char -> Bool’
with actual type ‘IO ()’
The function ‘print’ is applied to two arguments,
but its type ‘Char -> IO ()’ has only one
In the expression: print 'x' 'y'
In an equation for ‘triggersLoop’:
triggersLoop (Q _ _) (Q _ _) = print 'x' 'y'
......@@ -262,4 +262,4 @@ test('T10507', normal, compile, [''])
test('T10634', normal, compile, [''])
test('T10713', normal, compile, [''])
test('T10753', normal, compile, [''])
test('T10806', 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