When writing an Atlassian Connect add-on in Haskell you will want to create an Atlassian Connect Descriptor. You can use this library to help you generate an Atlassian Connect Descriptor in a type safe manner and easily convert it to the required JSON using the Aeson library.
You can find this library on Hackage; the documentation is quite extensive.
This library is used in production by the My Reminders Atlassian Connect add-on; as you can view in our source and live.