(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:pkgname)
          op: assign_op.Equal
          rhs: {<idris>}
          spids: [18]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:pkgver)
          op: assign_op.Equal
          rhs: {<1.0>}
          spids: [21]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:pkgrel)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [24]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:pkgdesc)
          op: assign_op.Equal
          rhs: {(DQ <'A Language with Dependent Types'>)}
          spids: [27]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:url)
          op: assign_op.Equal
          rhs: {(DQ <'http://www.idris-lang.org'>)}
          spids: [32]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:arch)
          op: assign_op.Equal
          rhs: {(DQ <x86_64>)}
          spids: [37]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:license)
          op: assign_op.Equal
          rhs: {(DQ <BSD3>)}
          spids: [42]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:depends)
          op: assign_op.Equal
          rhs: {(DQ <'gmp-dev gcc'>)}
          spids: [47]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:makedepends)
          op: assign_op.Equal
          rhs: {(DQ <'ghc cabal libffi-dev ncurses-dev zlib-dev'>)}
          spids: [52]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:subpackages)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$pkgname') <-doc>)}
          spids: [57]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:source)
          op: assign_op.Equal
          rhs: 
            {
              (DQ ($ Id.VSub_DollarName '$pkgname') <-> ($ Id.VSub_DollarName '$pkgver') 
                <'.tar.gz::https://github.com/idris-lang/Idris-dev/archive/v'> ($ Id.VSub_DollarName '$pkgver') <'.tar.gz\n'> <'\tcabal.config'>
              )
            }
          spids: [63]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:builddir)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$srcdir') <'/Idris-dev-'> ($ Id.VSub_DollarName '$pkgver'))}
          spids: [74]
        )
      ]
    )
    (C {<export>} 
      {<Id.Lit_VarLike 'CABAL_CONFIG='> (DQ ($ Id.VSub_DollarName '$srcdir') <'/cabal/cabal.config'>)}
    )
    (command.ShFunction
      name: cabal_update
      body: 
        (BraceGroup
          children: [
            (C {<msg>} {(DQ <'Updating constraints'>)})
            (C {<cd>} {(DQ ($ Id.VSub_DollarName '$builddir'))})
            (command.Simple
              words: [{<cabal>} {<update>}]
              more_env: [
                (env_pair
                  name: HOME
                  val: 
                    {
                      (DQ 
                        (braced_var_sub
                          token: <Id.VSub_Name CABAL_CONFIG>
                          suffix_op: 
                            (suffix_op.Unary
                              tok: <Id.VOp1_Percent '%'>
                              arg_word: {<Id.Lit_Slash '/'> <Id.Lit_Other '*'>}
                            )
                        )
                      )
                    }
                  spids: [118]
                )
              ]
              do_fork: T
            )
            (C {<rm>} {<-f>} {<cabal.config>})
            (C {<cabal>} {<freeze>})
            (C {<sed>} {<-i>} {(DQ <1i--> ($ Id.VSub_DollarName '$pkgver'))} {<cabal.config>})
            (C {<mv>} {<cabal.config>} {(DQ ($ Id.VSub_DollarName '$startdir')) <'/'>})
            (C {<cd>} {(DQ ($ Id.VSub_DollarName '$startdir'))})
            (C {<abuild>} {<checksum>})
          ]
        )
    )
    (command.ShFunction
      name: prepare
      body: 
        (BraceGroup
          children: [
            (C {<default_prepare>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: <Id.Left_DollarParen '$('>
                                    child: 
                                      (C {<head>} {<-n>} {<1>} 
                                        {(DQ ($ Id.VSub_DollarName '$srcdir')) <'/cabal.config'>}
                                      )
                                  )
                                )
                              } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <--> ($ Id.VSub_DollarName '$pkgver'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<die>} {(DQ <'Requirements file is outdated, run \'abuild cabal_update\''>)})
                  ]
                  spids: [204 234]
                )
              ]
            )
            (C {<cd>} {(DQ ($ Id.VSub_DollarName '$builddir'))})
            (command.Simple
              words: [{<cabal>} {<update>}]
              more_env: [
                (env_pair
                  name: HOME
                  val: 
                    {
                      (DQ 
                        (braced_var_sub
                          token: <Id.VSub_Name CABAL_CONFIG>
                          suffix_op: 
                            (suffix_op.Unary
                              tok: <Id.VOp1_Percent '%'>
                              arg_word: {<Id.Lit_Slash '/'> <Id.Lit_Other '*'>}
                            )
                        )
                      )
                    }
                  spids: [260]
                )
              ]
              do_fork: T
            )
            (C {<ln>} {<-sf>} {(DQ ($ Id.VSub_DollarName '$srcdir')) <'/cabal.config'>} {<.>})
            (C {<cabal>} {<sandbox>} {<init>})
            (C {<cabal>} {<fetch>} {<libffi>} {<.>})
          ]
        )
    )
    (command.ShFunction
      name: build
      body: 
        (BraceGroup
          children: [
            (C {<cd>} {(DQ ($ Id.VSub_DollarName '$builddir'))})
            (C {<cabal>} {<install>} {<--offline>} {<-v>} {<libffi>})
            (C {<cabal>} {<install>} {<--only-dependencies>} {<--offline>} {<-v>})
            (C {<cabal>} {<configure>} {<--prefix> <Id.Lit_Equals '='> (SQ <'/usr'>)} 
              {<--docdir> <Id.Lit_Equals '='> (SQ <'$prefix/share/doc'>)} {<--datadir> <Id.Lit_Equals '='> (SQ <'$prefix/share'>)} 
              {<--htmldir> <Id.Lit_Equals '='> (SQ <'$docdir/html'>)} {<--libdir> <Id.Lit_Equals '='> (SQ <'$prefix/lib'>)} 
              {<--libsubdir> <Id.Lit_Equals '='> (DQ ($ Id.VSub_DollarName '$pkgname'))} {<--datasubdir> <Id.Lit_Equals '='> (DQ ($ Id.VSub_DollarName '$pkgname'))} 
              {<--dynlibdir> <Id.Lit_Equals '='> (DQ ($ Id.VSub_DollarName '$pkgname'))} {<--disable-shared>} {<--flags> <Id.Lit_Equals '='> (SQ <'GMP FFI standalone'>)}
            )
            (C {<cabal>} {<build>})
          ]
        )
    )
    (command.ShFunction
      name: check
      body: 
        (BraceGroup
          children: [
            (C {<cd>} {(DQ ($ Id.VSub_DollarName '$builddir'))})
            (C {<'./dist/build/idris/idris'>} {<--version>})
          ]
        )
    )
    (command.ShFunction
      name: package
      body: 
        (BraceGroup
          children: [
            (C {<cd>} {(DQ ($ Id.VSub_DollarName '$builddir'))})
            (C {<cabal>} {<copy>} {<--destdir> <Id.Lit_Equals '='> (DQ ($ Id.VSub_DollarName '$pkgdir'))})
            (C {<cd>} {(DQ ($ Id.VSub_DollarName '$pkgdir'))})
            (C {<rm>} {<-r>} {<'usr/lib/idris'>})
            (C {<mkdir>} {<-p>} {<'usr/share/doc/idris/'>} 
              {<'usr/share/licenses/'> ($ Id.VSub_DollarName '$pkgname') <'/'>}
            )
            (C {<mv>} {<'usr/share/idris/docs'>} {<'usr/share/doc/idris'>})
            (C {<mv>} {<'usr/share/doc/LICENSE'>} 
              {<'usr/share/licenses/'> ($ Id.VSub_DollarName '$pkgname') <'/'>}
            )
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:sha512sums)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                <
'a350004a8510f01d1cc8f965a9a4e2dab219f003980b98354ebb5ae42f73b32c90c98dce193943e9709d994cb92ad35814a46b79412a1afc85d42e1018c6ba10  idris-1.0.tar.gz\n'
                > 
                <
'e078892987816012034295be81118fbc710e3dbf08af18257e5390fc159bb5d64e1aae8a802835ca92b1e0d065524833d657bc9edffc9ebefc8cb5c02935694a  cabal.config'
                >
              )
            }
          spids: [572]
        )
      ]
    )
  ]
)