Template Haskell to the rescue!

I just posted an article where I needed to use the (ugh) C preprocessor in a Haskell program. Well, thank the gud lawd that’s not true. I remembered learning about the existence of Template Haskell some time ago. That means I can abstract the whole Accessor thing out into another module. I will soon be able to generate accessors automatically based on the state declaration!

Anyway, the modified files are here:

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s