Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Move or document orphan instances in Language.Pirouette.QuasiQuoter.Internal #176

Open
Niols opened this issue Jan 23, 2023 · 0 comments
Open

Comments

@Niols
Copy link
Member

Niols commented Jan 23, 2023

The file src/Language/Pirouette/QuasiQuoter/Internal.hs includes orphan instances of Lift:

-- Orphan instances to 'Lift' the necessary types
deriving instance Lift ann => Lift (SystF.Ann ann)
deriving instance Lift Namespace
deriving instance Lift Name
deriving instance Lift SystF.Kind
deriving instance (Lift (Constants lang), Lift (BuiltinTypes lang), Lift (BuiltinTerms lang)) => Lift (TermBase lang)
deriving instance (Lift (Constants lang), Lift (BuiltinTypes lang), Lift (BuiltinTerms lang)) => Lift (Var lang)
deriving instance Lift (BuiltinTypes lang) => Lift (TypeBase lang)
deriving instance Lift (BuiltinTypes lang) => Lift (TyVar lang)
deriving instance Lift (BuiltinTypes lang) => Lift (Type lang)
deriving instance (Lift (Constants lang), Lift (BuiltinTypes lang), Lift (BuiltinTerms lang)) => Lift (Arg lang)
deriving instance (Lift (Constants lang), Lift (BuiltinTypes lang), Lift (BuiltinTerms lang)) => Lift (Term lang)
deriving instance Lift Rec
deriving instance (Lift (Constants lang), Lift (BuiltinTypes lang), Lift (BuiltinTerms lang)) => Lift (FunDef lang)
deriving instance Lift (BuiltinTypes lang) => Lift (TypeDef lang)
deriving instance (Lift (Constants lang), Lift (BuiltinTypes lang), Lift (BuiltinTerms lang)) => Lift (Definition lang)

I am not quite sure what they are for. Someone should look that up and either move them to a place that makes more sense (if possible), or at least document more what they are for, what types they should be attached to, and why we decided to have them as orphan.

cf also #168 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant