git.iko.soy/typeable/servant
on master help sign in
Merge pull request #85 from haskell-servant/wip-better-error-doctest-failure

servant, servant-server: handle corner case in doctests, add an helpful error message

commit09e525fc76f11a3306103ae34aa95f328b1b2ed5 authorAlp Mestanogullari <alpmestan@gmail.com> dateSat 16 May 2015, 09:49 (11 years ago) parente59c03fec55177
2 files changed+4
servant-server/test/Doctests.hs+2 servant/test/Doctests.hs+2
servant-server/test/Doctests.hs+2
@@ -27,3 +27,5 @@ getCabalMacrosFile = do
2727 return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of
2828 [x] -> "dist" </> x </> rest
2929 [] -> "dist" </> rest
30+ xs -> error $ "ran doctests with multiple dist/dist-sandbox-xxxxx's: \n"
31+ ++ show xs ++ "\nTry cabal clean"
servant/test/Doctests.hs+2
@@ -25,3 +25,5 @@ getCabalMacrosFile = do
2525 return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of
2626 [x] -> "dist" </> x </> rest
2727 [] -> "dist" </> rest
28+ xs -> error $ "ran doctests with multiple dist/dist-sandbox-xxxxx's: \n"
29+ ++ show xs ++ "\nTry cabal clean"