Skip to content

haskell-process-do-type truncates types too aggressively #988

Closed
@bergey

Description

@bergey

When reporting a type in the message area (not inserting in the buffer), haskell-process-do-type only shows the first line and the first few chars of the second line. haskell-mode-message-line has the actual truncation logic. Because GHCi tries to format types nicely, this leads to useless output like snugCenterV [ :: (Fracti .. ]. The full type is:

snugCenterV
  :: (Fractional (N a), HasOrigin a, Traced a, Alignable a) =>
     V a (N a) -> a -> a

This would fit just fine on one line on my computer (92 chars).

I'm happy to write the code to fix this, if I can get some guidance on what would be acceptable. How about checking the minibuffer size, trying to fit on one line, and if that's not possible, truncating just enough to fit ... at the end?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions