Skip to content

add Semigroup instance for InfoMod#132

Merged
chrisdone-artificial merged 1 commit into
chrisdone:mainfrom
supersonic-copycat:infomod_semigroup
May 29, 2026
Merged

add Semigroup instance for InfoMod#132
chrisdone-artificial merged 1 commit into
chrisdone:mainfrom
supersonic-copycat:infomod_semigroup

Conversation

@supersonic-copycat
Copy link
Copy Markdown
Contributor

There is no Semigroup instance for InfoMod, preventing writing something like this, like I'd write in plain Haskell (taken from examples/41-commands.hell, modified):

main = do
  let opts = Options.info (Main.cmdParser <**> Options.helper) 
    (Options.fullDesc <> Options.header "Program is distributed AS IS, without ANY warranty claims")
  cmd <- Options.execParser opts
  case cmd of
    Add f    -> Text.putStrLn $ "Adding " <> f
    Remove f -> Text.putStrLn $ "Removing " <> f
    List     -> Text.putStrLn "Listing files"

PS. I stumbled upon this project and it is quite nice, thanks for open-sourcing it. I do not write a lot of scripts but when I do it's nice to have simpler and somewhat familiar (although more restrictive) alternative to bash.

If your vision of future development of this project does not include having Semigroup instance for InfoMod, feel free to close my MRs.

@chrisdone
Copy link
Copy Markdown
Owner

chrisdone commented May 29, 2026 via email

@chrisdone-artificial chrisdone-artificial merged commit 5c3c61e into chrisdone:main May 29, 2026
1 check passed
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