Skip to content

Conversation

@Yewzir
Copy link

@Yewzir Yewzir commented Sep 19, 2025

The import of the State module has been changed to Control.Monad.State.

Some imported modules require additional packages:

Because of all the changes, it is now required to run the install command1 for additional packages, like this:

$ cabal install --lib bytestring containers dlist filepath memoize mtl murmur-hash process split template-haskell

I've also commented out the individual commands for any imports that didn't have this yet.

The changes in this pull request have been successfully tested on the following versions:

  • 8.10.7
  • 9.0.1
  • 9.6.6
  • 9.6.7
  • 9.8.1
  • 9.8.4
  • 9.10.3
  • 9.12.1
  • 9.12.2

From the test results, I can conclude that the hack for the Data.Function.Memoize module is required from version 9.8.1 onwards. This hack consists of downloading and extracting the package tarball and running the following commands in the package's root directory:

$ sed -i 's/()/BndrVis/' src/Data/Function/Memoize/TH.hs
$ cabal install --lib memoize --project-dir .

This commit also fixes the issue in this comment.

Footnotes

  1. Since version 9.8.1, "memoize" must be omitted from the command and the package must be installed using the tarball hack.

op(('/',10), [list, EOF], \[a1] -> do
modify $ \s -> s { pdImplicitArgUsed = True }
return $ "\\a -> if null a then "++defaultValue (elemT a1)++" else head a" ~> elemT a1),
op(('/',10), [list, EOF], \[a1] -> "\\a -> if null a then "++defaultValue (elemT a1)++" else head a" ~> elemT a1),
Copy link
Author

Choose a reason for hiding this comment

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

The original piece of code led to a number of ambiguity errors. With this change, the sample tests will certainly also produce the desired results.

@Yewzir
Copy link
Author

Yewzir commented Sep 19, 2025

This hack consists of downloading and extracting the package tarball and running the following commands in the package's root directory:

$ sed -i 's/()/BndrVis/' src/Data/Function/Memoize/TH.hs
$ cabal install --lib memoize --project-dir .

Actually, only the sed command is needed, because if you run ghc -O [-package ghc] nibbles.hs everything will be installed automatically, provided all project files are in the same directory.

@darrenks
Copy link
Owner

Hey Yewzir, thank you for working to keep Nibbles compatible with current versions. Everything looks good, could you also update the exact instructions in docs/try_it.md (both the download+compile and note on libraries). I'll attempt to verify them as well and then accept.

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.

2 participants