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
Written by Kenneth Falck
Related protips
2 Responses
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: http://stackoverflow.com/questions/12546757/how-do-i-use-cabals-min-version-and-other-macros-with-ghci/12546758#12546758
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Haskell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#