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

Check regexes at compile #8

Open
gabriel-fallen opened this issue Feb 14, 2018 · 5 comments
Open

Check regexes at compile #8

gabriel-fallen opened this issue Feb 14, 2018 · 5 comments

Comments

@gabriel-fallen
Copy link

Currently regular expressions (TRegex for SchemaText) get compiled only when (and if) relevant data being validated at run-time. Thus even malformed regexes pass compilation and might sleep past testing. It would be nice if they get compiled or syntactically verified while compiling Haskell.

@dredozubov
Copy link
Contributor

It would. But do you have a way of doing that in mind?

@sboosali
Copy link

sboosali commented Feb 14, 2018 via email

@sboosali
Copy link

sboosali commented Feb 14, 2018 via email

@dredozubov
Copy link
Contributor

I've thought about the type level representation, but I would rather separate something like this to a different project before trying to incorporate it into schematic. Schematic already incurs heavy compilation burden on ghc and I think it can get worse with type level regexes. Do you think some helpers to test out the type level regexes would come in handy? It may be an alternative.

@sboosali
Copy link

Yeah, wrapping whatever regular expression parser is eventually invoked makes sense.

masaeedu pushed a commit to masaeedu/schematic that referenced this issue Sep 21, 2018
Change Min, Max, Sort, Length benchmarks
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

3 participants