Skip to content

@s.* PPX not usable on root schema type #151

@benadamstyles

Description

@benadamstyles

Firstly, thanks so much for Sury. It's a revelation!

We're having one issue though:

@schema
type t = @s.strict {
  email: string,
  name: string,
}

leads to:

An inline record type declaration is only allowed in a variant constructor's declaration

The same happens with @s.meta() and others.

Am I missing something obvious?

I tried this but it doesn't actually apply the strictness:

@schema @s.strict
type t = {
  email: string,
  name: string,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions