-
Notifications
You must be signed in to change notification settings - Fork 155
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
Reorganized SetAlgebra by breaking it into 4 modules. #2564
Conversation
Can you talk a little bit about the general structure? E.g. what's the difference between |
a8b8ed2
to
ad2c693
Compare
Over view of system structure. Normal users, who just want to use Set algebra expressions should use: The modules divide the system into components. imports of these modules should be limited to the SetAlgebra systems, and tests and benchmarks of the system that need lower level operations. The organization of these modules is this. Control.Iterate.BaseTypes defines the classes that types that use the SetAlgebra system must defined instances. The file also contains instances for things like lists, sets, Data.Map etc. Control.Iterate.BiMap defines a new type that we use in the system. Instances for this type are included in Control.Iterate.BaseTypes. import Control.Iterate.Exp defines the internal intermediate data structures that the system uses to perform runtime pattern matching. Users do not need to understand these types. Control.Iterate.SetAlgebra contains the evaluation strategies, eval, compute, compile etc. |
…ntrol.Iterate.BaseTypes, Control.Iterate.Exp, and Control.Iterate.BiMap
ad2c693
to
e23c1fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for splitting this up @TimSheard !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great overall, however it seems that you reverted one of the resent PRs: #2563
As we introduce new datatypes that are more compact, we will need new SetAlgebra Instances. This ha become problematic since SetAgebra is a huge file, and the pieces of code pertinent to one type are spread all over.
So we reorganize by breaking it into four modules. The new ones are Control.Iterate.BaseTypes, Control.Iterate.Exp, and Control.Iterate.BiMap
To add a new type XXX, add Control.Iterate.XXX where the new type is defined.
Then add instances in Control.Iterate.BaseTypes.
The other modules Control.Iterate.SetAlgebra and Control.Iterate.Exp are independent from what the Base types are.