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

Changing current AoS representation of datatypes to SoA #270

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

vidsinghal
Copy link
Collaborator

@vidsinghal vidsinghal commented Oct 7, 2024

Currently spending time refactoring the type signature of LocVar.
goal 1: get the AoS representation working with the new LocVar type.
goal 2: modify inferLocations to factor out new locations for fields.
...

@ulysses4ever
Copy link
Collaborator

A big chunk of the patch so far is replacing string literals like "loc1" with ("loc1", []). This could be done automagically if the following 3 conditions hold:

  1. LocVar was made into a proper datatype. (It should be anyway)
  2. LocVar was made an instance of the IsString class.
  3. The OverloadedStrings GHC extension was activated (maybe it already is? I haven't checked).

For the common case where you want to turn a non-literal String into LocaVar, there should be a "smart constructor", i.e. a function that turns a string into LocVar:

single :: String -> LocaVar
single s = (s, [])

and you should use it throughout.

@vidsinghal vidsinghal changed the title Changing AoS representation of types of SoA Changing current AoS representation of datatypes to SoA Oct 8, 2024
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.

2 participants