Skip to content

Fixits don't render properly #2

Open
@thoughtpolice

Description

@thoughtpolice

Consider the following snippet:

{-# LANGUAGE OverloadedStrings #-}
module Main where
import Text.Trifecta
import Data.ByteString.Char8()

main :: IO ()
main = parseTest p "hello"
  where p = do
          string "h"
          (_ :~ s) <- spanned $ string "ello"
          warnAt [] "Fix this" $ render $ Fixit s "should be OMFGLOLOL"

When run it gives this output:

$ runghc trifecta.hs
(interactive):1:2: warning: Fix this
hello<EOF> 
 ~~~~      
 should be>
()

You would normally expect the fixit string to be as long as necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions