+lookupSimpleInst (LitInst {tci_lit = HsIsString s from_string_name, tci_ty = ty, tci_loc = loc})
+ | Just expr <- shortCutStringLit s ty
+ = returnM (GenInst [] (noLoc expr))
+ | otherwise
+ = ASSERT( from_string_name `isHsVar` fromStringName ) -- A LitInst invariant
+ tcLookupId fromStringName `thenM` \ from_string ->
+ tcInstClassOp loc from_string [ty] `thenM` \ method_inst ->
+ mkStrLit s `thenM` \ string_lit ->
+ returnM (GenInst [method_inst]
+ (mkHsApp (L (instLocSpan loc)
+ (HsVar (instToId method_inst))) string_lit))
+