Commits

camlspotter committed 298dba1

error was not required

Comments (0)

Files changed (3)

 module type S = sig
   include Planck_intf.S
 (* CR jfuruse: damn it, we cannot restrict signature by components of itself!
-      with type error = Str.Pos.t * string
-      and  type 'a t = Str.t -> ('a * Str.t, Str.Pos.t * string (* =error *)) Result.t
+      and  type 'a t = Str.t -> ('a * Str.t, error) Result.t
 *)
   val run : 'a t -> Str.t -> ('a * Str.t, error) Result.t
 end
 
 module Make( Str : Stream_intf.S ) 
   : S with module Str = Str
-      and  type error = Str.Pos.t * string
       and  type 'a t = Str.t -> ('a * Str.t, Str.Pos.t * string (* =error *)) Result.t
 (** Functor [Make] takes a stream implementation [S] and create a monadic parser module for [S].
-    The parse uses the element, position and attribute from [S].
     The monad is a function type [Str.t -> ('a * Str.t, error) Result.t].
 *)
 (** Monadic parser for buffered char streams *)
 
-(* open Sbuffer *)
-
 (** Extend(Str)(Base) extends Base for Str with buffered string operations
     Typical usage is:
 
 end
 
 
-module Extend(SBase : sig
-  include Stream_intf.S with type Elem.t = char
-                        and  type Pos.t = Position.File.t
-  val substr : t -> int -> int -> string * t
-  val takeWhile : (char -> bool) -> t -> string * t
-  val bytes : t -> int
-end)(PBase : Planck_intf.S 
+module Extend
+  (SBase : sig
+    include Stream_intf.S with type Elem.t = char
+                          and  type Pos.t = Position.File.t
+    val substr : t -> int -> int -> string * t
+    val takeWhile : (char -> bool) -> t -> string * t
+    val bytes : t -> int
+  end)
+  (PBase : Planck_intf.S 
      with type Str.desc   = SBase.desc (* I want to say Str.t = SBase.t but not possible *)
      and  type Str.Elem.t = char
      and  type Str.Pos.t  = Position.File.t
     and  type Str.Elem.t = char
     and  type Str.Pos.t  = Position.File.t
     and  type Str.Attr.t = SBase.Attr.t
-    and  type error = SBase.Pos.t * string
     and  type 'a t = SBase.t -> ('a * SBase.t, SBase.Pos.t * string (* =error *)) Result.t
   include X with type 'a t := 'a Pbase.Make(SBase).t
 end
                   and  type Str.Elem.t = char
                   and  type Str.Pos.t  = Position.File.t
                   and  type Str.Attr.t = Stream.Attr.t
-                  and  type error = Stream.Pos.t * string
                   and  type 'a t = 'a t
   include Pbuffer.X with type 'a t := 'a Pbase.Make(Stream).t
 end
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.