summaryrefslogtreecommitdiff
path: root/tests/examples/ghc710/GADTContext.hs
blob: 02b92ac20adf2ff3915b1b8261e288377a6d7fb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{-# LANGUAGE GADTs              #-}
{-# LANGUAGE RankNTypes         #-}
{-# LANGUAGE StandaloneDeriving #-}

data StackItem a where
  Snum :: forall a. Fractional a => a -> StackItem a
  Sop  :: OpDesc -> StackItem a
deriving instance Show a => Show (StackItem a)

-- AZ added to test Trac #10399
data MaybeDefault v where
    SetTo :: forall v . ( Eq v, Show v ) => !v -> MaybeDefault v
    SetTo4 :: forall v a. (( Eq v, Show v ) => v -> MaybeDefault v -> a -> MaybeDefault [a])