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,251
Issues
4,251
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
398
Merge Requests
398
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
a6111b8c
Commit
a6111b8c
authored
Oct 10, 2016
by
Simon Peyton Jones
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More tests for Trac
#12522
These ones test the variations in coment:15 of the ticket
parent
cc5ca21b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
0 deletions
+61
-0
testsuite/tests/indexed-types/should_compile/T12522b.hs
testsuite/tests/indexed-types/should_compile/T12522b.hs
+20
-0
testsuite/tests/indexed-types/should_compile/all.T
testsuite/tests/indexed-types/should_compile/all.T
+1
-0
testsuite/tests/indexed-types/should_fail/T12522a.hs
testsuite/tests/indexed-types/should_fail/T12522a.hs
+21
-0
testsuite/tests/indexed-types/should_fail/T12522a.stderr
testsuite/tests/indexed-types/should_fail/T12522a.stderr
+18
-0
testsuite/tests/indexed-types/should_fail/all.T
testsuite/tests/indexed-types/should_fail/all.T
+1
-0
No files found.
testsuite/tests/indexed-types/should_compile/T12522b.hs
0 → 100644
View file @
a6111b8c
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeFamilyDependencies #-}
{-# LANGUAGE TypeOperators #-}
module
T12522a
where
newtype
I
a
=
I
a
type
family
Curry
(
as
::
[
*
])
b
=
f
|
f
->
as
b
where
Curry
'
[]
b
=
I
b
Curry
(
a
:
as
)
b
=
a
->
Curry
as
b
data
Uncurried
(
as
::
[
*
])
b
def
::
Curry
as
b
->
Uncurried
as
b
def
=
undefined
-- test2 :: Uncurried [Bool, Bool] Bool
test2
=
def
$
\
a
b
->
I
$
a
&&
b
testsuite/tests/indexed-types/should_compile/all.T
View file @
a6111b8c
...
...
@@ -275,3 +275,4 @@ test('T11361a', normal, compile_fail, [''])
test
('
T11581
',
normal
,
compile
,
[''])
test
('
T12175
',
normal
,
compile
,
[''])
test
('
T12522
',
normal
,
compile
,
[''])
test
('
T12522b
',
normal
,
compile
,
[''])
testsuite/tests/indexed-types/should_fail/T12522a.hs
0 → 100644
View file @
a6111b8c
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeFamilyDependencies #-}
{-# LANGUAGE TypeOperators #-}
module
T12522a
where
newtype
I
a
=
I
a
type
family
Curry
(
as
::
[
*
])
b
=
f
|
f
->
as
b
where
Curry
'
[]
b
=
I
b
Curry
(
a
:
as
)
b
=
a
->
Curry
as
b
data
Uncurried
(
as
::
[
*
])
b
def
::
Curry
as
b
->
Uncurried
as
b
def
=
undefined
-- test :: Uncurried [Int, String] String
test
=
def
$
\
n
s
->
I
$
show
n
++
s
testsuite/tests/indexed-types/should_fail/T12522a.stderr
0 → 100644
View file @
a6111b8c
T12522a.hs:20:26: error:
• Ambiguous type variable ‘a0’ arising from a use of ‘show’
prevents the constraint ‘(Show a0)’ from being solved.
Relevant bindings include
n :: a0 (bound at T12522a.hs:20:15)
test :: Uncurried '[a0, [Char]] [Char] (bound at T12522a.hs:20:1)
Probable fix: use a type annotation to specify what ‘a0’ should be.
These potential instances exist:
instance Show Ordering -- Defined in ‘GHC.Show’
instance Show Integer -- Defined in ‘GHC.Show’
instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
...plus 22 others
...plus five instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the first argument of ‘(++)’, namely ‘show n’
In the second argument of ‘($)’, namely ‘show n ++ s’
In the expression: I $ show n ++ s
testsuite/tests/indexed-types/should_fail/all.T
View file @
a6111b8c
...
...
@@ -139,3 +139,4 @@ test('T11136', normal, compile_fail, [''])
test
('
T7788
',
normal
,
compile_fail
,
[''])
test
('
T11450
',
normal
,
compile_fail
,
[''])
test
('
T12041
',
normal
,
compile_fail
,
[''])
test
('
T12522a
',
normal
,
compile_fail
,
[''])
Administrator
@root
mentioned in commit
801cbb42
·
Dec 17, 2018
mentioned in commit
801cbb42
mentioned in commit 801cbb42638714004587ba39d1d6b2bbc9ad3b9d
Toggle commit list
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