Fixits don't render properly #2

thoughtpolice opened this Issue Nov 1, 2011 · 1 comment


None yet

2 participants


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
 should be>

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


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