CurryInfo: stylechecker-2.0.0 / Check.AST.Indent.IfThenElse.checkIfThenElse'

definition:
checkIfThenElse' :: SpanInfo -> SpanInfo -> SpanInfo -> SpanInfo -> CSM ()
checkIfThenElse' sI0 sI1 sI2 sI3 = case (sI0, sI1, sI2, sI3) of
  (SpanInfo sp [ Span (Position lpi pi) _, Span (Position lpt pt) _, Span (Position lpe pe) _],
   SpanInfo (Span _ (Position li _)) _,
   SpanInfo (Span _ (Position lt _)) _,
   SpanInfo (Span _ (Position le _)) _)
    | lpi == le               -> return ()
    | lpi == lpe              -> do report (Message
                                            sp
                                            ( text "wrong formatting"
                                              <+> colorizeKey "else expression"
                                            )
                                            ( text "do not break"
                                              <+> colorizeKey " else expression"
                                              <+> text "if writing"
                                              <+> colorizeKey "if-then-else"
                                              <+> text "in one line"
                                            ))
    | lpi == lpt && lt /= lpe -> do checkIfThenElseInTwoLines sp pt pe
                                    checkBreakIndent "then" lpt pt sI2
                                    checkBreakIndent "else" lpe pe sI3
    | lt == lpe               -> do report (Message
                                            sp
                                            ( text "wrong formatting"
                                             <+> colorizeKey "else"
                                            )
                                            ( colorizeKey "else"
                                              <+> text " should start in seperate line"
                                            ))
    | li == lpt               -> do report (Message
                                            sp
                                            ( text "wrong formatting"
                                              <+> colorizeKey "then"
                                            )
                                            ( colorizeKey "then"
                                              <+> text " should start in seperate line"
                                            ))
    | li /= lpt && lt /= lpe  -> do checkIfThenElseInThreeLines sp pi pt pe
                                    checkBreakIndent "if" lpi pi sI1
                                    checkBreakIndent "then" lpt pt sI2
                                    checkBreakIndent "else" lpe pe sI3
  _ -> return ()
demand:
no demanded arguments
deterministic:
deterministic operation
documentation:
-- Checks for various situations:
--   all in one line
--   if - else in one line, else expression not
--   if - then in one line, else and else expression in another -> twolines
--   if - then in one line, then expression and else in one
--   if and then not in one line, if expression and then in one
--   if then else in different lines, if and then expressions not right in front
--   if then and else
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_,_,_) |-> _}
name:
checkIfThenElse'
precedence:
no precedence defined
result-values:
_
signature:
Curry.SpanInfo.SpanInfo -> Curry.SpanInfo.SpanInfo -> Curry.SpanInfo.SpanInfo
-> Curry.SpanInfo.SpanInfo
-> Control.Monad.Trans.State.StateT Types.CheckState Data.Functor.Identity.Identity ()
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term