check :: Style -> Result.Result ()
check style
  = case maybeError of
        Nothing -> return ()
        Just message -> Result.fatalError $ Error.createStyleFormatError message
  where maybeError
          = case errorMessages of
                [] -> Nothing
                messages -> Just $ Newline.joinSeparatedLines messages
        errorMessages = Maybe.mapMaybe unwrap $ createChecks style
        unwrap (Check errorMessage) = errorMessage
check :: Style -> Result.Result ()
check style
  = case maybeError of
        Nothing -> return ()
        Just message -> Result.fatalError $ Error.createStyleFormatError message
  where maybeError
          = case errorMessages of
                [] -> Nothing
                messages -> Just $ Newline.joinSeparatedLines messages
        errorMessages = Maybe.mapMaybe unwrap $ createChecks style
        unwrap (Check errorMessage) = errorMessage
check style
  = case maybeError of
        Nothing -> return ()
        Just message -> Result.fatalError $ Error.createStyleFormatError message
  where maybeError
          = case errorMessages of
                [] -> Nothing
                messages -> Just $ Newline.joinSeparatedLines messages
        errorMessages = Maybe.mapMaybe unwrap $ createChecks style
        unwrap (Check errorMessage) = errorMessage