[m-dev.] Type classes
Ralph Becket
rafe at csse.unimelb.edu.au
Tue May 22 12:21:24 AEST 2007
For G12 I've defined two type classes
:- typeclass high_level_linear_solver(Solver) where [...].
:- typeclass low_level_linear_solver(Solver) where [...].
I'd like to say that all low_level_linear_solvers are
high_level_linear_solvers with something like this:
:- instance high_level_linear_solver(Solver)
<= low_level_linear_solver(Solver)
where [
... implementation ...
].
Of course I can't say this because instance arguments have to take the
form type_name(TypeVar, TypeVar, ...).
Would this a useful thing to allow? Would it have bad consequences?
-- Ralph
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions: mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the developers
mailing list