Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
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
Alex D
GHC
Commits
c45f8ceb
Commit
c45f8ceb
authored
Jun 18, 2015
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Elaborate test for Trac #10403
parent
ba7c8e59
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
21 deletions
+42
-21
testsuite/tests/partial-sigs/should_compile/T10403.hs
testsuite/tests/partial-sigs/should_compile/T10403.hs
+6
-4
testsuite/tests/partial-sigs/should_compile/T10403.stderr
testsuite/tests/partial-sigs/should_compile/T10403.stderr
+36
-17
No files found.
testsuite/tests/partial-sigs/should_compile/T10403.hs
View file @
c45f8ceb
{-# LANGUAGE PartialTypeSignatures #-}
{-# OPTIONS_GHC -fdefer-type-errors #-}
module
T10403
where
data
I
a
=
I
a
...
...
@@ -11,9 +12,10 @@ instance Functor (B t) where
newtype
H
f
=
H
(
f
()
)
app
::
H
(
B
t
)
app
=
h
(
H
.
I
)
(
B
()
)
h
::
_
=>
_
--h :: Functor m => (a -> b) -> m a -> H m
--
h :: Functor m => (a -> b) -> m a -> H m
h
f
b
=
(
H
.
fmap
(
const
()
))
(
fmap
f
b
)
h2
::
_
-- h2 :: Functor m => (a -> b) -> m a -> H m
h2
f
b
=
(
H
.
fmap
(
const
()
))
(
fmap
f
b
)
testsuite/tests/partial-sigs/should_compile/T10403.stderr
View file @
c45f8ceb
T10403.hs:17:6: warning:
Found hole ‘_’ with inferred constraints: Functor f
In the type signature for ‘h’: _ => _
T10403.hs:17:11: warning:
Found hole ‘_’ with type: (a -> b) -> f a -> H f
Where: ‘f’ is a rigid type variable bound by
the inferred type of h :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:19:1
‘b’ is a rigid type variable bound by
the inferred type of h :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:19:1
‘a’ is a rigid type variable bound by
the inferred type of h :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:19:1
In the type signature for ‘h’: _ => _
T10403.hs:15:6: warning:
Found hole ‘_’ with inferred constraints: Functor f
In the type signature for ‘h’: _ => _
T10403.hs:15:11: warning:
Found hole ‘_’ with type: (a -> b) -> f a -> H f
Where: ‘f’ is a rigid type variable bound by
the inferred type of h :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:17:1
‘b’ is a rigid type variable bound by
the inferred type of h :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:17:1
‘a’ is a rigid type variable bound by
the inferred type of h :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:17:1
In the type signature for ‘h’: _ => _
T10403.hs:19:7: warning:
Found hole ‘_’ with type: (a -> b) -> f a -> H f
Where: ‘f’ is a rigid type variable bound by
the inferred type of h2 :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:21:1
‘b’ is a rigid type variable bound by
the inferred type of h2 :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:21:1
‘a’ is a rigid type variable bound by
the inferred type of h2 :: Functor f => (a -> b) -> f a -> H f
at T10403.hs:21:1
In the type signature for ‘h2’: _
T10403.hs:21:1: warning:
No instance for (Functor f)
When checking that ‘h2’ has the inferred type
h2 :: forall (f :: * -> *) b a. (a -> b) -> f a -> H f
Probable cause: the inferred type is ambiguous
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