summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/deriving/should_run/drvrun014.hs
blob: 806af8ce1c0c52b5dae16d9ba7fb06fe669f0712 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- This one gave the wrong answer with ghci 5.02.3 (and 5.02.2)

module Main where

infixr 3 :*
infixr 2 :+

data RE a = RE a :+ RE a
          | RE a :* RE a
          | Cat  [RE a]
          | Star (RE a)
          | Plus (RE a)
          | Opt  (RE a)
          | Comp (RE a)
          | Empty
          | Str  [a]
            deriving (Show, Eq, Ord)

main = print (Str "ab" == (Str "a" :+ Str "b"))