Dear John,
never mind, I have found meanwhile a good (?) hierarchy that does the job.
Perhaps I was too impatient about the learning curve.
All the examples and also the difficulties with step and apply are overcome.
Since all looks very clear, I hope that I am on the right track.
On weekend, I wanted to try some algorithms at home on the pc.
Since the DOS-gofer had too few cells, I thought of turning to HUGS.
( I retrieved it due to your advice).
It drove me into the problem with class parameters (see previous mail).
But it is a good way to check whether I am Haskell-conform or not.
So please, do not look into the old code, which I send you earlier.
The class structure is now:
class (Eq a,Ix a) => States a where
numberofstates :: a->Int -- of course, this does not depend of an a
list :: a -> [a]
class States a => States0 a where
neutral :: a -> a
class States a => StateTran a where
trans :: t -> a -> (StatesMap a) -- give the transformation
arity :: t -> a -> Int -- where 0 means: arbitrary
class (Num a,Ix a) => Grid a where
dim :: a -> Int
type CellSpace n t a = (n,t,a) -- neighb.,transf. rule, states
-- dimension can be concluded from n
The most important point is, that CellSpace is no class !!
I was surprised when I realized that this is the way to go, but it works.