Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
e8d8c2e9
Commit
e8d8c2e9
authored
Mar 13, 2008
by
chak@cse.unsw.edu.au.
Browse files
Type families: Roman's test for normalisation of reduced dicts
parent
97621295
Changes
2
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/indexed-types/should_compile/InstContextNorm.hs
0 → 100644
View file @
e8d8c2e9
{-# LANGUAGE TypeFamilies, FlexibleContexts #-}
{-# LANGUAGE EmptyDataDecls, FlexibleInstances #-}
module
InstContextNorm
where
data
EX
_x
_y
(
p
::
*
->
*
)
data
ANY
class
Base
p
class
Base
(
Def
p
)
=>
Prop
p
where
type
Def
p
instance
Base
()
instance
Prop
()
where
type
Def
()
=
()
instance
(
Base
(
Def
(
p
ANY
)))
=>
Base
(
EX
_x
_y
p
)
instance
(
Prop
(
p
ANY
))
=>
Prop
(
EX
_x
_y
p
)
where
type
Def
(
EX
_x
_y
p
)
=
EX
_x
_y
p
data
FOO
x
instance
Prop
(
FOO
x
)
where
type
Def
(
FOO
x
)
=
()
data
BAR
instance
Prop
BAR
where
type
Def
BAR
=
EX
()
()
FOO
testsuite/tests/ghc-regress/indexed-types/should_compile/all.T
View file @
e8d8c2e9
...
...
@@ -95,6 +95,8 @@ test('InstEqContext2', if_compiler_lt('ghc', '6.9', expect_fail),
compile
,
[''])
test
('
InstEqContext3
',
normal
,
compile
,
[''])
test
('
InstContextNorm
',
if_compiler_lt
('
ghc
',
'
6.9
',
expect_fail
),
compile
,
[''])
test
('
HO
',
normal
,
compile
,
[''])
test
('
GivenCheck
',
normal
,
compile
,
[''])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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