Skip to content

%import interface types with deriving #34

@Leandros

Description

@Leandros

If I try to derive eq from imported types, I get the following error message:

Error: eq cannot be derived for fully abstract types

The setup is as follows:

mod.mli

type foo = Bar of int
[@@deriving eq,show]

mod.ml

type foo = [%import: Mod.foo]
[@@deriving eq,show]

dune

; ...
  (preprocess
    (staged_pps
      ppx_import
      ppx_deriving.std
; ...

Works fine if I import types from other interfaces/modules.
Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions