packages feed

dhall-to-cabal-1.3.2.0: golden-tests/dhall-to-cabal/gh-55.dhall

let prelude = ../../dhall/prelude.dhall

let types = ../../dhall/types.dhall

let v = prelude.v

let ghcImpl =
        λ(cfg : types.Config)
      → λ(ver : types.VersionRange)
      → cfg.impl (types.Compiler.GHC {=}) ver

in    ./../../dhall/defaults/Package.dhall
    ⫽ { name =
          "Name"
      , version =
          v "1"
      , library =
          Some
          (   λ(config : types.Config)
            →   prelude.defaults.Library
              ⫽ { exposed-modules =
                      [ "Module1" ]
                    # (       if ghcImpl
                                 config
                                 (prelude.orLaterVersion (v "7.1.3"))
                        
                        then  [ "Module2" ]
                        
                        else  [] : List Text
                      )
                , other-modules =
                          if ghcImpl config (prelude.orLaterVersion (v "7.1.3"))
                    
                    then  [ "OtherModule" ]
                    
                    else  [] : List Text
                , cpp-options =
                          if ghcImpl config (prelude.orLaterVersion (v "7.1.3"))
                    
                    then  [ "-DCOND1" ]
                    
                    else  [] : List Text
                }
          )
      }