How do I enable language extensions from within GHCi?

Matt Fenwick picture Matt Fenwick · Sep 25, 2012 · Viewed 16.4k times · Source

I'm trying to enable XRankNTypes in GHCi. How do I do this?

Answer

Cat Plus Plus picture Cat Plus Plus · Sep 25, 2012

:set -XRankNTypes. The -X part is a compiler switch, by the way, extension is called just RankNTypes.