diff --git a/dhall-docs/src/Dhall/Docs/CodeRenderer.hs b/dhall-docs/src/Dhall/Docs/CodeRenderer.hs index 789fcc3fb..51224bb64 100644 --- a/dhall-docs/src/Dhall/Docs/CodeRenderer.hs +++ b/dhall-docs/src/Dhall/Docs/CodeRenderer.hs @@ -245,16 +245,16 @@ fragments = Data.List.sortBy sorter . removeUnusedDecls . Writer.execWriter . in return NoInfo where - handleRecordLike l = RecordFields . Set.fromList <$> mapM f l + handleRecordLike l = RecordFields . Set.fromList . concat <$> mapM f l where f (key, RecordField (Just Src{srcEnd = startPos}) val (Just Src{srcStart = endPos}) _) = do dhallType <- infer context val let nameSrc = makeSrcForLabel startPos endPos key let nameDecl = NameDecl nameSrc key dhallType Writer.tell [SourceCodeFragment nameSrc (NameDeclaration nameDecl)] - return nameDecl + return [ nameDecl ] where - f _ = fileAnIssue "A `RecordField` of type `Expr Src Import` doesn't have `Just src*`" + f _ = return [ ] fileAsText :: File -> Text fileAsText File{..} = foldr (\d acc -> acc <> "/" <> d) "" (Core.components directory)