Skip to content

stack script can not access vector package #6704

@flip111

Description

@flip111

Installed stack by downloading the binary from github. Ubuntu 24.04. I completely removed ~/.stack/ before running the script just to make sure there was nothing corrupted there. Invocation is from running the script a second time (so the ghc install messages are not visible)


» stack --version
Version 3.5.1, Git revision 5c774d7ca92f4716ef7a51d5da21a5c3713517a5 x86_64 hpack-0.38.0

» cat /home/flip111/bin/vector.hs
#!/usr/bin/env stack
{- stack
  script
  --resolver lts-23.17
  --package vector
-}

import Prelude
import Data.Vector

main :: IO ()
main = putStrLn "Hello"


» /home/flip111/bin/vector.hs

/home/flip111/bin/vector.hs:9:1: error: [GHC-87110]
    Could not load module ‘Data.Vector’.
    It is a member of the hidden package ‘vector-0.13.2.0’.
    You can run ‘:set -package vector’ to expose it.
    (Note: this unloads all the modules in the current scope.)
    Use :set -v to see a list of the files searched for.
  |
9 | import Data.Vector
  | ^^^^^^^^^^^^^^^^^^


» stack exec -- ghc-pkg describe vector
name:                 vector
version:              0.13.2.0
visibility:           public
id:                   vector-0.13.2.0-HjnFOxRIwLaIS0isdmcrcH
key:                  vector-0.13.2.0-HjnFOxRIwLaIS0isdmcrcH
license:              BSD-3-Clause
copyright:
    (c) Roman Leshchinskiy 2008-2012,
        Alexey Kuleshevich 2020-2022,
        Aleksey Khudyakov 2020-2022,
        Andrew Lelechenko 2020-2022

maintainer:
    Haskell Libraries Team <libraries@haskell.org>
    Alexey Kuleshevich <alexey@kuleshevi.ch>,
    Aleksey Khudyakov <alexey.skladnoy@gmail.com>,
    Andrew Lelechenko <andrew.lelechenko@gmail.com>

author:               Roman Leshchinskiy <rl@cse.unsw.edu.au>
homepage:             https://github.com/haskell/vector
synopsis:             Efficient Arrays
description:
    .
    An efficient implementation of @Int@-indexed arrays (both mutable
    and immutable), with a powerful loop optimisation framework .
    .
    It is structured as follows:
    .
    ["Data.Vector"] Boxed vectors of arbitrary types.
    .
    ["Data.Vector.Unboxed"] Unboxed vectors with an adaptive
    representation based on data type families.
    .
    ["Data.Vector.Storable"] Unboxed vectors of 'Storable' types.
    .
    ["Data.Vector.Primitive"] Unboxed vectors of primitive types as
    defined by the @primitive@ package. "Data.Vector.Unboxed" is more
    flexible at no performance cost.
    .
    ["Data.Vector.Generic"] Generic interface to the vector types.
    .
    There is also a (draft) tutorial on common uses of vector.
    .
    * <http://haskell.org/haskellwiki/Numeric_Haskell:_A_Vector_Tutorial>

category:             Data, Data Structures
abi:                  d8e7e6d882071c69586d3bd862bcae5b
exposed:              True
exposed-modules:
    Data.Vector Data.Vector.Fusion.Bundle
    Data.Vector.Fusion.Bundle.Monadic Data.Vector.Fusion.Bundle.Size
    Data.Vector.Fusion.Stream.Monadic Data.Vector.Fusion.Util
    Data.Vector.Generic Data.Vector.Generic.Base
    Data.Vector.Generic.Mutable Data.Vector.Generic.Mutable.Base
    Data.Vector.Generic.New Data.Vector.Internal.Check
    Data.Vector.Mutable Data.Vector.Primitive
    Data.Vector.Primitive.Mutable Data.Vector.Storable
    Data.Vector.Storable.Internal Data.Vector.Storable.Mutable
    Data.Vector.Strict Data.Vector.Strict.Mutable Data.Vector.Unboxed
    Data.Vector.Unboxed.Base Data.Vector.Unboxed.Mutable

import-dirs:
    /home/flip111/.stack/snapshots/x86_64-linux-tinfo6/310d3d4cb0ecb83dc0d4ce3883daba97e6f4afd501f41e4c85a83923e132d8bd/9.8.4/lib/x86_64-linux-ghc-9.8.4/vector-0.13.2.0-HjnFOxRIwLaIS0isdmcrcH

library-dirs:
    /home/flip111/.stack/snapshots/x86_64-linux-tinfo6/310d3d4cb0ecb83dc0d4ce3883daba97e6f4afd501f41e4c85a83923e132d8bd/9.8.4/lib/x86_64-linux-ghc-9.8.4/vector-0.13.2.0-HjnFOxRIwLaIS0isdmcrcH

library-dirs-static:
    /home/flip111/.stack/snapshots/x86_64-linux-tinfo6/310d3d4cb0ecb83dc0d4ce3883daba97e6f4afd501f41e4c85a83923e132d8bd/9.8.4/lib/x86_64-linux-ghc-9.8.4/vector-0.13.2.0-HjnFOxRIwLaIS0isdmcrcH

dynamic-library-dirs:
    /home/flip111/.stack/snapshots/x86_64-linux-tinfo6/310d3d4cb0ecb83dc0d4ce3883daba97e6f4afd501f41e4c85a83923e132d8bd/9.8.4/lib/x86_64-linux-ghc-9.8.4

data-dir:
    /home/flip111/.stack/snapshots/x86_64-linux-tinfo6/310d3d4cb0ecb83dc0d4ce3883daba97e6f4afd501f41e4c85a83923e132d8bd/9.8.4/share/x86_64-linux-ghc-9.8.4/vector-0.13.2.0

hs-libraries:         HSvector-0.13.2.0-HjnFOxRIwLaIS0isdmcrcH
include-dirs:
    /home/flip111/.stack/snapshots/x86_64-linux-tinfo6/310d3d4cb0ecb83dc0d4ce3883daba97e6f4afd501f41e4c85a83923e132d8bd/9.8.4/lib/x86_64-linux-ghc-9.8.4/vector-0.13.2.0-HjnFOxRIwLaIS0isdmcrcH/include

depends:
    base-4.19.2.0-2a19 deepseq-1.5.1.0-15a9
    primitive-0.9.0.0-JI7Ra208vLk8wAmTubcivl
    vector-stream-0.1.0.1-DCetcobehSQD2mCVP01kb7

haddock-interfaces:
    /home/flip111/.stack/snapshots/x86_64-linux-tinfo6/310d3d4cb0ecb83dc0d4ce3883daba97e6f4afd501f41e4c85a83923e132d8bd/9.8.4/doc/vector-0.13.2.0/vector.haddock

haddock-html:
    /home/flip111/.stack/snapshots/x86_64-linux-tinfo6/310d3d4cb0ecb83dc0d4ce3883daba97e6f4afd501f41e4c85a83923e132d8bd/9.8.4/doc/vector-0.13.2.0
pkgroot: "/home/flip111/.stack/snapshots/x86_64-linux-tinfo6/310d3d4cb0ecb83dc0d4ce3883daba97e6f4afd501f41e4c85a83923e132d8bd/9.8.4"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions