           output = << output :: binary, String.from_char_data!(prompt) :: binary >>
         end
 
-        {result, state(s, input: input, output: output)}
+        {result, %{s| input: input, output: output}}
     end
   end
 

    super(msg, s)
  end

  def handle_call(:contents, _from, state(input: input, output: output) = s) do
    {:reply, {input, output}, s}
  end

  def handle_call(:close, _from, state(input: input, output: output) = s) do
    {:stop, :normal, {:ok, {input, output}}, s}
  end



  def init({string, options}) do
    capture_prompt = options[:capture_prompt] || false
    {:ok, %{input: string, output: "", capture_prompt: capture_prompt}}
  end

  def handle_info({:io_request, from, reply_as, req}, s) do
