Hello,
Is it possible to bind the result of a functional dependency to a name? If we have these definitions:
type Row1 = ( field1 :: Int )
type Row2 = ( field2 :: Int )
and i want the record of the union of those rows:
Union Row1 Row2 result => Record result
I could make a type like this:
type Rec result = Union Row1 Row2 result => Record result
But when i use it I would have to either define the result type by hand or leave a wildcard(this will generate a warning that cant be disabled).
a :: Rec _
a =
{ field1 : 1
, field2 : 3
}
What i would like to do is let the compiler infer the result and bind it to a name. Something like this:
type Rec = forall result . Union Row1 Row2 result => Record result
a :: Rec
a =
{ field1 : 1
, field2 : 2
}
This wont compile. Is there a way to hide the result type variable somewhere?