Module
Justifill.Justifiable
- Package
- purescript-justifill
- Repository
- i-am-the-slime/purescript-justifill
#Justifiable Source
class Justifiable unjust just where
Members
justify :: unjust -> just
Instances
(RowToList unjust xs, JustifiableFields xs unjust () just) => Justifiable (Record unjust) (Record just)
Justifiable a (Maybe a)
Justifiable a a
#JustifiableFields Source
class JustifiableFields :: RowList Type -> Row Type -> Row Type -> Row Type -> Constraint
class JustifiableFields (xs :: RowList Type) (row :: Row Type) (from :: Row Type) (to :: Row Type) | xs -> row from to where
In case of empty Arrays or Nothing values, it helps inference to go from the add a functional dependency from the output to the input type However, that messess with the more basic cases (going from a -> a fails to find an instance) Therefore, we only fall back to this at this point Note how b and a are unrelated types here
Members
Instances
JustifiableFields Nil row () ()
(IsSymbol name, Lacks name from', Cons name a trash row, Cons name justA from' to, JustifiableFields tail row from from', Justifiable a justA) => JustifiableFields (Cons name a tail) row from to