Ticket #3731: Bug2.hs

File Bug2.hs, 507 bytes (added by dsf, 4 years ago)

Test case for ghc-6.13, use with attached Default.hs and NewData?.hs

Line 
1{-# LANGUAGE  DeriveDataTypeable, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, TemplateHaskell, UndecidableInstances #-}
2
3import Data.Data (Data, Typeable)
4import NewData (deriveNewData)
5import Default (Default(defaultValue))
6
7data Proposition = Proposition Expression deriving (Show, Data, Typeable)
8data Expression = Conjunction [Expression] deriving (Show, Data, Typeable)
9
10$(deriveNewData [''Proposition, ''Expression])
11
12main :: IO ()
13main = putStrLn (show (defaultValue :: Proposition))