3 ms·
> If you write all the queries directly in Haskell, you get an IO action which you can't inspect. Of course you can inspect it: open the source code you wrote
by Joker_vD 1y ago
> If you write all the queries directly in Haskell, you get an IO action which you can't inspect.
Of course you can inspect it: open the source code you wrote and read it. Also, don't write the code you don't want to be executed?
> but it's often much easier to ask a regex library to run an interpreter over a string describing the pattern to match.
Which, I might notice, you never inspect. You execute it blindly and look at the outputs of the match() method falling out of it. In fact, most regex libraries compile your regex into an opaque data structure which you can't inspect — and nobody complain about it.
- tinyspacewizard 1y ago> Of course you can inspect it: open the source code you wrote and read it. Also, don't write the code you don't want to be executed? This is not what they meant by inspection. What they mean is that you can write a function, in Haskell, that given a value in the DSL, it returns the list of all requests it will perform on execution. This can be useful for tests, security, caching, performance, debugging...