This is the first step to cut boilerplate code. \bigskip Two background mechanisms are used: Template Haskell and Takusen. Two Template Haskell key concepts here, are expressions of type \verb|Q [Dec]| and splicing. And one key concept of Takusen is the action monad. We examine them briefly. \bigskip A \verb|Q [Dec]| expression is an abstract syntax tree (AST) that represents a list of Haskell declarations. The AST may be rendered into the compiler by splicing it (only at compile time), and would have the equivalent effect of written source code. \bigskip As Takusen deals with the world outside of a program, one would expect to find a monad to do so. This monad is named \textit{DBM}. To use Takusen, one writes DBM actions (or, if you prefer, monadic values). \bigskip Template Haskell provides means to construct ASTs. One of the things that the TrĂ¡nsito Abierto library provides, is the definition of AST builders by specifying queries as lists of DBM actions. The AST builders may be viewed as seeds. Later, we show the way to make them germinate (in this case, splice these resulting ASTs). \bigskip \begin{code} {-# options -fglasgow-exts #-} module RCSdef where import Database.TA.TAB rcs01 = [ genSelect $ CR "qTwoColumns" "" "" $ emptySelect { select_ = ["*"] , from_ = ["twoColumns"] , order_ = ["value"] } ] \end{code} Each ``genSelect'' statement is responsible of generating a DBM action that returns \verb|Q [Dec]| code. Its parameter is a \textit{relational command} (CR) record. A CR record is composed of: \begin{itemize} \item A name for the query action. \item A prefix for the fields of the result record datatype. \item A suffix for the fields of the result record datatype. \item A select spelled in terms of an internal record representation (RIS). \end{itemize} \bigskip In this case the name chosen for the query action was ``qTwoColumns'', no prefix or suffix were indicated. We used the ``emptySelect'' function to construct a new select record expressed in ``RIS'' terms. The ``TAB'' library was imported because it contains required functionality. The name ``rcs01'' is our seed and it is a list of DBM actions capable of generating database access code expressed as ASTs. \bigskip