Revert "Use fromRight instead of reimplementing it"

We still support GHC 8.0, which didn't have fromRight.

This reverts commit 64c31d9142.
This commit is contained in:
Joseph C. Sible 2020-04-24 22:14:08 -04:00
parent 75863a887e
commit e0daa936d2
3 changed files with 3 additions and 6 deletions

View file

@ -22,7 +22,6 @@ module ShellCheck.Formatter.GCC (format) where
import ShellCheck.Interface
import ShellCheck.Formatter.Format
import Data.Either
import Data.List
import GHC.Exts
import System.IO
@ -45,7 +44,7 @@ outputAll cr sys = mapM_ f groups
f group = do
let filename = sourceFile (head group)
result <- (siReadFile sys) filename
let contents = fromRight "" result
let contents = either (const "") id result
outputResult filename contents group
outputResult filename contents warnings = do