TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Creating a macOS app with Haskell and Swift

Forums > Swift

Hello all! I’d like to share one of my recent successful endeavours into creating native applications with Haskell. I’ve started researching interoperability (with batteries) between Haskell and Swift, to be able to leverage Apple’s SwiftUI library for designing native applications with Cupertino-approved UI while implementing the data and logic of the application in Haskell.

So far it’s going great. I’ve written a preliminary blogpost on how to setup an XCode project and Haskell library such that functions from Haskell can be called at all from Swift (dealing with linking, headers, etc.). The part about calling Haskell functions from Swift easily will come in due time in later iterations of this blogpost series. As a little spoiler I’ll add that the new Swift 5.9 Macro system and Template Haskell go a looong way.

Unfortunately, I'm not able to post the link to the blog, so instead I added a link to the github repo that is associated with the blogpost: https://github.com/alt-romes/haskell-x-swift-project-steps

Happy to have your feedback, Rodrigo

3      

Hacking with Swift is sponsored by Blaze.

SPONSORED Still waiting on your CI build? Speed it up ~3x with Blaze - change one line, pay less, keep your existing GitHub workflows. First 25 HWS readers to use code HACKING at checkout get 50% off the first year. Try it now for free!

Reserve your spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.