Source

planck / lib / strfile.ml

Full commit
(* char stream from a file *)

module Buffered = struct

  module Base = struct
    
    module Elem = Elem.Char
    module Pos  = Position.File
    
    module Attr = struct
      type t = Sbuffer.buf
      let position attr = Sbuffer.position_of_buf attr
    end
    
  end
  
  module NonBuffered = Stream.Make(Base)

  include NonBuffered

  include Sbuffer.Extend(struct
    include NonBuffered
    let create_attr buf = buf
    let buf st = attr st
  end)
end