[Haskell-cafe] Data-types in dynamically loaded hs-plugins

Thomas Sutton thsutton at gmail.com
Tue Jul 26 09:43:52 EDT 2005


Hi all,

I'm [trying to] develop a system that uses plug-ins to implement a  
"black-box" ADT, that is a data-type and a few typeclass instances  
for it. I want my system (a theorem prover) to be able to work with  
any of these plug-ins (which define a logic and operations on its  
formulae) but have been having trouble.

I've had a go at using forall's, and at adding a type variable  
(constrained to the appropriate class) to the interface of the plug- 
in, but I haven't been able to get it to work and have run out of ideas.

Is it possible to define data-types in a module loaded at run-time  
with hs-plugins and have values pass out of the plug-in (though only  
being used by functions within it)? Can someone point me in the right  
direction?

Cheers,
Thomas Sutton


More information about the Haskell-Cafe mailing list