On Sat, 13 Feb 2016, Antoine Jacoutot wrote:

> > Maybe the haskell package db is fucked (wouldn't be the first time
> > this happens)?
> > 
> > Does
> > 
> >     ghc-pkg check
> > 
> > compain? Does
> > 
> >     ghc-pkg list | grep dataenc
> > 
> > show anything?
> 
> Looks sane.
> 
> $ ghc-pkg check
> $ echo $?
> 0
> $ ghc-pkg list | grep dataenc
>     dataenc-0.14.0.7

What CMake does is:

/usr/local/bin/ghc -DMODULE=Codec.Binary.Base64 -DFUNCTION=encode 
-DPARAMETERS="" -cpp -c 
/usr/pobj/hedgewars-src-0.9.22/hedgewars-src-0.9.22/cmake_modules/checkModule.hs

And then:

if(${COMMAND_RESULT} EQUAL 0)
  message(STATUS "Looking for ${FUNCTION} in ${MODULE} - found")
... etc ...

Where checkModule.hs is:

---8<---

module Main where

import qualified MODULE as M

main = undefined $ M.FUNCTION PARAMETERS

---8<---

Ciao!
David

Reply via email to