[Ur] Record subtype constraint
Karn Kallio
tierpluspluslists at gmail.com
Tue Dec 7 21:12:04 EST 2010
> Karn Kallio wrote:
> > However, this does not compile:
> >
> > [codesnip]
> >
> > giving error:
> >
> > f.ur:11:4-11:6: Expression is not a constructor function
> > Expression: fl
> >
> > Type: Top.folder[[Type]] super
>
> This makes sense, since you are trying to apply [fl] as a constructor
> function, but it isn't one, it's a [folder]. [folder] is an abstract
> type family. You should instead be calling [Top.fold], which can be
> abbreviated to just [fold].
Aha! Thanks! In case anyone else wonders how to express record subtype
constraints I posted a page on the wiki :
http://www.impredicative.com/wiki/index.php/Expressing_subrecord_constraints
More information about the Ur
mailing list