Failed installing tree-monad


I failed installing tree-monad. Can anyone help?

$ cabal install tree-monad
Resolving dependencies…
Build profile: -w ghc-8.8.4 -O1
In order, the following will be built (use -v for more details):

  • tree-monad-0.3 (lib:tree-monad) (requires build)
    Starting tree-monad-0.3 (all, legacy fallback)
    Building tree-monad-0.3 (all, legacy fallback)

Failed to build tree-monad-0.3.
Build log (
Configuring tree-monad-0.3…
Preprocessing library for tree-monad-0.3…
Building library for tree-monad-0.3…
[1 of 1] Compiling Control.Monad.SearchTree ( Control/Monad/SearchTree.hs, dist/build/Control/Monad/SearchTree.o )

Control/Monad/SearchTree.hs:51:3: error:
‘fail’ is not a (visible) method of class ‘Monad’
51 | fail _ = None
| ^^^^

Control/Monad/SearchTree.hs:85:3: error:
‘fail’ is not a (visible) method of class ‘Monad’
85 | fail _ = mzero
| ^^^^
cabal: Failed to build tree-monad-0.3. See the build log above for details.

You got a good answer on reddit:

I would like to add that you cannot expect every package on Hackage to build without problems, especially if the last upload was about 10 years ago.

1 Like