Skip to content

Haskell x Swift interoperability libraries and tools

Notifications You must be signed in to change notification settings

alt-romes/haskell-swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

haskell-swift

Home to haskell-swift interoperability libraries and tools

  • hxs: a build-tool to setup and build an xcode project that links against a Haskell library as explained in the first part of the guide

    • Usage instructions coming soon
    • Currently missing automatically adding as dependencies the to-be haskell-swift Haskell library and swift-haskell Swift package (As these libraries are not yet complete)
    • Preliminary bleeding edge installation instructions:
    # After cloning the repo
    cd haskell-swift/hxs
    cabal install
    # Create a new empty XCode project in a new directory, and run inside it:
    hxs init
    hxs build
    # Open XCode: in `ContentView.swift` and you should be able to
    import NameOfAppHS.MyForeignLib
    # and call hs_factorial
    Text("Factorial: \(hs_factorial(3))")
    
    • As I've said, this is still missing all the @ForeingImportHaskell, $(foreignExportSwift ...) niceties from the libraries that are WIP.
  • swift-ffi: a Haskell library with Swift foreign function interface utilities (Template Haskell) for exporting Haskell functions to call from Swift

  • haskell-ffi: a Swift package with Haskell foreign function interface utilities (using Swift 5.9 Macros) for importing Haskell functions to call from Swift

About

Haskell x Swift interoperability libraries and tools

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published