Skip to content

Rewrite to duotype (#9)#10

Open
Laar wants to merge 13 commits intodevelopfrom
duo
Open

Rewrite to duotype (#9)#10
Laar wants to merge 13 commits intodevelopfrom
duo

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.

1 participant