haskell - Designing a monadic type -


i'd need design monadic datatype, seem have trouble wrapping head around idea, pretty know want. type checker seems require persuading in matter.

what want datatype primitive can monad. functions of drawing primitives, , want able combine them , combinations being primitives well, parser type in library parsec. actual drawing has done io monad.

incidentally, have class drawable a this:

class drawable     draw :: (monadio m) => pos -> -> m () 

and want every primitive of course drawable. thankful input.

i don't understand why think should monad. what's monadic it?

you should design api want first, , incrementally think how abstract it.

incidentally, brent's diagrams library has nice compositional api provide ideas: http://byorgey.wordpress.com/2008/04/30/new-haskell-diagrams-library/


Comments

Popular posts from this blog

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

apache - Add omitted ? to URLs -

php - How can I stop spam on my custom forum/blog? -