herbalizer icon indicating copy to clipboard operation
herbalizer copied to clipboard

Can't cabal-install it

Open vemv opened this issue 7 years ago • 4 comments

Hi there, hopefully this will be an easy one:

~ $ cabal install herbalizer
Resolving dependencies...
Downloading mtl-2.2.2...
Downloading text-1.2.3.0...
Configuring mtl-2.2.2...
Configuring text-1.2.3.0...
Building mtl-2.2.2...
Building text-1.2.3.0...
Installed mtl-2.2.2
Downloading regex-base-0.93.2...
Configuring regex-base-0.93.2...
Building regex-base-0.93.2...
Installed regex-base-0.93.2
Downloading regex-posix-0.95.2...
Configuring regex-posix-0.95.2...
Building regex-posix-0.95.2...
Installed regex-posix-0.95.2
Installed text-1.2.3.0
Downloading parsec-3.1.13.0...
Configuring parsec-3.1.13.0...
Building parsec-3.1.13.0...
Installed parsec-3.1.13.0
Downloading indents-0.4.0.1...
Configuring indents-0.4.0.1...
Building indents-0.4.0.1...
Installed indents-0.4.0.1
Downloading herbalizer-0.4.9...
Configuring herbalizer-0.4.9...
Building herbalizer-0.4.9...
Failed to install herbalizer-0.4.9
Build log ( /Users/vemv/.cabal/logs/ghc-8.2.2/herbalizer-0.4.9-GXkK3dtmgmVHkr1XnJrOIH.log ):
cabal: Entering directory '/var/folders/d5/_q5_g7xj0qlfsdr0d6v7mqs40000gn/T/cabal-tmp-94557/herbalizer-0.4.9'
Configuring herbalizer-0.4.9...
Preprocessing executable 'herbalizer' for herbalizer-0.4.9..
Building executable 'herbalizer' for herbalizer-0.4.9..
[1 of 1] Compiling Main             ( src/Main.hs, dist/build/herbalizer/herbalizer-tmp/Main.o )

src/Main.hs:417:11: error:
    Ambiguous occurrence ‘runIndentParser’
    It could refer to either ‘Text.Parsec.Indent.runIndentParser’,
                             imported from ‘Text.Parsec.Indent’ at src/Main.hs:8:1-25
                          or ‘Main.runIndentParser’, defined at src/Main.hs:406:1
    |
417 |     case (runIndentParser id topLevelsParser1 s) of
    |           ^^^^^^^^^^^^^^^
cabal: Leaving directory '/var/folders/d5/_q5_g7xj0qlfsdr0d6v7mqs40000gn/T/cabal-tmp-94557/herbalizer-0.4.9'
cabal: Error: some packages failed to install:
herbalizer-0.4.9-GXkK3dtmgmVHkr1XnJrOIH failed during the building phase. The
exception was:
ExitFailure 1

Cheers - Victor

vemv avatar Feb 25 '18 17:02 vemv

nathans-MacBook:www nathansire$ cd herbalizer/ nathans-MacBook:herbalizer nathansire$ cabal update Downloading the latest package list from hackage.haskell.org nathans-MacBook:herbalizer nathansire$ cabal install herbalizer Warning: --root-cmd is no longer supported, see https://github.com/haskell/cabal/issues/3353 (if you didn't type --root-cmd, comment out root-cmd in your ~/.cabal/config file) Resolving dependencies... Configuring herbalizer-0.4.9... Building herbalizer-0.4.9... Failed to install herbalizer-0.4.9 Build log ( /Users/nathansire/.cabal/logs/ghc-8.2.2/herbalizer-0.4.9-GXkK3dtmgmVHkr1XnJrOIH.log ): cabal: Entering directory '/var/folders/_0/4yk2mn3d2497dgls0cvcxjw80000gn/T/cabal-tmp-82159/herbalizer-0.4.9' Configuring herbalizer-0.4.9... Preprocessing executable 'herbalizer' for herbalizer-0.4.9.. Building executable 'herbalizer' for herbalizer-0.4.9.. [1 of 1] Compiling Main ( src/Main.hs, dist/build/herbalizer/herbalizer-tmp/Main.o )

src/Main.hs:417:11: error: Ambiguous occurrence ‘runIndentParser’ It could refer to either ‘Text.Parsec.Indent.runIndentParser’, imported from ‘Text.Parsec.Indent’ at src/Main.hs:8:1-25 or ‘Main.runIndentParser’, defined at src/Main.hs:406:1 | 417 | case (runIndentParser id topLevelsParser1 s) of | ^^^^^^^^^^^^^^^ cabal: Leaving directory '/var/folders/_0/4yk2mn3d2497dgls0cvcxjw80000gn/T/cabal-tmp-82159/herbalizer-0.4.9' cabal: Error: some packages failed to install: herbalizer-0.4.9-GXkK3dtmgmVHkr1XnJrOIH failed during the building phase. The exception was: ExitFailure 1

natesire avatar Mar 18 '19 15:03 natesire

it is a namespace collision. Need to do something like this...

import Text.Parsec.Indent as P

line 417: case (P.runIndentParser id topLevelsParser1 s) of

natesire avatar Mar 18 '19 15:03 natesire

The solution is actually to change:

417 to:

case (Main.runIndentParser id topLevelsParser1 s) of

dmix avatar Jun 27 '22 18:06 dmix

I made a dockerfile in my fork to use herbalizer without using Cabal directly, applying the solution. If you are familiar with Docker, You can use it like docker run --rm -i herbalizer < test.haml.

mmx900 avatar Feb 23 '24 02:02 mmx900