Haskell Xcode Plugin (beta)
Tue, Feb 13 2007: Current (beta) version is Feb-07-07.
IntroductionThis is a plugin for Apple's Xcode,
which allows one to develop Haskell tools, libraries, and applications. See below for screenshots.
- Compiling and Linking
- Source code highlighting for: .hsc .cabal .lhs, and basic Haddock doc comments
- Errors and warnings with source locations (jump to)
- Basic project templates *
- Basic Cabal support
- File templates for:
- FFI modules
- hsc2hs modules
- Cabal packages for executable and library types
- Literal haskell modules
- ⌘- for [un]commenting (Option-minus)
- GHCi works in Xcode's pseudo terminal
- One can build full Cocoa applications (* manually, will provide example)
- Xcode identifier/word completion works well
- Various text macros: eg. let=$x, ffi import/export, type signatures
- GHC compiler and linker options are not working (manually, see HYCompilerSpecificationHaskell.m)
- Scanning modules for dependencies
- Scanning modules for C stub generated and hsc2hs dependencies
- Cabal integration (project - Cabal does not compile-what-is-needed anyway)
- GHCi integration (ie. "Evaluate Selection" or "Load Module into GHCi")
- Cocoa applications with full Objective-C support, see example below
- Haskell symbol parsing for completion and Xcode navigation and search
- More Xcode perl scripts ie. GHCi commands
- More text macros
- Project templates
- Proper/formal customizable installation procedure/process
- Building libraries without Cabal is untested.
- Download the (beta) Haskell Plugin for Xcode
- Open the Xcode project contained within
- Build this project; all necessary files are installed into the right places.
- Restart Xcode for the plugin to become loaded into the application environment.
- Create a new empty project.
- Create target for your project, Haskell > Shell Tool
- Add file to project and target, Main.hs
- Write some Haskell, Build and Run as necessary =)
Author: Lyndon Tremblay (humasect ++ at ++ shaw ++ dot ++ ca)
Thanks to Damien Bobillot for writing the Objective Caml plugin for Xcode,
and his efforts in researching and hacking the Xcode plugin API interface and code.
Thanks to Blacktiger for hosting the first iteration of this page.