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
This commit is contained in:
Alp Mestanogullari 2015-05-16 09:49:05 +01:00
commit 09e525fc76
2 changed files with 4 additions and 0 deletions

View file

@ -27,3 +27,5 @@ getCabalMacrosFile = do
return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of
[x] -> "dist" </> x </> rest [x] -> "dist" </> x </> rest
[] -> "dist" </> rest [] -> "dist" </> rest
xs -> error $ "ran doctests with multiple dist/dist-sandbox-xxxxx's: \n"
++ show xs ++ "\nTry cabal clean"

View file

@ -25,3 +25,5 @@ getCabalMacrosFile = do
return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of
[x] -> "dist" </> x </> rest [x] -> "dist" </> x </> rest
[] -> "dist" </> rest [] -> "dist" </> rest
xs -> error $ "ran doctests with multiple dist/dist-sandbox-xxxxx's: \n"
++ show xs ++ "\nTry cabal clean"