ppNextState :: NextState -> Doc
ppNextState x
  | validNextState x = char x
  | otherwise        = error ("ppNextState: invalid character: " ++ [x])
ppNextState :: NextState -> Doc
ppNextState x
  | validNextState x = char x
  | otherwise        = error ("ppNextState: invalid character: " ++ [x])
ppNextState x
  | validNextState x = char x
  | otherwise        = error ("ppNextState: invalid character: " ++ [x])