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

Move Recursive newtype to core #238

Closed
Tracked by #247
sorki opened this issue Nov 19, 2023 · 0 comments
Closed
Tracked by #247

Move Recursive newtype to core #238

sorki opened this issue Nov 19, 2023 · 0 comments

Comments

@sorki
Copy link
Member

sorki commented Nov 19, 2023

I've replaced Bool with it in remote but same thing is used by ReadOnlyStore and S3 in #37

For the reference since it will move around

-- | Recursive, used by @addToStore@
newtype Recursive = Recursive { unRecursive :: Bool }
  deriving (Eq, Ord, Show)

addRecursive, addNonRecursive :: Recursive
-- | Add target directory recursively
addRecursive = Recursive True
-- | Add target directory non-recursively
addNonRecursive = Recursive False

Maybe sum type / enum would be even better, draft

data Recursive =
  Recursive_Recursive
  Recursive_NonRecursive

sounds kind-of superfluous and very recursive 🙃

Also wondering where to put it, considering System.Nix.Store.Types

This was referenced Nov 19, 2023
@sorki sorki closed this as completed in 8ac46de Nov 22, 2023
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

1 participant