Skip to content

Instantly share code, notes, and snippets.

@quasicomputational
Created May 20, 2018 18:30
Show Gist options
  • Save quasicomputational/b4b16130726f82b0fbd1ed6260d44340 to your computer and use it in GitHub Desktop.
Save quasicomputational/b4b16130726f82b0fbd1ed6260d44340 to your computer and use it in GitHub Desktop.
let prelude = ./dhall/prelude.dhall
in let types = ./dhall/types.dhall
in prelude.defaults.Package
⫽ { cabal-version =
prelude.v "2.0"
, name =
"wai-servlet"
, version =
prelude.v "0.1.5.0"
, flags =
[ { default =
False
, description =
"print debug output. not suitable for production"
, manual =
False
, name =
"wai-servlet-debug"
}
]
, library =
[ λ ( config
: types.Config
)
→ if config.impl
(prelude.types.Compilers.GHC {=})
(prelude.orLaterVersion (prelude.v "0.0.9.7"))
then if config.impl
(prelude.types.Compilers.GHC {=})
( prelude.earlierVersion
(prelude.v "0.7.0.2")
)
then if config.impl
( prelude.types.Compilers.GHC
{=}
)
( prelude.orLaterVersion
(prelude.v "0.0.9")
)
then if config.flag
"wai-servlet-debug"
then prelude.defaults.Library
⫽ { c-sources =
[ "java/Utils.java"
]
, cpp-options =
[ "-DINTEROP"
, "-DPURE_JAVA_WITH"
, "-DWAI_SERVLET_DEBUG"
]
}
else prelude.defaults.Library
⫽ { c-sources =
[ "java/Utils.java"
]
, cpp-options =
[ "-DINTEROP"
, "-DPURE_JAVA_WITH"
]
}
else if config.flag
"wai-servlet-debug"
then prelude.defaults.Library
⫽ { cpp-options =
[ "-DINTEROP"
, "-DPURE_JAVA_WITH"
, "-DWAI_SERVLET_DEBUG"
]
}
else prelude.defaults.Library
⫽ { cpp-options =
[ "-DINTEROP"
, "-DPURE_JAVA_WITH"
]
}
else if config.impl
(prelude.types.Compilers.GHC {=})
( prelude.orLaterVersion
(prelude.v "0.0.9")
)
then if config.flag
"wai-servlet-debug"
then prelude.defaults.Library
⫽ { c-sources =
[ "java/Utils.java" ]
, cpp-options =
[ "-DINTEROP"
, "-DWAI_SERVLET_DEBUG"
]
}
else prelude.defaults.Library
⫽ { c-sources =
[ "java/Utils.java" ]
, cpp-options =
[ "-DINTEROP" ]
}
else if config.flag "wai-servlet-debug"
then prelude.defaults.Library
⫽ { cpp-options =
[ "-DINTEROP"
, "-DWAI_SERVLET_DEBUG"
]
}
else prelude.defaults.Library
⫽ { cpp-options = [ "-DINTEROP" ] }
else if config.impl
(prelude.types.Compilers.GHC {=})
(prelude.earlierVersion (prelude.v "0.7.0.2"))
then if config.impl
(prelude.types.Compilers.GHC {=})
( prelude.orLaterVersion
(prelude.v "0.0.9")
)
then if config.flag
"wai-servlet-debug"
then prelude.defaults.Library
⫽ { c-sources =
[ "java/Utils.java" ]
, cpp-options =
[ "-DPURE_JAVA_WITH"
, "-DWAI_SERVLET_DEBUG"
]
}
else prelude.defaults.Library
⫽ { c-sources =
[ "java/Utils.java" ]
, cpp-options =
[ "-DPURE_JAVA_WITH" ]
}
else if config.flag "wai-servlet-debug"
then prelude.defaults.Library
⫽ { cpp-options =
[ "-DPURE_JAVA_WITH"
, "-DWAI_SERVLET_DEBUG"
]
}
else prelude.defaults.Library
⫽ { cpp-options = [ "-DPURE_JAVA_WITH" ] }
else if config.impl
(prelude.types.Compilers.GHC {=})
(prelude.orLaterVersion (prelude.v "0.0.9"))
then if config.flag "wai-servlet-debug"
then prelude.defaults.Library
⫽ { c-sources =
[ "java/Utils.java" ]
, cpp-options =
[ "-DWAI_SERVLET_DEBUG" ]
}
else prelude.defaults.Library
⫽ { c-sources = [ "java/Utils.java" ] }
else if config.flag "wai-servlet-debug"
then prelude.defaults.Library
⫽ { cpp-options = [ "-DWAI_SERVLET_DEBUG" ] }
else prelude.defaults.Library
] : Optional (types.Config → types.Library)
}
name: wai-servlet
version: 0.1.5.0
cabal-version: 2.0
build-type: Simple
license: UnspecifiedLicense
flag wai-servlet-debug
description:
print debug output. not suitable for production
default: False
library
if impl(ghc >=0.0.9.7)
if impl(ghc <0.7.0.2)
if impl(ghc >=0.0.9)
if flag(wai-servlet-debug)
cpp-options: -DWAI_SERVLET_DEBUG
c-sources:
java/Utils.java
else
cpp-options: -DWAI_SERVLET_DEBUG
cpp-options: -DPURE_JAVA_WITH
else
cpp-options: -DWAI_SERVLET_DEBUG
c-sources:
java/Utils.java
cpp-options: -DINTEROP
else
cpp-options: -DPURE_JAVA_WITH -DWAI_SERVLET_DEBUG
c-sources:
java/Utils.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment