{-# OPTIONS -fglasgow-exts #-}
module Labels (tests) where
import Test.HUnit
import Data.Generics
data NoLabels = NoLabels Int Float
deriving (Typeable, Data)
data YesLabels = YesLabels { myint :: Int
, myfloat :: Float
}
deriving (Typeable, Data)
noLabels = NoLabels 42 3.14
yesLabels = YesLabels 42 3.14
tests = ( constrFields $ toConstr noLabels
, constrFields $ toConstr yesLabels
) ~=? output
output = ([],["myint","myfloat"])