Last Updated: February 25, 2016
· kennu

How to run Yesod interactively in GHCi (Haskell)

After scaffolding your Yesod app:

ghci -XTemplateHaskell -XTypeFamilies -XDeriveDataTypeable -XOverloadedStrings -XGADTs -XMultiParamTypeClasses -XQuasiQuotes -XCPP Import.hs

That will load all the exports from Import.hs, allowing you to examine your data types and try out stuff interactively in the REPL. You may then want to load some additional modules:

:l Model
:l Application

2 Responses
Add your response

What if we are using a cabal sandbox? I get a bunch of "Could not find module" errors.

over 1 year ago ·

Answering my own question. -- Use "cabal repl" -- However, it is possible to continue using ghci following the information in:

over 1 year ago ·