Closed Rewbert closed 3 years ago
Btw, just a thought: what do you think of defining Ident
a record? i.e.,
data Ident = Ident { identName :: String, identSrcInfo :: SrcInformation }
We get the identName
getter for free, and we get to pattern match within the record.
Not a suggestions strictly limited to this PR, but just as a possible code pattern we can adopt for aggregate data structures within this codebase.
No objections! The only thing I really dislike about records is that they populate the global namespace. It's not a big issue but that's why I usually opt for these simpler types if I only have a low number of fields.
That said, I am not against making this change. As I don't rely on patternmatches anywhere (I think!) The change should be extremely simple :)
Btw, just a thought: what do you think of defining
Ident
a record? i.e.,data Ident = Ident { identName :: String, identSrcInfo :: SrcInformation }
We get the
identName
getter for free, and we get to pattern match within the record.Not a suggestions strictly limited to this PR, but just as a possible code pattern we can adopt for aggregate data structures within this codebase.
Fix by 72e8b01 .
Same as PR #52, but I've rebased it off runtime-refactor, and now open the PR towards that branch instead.