Skip to content

Add These constructors and These.these function#90

Merged
chrisdone merged 5 commits intochrisdone:mainfrom
austin-artificial:austin/these
Mar 5, 2025
Merged

Add These constructors and These.these function#90
chrisdone merged 5 commits intochrisdone:mainfrom
austin-artificial:austin/these

Conversation

@austin-artificial
Copy link
Copy Markdown
Contributor

This adds basic support for the These type in Data.These.

Along the way I bumped nixpkgs and pinned the ghc version (to 9.10 in this case).

See the example for how it looks:

main = do
let things = [These.This 1, These.That "hello", These.These 2 "bonjour"]
Monad.forM_ things $ \thing -> Text.putStrLn $
These.these
(\i -> Show.show i)
(\s -> s)
(\i s -> Text.concat [Show.show i, " ", s])
thing

Copy link
Copy Markdown
Collaborator

@chrisdone-artificial chrisdone-artificial left a comment

Choose a reason for hiding this comment

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

Wonderful!

@chrisdone chrisdone merged commit 6042c12 into chrisdone:main Mar 5, 2025
1 check failed
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