mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-14 17:13:08 -07:00
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:
parent
75863a887e
commit
e0daa936d2
3 changed files with 3 additions and 6 deletions
|
@ -24,7 +24,6 @@ import ShellCheck.Interface
|
|||
import ShellCheck.Formatter.Format
|
||||
|
||||
import Data.Aeson
|
||||
import Data.Either
|
||||
import Data.IORef
|
||||
import Data.Monoid
|
||||
import GHC.Exts
|
||||
|
@ -119,7 +118,7 @@ collectResult ref 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
|
||||
let comments' = makeNonVirtual comments contents
|
||||
modifyIORef ref (\x -> comments' ++ x)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue