Closed Martinsos closed 3 months ago
Sounds agreeable!
Sounds agreeable!
Ok! I created a very simple PR here https://github.com/commercialhaskell/path/pull/187 -> I think this should be it and I can see all the checks passing. Would love to get your eyes onto it also, just to make sure I haven't missed something.
This is long-fixed. Just closing this issue now.
This is long-fixed. Just closing this issue now.
Is there are a particular reason why Rel, File, Abs and Dir are not deriving
Data
?data Path b t
is deriving Data, and what that does is create an instance Data for it whereb
andt
also need to have instances of Data. However, since Rel, File, Abs and Dir don't haveData
instances, this means thatPath Rel File
,Path Rel Dir
, ... and so are not instances ofData
.I am encountering this is a problem now in https://github.com/wasp-lang/strong-path because I would like to make main type of StrongPath instance of
Data
, but the only thing stopping me from derivingData
is the fact that internally StrongPath usesPath Rel File
,Path Rel Dir
and so on, and those are not instances ofData
.I believe making
Rel
,File
and similar instances ofData
is as simple as just addingData
toderiving
.