Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,262
Issues
4,262
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
404
Merge Requests
404
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
d157f5f2
Commit
d157f5f2
authored
Aug 19, 2013
by
Jan Stolarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add regression test for
#8142
parent
0bc0e7d3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
2 deletions
+37
-2
testsuite/tests/typecheck/should_fail/T8142.hs
testsuite/tests/typecheck/should_fail/T8142.hs
+11
-0
testsuite/tests/typecheck/should_fail/T8142.stderr
testsuite/tests/typecheck/should_fail/T8142.stderr
+23
-0
testsuite/tests/typecheck/should_fail/all.T
testsuite/tests/typecheck/should_fail/all.T
+3
-2
No files found.
testsuite/tests/typecheck/should_fail/T8142.hs
0 → 100644
View file @
d157f5f2
{-# LANGUAGE TypeFamilies #-}
module
T8142
where
tracer
::
(
Functor
f
,
Coinductive
f
)
=>
(
c
->
f
c
)
->
(
c
->
f
c
)
tracer
=
h
where
h
=
(
\
(
_
,
b
)
->
((
outI
.
fmap
h
)
b
))
.
out
class
Functor
g
=>
Coinductive
g
where
type
Nu
g
::
*
out
::
Nu
g
->
g
(
Nu
g
)
outI
::
g
(
Nu
g
)
->
Nu
g
testsuite/tests/typecheck/should_fail/T8142.stderr
0 → 100644
View file @
d157f5f2
T8142.hs:6:18:
Couldn't match type ‛Nu f0’ with ‛Nu f’
NB: ‛Nu’ is a type function, and may not be injective
The type variable ‛f0’ is ambiguous
Expected type: a -> Nu f
Actual type: a -> Nu f0
When checking that ‛h’
has the inferred type ‛forall (f :: * -> *) a. a -> Nu f’
Probable cause: the inferred type is ambiguous
In an equation for ‛tracer’:
tracer
= h
where
h = (\ (_, b) -> ((outI . fmap h) b)) . out
T8142.hs:6:57:
Occurs check: cannot construct the infinite type: a ~ f1 a
Expected type: a -> (t0, f1 a)
Actual type: Nu ((,) t0) -> (t0, Nu ((,) t0))
Relevant bindings include h :: a -> Nu f1 (bound at T8142.hs:6:18)
In the second argument of ‛(.)’, namely ‛out’
In the expression: (\ (_, b) -> ((outI . fmap h) b)) . out
testsuite/tests/typecheck/should_fail/all.T
View file @
d157f5f2
test
('
tcfail001
',
normal
,
compile_fail
,
[''])
test
('
tcfail002
',
normal
,
compile_fail
,
[''])
test
('
tcfail003
',
normal
,
compile_fail
,
[''])
...
...
@@ -217,7 +217,7 @@ test('T3950', normal, compile_fail, [''])
test
('
T3966
',
normal
,
compile_fail
,
['
-O
'])
test
('
IPFail
',
normal
,
compile_fail
,
[''])
test
('
T3468
',
extra_clean
(['
T3468.hi-boot
',
'
T3468.o-boot
']),
test
('
T3468
',
extra_clean
(['
T3468.hi-boot
',
'
T3468.o-boot
']),
multimod_compile_fail
,
['
T3468
',
'
-v0
'])
test
('
T2846b
',
normal
,
compile_fail
,
[''])
test
('
FrozenErrorTests
',
normal
,
compile_fail
,
[''])
...
...
@@ -311,3 +311,4 @@ test('T7869', normal, compile_fail, [''])
test
('
T7892
',
normal
,
compile_fail
,
[''])
test
('
T7809
',
normal
,
compile_fail
,
[''])
test
('
T7989
',
normal
,
compile_fail
,
[''])
test
('
T8142
',
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