- fixTc (\ ~(prag_info_fn, _) ->
- -- This is the usual prag_info fix; the PragmaInfo field of an Id
- -- is not inspected till ages later in the compiler, so there
- -- should be no black-hole problems here.
- tcBindWithSigs binder_names bind
- sigs prag_info_fn `thenTc` \ (poly_binds, poly_lie, poly_ids) ->
-
- -- Extend the environment to bind the new polymorphic Ids
- tcExtendLocalValEnv binder_names poly_ids $
-
- -- Build bindings and IdInfos corresponding to user pragmas
- tcPragmaSigs sigs `thenTc` \ (prag_info_fn, prag_binds, prag_lie) ->
-
- -- Now do whatever happens next, in the augmented envt
- do_next `thenTc` \ (thing, thing_lie, thing_ty) ->
-
- -- Create specialisations of functions bound here
- bindInstsOfLocalFuns (prag_lie `plusLIE` thing_lie)
- poly_ids `thenTc` \ (lie2, inst_mbinds) ->
-
- -- All done
- let
- final_lie = lie2 `plusLIE` poly_lie
- final_binds = poly_binds `ThenBinds`
- SingleBind (NonRecBind inst_mbinds) `ThenBinds`
- prag_binds
- in
- returnTc (prag_info_fn, (combiner final_binds thing, final_lie, thing_ty))
- ) `thenTc` \ (_, result) ->
- returnTc result
- where
- binder_names = map fst (bagToList (collectBinders bind))
-\end{code}
-
-
-%************************************************************************
-%* *
-\subsection{tcBindWithSigs}
-%* *
-%************************************************************************
-
-@tcBindWithSigs@ deals with a single binding group. It does generalisation,
-so all the clever stuff is in here.
-
-\begin{code}
-tcBindWithSigs binder_names bind sigs prag_info_fn
- = -- Create a new identifier for each binder, with each being given