implement builtin for git fetcher#406
Conversation
|
My biggest trouble with this is to make the To realize this I'd require something like an I tried implementing this in multiple ways but always failed because of the limited abilities that @nmattia maybe you have some idea to fix this? |
|
@flandweber to clarify, the hash is only needed in the I don't 100% remember how arrows work and to be honest I haven't written Haskell in years! But I seem to recall that while you can't change the structure (for some definition of structure) you should be able to update the value. This means you'd always write a hash value, but it may be getHash :: IO T.Text
foo :: Update (Box Bool) (Box Aeson.Value)
foo = arr $ \builtin ->
Box
{ boxNew = boxNew builtin,
boxOp = do
useBuiltin <- boxOp builtin
if useBuiltin then pure Aeson.Null else Aeson.String <$> getHash
}This somewhat typechecks, maybe that's something to investigate? |
yes, correct
You're right, I forgot there were |
fixes #229