getInstruction' :: Throws (Located GeneratorError) e => String -> FieldType -> (TypeInstructions -> Maybe a) -> GenerateJvm e a
getInstruction' msg t fn = do
  x <- getInstruction msg t fn
  let msg' = "Unsupported " ++ msg ++ ": " ++ show t
  case x of 
    Nothing -> failCheck GeneratorError msg'
    Just i -> return i
getInstruction' :: Throws (Located GeneratorError) e => String -> FieldType -> (TypeInstructions -> Maybe a) -> GenerateJvm e a
getInstruction' msg t fn = do
  x <- getInstruction msg t fn
  let msg' = "Unsupported " ++ msg ++ ": " ++ show t
  case x of 
    Nothing -> failCheck GeneratorError msg'
    Just i -> return i
getInstruction' msg t fn = do
  x <- getInstruction msg t fn
  let msg' = "Unsupported " ++ msg ++ ": " ++ show t
  case x of 
    Nothing -> failCheck GeneratorError msg'
    Just i -> return i