"Not in scope: fromJust" means that the compiler cannot find fromJust
, since it's not defined in your module, or in any of your imported modules (including the Prelude, which is imported automatically by default).
You need to import it yourself from the correct module. You can find out which one using Hoogle.
In this case, you need to import Data.Maybe
.