packages feed

aihc-parser-1.0.0.2: test/Test/Fixtures/golden/module/do-if-then-else-let-layout.yaml

extensions: [DoAndIfThenElse]
input: |
  {-# LANGUAGE DoAndIfThenElse #-}
  module DoAndIfThenElseLetLayout where
  withLet :: IO ()
  withLet = do
    if True
      then do
      let x = 1
          y = 2
      return (x + y)
      else do
      return 0
ast: |-
  Module {ModuleHead {"DoAndIfThenElseLetLayout"}, [DoAndIfThenElse], [DeclTypeSig ["withLet"] (TApp (TCon "IO") (TTuple [])), DeclValue (PatternBind (PVar "withLet") (EDo [DoExpr (EIf (EVar "True") (EDo [DoLetDecls [DeclValue (PatternBind (PVar "x") (EInt 1 TInteger)), DeclValue (PatternBind (PVar "y") (EInt 2 TInteger))], DoExpr (EApp (EVar "return") (EParen (EInfix (EVar "x") "+" (EVar "y"))))]) (EDo [DoExpr (EApp (EVar "return") (EInt 0 TInteger))]))]))]}
status: pass