Skip to content

Add support for validation functions to have a single parameter #17

Description

@willnationsdev

Because the dependent type depends on the new function of the validator being unit -> 'Pi, it is impossible to have the DependentType creation take in a value that should go to the validator function. In my use case, I have validation that always takes in some form of logger function. I specifically do this because each validation operation within a validator function is wrapped in code quotes and stringified with unquote before logging the error and exiting early with a None.

I wish this could be "fixed" by just implementing a LogSomeDependentType or some such, but apparently you can't pass any parameters to the new() of a type parameter.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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