The following program:

        module Main where
 
        infixl 9 :++
        data T = T1 |  T :++ T  deriving (Eq,Show, Read)

        t :: T
        t = read "T1"

        main = print t

fails to terminate under GHC. This is a known problem with
the deriving Read. However, if you remove the infixl 9 :++,
then the program does terminate.

The Haskell report (4.4.2) says that if the infixity is
not specified, it should be "infixl 9". So adding/removing
the infixl should have no effect.

Is GHC giving (:++) the wrong default infixity?

Andy Gill

Reply via email to