I have a code that uses the fromRight
function defined circa GHC 8.2. But I need to downgrade to GHC 8.0.2, which gives an error about Variable not in scope:
for fromRight
I was wondering if it possible and how to add the missing definition
fromRight :: b -> Either a b -> b
fromRight _ (Right b) = b
fromRight b _ = b
so that it is only used when I use an GHC version than 8.2.1?
See Question&Answers more detail:os