vim-ocaml icon indicating copy to clipboard operation
vim-ocaml copied to clipboard

Parentice highlighting error in vim

Open struktured opened this issue 8 years ago • 2 comments

Image and code attached with an example. I assume it's a rule in this file:

https://github.com/rgrinberg/vim-ocaml/blob/master/syntax/ocaml.vim

but I couldn't figure out myself.

Example

module type S = 
  sig
    type t
  end

module Make(T:S) = 
struct
  let const = 5
  module type Show =
    sig
      include S
      val show : t -> string
    end
end

module Make2(T:S) : S with type t = T.t =
struct
    type t = T.t
end

module Int = struct type t = int end

module T = Make(Make2(Int))

(* No parse errors *)
module Show1 : Make(Int).Show =
  struct
      include Int
      let show = string_of_int
  end

module Foo2 : module type of Make(Make2(Int)) = Make(Make2(Int))

let const = let module M = Make(Make2(Int)) in M.const

(* Shows parse error on last parentice *)
module Show2 : Make(Make2(Int)).Show =
  struct
      module type S = sig include Make(Make2(Int)).Show end
      include Int
      let show = string_of_int
  end

struktured avatar Aug 16 '15 23:08 struktured