This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/D/ncurses-5.9 ❯❯❯ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install ncurses ⏎ | |
==> Downloading http://ftpmirror.gnu.org/ncurses/ncurses-5.9.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/ncurses-5.9.tar.gz | |
/usr/bin/tar xf /Library/Caches/Homebrew/ncurses-5.9.tar.gz | |
==> ./configure --disable-debug --prefix=/usr/local/Cellar/ncurses/5.9 --mandir=/usr/local/Cellar/ncurses/5.9/share/man --with-shared --with-widec --with-manpage-format=normal --enable-symlinks | |
./configure --disable-debug --prefix=/usr/local/Cellar/ncurses/5.9 --mandir=/usr/local/Cellar/ncurses/5.9/share/man --with-shared --with-widec --with-manpage-format=normal --enable-symlinks | |
checking for egrep... grep -E | |
Configuring NCURSES 5.9 ABI 5 (Mon Nov 5 21:55:27 CET 2012) | |
checking build system type... x86_64-apple-darwin12.2.0 | |
checking host system type... x86_64-apple-darwin12.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
toMaybe :: a -> Bool -> Maybe a | |
toMaybe x b | b = Just x | |
| otherwise = Nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Code: | |
data HdbcSnaplet = forall conn. IConnection conn => HdbcSnaplet { | |
_iConn :: conn | |
} | |
makeLens ''HdbcSnaplet | |
{- | |
Error: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
λ include → λ git master* → cabal configure;cabal build | |
Resolving dependencies... | |
Configuring hgit2-0.1... | |
Preprocessing library hgit2-0.1... | |
i686-apple-darwin11-llvm-gcc-4.2: warning: '-x c' after last input file has no effect | |
i686-apple-darwin11-llvm-gcc-4.2: no input files | |
c2hs: Error during preprocessing custom header file | |
Library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have a function | |
GIT_EXTERN(int) git_repository_open(git_repository **repository, const char *path); | |
Return int is a possible error code. Actual value I'm interested in is **repository | |
Haskell code: | |
openRepo :: String -> IO (Either GitError Repository) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c2hs --cppopts='-I.' --cppopts='-U __BLOCKS__' Git2.chs | |
ghc --make Main.hs | |
[1 of 2] Compiling Git2 ( Git2.hs, Git2.o ) | |
Linking Main ... | |
ld: warning: could not create compact unwind for .LFB3: non-standard register 5 being saved in prolog | |
Undefined symbols for architecture i386: | |
"_git_repository_database", referenced from: | |
_s1JB_info in Git2.o | |
"_git_repository_free", referenced from: | |
_s1KY_info in Git2.o |