withState :: FCode a -> CgState -> FCode (a,CgState)
withState (FCode fcode) newstate = FCode $ \info_down state ->
  case fcode info_down newstate of
    (# retval, state2 #) -> (# (retval,state2), state #)
withState :: FCode a -> CgState -> FCode (a,CgState)
withState (FCode fcode) newstate = FCode $ \info_down state ->
  case fcode info_down newstate of
    (# retval, state2 #) -> (# (retval,state2), state #)
withState (FCode fcode) newstate = FCode $ \info_down state ->
  case fcode info_down newstate of
    (# retval, state2 #) -> (# (retval,state2), state #)