evincarofautumn / kitten

A statically typed concatenative systems programming language.
http://kittenlang.org/
Other
1.09k stars 39 forks source link

Error when building: "Not in scope: ‘V.imapM’" #155

Closed JobLeonard closed 8 years ago

JobLeonard commented 8 years ago
cabal-1.24 install --enable-tests --only-dependencies
Resolving dependencies...
All the requested packages are already installed:
Use --reinstall if you want to reinstall anyway.
cabal-1.24 configure --enable-tests
Resolving dependencies...
Configuring kitten-0.1...
cabal-1.24 build
Building kitten-0.1...
Preprocessing library kitten-0.1...
[ 1 of 58] Compiling Kitten.Util.Show ( lib/Kitten/Util/Show.hs, dist/build/Kitten/Util/Show.o )
[ 2 of 58] Compiling Kitten.Util.Set  ( lib/Kitten/Util/Set.hs, dist/build/Kitten/Util/Set.o )
[ 3 of 58] Compiling Kitten.Util.Applicative ( lib/Kitten/Util/Applicative.hs, dist/build/Kitten/Util/Applicative.o )
[ 4 of 58] Compiling Kitten.Parsec    ( lib/Kitten/Parsec.hs, dist/build/Kitten/Parsec.o )
[ 5 of 58] Compiling Kitten.Util.Parsec ( lib/Kitten/Util/Parsec.hs, dist/build/Kitten/Util/Parsec.o )
[ 6 of 58] Compiling Kitten.Util.Function ( lib/Kitten/Util/Function.hs, dist/build/Kitten/Util/Function.o )
[ 7 of 58] Compiling Kitten.Util.Vector ( lib/Kitten/Util/Vector.hs, dist/build/Kitten/Util/Vector.o )

lib/Kitten/Util/Vector.hs:14:14:
    Not in scope: ‘V.imapM’
    Perhaps you meant one of these:
      ‘V.mapM’ (imported from Data.Vector),
      ‘V.imap’ (imported from Data.Vector),
      ‘V.map’ (imported from Data.Vector)
[ 8 of 58] Compiling Kitten.Util.FailWriter ( lib/Kitten/Util/FailWriter.hs, dist/build/Kitten/Util/FailWriter.o )
[ 9 of 58] Compiling Kitten.Util.List ( lib/Kitten/Util/List.hs, dist/build/Kitten/Util/List.o )
[10 of 58] Compiling Kitten.Util.Monad ( lib/Kitten/Util/Monad.hs, dist/build/Kitten/Util/Monad.o )
[11 of 58] Compiling Kitten.Util.Either ( lib/Kitten/Util/Either.hs, dist/build/Kitten/Util/Either.o )
[12 of 58] Compiling Kitten.Util.Tuple ( lib/Kitten/Util/Tuple.hs, dist/build/Kitten/Util/Tuple.o )
[13 of 58] Compiling Kitten.Util.Text ( lib/Kitten/Util/Text.hs, dist/build/Kitten/Util/Text.o )
[14 of 58] Compiling Kitten.Kind      ( lib/Kitten/Kind.hs, dist/build/Kitten/Kind.o )
[15 of 58] Compiling Kitten.Util.Maybe ( lib/Kitten/Util/Maybe.hs, dist/build/Kitten/Util/Maybe.o )
[16 of 58] Compiling Kitten.Id        ( lib/Kitten/Id.hs, dist/build/Kitten/Id.o )
[17 of 58] Compiling Kitten.IdMap     ( lib/Kitten/IdMap.hs, dist/build/Kitten/IdMap.o )
[18 of 58] Compiling Kitten.KindedId  ( lib/Kitten/KindedId.hs, dist/build/Kitten/KindedId.o )
[19 of 58] Compiling Kitten.ClosedName ( lib/Kitten/ClosedName.hs, dist/build/Kitten/ClosedName.o )
[20 of 58] Compiling Kitten.Name      ( lib/Kitten/Name.hs, dist/build/Kitten/Name.o )
[21 of 58] Compiling Kitten.Intrinsic ( lib/Kitten/Intrinsic.hs, dist/build/Kitten/Intrinsic.o )
[22 of 58] Compiling Kitten.Operator  ( lib/Kitten/Operator.hs, dist/build/Kitten/Operator.o )
[23 of 58] Compiling Kitten.Location  ( lib/Kitten/Location.hs, dist/build/Kitten/Location.o )
[24 of 58] Compiling Kitten.Annotation ( lib/Kitten/Annotation.hs, dist/build/Kitten/Annotation.o )
[25 of 58] Compiling Kitten.Error     ( lib/Kitten/Error.hs, dist/build/Kitten/Error.o )
[26 of 58] Compiling Kitten.Resolve.Monad ( lib/Kitten/Resolve/Monad.hs, dist/build/Kitten/Resolve/Monad.o )
[27 of 58] Compiling Kitten.Import    ( lib/Kitten/Import.hs, dist/build/Kitten/Import.o )
[28 of 58] Compiling Kitten.Type      ( lib/Kitten/Type.hs, dist/build/Kitten/Type.o )
[29 of 58] Compiling Kitten.Definition ( lib/Kitten/Definition.hs, dist/build/Kitten/Definition.o )
[30 of 58] Compiling Kitten.Term      ( lib/Kitten/Term.hs, dist/build/Kitten/Term.o )
[31 of 58] Compiling Kitten.Config    ( lib/Kitten/Config.hs, dist/build/Kitten/Config.o )
[32 of 58] Compiling Kitten.Type.Tidy ( lib/Kitten/Type/Tidy.hs, dist/build/Kitten/Type/Tidy.o )
[33 of 58] Compiling Kitten.TypeDefinition ( lib/Kitten/TypeDefinition.hs, dist/build/Kitten/TypeDefinition.o )
[34 of 58] Compiling Kitten.Program   ( lib/Kitten/Program.hs, dist/build/Kitten/Program.o )
[35 of 58] Compiling Kitten.Optimize  ( lib/Kitten/Optimize.hs, dist/build/Kitten/Optimize.o )
[36 of 58] Compiling Kitten.Fragment  ( lib/Kitten/Fragment.hs, dist/build/Kitten/Fragment.o )
[37 of 58] Compiling Kitten.IR        ( lib/Kitten/IR.hs, dist/build/Kitten/IR.o )
[38 of 58] Compiling Kitten.C         ( lib/Kitten/C.hs, dist/build/Kitten/C.o )

lib/Kitten/C.hs:64:16:
    Not in scope: ‘V.imapM’
    Perhaps you meant one of these:
      ‘V.mapM’ (imported from Data.Vector),
      ‘V.imap’ (imported from Data.Vector),
      ‘V.map’ (imported from Data.Vector)
[39 of 58] Compiling Kitten.Resolve   ( lib/Kitten/Resolve.hs, dist/build/Kitten/Resolve.o )
[40 of 58] Compiling Kitten.Scope     ( lib/Kitten/Scope.hs, dist/build/Kitten/Scope.o )
[41 of 58] Compiling Kitten.HTML      ( lib/Kitten/HTML.hs, dist/build/Kitten/HTML.o )
[42 of 58] Compiling Kitten.Infer.Monad ( lib/Kitten/Infer/Monad.hs, dist/build/Kitten/Infer/Monad.o )
[43 of 58] Compiling Kitten.Infer.Scheme ( lib/Kitten/Infer/Scheme.hs, dist/build/Kitten/Infer/Scheme.o )
[44 of 58] Compiling Kitten.Infer.Type ( lib/Kitten/Infer/Type.hs, dist/build/Kitten/Infer/Type.o )
[45 of 58] Compiling Kitten.Infer.Locations ( lib/Kitten/Infer/Locations.hs, dist/build/Kitten/Infer/Locations.o )
[46 of 58] Compiling Kitten.Infer.Unify ( lib/Kitten/Infer/Unify.hs, dist/build/Kitten/Infer/Unify.o )
[49 of 58] Compiling Kitten.Token     ( lib/Kitten/Token.hs, dist/build/Kitten/Token.o )
[50 of 58] Compiling Kitten.Tokenize  ( lib/Kitten/Tokenize.hs, dist/build/Kitten/Tokenize.o )
[51 of 58] Compiling Kitten.Parse.Monad ( lib/Kitten/Parse/Monad.hs, dist/build/Kitten/Parse/Monad.o )
[52 of 58] Compiling Kitten.Parse.Layout ( lib/Kitten/Parse/Layout.hs, dist/build/Kitten/Parse/Layout.o )
[53 of 58] Compiling Kitten.Parse.Primitive ( lib/Kitten/Parse/Primitive.hs, dist/build/Kitten/Parse/Primitive.o )
[54 of 58] Compiling Kitten.Parse.Type ( lib/Kitten/Parse/Type.hs, dist/build/Kitten/Parse/Type.o )
[55 of 58] Compiling Kitten.Abbreviation ( lib/Kitten/Abbreviation.hs, dist/build/Kitten/Abbreviation.o )
[56 of 58] Compiling Kitten.Parse.Element ( lib/Kitten/Parse/Element.hs, dist/build/Kitten/Parse/Element.o )
[57 of 58] Compiling Kitten.Parse     ( lib/Kitten/Parse.hs, dist/build/Kitten/Parse.o )
Makefile:86: recipe for target 'dist/build/kitten/kitten' failed
make: *** [dist/build/kitten/kitten] Error 1

On Ubuntu, installed GHC 7.10 and cabal 1.24 via this launchpad

evincarofautumn commented 8 years ago

Haha, the intent of da7e014120 was to fix this, but clearly I goofed. Will push a fix in a moment.

evincarofautumn commented 8 years ago

Removing the V. qualification, I see the opposite error:

lib/Kitten/Util/Vector.hs:14:14:
    Not in scope: ‘imapM’
    Perhaps you meant one of these:
      ‘V.imapM’ (imported from Data.Vector),
      ‘mapM’ (imported from Prelude),
      ‘V.mapM’ (imported from Data.Vector)

My .cabal-sandbox/logs contains an entry for vector-0.11.0.0. Which version of vector do you have?

evincarofautumn commented 8 years ago

It’s worth noting that the Makefile creates a Cabal sandbox, so the dependencies should resolve cleanly there. You may want to try that, or use the Makefile with CABAL=cabal-1.24 make. I will also be doing a Stack build soon for #154, now that it’s been asked for.

JobLeonard commented 8 years ago

I honestly don't know which version of vector I have, because I installed Haskell just to compile this :P

I already edited the makefile; it wouldn't compile otherwise. I did see a warning that I should run cabal update, which I did afterwards. Maybe an old version is stuck in the cache now?

How do perform a clean install to check?

JobLeonard commented 8 years ago

Ok, figured it out thanks to your comment in the other issue:

you may need to delete dist and .cabal-sandbox if they were created with an older version of Cabal.

What probably happened was that I tried to compile it with the default Haskell installation first (which is too old), then installed these newer versions. So the issue was entirely with me.

Everything builds fine now, thanks for the help!