I think you're missing -idist/build It's a bit of a hack, but here is one example to do it:
http://github.com/nominolo/scion/tree/master/src%2FScion%2FSession.hs#L169 This uses the GHC API, but GHCi is just a thin layer around that API, so it should be straightforward. The idea is that you just pass the same flags to GHCi that Cabal would pass to ghc. This is not always what you want, but it works well enough for now (without duplicating any code). The hackish part is that 'ghcOptions' isn't considered a public interface so it might break between (perhaps minor) Cabal releases. So my suggestion: write a small program that reads the configured build info, and prints the options, then use this for ghci. 2008/11/22 Александър Л. Димитров <[EMAIL PROTECTED]>: > Thus spoke Jean-Philippe Bernardy: >> Excellent! Nicolas Pouillard is the Vim-bindings specialist, maybe he'll >> have >> useful feedback for you. > > Thanks, I'll keep that in mind. > >> I never use the debugger. I'd be interested in your experience with it on Yi. > > It now works, I have so far only tried to use GHCi's type inference system > (which works rather well now.) > > There is one thing I still don't understand. I think it has something to do > with > the way you manage the data types within Yi: > >> *Yi.Keymap.Vim> :t (const $ ArbMove firstNonSpaceB) >> >> <interactive>:1:9: >> Can't find interface-file declaration for data constructor ArbMove >> Probable cause: bug in .hi-boot file, or inconsistent .hi file >> Use -ddump-if-trace to get an idea of which file caused the error >> In the second argument of `($)', namely `ArbMove firstNonSpaceB' > > That's a strange error I've never seen before. Of course -ddump-if-trace is > quite *verbose*. I loaded ghci with the following command: > > % ghci -cpp -XRankNTypes -XFlexibleContexts -XGeneralizedNewtypeDeriving \ > -XDeriveDataTypeable -IYi/Lexer -idist/build/autogen \ > -idist/build/yi/yi-tmp Yi/Keymap/Vim.hs > >> I've just added a Makefile rule (interactive) to load Yi in ghci. This >> is for my config, >> so you might have to adapt it a bit. > > Thanks for the lightning-fast response! > >> Thanks to you :) ... And I think I can speak for the whole team here :) >> >> If you have further questions feel free to ask! > > Well, my Haskell is still evolving, so I'll take you up on that offer :-) > > I've extended the small TODO-list in Vim.hs, and devised a one-liner fix for > S-i. I'll darcs-send them soon. > > Best, > Aleks > -- Push the envelope. Watch it bend. --~--~---------~--~----~------------~-------~--~----~ Yi development mailing list [email protected] http://groups.google.com/group/yi-devel -~----------~----~----~----~------~----~------~--~---
