[Haskell-beginners] Patch source, then pickup compile

James Toll james at jtoll.com
Sun Sep 21 01:26:40 UTC 2014


On Sep 20, 2014, at 12:08 PM, Nadir Sampaoli <nadirsampaoli at gmail.com> wrote:
> Il 20/set/2014 18:58 "James Toll" <james at jtoll.com> wrote:
> >
> > I do have one concern though.  The part where you mention that if any of the source files are changed, then cabal will rebuild.  I don’t want or need that functionality given that this is supposed to be a temporary work around until the fixed version of Pandoc is in Hackage.
> 
> According to the wiki ("sandboxes: advanced usage" section) you should use `cabal sandbox add-source --snapshot` "which disables the change tracking".
> 
> >
> > If possible, I might prefer to just delete the pandoc-1.13.1 source subdirectory entirely, as long as it doesn’t mess up the current hakyll installation. Is that possible?  If not, in the future, once the version of Pandoc in Hackage has been updated, is it then possible to remove the added source?
> To remove an added source I think the correct sandbox subcommand is `delete-source`. See the --help for more info.


I wish I could say that I got this to work, but I’ve had no success.  The problem I’m having is that I can’t even get 'cabal sandbox add-source --snapshot’ to work.  This is what I’m trying to do, and the output:

$ mkdir hakyll
$ cd hakyll
$ cabal sandbox init --sandbox .
$ cabal install -j hakyll
[compilation fails]
$ cabal get pandoc-1.13.1
$ cabal sandbox add-source --snapshot pandoc-1.13.1/
cabal: Error: Could not find module: Text.Pandoc.Data with any suffix:
["gc","chs","hsc","x","y","ly","cpphs","hs","lhs”]

This last command creates the ’snapshots' directory within the hakyll directory.  Snapshots contains an empty subdirectory called ‘pandoc-1.13.1-tmp’. If I then try a different slightly different path to pandoc, it fails, but differently:

$ cabal sandbox add-source --snapshot ./pandoc-1.13.1/
cabal: /Users/james/src/haskell/sandboxes/hakyll/snapshots/pandoc-1.13.1: does
not exist

If I delete the ‘snapshots’ directory, it fails with the first error where it can’t find the module.

What am I doing wrong?  I’ve tried many different iterations of this.  Executing the command from within the pandoc directory, renaming the directory, plus many other variations.  Nothing has worked.  How is this supposed to work.  It just doesn’t seem like it should be this hard.

Thanks.

James




More information about the Beginners mailing list