Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8348001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:33:22+00:00 2026-06-09T07:33:22+00:00

I’ve been fighting with Cabal for a good portion of a day trying to

  • 0

I’ve been fighting with Cabal for a good portion of a day trying to make its automated testing features work with HUnit. I’ve read the documentation here and here, and I have my Test-Suite section set up like it shows, but whenever I try and build the package using cabal build Cabal says that the only Test-Suite type supported is exitcode-stdio-1.0. What gives?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:33:23+00:00Added an answer on June 9, 2026 at 7:33 am

    Background

    So here’s the deal, the documentation on the cabal site is “future documentation,” that is, not all of those features are implemented and released yet. Cabal-install 0.14.0 comes with the detailed-0.9 interface, which is a version behind what’s specified in the docs (detailed-1.0), but I haven’t encountered any problems related to this yet. If you have the Haskell Platform version 2011.4 which comes with cabal-install 0.10.2 you won’t be able to use the detailed-0.9 interface. You’ll need to upgrade to Haskell Platform 2012.2 which comes with cabal-install 0.14.0. You could also just upgrade cabal-install separately, which is what I did because on Fedora 17 the Haskell Platform is only on 2011.4.

    Installation

    In the documentation here you’ll see an example of how to use the detailed-0.9 interface with QuickCheck. It mentions some packages that have interfaces to HUnit, QuickCheck1, and QuickCheck2, but only the package for QuickCheck2 is available on hackage. If you want the packages for the rest of the frameworks you’ll need to use darcs (a VCS) to download them from this location. The command you want to run for the HUnit interface is this: darcs get http://community.haskell.org/~ttuegel/cabal-test-hunit/. You may have to adjust the .cabal file in order to get it to build, specifically it relies on ghc 3.* and cabal 1.10. I changed this to my versions (ghc 4.* and cabal 1.14) and it built fine.

    Testing

    Once you have the interface built you need to do some stuff in your test module so Cabal can run it. Specifically you’ll need to import both Distribution.TestSuite and Distribution.TestSuite.HUnit. After that you’ll need to convert your HUnit Tests to Cabal Tests, using a function provided in the HUnit interface. Here’s the relevant lines of code:

    import qualified Distribution.TestSuite as Cabal
    import qualified Distribution.TestSuite.HUnit as CabalHUnit
    
    tests = map (\(x,y) -> CabalHUnit.test x y) [("Login tests", loginTests)]
    

    That’s it! You should be able to run cabal configure --enable-tests && cabal build && cabal test and see your unit tests pass (or fail).

    Edit
    Edited to clarify that the detailed-0.9 interface is included in cabal-install 0.14.0, not detailed-1.0.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to select an H1 element which is the second-child in its group
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have been unable to fix a problem with Java Unicode and encoding. The
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.