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
Glasgow Haskell Compiler
GHC
Commits
cb8ee078
Commit
cb8ee078
authored
Jul 03, 2007
by
simonpj
Browse files
Test for Trac
#1456
parent
b1defde7
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/typecheck/should_compile/all.T
View file @
cb8ee078
...
...
@@ -243,6 +243,7 @@ test('tc227', normal, compile, [''])
test
('
tc228
',
normal
,
compile
,
[''])
test
('
tc229
',
normal
,
compile
,
[''])
test
('
tc230
',
normal
,
compile
,
[''])
test
('
tc231
',
normal
,
compile
,
[''])
test
('
faxen
',
normal
,
compile
,
[''])
...
...
testsuite/tests/ghc-regress/typecheck/should_compile/tc231.hs
0 → 100644
View file @
cb8ee078
{-# OPTIONS_GHC -fglasgow-exts -ddump-types #-}
-- See Trac #1456
-- The key thing here is that foo should get the type
-- foo :: forall b s t1. (Zork s (Z [Char]) b)
-- => Q s (Z [Char]) t1 -> ST s ()
-- Note the quantification over 'b', which was previously
-- omitted; see Note [Important subtlety in oclose] in FunDeps
module
ShouldCompile
where
import
Control.Monad.ST
data
Q
s
a
chain
=
Node
s
a
chain
data
Z
a
=
Z
a
s
::
Q
t
(
Z
[
Char
])
t1
->
Q
t
(
Z
[
Char
])
t1
s
=
undefined
class
Zork
s
a
b
|
a
->
b
where
huh
::
Q
s
a
chain
->
ST
s
()
foo
b
=
huh
(
s
b
)
testsuite/tests/ghc-regress/typecheck/should_compile/tc231.stderr
0 → 100644
View file @
cb8ee078
TYPE SIGNATURES
foo :: forall b s t1. (Zork s (Z [Char]) b) => Q s (Z [Char]) t1 -> ST s ()
s :: forall t t1. Q t (Z [Char]) t1 -> Q t (Z [Char]) t1
TYPE CONSTRUCTORS
data Q s a chain
RecFlag NonRecursive
Generics: no
= Node :: forall s a chain. s -> a -> chain -> Q s a chain Stricts: _ _ _
FamilyInstance: none
data Z a
RecFlag NonRecursive
Generics: no
= Z :: forall a. a -> Z a Stricts: _
FamilyInstance: none
Tycons with generics:
Dependent modules: []
Dependent packages: [base]
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