Shea Levy

Results 136 comments of Shea Levy

I can close if the guidance is that we should not expect this to end up in the compiler or stdlib, but if there's a chance something like this could...

> Nothing downstream will understand a multi-script with different options If we build it, they will come :stuck_out_tongue_winking_eye:

> We won't be able to work out what the function is when we try and compile things... GHC will compile each bit of code once Hmm, I'm confused. Given...

I was proposing something like: ```haskell scriptCode :: DebugMode -> a prodAndDebugScript :: (CompiledCode a, CompiledCode a) prodAndDebugScript = ($$(compile [|| scriptCode NoDebug ||]), $$(compile [|| scriptCode Debug ||])) ```

And maybe we even write a TH function `compileProdAndDebug`

So to make sure I understand your proposal, `queryOpt @"Foo"` would be noinline (and presumably its definition would be `BuiltinBool False`), and then the plugin would, as an early pass,...

Should it really be `BuiltinBool` though? Don't we *want* the user's code to directly pattern-match on it, not use the on-chain bool case function?

OK so the user-facing interface would be `queryOpt :: forall (opt :: Symbol) . Bool`, which would be implemented on top of `Builtins.Internal.queryOpt :: forall (opt :: Symbol) . BuiltinBool`...

I'm assuming we can't just use `defineBuiltinTerm` directly since we'll need to somehow inspect the core for which symbol is being requested, right?

I would like this as well. Use case is: Configuration files specifies a set of outputs as a dict, where the key is the output name and the value is...