nmattia / niv

Easy dependency management for Nix projects
https://github.com/nmattia/niv
MIT License
1.57k stars 77 forks source link

Update type refactoring #407

Open flandweber opened 2 months ago

flandweber commented 2 months ago

as mentioned in https://github.com/nmattia/niv/pull/406#issuecomment-2189273534 I believe the Update module needs a refactoring. Especially the function runUpdate' seems overly complex. I'm sure there's a better abstraction to be found, though I don't know what it is yet. maybe System.IO.Lazy could play a role?

@nmattia what was the original reason to make Update an arrow instead of a monad? I'm new to arrows so I don't yet fully grasp the advantages it has over monads in the implementation.