Hi Brian, thanks for the swift response!
> Making all GHC's datatypes Showable would probably be a nightmare. Not I guessed as much. Thanks for confirming my suspicions :-) > pretty printed output and using that. When you need to pull some more > details out of a datatype just sticking random pprPanics in is a great > debugging aid. How would I go about this, then? You mean I can then use ppr on random places without needing guid get the output up properly? I think I've simply used "error" for that to the same effect, which does indeed gets the job done (albeit slowly). > You might be looking for isDataConId :: Id -> Bool, or > isDataConId_maybe :: Id -> Maybe DataCon. I didn't find this one yet, thanks. > You might find exprIsConApp_maybe :: CoreExpr -> Maybe (DataCon,[CoreExpr]) > handy (along with isTupleCon :: DataCon -> Bool on the DataCon). That looks exactly like what I need, thanks. I've used isTupleCon before (working from a Type), but didn't find anything to may a CoreExpr to a DataCon. I'll let you know how it goes. Gr. Matthijs
signature.asc
Description: Digital signature
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users