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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
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
Alexis King
GHC
Commits
ee5dcdf9
Commit
ee5dcdf9
authored
Jun 22, 2020
by
Ben Gamari
🐢
Committed by
Marge Bot
Oct 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testsuite: Add test for #18346
This was fixed by
4291bdda
.
parent
9648d680
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
testsuite/tests/simplCore/should_compile/T18346/MiniLens.hs
testsuite/tests/simplCore/should_compile/T18346/MiniLens.hs
+23
-0
testsuite/tests/simplCore/should_compile/T18346/T18346.hs
testsuite/tests/simplCore/should_compile/T18346/T18346.hs
+18
-0
testsuite/tests/simplCore/should_compile/T18346/all.T
testsuite/tests/simplCore/should_compile/T18346/all.T
+2
-0
No files found.
testsuite/tests/simplCore/should_compile/T18346/MiniLens.hs
0 → 100644
View file @
ee5dcdf9
{-# LANGUAGE RankNTypes #-}
module
MiniLens
((
^.
),
Getting
,
Lens
'
,
lens
,
view
)
where
import
Data.Functor.Const
(
Const
(
..
))
type
Lens
s
t
a
b
=
forall
f
.
Functor
f
=>
(
a
->
f
b
)
->
s
->
f
t
type
Lens'
s
a
=
Lens
s
s
a
a
lens
::
(
s
->
a
)
->
(
s
->
b
->
t
)
->
Lens
s
t
a
b
lens
sa
sbt
afb
s
=
sbt
s
<$>
afb
(
sa
s
)
{-# INLINE lens #-}
type
Getting
r
s
a
=
(
a
->
Const
r
a
)
->
s
->
Const
r
s
view
::
Getting
a
s
a
->
s
->
a
view
l
=
getConst
.
l
Const
{-# INLINE view #-}
(
^.
)
::
s
->
Getting
a
s
a
->
a
s
^.
l
=
getConst
(
l
Const
s
)
{-# INLINE (^.) #-}
testsuite/tests/simplCore/should_compile/T18346/T18346.hs
0 → 100644
View file @
ee5dcdf9
{-# LANGUAGE RankNTypes #-}
module
GHCBug
(
field
)
where
import
MiniLens
((
^.
),
Getting
,
Lens
'
,
lens
,
view
)
t'
::
Getting
()
()
()
t'
=
lens
id
const
{-# NOINLINE t' #-}
mlift
::
Functor
f
=>
Getting
b
a
b
->
Lens'
(
f
a
)
(
f
b
)
mlift
l
=
lens
(
fmap
(
^.
l
))
const
{-# INLINE mlift #-}
newtype
Field
=
F
(
Maybe
()
->
Maybe
()
)
field
::
Field
field
=
F
(
view
(
mlift
t'
))
testsuite/tests/simplCore/should_compile/T18346/all.T
0 → 100644
View file @
ee5dcdf9
test
('
T18346
',
[
extra_files
(['
MiniLens.hs
'])],
multimod_compile
,
['
T18346.hs
',
'
-v0
'])
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