You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we assign a mirror $wf:ATC to an associated type ATC of class say C.
or
class C a where
type ATC a
op :: ...
gets elaborated to
class C a where
type ATC a
type $wf:ATC a :: Constraint
op :: ...
Will it be more appropriate to add the class constraint as the wellformedness mirror?
Possible problem may be that the associated data type has fewer type variables than the class variables potentially, giving rise to unambiguous types post elaboration.
Motivation:
There are cases where a data type references an associated type.
data IsNode a => Graph a = Graph { graphMap :: (Map (Key a) a) }
class Ord (Key a) => IsNode a where
type Key a :: *
nodeKey :: a -> Key a
nodeNeighbors :: a -> [Key a]
The text was updated successfully, but these errors were encountered:
Currently we assign a mirror
$wf:ATC
to an associated typeATC
of class sayC
.or
gets elaborated to
Will it be more appropriate to add the class constraint as the wellformedness mirror?
Possible problem may be that the associated data type has fewer type variables than the class variables potentially, giving rise to unambiguous types post elaboration.
Motivation:
There are cases where a data type references an associated type.
The text was updated successfully, but these errors were encountered: