Commit a718f4a0 authored by simonpj's avatar simonpj
Browse files

Test for Trac #1913

parent d6030d4d
......@@ -13,3 +13,4 @@ test('drvfail011', normal, compile_fail, [''])
test('drvfail012', normal, compile_fail, [''])
test('drvfail013', normal, compile_fail, [''])
test('drvfail014', normal, compile_fail, [''])
test('drvfail015', normal, compile_fail, [''])
{-# OPTIONS_GHC -XStandaloneDeriving #-}
module ShouldFail where
import System.IO( Handle )
-- T is a synonym
type T = Int
deriving instance Eq T
-- Handle is abstract
deriving instance Eq Handle
drvfail015.hs:10:0:
Illegal instance declaration for `Eq T'
(All instance types must be of the form (T t1 ... tn)
where T is not a synonym.
Use -XTypeSynonymInstances if you want to disable this.)
In the stand-alone deriving instance for `Eq T'
drvfail015.hs:13:0:
The data constructors of `Handle' are not all in scope
so you cannot derive an instance for it
In the stand-alone deriving instance for `Eq Handle'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment