Commit f4b72c61 authored by's avatar
Browse files


parent f051b216
{-# LANGUAGE TypeFamilies #-}
module T2693 where
type family TFn a :: *
f :: Maybe ()
f = do
let Just x = undefined :: Maybe (TFn a)
let n = fst x + fst x
return ()
Couldn't match expected type `(a1, b)'
against inferred type `TFn a'
In the first argument of `fst', namely `x'
In the first argument of `(+)', namely `fst x'
In the expression: fst x + fst x
......@@ -46,3 +46,4 @@ test('T1900', normal, compile_fail, [''])
test('T2157', normal, compile_fail, [''])
test('T2203a', normal, compile_fail, [''])
test('T2627b', normal, compile_fail, [''])
test('T2693', 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