Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
e9cb5fef
Commit
e9cb5fef
authored
Jun 06, 2008
by
simonpj
Browse files
Test for Trac
#2334
parent
7d5f8035
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/indexed-types/should_fail/T2334.hs
0 → 100644
View file @
e9cb5fef
{-# LANGUAGE TypeFamilies #-}
-- Trac #2334
module
Test
where
data
family
F
r
newtype
instance
F
()
=
F
()
()
deriving
Eq
newtype
instance
F
Int
=
H
deriving
Eq
data
instance
F
Bool
=
K1
data
instance
F
Bool
=
K2
testsuite/tests/ghc-regress/indexed-types/should_fail/T2334.stderr
0 → 100644
View file @
e9cb5fef
T2334.hs:9:25:
The constructor of a newtype must have exactly one field
but `F' has two
In the definition of data constructor `F'
In the newtype instance declaration for `F'
T2334.hs:10:26:
The constructor of a newtype must have exactly one field
but `H' has none
In the definition of data constructor `H'
In the newtype instance declaration for `F'
T2334.hs:12:14:
Conflicting family instance declarations:
data instance F Bool -- Defined at T2334.hs:12:14
data instance F Bool -- Defined at T2334.hs:13:14
testsuite/tests/ghc-regress/indexed-types/should_fail/all.T
View file @
e9cb5fef
...
...
@@ -26,6 +26,7 @@ test('Simple16', expect_fail, compile_fail, [''])
test
('
TyFamArity1
',
normal
,
compile_fail
,
[''])
test
('
TyFamArity2
',
normal
,
compile_fail
,
[''])
test
('
TyFamUndec
',
normal
,
compile_fail
,
[''])
test
('
T2334
',
normal
,
compile_fail
,
[''])
test
('
GADTwrong1
',
if_compiler_lt
('
ghc
',
'
6.9
',
expect_fail
),
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