Skip to content

Support multiple extensions in (dialect) patterns #7777

@aantron

Description

@aantron

Desired Behavior

Dream currently recommends .eml.ml files, to take advantage of partial syntax highlighting of their ML parts. This is currently not possible with (dialect):

(lang dune 2.0)

(dialect
 (name eml)
 (implementation
  (extension eml.ml)
  (preprocess (run %{bin:dream_eml} --stdout %{input-file})))
 (interface
  (extension emli)
  (format (run cat))))

results in

Entering directory '/home/antron/code/dreamworld'
File "dream/example/7-template/dune-project", line 6, characters 13-19:
6 |   (extension eml.ml)
                 ^^^^^^
Error: extension must not contain '.'

Is it possible to support such extensions?

Example

(lang dune 2.0)

(dialect
 (name eml)
 (implementation
  (extension eml.ml)
  (preprocess (run %{bin:dream_eml} --stdout %{input-file})))
 (interface
  (extension emli)
  (format (run cat))))

See camlworks/dream#228 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions