Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Alex D
GHC
Commits
c9ac9de7
Commit
c9ac9de7
authored
Feb 08, 2016
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test Trac #11552
parent
fac0efc3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
testsuite/tests/typecheck/should_compile/T11552.hs
testsuite/tests/typecheck/should_compile/T11552.hs
+21
-0
testsuite/tests/typecheck/should_compile/all.T
testsuite/tests/typecheck/should_compile/all.T
+1
-0
No files found.
testsuite/tests/typecheck/should_compile/T11552.hs
0 → 100644
View file @
c9ac9de7
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE ScopedTypeVariables #-}
module
T11552
where
newtype
MaybeT
m
a
=
MaybeT
{
runMaybeT
::
m
(
Maybe
a
)
}
instance
(
Functor
m
)
=>
Functor
(
MaybeT
m
)
where
fmap
f
(
MaybeT
ma
)
=
MaybeT
$
(
fmap
.
fmap
)
f
ma
instance
forall
f
.
(
Applicative
f
)
=>
Applicative
(
MaybeT
f
)
where
pure
::
a
->
MaybeT
f
a
pure
x
=
MaybeT
(
pure
(
pure
x
))
(
<*>
)
::
forall
a
b
.
Applicative
f
=>
MaybeT
f
(
a
->
b
)
->
MaybeT
f
a
->
MaybeT
f
b
(
MaybeT
fab
)
<*>
(
MaybeT
mma
)
=
let
fab'
::
f
(
Maybe
(
a
->
b
))
fab'
=
fab
in
MaybeT
$
undefined
testsuite/tests/typecheck/should_compile/all.T
View file @
c9ac9de7
...
...
@@ -504,3 +504,4 @@ test('T11397', normal, compile, [''])
test
('
T11458
',
normal
,
compile
,
[''])
test
('
T11516
',
expect_broken
(
11516
),
compile
,
[''])
test
('
T11524
',
normal
,
compile
,
[''])
test
('
T11552
',
normal
,
compile
,
[''])
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