I am trying to build a simple ghci-like console using ghc-api. I've gotten to a point where I can extract Type
's of expressions using exprType
and to evaluate them. Is there also an easy way to check if the type of the expression has an instance of a given class?
Edit: It seems that functions I'm looking for would require an InstEnv
, but I have no clue where to find that.