| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
|
||
| -- | The range of text associated with an error | ||
| newtype ErrorPosition = ErrorPosition | ||
| type ErrorPosition = |
There was a problem hiding this comment.
All of these types can be generically encoded and decoded via Argonaut without requiring newtypes and generic instances, so I've returned them to be raw records. However, if we really want those newtypes (for example, for more readable type errors) then I can reinstate them.
Sorry, something went wrong.
|
I think we can also remove the config key in package.json now too. Also it might be worth checking whether the changes to these package.json scripts mean that instructions in the readme or something need to be updated, if you haven’t done that already? |
Sorry, something went wrong.
|
Good point on the config key. The README doesn't need any changes as far as I can tell. |
Sorry, something went wrong.
| requestBody = AXRB.String code | ||
| requestBody = Just $ AXRB.Json $ encodeJson code |
There was a problem hiding this comment.
Wondering if the CORS issue reported in #215 is (unexpectedly) related to using AXRB.Json instead of AXRB.String.
Sorry, something went wrong.
There was a problem hiding this comment.
Wow, great find -- it totally is. Changing this to AXRB.String $ unsafeCoerce (encodeJson code) works as expected. I don't know why -- going to look a little deeper.
Sorry, something went wrong.
There was a problem hiding this comment.
Well, on reflection the code isn't actually JSON. It's just a string. Encoding it runs through a stringify call, which isn't what we want; I still don't know why this would cause a CORS issue (perhaps it's a red herring?) but regardless this wasn't a correct change to make in the first place.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR continues #211 by migrating from foreign-generic to argonaut-codecs for JSON encoding and decoding. It also updates the tests and ensures they're exercised in CI.