[Haskell-cafe] Constraint on data type
Vlatko Basic
vlatko.basic at gmail.com
Mon Jan 20 11:48:31 UTC 2014
Hi Cafe,
I have these typeclasses defined:
class UA a where ...
class RA a where ...
and this data definition
data (UA u, RA r) => AD u r = AD { ... }
I have another data definition
data ACT aur c = ACT { x :: aur, ... }
but the type 'aur' should be restricted to (AD u r) only.
(I would like to keep 'aur' as 1 parameter, not as
data ACT u r c = ACT { x :: AD u r, ... } )
How can such constraint be defined?
Best regards,
vlatko
More information about the Haskell-Cafe
mailing list