Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
9d8cfd8d
Commit
9d8cfd8d
authored
Jul 08, 2007
by
Ian Lynagh
Browse files
Tests for -XGeneralizedNewtypeDeriving
parent
2cd7f402
Changes
6
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/parser/should_compile/all.T
View file @
9d8cfd8d
...
...
@@ -62,3 +62,5 @@ test('read052', normal, compile, [''])
test
('
read053
',
normal
,
compile
,
[''])
test
('
read054
',
normal
,
compile
,
[''])
test
('
read055
',
normal
,
compile
,
[''])
test
('
read056
',
normal
,
compile
,
[''])
test
('
read057
',
normal
,
compile
,
[''])
testsuite/tests/ghc-regress/parser/should_compile/read056.hs
0 → 100644
View file @
9d8cfd8d
{-# OPTIONS_GHC -XGeneralizedNewtypeDeriving #-}
module
Foo
where
class
C
a
instance
C
Int
newtype
Foo
=
Foo
Int
deriving
C
testsuite/tests/ghc-regress/parser/should_compile/read057.hs
0 → 100644
View file @
9d8cfd8d
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module
Foo
where
class
C
a
instance
C
Int
newtype
Foo
=
Foo
Int
deriving
C
testsuite/tests/ghc-regress/parser/should_fail/all.T
View file @
9d8cfd8d
...
...
@@ -45,3 +45,4 @@ test('read035', normal, compile_fail, [''])
test
('
read036
',
normal
,
compile_fail
,
[''])
test
('
read037
',
normal
,
compile_fail
,
[''])
test
('
read038
',
normal
,
compile_fail
,
[''])
test
('
read039
',
normal
,
compile_fail
,
[''])
testsuite/tests/ghc-regress/parser/should_fail/read039.hs
0 → 100644
View file @
9d8cfd8d
module
Foo
where
class
C
a
instance
C
Int
newtype
Foo
=
Foo
Int
deriving
C
testsuite/tests/ghc-regress/parser/should_fail/read039.stderr
0 → 100644
View file @
9d8cfd8d
read039.hs:7:0:
Can't make a derived instance of `C Foo'
(`C' is not a derivable class
Try -fglasgow-exts for GHC's newtype-deriving extension)
In the newtype declaration for `Foo'
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