Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't cabal-install it #9

Open
vemv opened this issue Feb 25, 2018 · 4 comments
Open

Can't cabal-install it #9

vemv opened this issue Feb 25, 2018 · 4 comments

Comments

@vemv
Copy link

vemv commented Feb 25, 2018

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

@natesire
Copy link
Contributor

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
haskell/cabal#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
Copy link
Contributor

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

@dmix
Copy link

dmix commented Jun 27, 2022

The solution is actually to change:

417 to:

case (Main.runIndentParser id topLevelsParser1 s) of

@mmx900
Copy link

mmx900 commented Feb 23, 2024

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.

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

No branches or pull requests

4 participants