gameTree = do
    hea <- parseHeader
    app <- application hea
    gam <- gameType
    var <- variationType
    siz <- size gam
    fmap (Game app var siz) (parse hea gam siz False)
    where
    parse h g s = case g of
        Go            -> fmap TreeGo            . nodeGo h s
        Backgammon    -> fmap TreeBackgammon    . nodeBackgammon h
        LinesOfAction -> fmap TreeLinesOfAction . nodeLinesOfAction h
        Hex           -> gameHex h
        Octi          -> fmap TreeOcti          . nodeOcti h
        other         -> fmap (TreeOther other) . nodeOther h
-- }}}
gameTree = do
    hea <- parseHeader
    app <- application hea
    gam <- gameType
    var <- variationType
    siz <- size gam
    fmap (Game app var siz) (parse hea gam siz False)
    where
    parse h g s = case g of
        Go            -> fmap TreeGo            . nodeGo h s
        Backgammon    -> fmap TreeBackgammon    . nodeBackgammon h
        LinesOfAction -> fmap TreeLinesOfAction . nodeLinesOfAction h
        Hex           -> gameHex h
        Octi          -> fmap TreeOcti          . nodeOcti h
        other         -> fmap (TreeOther other) . nodeOther h
-- }}}
gameTree = do
    hea <- parseHeader
    app <- application hea
    gam <- gameType
    var <- variationType
    siz <- size gam
    fmap (Game app var siz) (parse hea gam siz False)
    where
    parse h g s = case g of
        Go            -> fmap TreeGo            . nodeGo h s
        Backgammon    -> fmap TreeBackgammon    . nodeBackgammon h
        LinesOfAction -> fmap TreeLinesOfAction . nodeLinesOfAction h
        Hex           -> gameHex h
        Octi          -> fmap TreeOcti          . nodeOcti h
        other         -> fmap (TreeOther other) . nodeOther h
-- }}}