Thanks, Daniel, for your suggestion, but I think it misses a key aspect of my situation (unless I've misunderstood).  Every model is supposed to be a quadruple (m, q, f, p), with m a list, q an element of m, f a list of ordered pairs of elements of m, and p a sublist of m.  By contrast, it looks like your definition makes a model either a single element, or a single pair, or a single list, etc.

--Todd


On Thu, Oct 17, 2013 at 4:12 AM, Daniel Trstenjak <daniel.trstenjak@gmail.com> wrote:

Hi Todd,

the problem is, that 'model_of' tries to return different types: Model a, Model (a,a) and Model [a].

I think you have to use some kind of ADT also for the Model, like you already did for ModName.

Something like:

   data Model a = Model a
                | ProductModel (a,a)
                | PowerModel [a]
                ...


Greetings,
Daniel
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners