- = do { let loc = getSrcSpan (ds_name spec)
- inst = mkInstance oflag (ds_theta spec) spec
- clas = ds_cls spec
-
- -- In case of a family instance, we need to use the representation
- -- tycon (after all, it has the data constructors)
- ; fix_env <- getFixityEnv
- ; let (meth_binds, aux_binds) = genDerivBinds loc fix_env clas rep_tycon
- binds = VanillaInst meth_binds [] standalone_deriv
- ; return (InstInfo { iSpec = inst, iBinds = binds }, aux_binds)
- }
+ = do { fix_env <- getFixityEnv
+ ; let loc = getSrcSpan name
+ (meth_binds, aux_binds) = genDerivBinds loc fix_env clas rep_tycon
+ -- In case of a family instance, we need to use the representation
+ -- tycon (after all, it has the data constructors)
+
+ ; return (InstInfo { iSpec = inst_spec
+ , iBinds = VanillaInst meth_binds [] standalone_deriv }
+ , aux_binds) }