From a6345517f3388cb9fe60a2d27e8ea7871c815cb5 Mon Sep 17 00:00:00 2001 From: csicar Date: Wed, 3 Mar 2021 23:47:33 +0100 Subject: [PATCH] Better compatability for `spago source` --- app/Main.hs | 2 +- src/Purepur/Generate.hs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index 04cae6a5..4e18ad65 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -41,7 +41,7 @@ data PurepurOptions = PurepurOptions docgen :: PurepurOptions -> IO () docgen p@(PurepurOptions moutput compileOutput inputGlob compileInputGlob) = do - compileInput <- concat <$> mapM glob compileInputGlob + compileInput <- concat <$> mapM glob (concatMap lines compileInputGlob) input <- concat <$> mapM glob inputGlob when (null compileInput) $ do diff --git a/src/Purepur/Generate.hs b/src/Purepur/Generate.hs index fdf14ae7..66676c7e 100644 --- a/src/Purepur/Generate.hs +++ b/src/Purepur/Generate.hs @@ -65,7 +65,8 @@ generateTestFromMarkdown title (Just comment) = do error $ "unused expression: " <> show expr commandsToDocument title [] = mempty commandsToDocument title (ExpectedOutput str: rest) = - error $ "Could not translate doctest comment: Found expected output " <> show str <> ", but no matching command." + error $ "Could not translate doctest comment: Found expected output " + <> show str <> ", but no matching command." <> " Maybe you missed a `>`? " generateTestFromMarkdownFile :: (FilePath, T.Text) -> Except ParseError (PurepurDocument, P.ModuleName)