haddock icon indicating copy to clipboard operation
haddock copied to clipboard

Constraints block doesn't wrap lines

Open ghc-mirror opened this issue 11 years ago • 2 comments

Original reporter: justnika@

As a result you get a doc like in the attached file[[Image(screenshot.png)]]

ghc-mirror avatar May 08 '14 20:05 ghc-mirror

I can't figure out what this was supposed too refer to?

gbaz avatar Feb 05 '18 08:02 gbaz

Possibly referring to long lists of constraints in multi-line mode? E.g.

-- | Do stuff
constraintsOhMy ::
  ( Arrow c,
    Bifunctor c,
    Bounded a,
    Category c,
    Enum a,
    Eq a,
    Exception e,
    Foldable m,
    HasCallStack,
    Monad m,
    MonadFix m,
    Monoid a,
    Ord a,
    Show a,
    Traversable m
  ) =>
  c e a ->
  m a ->
  ()
constraintsOhMy _ _ = ()

gives:

constraints_wrapping

But if you add argument descriptions hence activating multi-line mode:

-- | Do stuff
constraintsOhMy ::
  ( Arrow c,
    Bifunctor c,
    Bounded a,
    Category c,
    Enum a,
    Eq a,
    Exception e,
    Foldable m,
    HasCallStack,
    Monad m,
    MonadFix m,
    Monoid a,
    Ord a,
    Show a,
    Traversable m
  ) =>
  -- | An arg
  c e a ->
  -- | Another one
  m a ->
  ()
constraintsOhMy _ _ = ()

You get:

constraints_no_wrapping

The full list is actually there, but you either have to use the horizontal scrollbar or zoom out (this is 67% on my browser for this example):

constraints_no_wrapping_zoom_out

tbidne avatar Mar 21 '23 03:03 tbidne