Skip to content

Conversation

@L0neGamer
Copy link
Contributor

These are over-complicated for what they need to do.

@L0neGamer L0neGamer marked this pull request as draft November 26, 2025 18:10
@L0neGamer L0neGamer marked this pull request as ready for review November 26, 2025 18:22
pure $ case mIsFirst of
Just True -> ((x : ls), rs)
Just False -> (ls, (x : rs))
Nothing -> ((x : ls), (x : rs))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems strictly less clear. It also produces more "both" results than the current code, which might be fine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't want another type, you could do something basic with rem inline.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer a more numeric approach, I think that makes more sense than the ternary data types here.

TwoLists l r <- arbitrary
(l, r) <- sized $ \sz0 -> do
sz <- choose (0, sz0)
let universe = [0,3..3*(sz - 1)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I wrote the original code, but I no longer remember the purpose of using products of 3. Has your work here given you any hints?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not immediately; I would presume because they're not incredibly densely packed that lets other manipulations happen, but I can't say for certain.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think it's probably to get some gaps for testing with values in neither? I can't imagine that's the best way to do it; Please feel free to do something else about that.

Comment on lines +3 to +4
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As brought up in #1165, we would like to get tests working with MHS, which does not support type families. So this is potentially setting up a future problem.

@L0neGamer L0neGamer marked this pull request as draft November 27, 2025 08:06
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

Successfully merging this pull request may close these issues.

3 participants