Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gershomb
GHC
Commits
efd113f7
Commit
efd113f7
authored
7 years ago
by
Ben Gamari
Browse files
Options
Downloads
Patches
Plain Diff
testsuite: Add testcase for T13658
parent
49012ebc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
testsuite/tests/simplCore/should_compile/T13658.hs
+39
-0
39 additions, 0 deletions
testsuite/tests/simplCore/should_compile/T13658.hs
testsuite/tests/simplCore/should_compile/all.T
+1
-0
1 addition, 0 deletions
testsuite/tests/simplCore/should_compile/all.T
with
40 additions
and
0 deletions
testsuite/tests/simplCore/should_compile/T13658.hs
0 → 100644
+
39
−
0
View file @
efd113f7
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE BangPatterns #-}
{- # OPTIONS_GHC -Werror #-}
{-# OPTIONS_GHC -g -O2 #-}
module
Bug
(
bug
)
where
-- import GHC.Base (seq)
import
Unsafe.Coerce
(
unsafeCoerce
)
undefined
::
a
undefined
=
undefined
data
TypeRep
(
a
::
k
)
where
TrTyCon
::
TypeRep
(
a
::
k
)
TrApp
::
forall
k1
k2
(
a
::
k1
->
k2
)
(
b
::
k1
)
.
TypeRep
(
a
b
)
data
SomeTypeRep
where
SomeTypeRep
::
forall
k
(
a
::
k
)
.
TypeRep
a
->
SomeTypeRep
mkTrApp
::
forall
k1
k2
(
a
::
k1
->
k2
)
(
b
::
k1
)
.
TypeRep
(
a
::
k1
->
k2
)
->
TypeRep
(
a
b
)
mkTrApp
TrTyCon
=
undefined
mkTrApp
TrApp
=
undefined
bug
::
SomeTypeRep
-- bug = f x -- this works
bug
=
f
(
f
x
)
where
x
=
SomeTypeRep
TrTyCon
f
::
SomeTypeRep
->
SomeTypeRep
f
(
SomeTypeRep
acc
)
=
SomeTypeRep
(
mkTrApp
(
unsafeCoerce
acc
))
This diff is collapsed.
Click to expand it.
testsuite/tests/simplCore/should_compile/all.T
+
1
−
0
View file @
efd113f7
...
...
@@ -268,3 +268,4 @@ test('T12600',
normal
,
run_command
,
['
$MAKE -s --no-print-directory T12600
'])
test
('
T13658
',
normal
,
compile
,
['
-dcore-lint
'])
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment