Skip to content

cabal install not working #58

Description

@beh333

I am new to Haskell and hoping to try Mikrokosmos, but I can't get it to install. A few months ago I struggled to install Haskell, and so I started over with a "ghcup nuke" and fresh install of Haskell and cabal per https://www.haskell.org/ghcup/install/, which seemed to go fine on my Ubuntu 20 machine. But when I do "cabal install mikrokosmos" it fails, per below. Any tips? Thank you!

(env) bruce@bruce-ThinkPad-X1-Yoga-1st:~/python/myproject$ cabal install mikrokosmos
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):

  • ansi-terminal-0.11.1 (lib) (requires download & build)
  • clock-0.8.3 (lib) (requires download & build)
  • hashable-1.4.0.2 (lib) (requires download & build)
  • unliftio-core-0.2.0.1 (lib) (requires download & build)
  • ansi-wl-pprint-0.6.9 (lib) (requires build)
  • async-2.2.4 (lib) (requires build)
  • optparse-applicative-0.17.0.0 (lib) (requires download & build)
  • typed-process-0.2.8.0 (lib) (requires download & build)
  • tasty-1.4.2.1 (lib) (requires download & build)
  • tasty-quickcheck-0.10.2 (lib) (requires download & build)
  • tasty-hunit-0.10.0.3 (lib) (requires build)
  • tasty-golden-2.3.5 (lib) (requires download & build)
  • mikrokosmos-0.8.0 (exe:mikrokosmos) (requires build)
    Downloading clock-0.8.3
    Downloaded clock-0.8.3
    Downloading unliftio-core-0.2.0.1
    Starting clock-0.8.3 (lib)
    Downloaded unliftio-core-0.2.0.1
    Downloading hashable-1.4.0.2
    Starting unliftio-core-0.2.0.1 (lib)
    Downloaded hashable-1.4.0.2
    Downloading typed-process-0.2.8.0
    Starting hashable-1.4.0.2 (lib)
    Downloaded typed-process-0.2.8.0
    Downloading ansi-terminal-0.11.1
    Building clock-0.8.3 (lib)
    Building unliftio-core-0.2.0.1 (lib)
    Building hashable-1.4.0.2 (lib)
    Downloaded ansi-terminal-0.11.1
    Downloading optparse-applicative-0.17.0.0
    Starting ansi-terminal-0.11.1 (lib)
    Downloaded optparse-applicative-0.17.0.0
    Downloading tasty-1.4.2.1
    Downloaded tasty-1.4.2.1
    Downloading tasty-golden-2.3.5
    Installing unliftio-core-0.2.0.1 (lib)
    Building ansi-terminal-0.11.1 (lib)
    Completed unliftio-core-0.2.0.1 (lib)
    Downloaded tasty-golden-2.3.5
    Downloading tasty-quickcheck-0.10.2
    Downloaded tasty-quickcheck-0.10.2
    Installing clock-0.8.3 (lib)
    Completed clock-0.8.3 (lib)
    Installing hashable-1.4.0.2 (lib)
    Completed hashable-1.4.0.2 (lib)
    Starting async-2.2.4 (lib)
    Building async-2.2.4 (lib)
    Installing ansi-terminal-0.11.1 (lib)
    Completed ansi-terminal-0.11.1 (lib)
    Starting ansi-wl-pprint-0.6.9 (lib)
    Building ansi-wl-pprint-0.6.9 (lib)
    Installing async-2.2.4 (lib)
    Completed async-2.2.4 (lib)
    Starting typed-process-0.2.8.0 (lib)
    Installing ansi-wl-pprint-0.6.9 (lib)
    Completed ansi-wl-pprint-0.6.9 (lib)
    Starting optparse-applicative-0.17.0.0 (lib)
    Building typed-process-0.2.8.0 (lib)
    Building optparse-applicative-0.17.0.0 (lib)
    Installing typed-process-0.2.8.0 (lib)
    Completed typed-process-0.2.8.0 (lib)
    Installing optparse-applicative-0.17.0.0 (lib)
    Completed optparse-applicative-0.17.0.0 (lib)
    Starting tasty-1.4.2.1 (lib)
    Building tasty-1.4.2.1 (lib)
    Installing tasty-1.4.2.1 (lib)
    Completed tasty-1.4.2.1 (lib)
    Starting tasty-quickcheck-0.10.2 (lib)
    Starting tasty-hunit-0.10.0.3 (lib)
    Starting tasty-golden-2.3.5 (lib)
    Building tasty-golden-2.3.5 (lib)
    Building tasty-hunit-0.10.0.3 (lib)
    Building tasty-quickcheck-0.10.2 (lib)
    Installing tasty-hunit-0.10.0.3 (lib)
    Completed tasty-hunit-0.10.0.3 (lib)
    Installing tasty-quickcheck-0.10.2 (lib)
    Installing tasty-golden-2.3.5 (lib)
    Completed tasty-quickcheck-0.10.2 (lib)
    Completed tasty-golden-2.3.5 (lib)
    Starting mikrokosmos-0.8.0 (exe:mikrokosmos)
    Building mikrokosmos-0.8.0 (exe:mikrokosmos)

Failed to build exe:mikrokosmos from mikrokosmos-0.8.0.
Build log (
/home/bruce/.cabal/logs/ghc-8.10.7/mikrokosmos-0.8.0-e-mikrokosmos-5676a63111e4d2a457043e76eaed0be71875db064a0bbd21a8493d8a2d2a0f7d.log
):
Configuring executable 'mikrokosmos' for mikrokosmos-0.8.0..
Preprocessing executable 'mikrokosmos' for mikrokosmos-0.8.0..
Building executable 'mikrokosmos' for mikrokosmos-0.8.0..
[ 1 of 12] Compiling Format ( source/Format.hs, dist/build/mikrokosmos/mikrokosmos-tmp/Format.o )
[ 2 of 12] Compiling Lambda ( source/Lambda.hs, dist/build/mikrokosmos/mikrokosmos-tmp/Lambda.o )
[ 3 of 12] Compiling Libraries ( source/Libraries.hs, dist/build/mikrokosmos/mikrokosmos-tmp/Libraries.o )
[ 4 of 12] Compiling MultiBimap ( source/MultiBimap.hs, dist/build/mikrokosmos/mikrokosmos-tmp/MultiBimap.o )
[ 5 of 12] Compiling Environment ( source/Environment.hs, dist/build/mikrokosmos/mikrokosmos-tmp/Environment.o )
[ 6 of 12] Compiling NamedLambda ( source/NamedLambda.hs, dist/build/mikrokosmos/mikrokosmos-tmp/NamedLambda.o )

source/NamedLambda.hs:24:1: warning: [-Wunused-imports]
The import of ‘Control.Applicative’ is redundant
except perhaps to import instances from ‘Control.Applicative’
To import instances alone, use: import Control.Applicative()
|
24 | import Control.Applicative ((<$>), (<*>))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 7 of 12] Compiling Ski ( source/Ski.hs, dist/build/mikrokosmos/mikrokosmos-tmp/Ski.o )
[ 8 of 12] Compiling Stlc.Block ( source/Stlc/Block.hs, dist/build/mikrokosmos/mikrokosmos-tmp/Stlc/Block.o )

source/Stlc/Block.hs:14:10: error:
• No instance for (Semigroup Block)
arising from the superclasses of an instance declaration
• In the instance declaration for ‘Monoid Block’
|
14 | instance Monoid Block where
| ^^^^^^^^^^^^

source/Stlc/Block.hs:55:10: error:
• No instance for (Semigroup Block) arising from a use of ‘<>’
• In the expression: us <> Block [replicate (length label) ' ']
In an equation for ‘ut’:
ut = us <> Block [replicate (length label) ' ']
In an equation for ‘stackBlocks’:
stackBlocks label u v
= Block $ getBlock ut ++ [hline] ++ getBlock vt
where
mw = max (width u) (width v)
us = centerBlock mw u
vs = centerBlock mw v
hline = replicate mw hsepChar ++ label
....
|
55 | ut = us <> Block [replicate (length label) ' ']
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

source/Stlc/Block.hs:56:10: error:
• No instance for (Semigroup Block) arising from a use of ‘<>’
• In the expression: vs <> Block [replicate (length label) ' ']
In an equation for ‘vt’:
vt = vs <> Block [replicate (length label) ' ']
In an equation for ‘stackBlocks’:
stackBlocks label u v
= Block $ getBlock ut ++ [hline] ++ getBlock vt
where
mw = max (width u) (width v)
us = centerBlock mw u
vs = centerBlock mw v
hline = replicate mw hsepChar ++ label
....
|
56 | vt = vs <> Block [replicate (length label) ' ']
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

source/Stlc/Block.hs:79:32: error:
• No instance for (Semigroup Block) arising from a use of ‘<>’
• In the expression: x <> Block [" "] <> y
In the first argument of ‘foldr1’, namely
‘(\ x y -> x <> Block [" "] <> y)’
In the expression: foldr1 (\ x y -> x <> Block [" "] <> y) blocks
|
79 | then foldr1 (\x y -> x <> Block [" "] <> y) blocks
| ^^^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build exe:mikrokosmos from mikrokosmos-0.8.0. See the build
log above for details.

(env) bruce@bruce-ThinkPad-X1-Yoga-1st:~/python/myproject$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions