ekmett / ekmett/trifecta

Fixits don't render properly

Open
#2 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
303
Forks
48
PR merge metrics
No merged PRs in 30d

Description

Consider the following snippet:

``` haskell
{-# 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
~~~~
should be>
()
```

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.