(I didn't think of kind polymorphism and don't know how that relates to FlexibleInstances)
-- Fixed is owned
instance (Typeable k,Typeable a) => Data (Fixed (a :: k)) where
-- GhciMonad and GHCi are owned
instance GhciMonad (InputT GHCi) where
instance GhcMonad (InputT GHCi) where
instance HasHeapRep (a :: TYPE 'LiftedRep) where
-- IfaceType is owned
instance Binary (DefMethSpec IfaceType) where
-- MPTC
-- UserOfRegs, DefinerOfRegs, LocalReg, CmmReg, CmmExpr are owned
instance UserOfRegs LocalReg CmmReg where
instance DefinerOfRegs LocalReg CmmReg where
instance UserOfRegs GlobalReg CmmReg where
instance DefinerOfRegs GlobalReg CmmReg where
instance Ord r => UserOfRegs r r where
instance Ord r => DefinerOfRegs r r where
instance (Ord r, UserOfRegs r CmmReg) => UserOfRegs r CmmExpr where
instance UserOfRegs r a => UserOfRegs r [a] where
instance DefinerOfRegs r a => DefinerOfRegs r [a] where
-- (-Worphans is explicitly disabled in this module for another instance)
-- Pat is owned
type LPat a = Pat a
instance HasSrcSpan (LPat (GhcPass p)) where
-- NixOptsMonoid is owned
instance FromJSON (WithJSONWarnings NixOptsMonoid) where
-- LockedLocation is owned
instance ( FromJSON (WithJSONWarnings (Unresolved a))
, FromJSON (WithJSONWarnings (Unresolved b))
) =>
FromJSON (WithJSONWarnings (Unresolved (LockedLocation a b))) where
-- HackageCreds is owned
instance FromJSON (FilePath -> HackageCreds) where
class Iso t u where
instance (Ord a, Ord b) => Iso (Rel a b) (NaiveRel a b)
instance Iso a a where
https://gitlab.com/viercc/lambda/blob/master/src/Data/Lambda/Module.hs
-- Qualified is owned
-- | Never provide @Formattable (Qualified v)@ instance for
-- general @v@, as syntax for them varies.
instance Formattable (Qualified VarName) where
class HasField (field :: Symbol) s t a b | s field -> a, t field -> b, s field b -> t, t field a -> s where
instance -- see Note [Changing type parameters]
( HasTotalFieldP field (Rep s) ~~ 'Just a
, HasTotalFieldP field (Rep t) ~~ 'Just b
, HasTotalFieldP field (Rep (Indexed s)) ~~ 'Just a'
, HasTotalFieldP field (Rep (Indexed t)) ~~ 'Just b'
, t ~~ Infer s a' b
, s ~~ Infer t b' a
, HasField0 field s t a b
) => HasField field s t a b where
field f s = field0 @field f s
(Note that this library uses FunDeps and Flexible & Undecidable instances extensively. This usage is not like instance PrettyPrint (MyExpr MyVarType)
)