[Haskell-cafe] Template Haskell sugar / spliceing in automatically ?

Marc Weber marco-oweber at gmx.de
Sat Jun 14 17:06:26 EDT 2008


Hi, I've been thinking about template haskell sugar lately.

Some cool libraries are there such as metaHDBC or the template haskell
printf library.

However they all have one thing in common:

$(printf "...") a b c

$(runStmt "INSERT INTO ( ) VALUES ( ?, ?, ? )" ) 2 3 4


Would it make sense to automatically splice those functions?

{-# auto-splice: runStmt, printf #-}

So that you can just use
        printf "..." a b c
and
        runStmt "INSERT INTO ( ) VALUES ( ?, ?, ? )" 2 3 4
without $() ?

Would this be convinient?

Marc Weber


More information about the Haskell-Cafe mailing list