property :: GenParser Char st PropertyToken
property = do
    identation 4
    name <- identifier
    if | name == S.width       -> intProperty name
       | name == S.height      -> intProperty name
       | name == S.defaultCell -> objectProperty name
       | name == S.cells       -> cellsProperty name
       | otherwise             -> fail $ "unknown property: " ++ name
       

{-
Uncomment this in case of GHC < 7.6 (no MultiWayIf support).

property :: GenParser Char st PropertyToken
property = do
    identation 4
    name <- identifier
    chooseProperty name
  where
        chooseProperty name | name == S.width       = intProperty name
                            | name == S.height      = intProperty name
                            | name == S.defaultCell = objectProperty name
                            | name == S.cells       = cellsProperty name
                            | otherwise             = fail $ "unknown property: " ++ name
-}
property :: GenParser Char st PropertyToken
property = do
    identation 4
    name <- identifier
    if | name == S.width       -> intProperty name
       | name == S.height      -> intProperty name
       | name == S.defaultCell -> objectProperty name
       | name == S.cells       -> cellsProperty name
       | otherwise             -> fail $ "unknown property: " ++ name
       

{-
Uncomment this in case of GHC < 7.6 (no MultiWayIf support).

property :: GenParser Char st PropertyToken
property = do
    identation 4
    name <- identifier
    chooseProperty name
  where
        chooseProperty name | name == S.width       = intProperty name
                            | name == S.height      = intProperty name
                            | name == S.defaultCell = objectProperty name
                            | name == S.cells       = cellsProperty name
                            | otherwise             = fail $ "unknown property: " ++ name
-}
property = do
    identation 4
    name <- identifier
    if | name == S.width       -> intProperty name
       | name == S.height      -> intProperty name
       | name == S.defaultCell -> objectProperty name
       | name == S.cells       -> cellsProperty name
       | otherwise             -> fail $ "unknown property: " ++ name
       

{-
Uncomment this in case of GHC < 7.6 (no MultiWayIf support).

property :: GenParser Char st PropertyToken
property = do
    identation 4
    name <- identifier
    chooseProperty name
  where
        chooseProperty name | name == S.width       = intProperty name
                            | name == S.height      = intProperty name
                            | name == S.defaultCell = objectProperty name
                            | name == S.cells       = cellsProperty name
                            | otherwise             = fail $ "unknown property: " ++ name
-}