[<<][rtl][>>][..]
Wed May 29 11:02:12 EDT 2019

Next

I'm stuck.  Ideas aren't flowing.

The probelm is this:

      c <- op "mul" [a i j, b i j]

what i want instead is:

c <- f (a,b,i,j)

there are two things to relate to each other:

- an array is derived from other arrays.  though this by itself is not
  that important.

- an array is constructed element-wise

So in a sence, it really doesn't matter what is on the RHS.  Those
really are atomic values.

The only thing that matters is that:

- "c <- _" denotes the definition of an array

- its dimensions are fully determined by the dimensions of the loops
  it is in.


So I could start out by creating a "constant definer", and annotate
the types that way.

Maybe the most important part is that what is returned in a loop is
always a function.  Currying is natural here.



The problem is to define the type of loop.

This needs to be polymorphic.  Something like

loop :: (Index -> M [Index -> t]) -> M [Index -> t]

'M' needs to be on the outside: it is a representation of an array.



Yeah I really don't have the intuition for this.  No guiding
principle.

I'm stuck.

EDIT: Not quite sure why.  The initial analysis phase was simple.
Syntheses and type encoding seems to not go very well.  It could be
that I'm just too tired and dull to see the path.






[Reply][About]
[<<][rtl][>>][..]