Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
e9114531
Commit
e9114531
authored
Sep 30, 2008
by
chak@cse.unsw.edu.au.
Browse files
Type families: T2627b
parent
056dabee
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/indexed-types/should_fail/T2627b.hs
0 → 100644
View file @
e9114531
{-# LANGUAGE GADTs, TypeFamilies, EmptyDataDecls #-}
module
T2627b
where
data
R
a
b
data
W
a
b
data
Z
type
family
Dual
a
type
instance
Dual
Z
=
Z
type
instance
Dual
(
R
a
b
)
=
W
a
(
Dual
b
)
type
instance
Dual
(
W
a
b
)
=
R
a
(
Dual
b
)
data
Comm
a
where
Rd
::
(
a
->
Comm
b
)
->
Comm
(
R
a
b
)
Wr
::
a
->
Comm
b
->
Comm
(
W
a
b
)
Fin
::
Int
->
Comm
Z
conn
::
(
Dual
a
~
b
,
Dual
b
~
a
)
=>
Comm
a
->
Comm
b
->
(
Int
,
Int
)
conn
(
Rd
k
)
(
Wr
a
r
)
=
conn
undefined
undefined
testsuite/tests/ghc-regress/indexed-types/should_fail/T2627b.stderr
0 → 100644
View file @
e9114531
T2627b.hs:20:13:
Couldn't match expected type `a'
against inferred type `Dual (Dual a)'
In the pattern: Wr a r
In the definition of `conn':
conn (Rd k) (Wr a r) = conn undefined undefined
testsuite/tests/ghc-regress/indexed-types/should_fail/all.T
View file @
e9114531
...
...
@@ -30,6 +30,7 @@ test('T2334', normal, compile_fail, [''])
test
('
T1900
',
normal
,
compile_fail
,
[''])
test
('
T2157
',
normal
,
compile_fail
,
[''])
test
('
T2203a
',
normal
,
compile_fail
,
[''])
test
('
T2627b
',
normal
,
compile_fail
,
[''])
test
('
GADTwrong1
',
normal
,
compile_fail
,
[''])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment