Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
ee9fe3d6
Commit
ee9fe3d6
authored
Oct 19, 2010
by
Simon Peyton Jones
Browse files
Accept changes
parent
3be57048
Changes
4
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/indexed-types/should_fail/T1900.stderr
View file @
ee9fe3d6
...
...
@@ -8,7 +8,7 @@ T1900.hs:11:12:
In the instance declaration for `Bug Int'
T1900.hs:14:16:
Could not deduce (Depend s
1
~ Depend s) from the context (Bug s1)
Could not deduce (Depend s ~ Depend s
1
) from the context (Bug s1)
NB: `Depend' is a type function, and may not be injective
In the second argument of `(==)', namely `trans d'
In the expression: d == trans d
...
...
testsuite/tests/ghc-regress/indexed-types/should_fail/T3330c.hs
View file @
ee9fe3d6
...
...
@@ -18,5 +18,6 @@ type instance Der (f :+: g) = Der f :+: Der g
plug
::
Rep
f
=>
Der
f
x
->
x
->
f
x
plug
=
plug'
rep
where
plug'
::
R
f
->
Der
f
x
->
x
->
f
x
plug'
(
RSum
rf
rg
)
(
Inl
df
)
x
=
Inl
(
plug
rf
df
x
)
plug'
::
R
f
->
Der
f
x
->
x
->
f
x
plug'
(
RSum
rf
rg
)
(
Inl
df
)
x
=
Inl
(
plug
rf
df
x
)
testsuite/tests/ghc-regress/indexed-types/should_fail/T3330c.stderr
View file @
ee9fe3d6
T3330c.hs:22:35:
Couldn't match type `f2' with `Der f2'
`f2' is a rigid type variable bound by
a pattern with constructor
RSum :: forall (f :: * -> *) (g :: * -> *).
R f -> R g -> R (f :+: g)
at T3330c.hs:22:10
In the expression: Inl (plug rf df x)
In an equation for `plug'':
plug' (RSum rf rg) (Inl df) x = Inl (plug rf df x)
In an equation for `plug':
plug
= plug' rep
where
plug' :: R f -> Der f x -> x -> f x
plug' (RSum rf rg) (Inl df) x = Inl (plug rf df x)
T3330c.hs:22:45:
Couldn't match type `Der ((->) x)' with `R'
Expected type: Der ((->) x) (f1 x)
Actual type: R f
In the first argument of `plug', namely `rf'
In the first argument of `Inl', namely `(plug rf df x)'
In the expression: Inl (plug rf df x)
T3330c.hs:22:45:
Couldn't match type `f' with `f1 x'
`f' is a rigid type variable bound by
a pattern with constructor
RSum :: forall (f :: * -> *) (g :: * -> *).
R f -> R g -> R (f :+: g)
at T3330c.hs:22:10
T3330c.hs:23:43:
Occurs check: cannot construct the infinite type:
f = f x
Expected type: Der ((->) x) (f x)
Actual type: R f
In the first argument of `plug', namely `rf'
In the first argument of `Inl', namely `(plug rf df x)'
In the expression: Inl (plug rf df x)
testsuite/tests/ghc-regress/indexed-types/should_fail/all.T
View file @
ee9fe3d6
...
...
@@ -62,4 +62,5 @@ test('T3330c', normal, compile_fail, [''])
test
('
T4179
',
normal
,
compile_fail
,
[''])
test
('
T4254
',
normal
,
compile_fail
,
[''])
test
('
T2239
',
normal
,
compile_fail
,
[''])
test
('
T3651
',
normal
,
compile_fail
,
[''])
Write
Preview
Markdown
is supported
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