Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't put functions in structs or data constructors #1338

Open
duvenaud opened this issue Oct 8, 2023 · 0 comments
Open

Can't put functions in structs or data constructors #1338

duvenaud opened this issue Oct 8, 2023 · 0 comments

Comments

@duvenaud
Copy link
Contributor

duvenaud commented Oct 8, 2023

I'm trying to make a custom datatype that carries around a function. This used to work, but seems to have been broken by the new syntax. For example:

data SortsBy(a) =
  MkSortsBy(less_than:(a -> Bool))
Syntax error: Argument types should be in parentheses

  MkSortsBy(less_than:(a -> Bool))
                         ^^^

If this change was deliberate, then the error message is confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant