-
Notifications
You must be signed in to change notification settings - Fork 172
Open
Labels
🍰 good first issueGood for newcomersGood for newcomersmaintenanceTasks that are planned to be done as part of the regular maintenance of the project.Tasks that are planned to be done as part of the regular maintenance of the project.
Description
Ledger uses IP type from iproute package.
It does help with parsing and such, but using that type directly has a couple of issues that need to be fixed:
- Show instance for the type is incorrect, since it produces invalid Haskell:
output should be quoted, since it is a string. It should be:
ghci> show $ Just (read "2001:db8:00:00:00:00:00:01" :: IPv6) "Just 2001:db8::1"
There is no need to attempt and fix this upstream, since such patch would be a big breaking change and would be unlikely accepted. We can fix it however for us, by using aghci> show $ Just (read "2001:db8:00:00:00:00:00:01" :: IPv6) "Just \"2001:db8::1\""
newtype - It forces us to define orphan instances in
Cardano.Ledger.Orphans, which can and should be avoided.
I think the best path forward would be create newtypes with same names while importing original types as qualified. However, it doesn't have to be done this way
Metadata
Metadata
Assignees
Labels
🍰 good first issueGood for newcomersGood for newcomersmaintenanceTasks that are planned to be done as part of the regular maintenance of the project.Tasks that are planned to be done as part of the regular maintenance of the project.
Type
Projects
Status
Todo