[Haskell-cafe] ANNOUNCE: grid-1.1

Amy de Buitléir amy at nualeargais.ie
Thu Sep 6 18:36:24 CEST 2012


> It seems like you should be able to stick this behind some abstraction
> so that you can support multiple implementations for grids (i.e.,
> currently storing indices as you mention, but could support other
> implementations with different trade offs ...)?
> 
> kris

Yes, there's a Grid typeclass which anyone can extend. The minimal complete
definition is: indices, distance, and size. There are default implementations of
the other functions, but you can also develop your own.

So as you suggest, it would be easy for me to add other grid implementations
that would live side-by-side with the current implementations, but would have
different trade-offs.

 







More information about the Haskell-Cafe mailing list