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
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'
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'
Supports Markdown
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