Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixits don't render properly #2

Open
thoughtpolice opened this issue Nov 1, 2011 · 1 comment
Open

Fixits don't render properly #2

thoughtpolice opened this issue Nov 1, 2011 · 1 comment

Comments

@thoughtpolice
Copy link
Collaborator

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.

@ekmett
Copy link
Owner

ekmett commented Sep 30, 2013

I'm still open to improving this. It just needs the rendering logic to be smart enough to take into account those longer lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants