Skip to content

Commit

Permalink
Include . in extension
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolás Ojeda Bär <[email protected]>
  • Loading branch information
nojb committed Jul 11, 2019
1 parent 4097de3 commit f5db143
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/dialect.ml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ let to_dyn { name ; file_kinds } =
]

let extension { file_kinds = { Ml_kind.Dict.intf ; impl } ; _ } = function
| Ml_kind.Intf -> "." ^ intf.extension
| Impl -> "." ^ impl.extension
| Ml_kind.Intf -> intf.extension
| Impl -> impl.extension

let preprocess { file_kinds = { Ml_kind.Dict.intf ; impl } ; _ } = function
| Ml_kind.Intf -> intf.preprocess
| Impl -> impl.preprocess

let ml_suffix { file_kinds = { Ml_kind.Dict.intf ; impl } ; _ } ml_kind =
match intf.extension, impl.extension, ml_kind with
| "mli", _, Ml_kind.Intf | _, "ml", Impl -> None
| ".mli", _, Ml_kind.Intf | _, ".ml", Impl -> None
| _, _, Intf -> Some ".mli"
| _, _, Impl -> Some ".ml"

Expand All @@ -82,8 +82,8 @@ let ocaml =
; format = Filter.No_filter
}
in
let intf = file_kind Ml_kind.Intf "mli" in
let impl = file_kind Ml_kind.Impl "ml" in
let intf = file_kind Ml_kind.Intf ".mli" in
let impl = file_kind Ml_kind.Impl ".ml" in
{ name = "ocaml"
; file_kinds = Ml_kind.Dict.make ~intf ~impl
}
Expand All @@ -110,8 +110,8 @@ let reason =
; format = Filter.Action (Loc.none, format)
}
in
let intf = file_kind Ml_kind.Intf "rei" in
let impl = file_kind Ml_kind.Impl "re" in
let intf = file_kind Ml_kind.Intf ".rei" in
let impl = file_kind Ml_kind.Impl ".re" in
{ name = "reason"
; file_kinds = Ml_kind.Dict.make ~intf ~impl
}

0 comments on commit f5db143

Please sign in to comment.