Use fromRight instead of reimplementing it

This commit is contained in:
Joseph C. Sible 2020-04-05 22:13:39 -04:00
parent 01f4423465
commit 64c31d9142
3 changed files with 6 additions and 3 deletions

View file

@ -24,6 +24,7 @@ import ShellCheck.Interface
import ShellCheck.Formatter.Format
import Data.Aeson
import Data.Either
import Data.IORef
import Data.Monoid
import GHC.Exts
@ -118,7 +119,7 @@ collectResult ref cr sys = mapM_ f groups
f group = do
let filename = sourceFile (head group)
result <- siReadFile sys filename
let contents = either (const "") id result
let contents = fromRight "" result
let comments' = makeNonVirtual comments contents
modifyIORef ref (\x -> comments' ++ x)