<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span><br></span></div><div><span>Aha, I'd missed that; thanks - I'll try the fix after going pumpkin hunting with the kids!</span></div><div><span><br></span></div><div><span>Doug</span></div><div><span><br></span></div><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> JP Moresmau &lt;jpmoresmau@gmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> Doug Burke &lt;doug_j_burke@yahoo.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> "Haskell-Cafe@haskell.org" &lt;Haskell-Cafe@haskell.org&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Saturday, October 22, 2011 1:15
 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Haskell-cafe] hackage and cabal test support: why does it claim I have no type field when I do?<br></font><br>
Maybe the issue is that the test modules are missing from the<br>distribution file, which is a known bug.<br>(http://hackage.haskell.org/trac/hackage/ticket/792)<br><br>JP<br><br>On Sat, Oct 22, 2011 at 7:04 PM, Doug Burke &lt;<a ymailto="mailto:doug_j_burke@yahoo.com" href="mailto:doug_j_burke@yahoo.com">doug_j_burke@yahoo.com</a>&gt; wrote:<br>&gt;<br>&gt; I've just been updating my code to take advantage of the test support in<br>&gt; Cabal. I have it so that<br>&gt; &nbsp; cabal configure --enable-tests<br>&gt; &nbsp; cabal build<br>&gt; &nbsp; cabal test<br>&gt; works. However, when I try to upload to hackage, I get<br>&gt; &nbsp; cabal upload -c dist/swish-0.6.2.0.tar.gz<br>&gt; &nbsp; Checking dist/swish-0.6.2.0.tar.gz...<br>&gt; &nbsp; Error: dist/swish-0.6.2.0.tar.gz: 400 Error in upload<br>&gt; &nbsp; 400 Error in upload<br>&gt; &nbsp; line 271: The 'type' field is required for test suites. The available test<br>&gt; &nbsp; types are:
 exitcode-stdio-1.0<br>&gt; and here are the relevant lines from the cabal file:<br>&gt; &nbsp; &nbsp;267 &nbsp; &nbsp; if flag(developer)<br>&gt; &nbsp; &nbsp;268 &nbsp; &nbsp; &nbsp; &nbsp;ghc-options: -Werror<br>&gt; &nbsp; &nbsp;269 &nbsp; &nbsp; &nbsp; &nbsp;ghc-prof-options: -auto-all<br>&gt; &nbsp; &nbsp;270<br>&gt; &nbsp; &nbsp;271 &nbsp;Test-Suite test-builtinmap<br>&gt; &nbsp; &nbsp;272 &nbsp; &nbsp; type: &nbsp; &nbsp; &nbsp; exitcode-stdio-1.0<br>&gt; &nbsp; &nbsp;273 &nbsp; &nbsp; Hs-Source-Dirs: tests/ src/<br>&gt; &nbsp; &nbsp;274 &nbsp; &nbsp; Main-Is: &nbsp; &nbsp;BuiltInMapTest.hs<br>&gt; &nbsp; &nbsp;275 &nbsp; &nbsp; Other-Modules: &nbsp;TestHelpers<br>&gt; &nbsp; &nbsp;276<br>&gt; As you can see, there's a type field for the Test-Suite and I don't see any<br>&gt; obvious discrepancy with the information from the user's guide<br>&gt; (<a href="http://www.haskell.org/cabal/users-guide/#test-suites"
 target="_blank">http://www.haskell.org/cabal/users-guide/#test-suites</a>). I also have<br>&gt; &nbsp; Cabal-Version: &nbsp; &nbsp; &nbsp;&gt;= 1.9.2<br>&gt;<br>&gt; in the file; the full version can be found at<br>&gt; <a href="https://bitbucket.org/doug_burke/swish/src/4545220d88e2/swish.cabal#cl-271" target="_blank">https://bitbucket.org/doug_burke/swish/src/4545220d88e2/swish.cabal#cl-271</a><br>&gt;<br>&gt; What am I doing wrong?<br>&gt; Thanks in advance,<br>&gt; Doug<br>&gt;<br>&gt; _______________________________________________<br>&gt; Haskell-Cafe mailing list<br>&gt; <a ymailto="mailto:Haskell-Cafe@haskell.org" href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>&gt; http://www.haskell.org/mailman/listinfo/haskell-cafe<br>&gt;<br>&gt;<br><br><br><br>-- <br>JP Moresmau<br>http://jpmoresmau.blogspot.com/<br><br><br></div></div></div></body></html>