actProduction :: Int -> Action -> S.State DocLR0 ()
actProduction i action =
  modify $ \doc@DocLR0{slide,grammar=Doc g govs} ->
    let (ps1,Doc p povs:ps2) = splitAt i g
        g' = ps1 ++ (Doc p ((slide,action):povs):ps2)
    in doc{grammar=Doc g' govs}
actProduction :: Int -> Action -> S.State DocLR0 ()
actProduction i action =
  modify $ \doc@DocLR0{slide,grammar=Doc g govs} ->
    let (ps1,Doc p povs:ps2) = splitAt i g
        g' = ps1 ++ (Doc p ((slide,action):povs):ps2)
    in doc{grammar=Doc g' govs}
actProduction i action =
  modify $ \doc@DocLR0{slide,grammar=Doc g govs} ->
    let (ps1,Doc p povs:ps2) = splitAt i g
        g' = ps1 ++ (Doc p ((slide,action):povs):ps2)
    in doc{grammar=Doc g' govs}