Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parentice highlighting error in vim #3

Open
struktured opened this issue Aug 16, 2015 · 2 comments
Open

Parentice highlighting error in vim #3

struktured opened this issue Aug 16, 2015 · 2 comments

Comments

@struktured
Copy link

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 struktured changed the title Parentice highlighting error Parentice highlighting error in vim Aug 17, 2015
@Maelan
Copy link
Contributor

Maelan commented Jul 21, 2022

I confirm this bug. Here is a minimal example:

module Make (M : sig end) = struct module type S = sig end end
module Test : Make(Make(Int)).S = struct end
(* -------------------------^ this last parenthesis is linted as an error *)

@struktured
Copy link
Author

Thanks for fixing this @Maelan !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants