Skip to content

Add a compatibility helper for TcPluginSolveResult #17

Description

@sheaf

Something like this:

mkTcPluginSolveResult :: [Ct] -> [(EvTerm, Ct)] -> [Ct] -> TcPluginSolveResult
#if MIN_VERSION_ghc(9,3,0)
mkTcPluginSolveResult = TcPluginSolveResult
#else
mkTcPluginSolveResult contras solved new =
  -- On GHC 9.2 and below, it's not possible to return
  -- both contradictions and solved/new constraints.
  if null contras
  then TcPluginOk solved new
  else TcPluginContradiction contras
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions