Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  Build woes (cabal configure can't find   sandboxed deps)
      (Alex Hammel)
   2. Re:  Build woes (cabal configure can't find       sandboxed deps)
      (Alex Hammel)
   3. Re:  Build woes (cabal configure can't find sandboxed deps)
      (Brandon Allbery)
   4. Re:  Build woes (cabal configure can't find sandboxed deps)
      (Alex Hammel)
   5.  Vim + Syntastic + ghc-mod: over-verbose error    messages
      (Matthew Moppett)


----------------------------------------------------------------------

Message: 1
Date: Mon, 2 Feb 2015 10:22:45 -0800
From: Alex Hammel <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: [Haskell-beginners] Build woes (cabal configure can't find
        sandboxed deps)
Message-ID:
        <ca+_xfepo7-zbqmkghaxj3u4zw-vfbsy8_pi8gzy9crihqa3...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi list,

I've got a number of modules in a project set up like this:

project
|-- foo
|-- bar
|-- baz
`-- sandbox

where 'foo', 'bar' and 'baz' are modules which depend on one another, and
'sandbox' is a sandbox. Before building from scratch, I do a $(cabal
sandbox init --sandbox=../sandbox) in each of the module folders.

If I run $(cabal install ./foo ./bar ./baz) from the projects/ directory,
everything is happy. However, if I reconfigure one of the sub-modules with
different flags, it fails with missing dependencies:

# in foo/
$ cabal build
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
# module builds correctly

$ cabal configure --enable-tests
Resolving dependencies...
Configuring foo-0.1...

$ cabal build

dist/setup/setup.hs:13:8:
    Could not find module ?System.FilePath.Glob?
    Perhaps you meant
      System.FilePath (from filepath-1.3.0.2)
      System.FilePath.Posix (from filepath-1.3.0.2)
    Use -v to see a list of the files searched for.

Glob is installed in the sandbox.

I've tried pointing to the sandbox config file manually with both $(cabal
--sandbox-config-file=project/foo/cabal.sandbox.config) and $(cabal
--sandbox-config-file=project/cabal.sandbox.config) with the same result.
Cabal insists that Glob isn't installed until I nuke the foo/dist directory
and start over.

I figure there's some flag I need to pass to `cabal configure` that I'm
missing, but I can't figure out what it is. Anybody have any hints?

Cheers,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20150202/ce77aec6/attachment-0001.html>

------------------------------

Message: 2
Date: Mon, 2 Feb 2015 12:40:19 -0800
From: Alex Hammel <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Build woes (cabal configure can't
        find    sandboxed deps)
Message-ID:
        <CA+_xFer_9RAALQXpJ_fXYa=zljtnbdhpuaux2o55god9+sz...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hmm, nuking ~/.cabal and ~/.ghc seems to have fixed it.

Good old cabal. When in doubt, delete everything.

On Mon, Feb 2, 2015 at 10:22 AM, Alex Hammel <[email protected]> wrote:

> Hi list,
>
> I've got a number of modules in a project set up like this:
>
> project
> |-- foo
> |-- bar
> |-- baz
> `-- sandbox
>
> where 'foo', 'bar' and 'baz' are modules which depend on one another, and
> 'sandbox' is a sandbox. Before building from scratch, I do a $(cabal
> sandbox init --sandbox=../sandbox) in each of the module folders.
>
> If I run $(cabal install ./foo ./bar ./baz) from the projects/ directory,
> everything is happy. However, if I reconfigure one of the sub-modules with
> different flags, it fails with missing dependencies:
>
> # in foo/
> $ cabal build
> Package has never been configured. Configuring with default flags. If this
> fails, please run configure manually.
> # module builds correctly
>
> $ cabal configure --enable-tests
> Resolving dependencies...
> Configuring foo-0.1...
>
> $ cabal build
>
> dist/setup/setup.hs:13:8:
>     Could not find module ?System.FilePath.Glob?
>     Perhaps you meant
>       System.FilePath (from filepath-1.3.0.2)
>       System.FilePath.Posix (from filepath-1.3.0.2)
>     Use -v to see a list of the files searched for.
>
> Glob is installed in the sandbox.
>
> I've tried pointing to the sandbox config file manually with both $(cabal
> --sandbox-config-file=project/foo/cabal.sandbox.config) and $(cabal
> --sandbox-config-file=project/cabal.sandbox.config) with the same result.
> Cabal insists that Glob isn't installed until I nuke the foo/dist directory
> and start over.
>
> I figure there's some flag I need to pass to `cabal configure` that I'm
> missing, but I can't figure out what it is. Anybody have any hints?
>
> Cheers,
> Alex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20150202/2014b081/attachment-0001.html>

------------------------------

Message: 3
Date: Mon, 2 Feb 2015 15:44:04 -0500
From: Brandon Allbery <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Build woes (cabal configure can't
        find sandboxed deps)
Message-ID:
        <CAKFCL4WMLgEwA79iwFX=a26mb+zgkm3w_1_twvrjglr5lqc...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Mon, Feb 2, 2015 at 3:40 PM, Alex Hammel <[email protected]> wrote:

> Hmm, nuking ~/.cabal and ~/.ghc seems to have fixed it.
> Good old cabal. When in doubt, delete everything.
>

That says to me you didn't have the sandbox set up right. I'd have set up
the sandbox and then used --add-source for foo, bar, and baz... or,
sometimes, symlink the original sandbox into those dirs, but I suspect
that's asking for trouble :)

-- 
brandon s allbery kf8nh                               sine nomine associates
[email protected]                                  [email protected]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20150202/4490994d/attachment-0001.html>

------------------------------

Message: 4
Date: Mon, 2 Feb 2015 12:50:05 -0800
From: Alex Hammel <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Build woes (cabal configure can't
        find sandboxed deps)
Message-ID:
        <ca+_xfeokp+4c6gqexkdyyfdnzogrfljjd28k4bfo072qdzu...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

That's exactly what I did. From my setup script:

cabal sandbox init --sandbox sandbox
for folder in $SUBMODULES; do
    (cd "$folder"; cabal sandbox init --sandbox ../sandbox)
    cabal sandbox add-source "$folder"
done

$SUBMODULES contains ./foo, ./bar, and ./baz

On Mon, Feb 2, 2015 at 12:44 PM, Brandon Allbery <[email protected]>
wrote:

> On Mon, Feb 2, 2015 at 3:40 PM, Alex Hammel <[email protected]> wrote:
>
>> Hmm, nuking ~/.cabal and ~/.ghc seems to have fixed it.
>> Good old cabal. When in doubt, delete everything.
>>
>
> That says to me you didn't have the sandbox set up right. I'd have set up
> the sandbox and then used --add-source for foo, bar, and baz... or,
> sometimes, symlink the original sandbox into those dirs, but I suspect
> that's asking for trouble :)
>
> --
> brandon s allbery kf8nh                               sine nomine
> associates
> [email protected]
> [email protected]
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20150202/d72c187a/attachment-0001.html>

------------------------------

Message: 5
Date: Tue, 3 Feb 2015 16:30:20 +0700
From: Matthew Moppett <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: [Haskell-beginners] Vim + Syntastic + ghc-mod: over-verbose
        error   messages
Message-ID:
        <camlejzammqni7iojphv0-p8zgrfgoytpkngpjvhsmc2-c3n...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

I'm not sure if this is the right forum to raise this issue, but:

Trying out the Syntastic plugin in Vim, I've found that it displays
confusingly over-verbose error messages that contain unnecessary
information about the module location of identifiers -- e.g.:

Config.hs|13 col 7 error| Couldn't match type `(Config.ConfigElem,
GHC.Base.String)' with `[GHC.Types.Char]'Expected type: [GHC.Base.String]
-> containers-0.5.0.0:Data.Map.Base.Map Config.ConfigElem GHC.Base.String
Actual type: [(Config.ConfigElem, GHC.Base.String)] ->
containers-0.5.0.0:Data.Map.Base.Map Config.ConfigElem GHC.Base.StringIn
the expression: Data.Map.Strict.fromList :: [GHC.Base.String] ->
containers-0.5.0.0:Data.Map.Base.Map Config.ConfigElem GHC.Base.StringIn an
equation for `Config.foo': Config.foo = Data.Map.Strict.fromList ::
[GHC.Base.String] -> containers-0.5.0.0:Data.Map.Base.Map Config.ConfigElem
GHC.Base.String


Syntastic uses the output from "ghc-mod check" to generate this, and in
turn I think ghc-mod relies on ghc, since options can be passed to ghc from
ghc-mod using the -g option flag. Does anyone know of a way to modify the
behaviour of Syntastic/ghc-mod/ghc to produce output that's more readable?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20150203/c6232ca0/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


------------------------------

End of Beginners Digest, Vol 80, Issue 2
****************************************

Reply via email to