documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Rewrite the "Custom Type Errors" guide for 0.12

Open LiamGoodacre opened this issue 6 years ago • 5 comments

Based on the changes added here: https://github.com/purescript/purescript/pull/3298

Roughly:

  • New Doc kind
  • TypeConcat -> Beside
  • TypeString -> Quote
  • Symbol literal in message -> Text
  • New vertical composition: Above

LiamGoodacre avatar Apr 11 '18 21:04 LiamGoodacre

Assign to Tom

i-am-tom avatar Apr 11 '18 21:04 i-am-tom

Now that the relevant types and kinds have their own module inside the compiler, I'd quite like to move this guide into the compiler so that it shows up on the docs page for Prim.TypeError on Pursuit - see #96.

hdgarrood avatar Apr 11 '18 21:04 hdgarrood

Sounds good :+1:

LiamGoodacre avatar Apr 11 '18 21:04 LiamGoodacre

This folder explains the new custom type errors (since I don't think they are explained in Prim's docs yet). Also, one needs to understand TLP syntax first before their docs make more sense. https://github.com/JordanMartinez/purescript-jordans-reference/tree/latestRelease/21-Hello-World/04-Debugging/src/02-Custom-Type-Errors

JordanMartinez avatar Oct 31 '18 17:10 JordanMartinez

I think even just a quick example (on Pursuit) would be helpful, at least for now. The guide is still out there and wrong, and it currently takes some digging to find the right way to do something like a simple warning. I'm happy to help, too.

andyarvanitis avatar Apr 14 '19 19:04 andyarvanitis