Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite to duotype (#9) #10

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open

Rewrite to duotype (#9) #10

wants to merge 13 commits into from

Conversation

Laar
Copy link
Owner

@Laar Laar commented May 11, 2013

Implementation of #9 by changing the definition of the specification related mappings to use the new datatype

data DuoMap f
     = DuoMap
     { enumMap :: f EnumValue
     , funcMap :: f FuncValue
     }

This makes it possible to define the mappings in separate modules from the original values.

Laar added 13 commits May 3, 2013 22:12
DuoMap is an attemt to remove all mappings from the SpecValue type class by
having a single 'base map'. DuoMap contains two values (probably mappings) one
for enums and one for functions. See #9 on github for the motivation.

This initial experiment rewrites DefMap as a proof of concept.
Unwrapping and rewrapping the newtype layer adds quite some noise to the code.
To simplify this a 'trick' like the one from the newtype package is used to
make it simpler and less verbose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant