Adam Langley wrote:
Since CPP mode removes newlines in the out macro expansion. It appears
to be impossible to have a macro expand to a function with an INLINE
pragma since it appears to need to be in its own line.

that's because INLINE uses layout like everything else, so you can use semicolons for it too.

For example:

#define GETHOSTWORD(name, m, type) \
{-# INLINE name #-} \
name :: m type ; \
name = getPtr (sizeOf (undefined :: type)) \


something like

#define GETHOSTWORD(name, m, type) \
{-# INLINE name #-} ; \
name :: m type ; \
name = getPtr (sizeOf (undefined :: type)) \


~Isaac
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to