Here are two ways with the same type of result:
{- file prova.hs-} {-
add-on module for quasiquator heredoc
module QQStr(str) where import Prelude import Language.Haskell.TH import Language.Haskell.TH.Quote str = QuasiQuoter { quoteExp = stringE, quotePat = undefined , quoteType = undefined, quoteDec = undefined }
performance:
gabi64@zotac-ion:~/webs/yesod/prova$ ./cabal-dev/bin/prova 1 Migrating: CREATE TABLE "Person"("id" INTEGER PRIMARY KEY,"number" INTEGER NOT NULL,"numberOfEyes" INTEGER NOT NULL,"firstName" INTEGER NOT NULL REFERENCES "Firstnames","lastName" INTEGER NOT NULL REFERENCES "Lastnames") Migrating: CREATE TABLE "Lastnames"("id" INTEGER PRIMARY KEY,"lastname" VARCHAR NOT NULL) Migrating: CREATE TABLE "Firstnames"("id" INTEGER PRIMARY KEY,"firstname" VARCHAR NOT NULL) Just (2,"John","Doe")
Gabriel riba
source share