:: Either a b -> b package:extra

The fromRight' function extracts the element out of a Right and throws an error if its argument is Left. Much like fromJust, using this function in polished code is usually a bad idea.
\x -> fromRight' (Right x) == x
\x -> fromRight' (Left  x) == undefined
Given an Either, convert it to a Maybe, where Left becomes Nothing.
\x -> eitherToMaybe (Left x) == Nothing
\x -> eitherToMaybe (Right x) == Just x