Cosmetic: give function a more descriptive name
This commit is contained in:
parent
230c695231
commit
51ee065e6b
1 changed files with 3 additions and 3 deletions
|
@ -156,11 +156,11 @@ expression (L span expr) =
|
|||
MultiIf branches ->
|
||||
do branches' <- forM branches $ \(b,e) -> (,) <$> expression b <*> expression e
|
||||
return $ case last branches of
|
||||
(L _ (Var "Basics.otherwise"), _) -> els branches'
|
||||
(L _ (Literal (Boolean True)), _) -> els branches'
|
||||
(L _ (Var "Basics.otherwise"), _) -> safeIfs branches'
|
||||
(L _ (Literal (Boolean True)), _) -> safeIfs branches'
|
||||
_ -> ifs branches' (obj "_E.If" `call` [ ref "$moduleName", string (show span) ])
|
||||
where
|
||||
els branches = ifs (init branches) (snd (last branches))
|
||||
safeIfs branches = ifs (init branches) (snd (last branches))
|
||||
ifs branches finally = foldr iff finally branches
|
||||
iff (if', then') else' = CondExpr () if' then' else'
|
||||
|
||||
|
|
Loading…
Reference in a new issue