Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
99cd277c
Commit
99cd277c
authored
Oct 21, 2013
by
eir@cis.upenn.edu
Browse files
Update tests to reflect new check for GeneralizedNewtypeDeriving
parent
c43dd973
Changes
11
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/deriving/should_fail/T1496.stderr
View file @
99cd277c
...
...
@@ -3,5 +3,6 @@ T1496.hs:10:32:
Can't make a derived instance of ‛IsInt Moo’
(even with cunning newtype deriving):
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
the last parameter of ‛IsInt’ is at role Nominal
‛isInt’, at type ‛forall (c :: * -> *).
c Int -> c t’, cannot be converted safely
In the newtype declaration for ‛Moo’
testsuite/tests/deriving/should_fail/T2721.stderr
View file @
99cd277c
...
...
@@ -4,5 +4,5 @@ T2721.hs:15:28:
(even with cunning newtype deriving):
the class has associated types
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
the last parameter of ‛C’ is at role Nominal
‛foo’, at type ‛a -> T a’, cannot be converted safely
In the newtype declaration for ‛N’
testsuite/tests/deriving/should_fail/T4846.stderr
View file @
99cd277c
...
...
@@ -3,5 +3,5 @@ T4846.hs:29:1:
Can't make a derived instance of ‛B BOOL’
(even with cunning newtype deriving):
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
the last parameter of ‛B’ is at role Nominal
‛mkExpr’, at type ‛Expr a’, cannot be converted safely
In the stand-alone deriving instance for ‛B BOOL’
testsuite/tests/deriving/should_fail/T7148.stderr
View file @
99cd277c
...
...
@@ -3,5 +3,8 @@ T7148.hs:27:40:
Can't make a derived instance of ‛IsoUnit (Tagged a b)’
(even with cunning newtype deriving):
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
the last parameter of ‛IsoUnit’ is at role Nominal
‛iso1’, at type ‛forall b.
SameType () b -> SameType a b’, cannot be converted safely
‛iso2’, at type ‛forall b.
SameType b () -> SameType b a’, cannot be converted safely
In the newtype declaration for ‛Tagged’
testsuite/tests/deriving/should_fail/T7148a.stderr
View file @
99cd277c
...
...
@@ -3,5 +3,6 @@ T7148a.hs:19:50:
Can't make a derived instance of ‛Convert (IS_NO_LONGER a)’
(even with cunning newtype deriving):
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
the last parameter of ‛Convert’ is at role Nominal
‛coerce’, at type ‛forall b.
Proxy b -> a -> Result a b’, cannot be converted safely
In the newtype declaration for ‛IS_NO_LONGER’
testsuite/tests/gadt/CasePrune.stderr
View file @
99cd277c
...
...
@@ -3,5 +3,5 @@ CasePrune.hs:14:31:
Can't make a derived instance of ‛C A’
(even with cunning newtype deriving):
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
the last parameter of ‛C’ is at role Nominal
‛ic’, at type ‛T a’, cannot be converted safely
In the newtype declaration for ‛A’
testsuite/tests/roles/should_compile/RolesIArray.hs
0 → 100644
View file @
99cd277c
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module
RolesIArray
where
import
Data.Word
import
Data.Array.IArray
import
Data.Array.Unboxed
newtype
N
=
MkN
Word64
deriving
(
IArray
UArray
)
\ No newline at end of file
testsuite/tests/roles/should_compile/all.T
View file @
99cd277c
...
...
@@ -3,3 +3,4 @@ test('Roles2', only_ways('normal'), compile, ['-ddump-tc'])
test
('
Roles3
',
only_ways
('
normal
'),
compile
,
['
-ddump-tc
'])
test
('
Roles4
',
only_ways
('
normal
'),
compile
,
['
-ddump-tc
'])
test
('
Roles13
',
only_ways
('
normal
'),
compile
,
['
-ddump-simpl -dsuppress-uniques
'])
test
('
RolesIArray
',
only_ways
('
normal
'),
compile
,
[''])
\ No newline at end of file
testsuite/tests/roles/should_fail/Roles10.stderr
View file @
99cd277c
...
...
@@ -3,5 +3,5 @@ Roles10.hs:16:12:
Can't make a derived instance of ‛C Age’
(even with cunning newtype deriving):
it is not type-safe to use GeneralizedNewtypeDeriving on this class;
the last parameter of ‛C’ is at role Nominal
‛meth’, at type ‛a -> F a’, cannot be converted safely
In the newtype declaration for ‛Age’
testsuite/tests/roles/should_fail/Roles9.hs
deleted
100644 → 0
View file @
c43dd973
{-# LANGUAGE GeneralizedNewtypeDeriving, RoleAnnotations #-}
module
Roles9
where
type
role
C
nominal
class
C
a
where
meth
::
a
->
a
instance
C
Int
where
meth
=
(
+
1
)
newtype
Age
=
MkAge
Int
deriving
C
testsuite/tests/roles/should_fail/all.T
View file @
99cd277c
...
...
@@ -2,7 +2,6 @@ test('Roles5', normal, compile_fail, [''])
test
('
Roles6
',
normal
,
compile_fail
,
[''])
test
('
Roles7
',
normal
,
compile_fail
,
[''])
test
('
Roles8
',
normal
,
compile_fail
,
[''])
test
('
Roles9
',
normal
,
compile_fail
,
[''])
test
('
Roles10
',
normal
,
compile_fail
,
[''])
test
('
Roles11
',
normal
,
compile_fail
,
[''])
test
('
Roles12
',
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment