path: root/doc
diff options
authorJoey Hess2019-07-02 00:46:21 -0400
committerJoey Hess2019-07-02 00:46:21 -0400
commit2ba2cda972f484771b763603bf09d555003861b7 (patch)
tree13c79ae8e9f46cf6c9ec5353ca366555da0e0ab1 /doc
parent7ac0fbfa247ca153a6187c47dde9fc3a94c9cdb5 (diff)
Revert "Revert "custom type error messages""
This reverts commit 665ea0d3d9e1b0e90278fd659dee0ef8642030da.
Diffstat (limited to 'doc')
1 files changed, 20 insertions, 2 deletions
diff --git a/doc/todo/use_ghc_8.0_custom_compile_errors.mdwn b/doc/todo/use_ghc_8.0_custom_compile_errors.mdwn
index d21c92fe..8c2ed77a 100644
--- a/doc/todo/use_ghc_8.0_custom_compile_errors.mdwn
+++ b/doc/todo/use_ghc_8.0_custom_compile_errors.mdwn
@@ -6,7 +6,25 @@ For example, a RevertableProperty is sometimes used where only a regular
Property is accepted. In this case, the error could suggest that the user
apply `setupRevertableProperty` to extract the setup side of the RevertableProperty.
-> The `custom-error-types` branch has this implemented quite nicely.
-> Unfortunately, it ran into a ghc bug <>
+> I tried this, it didn't seem worth the complication however. --[[Joey]]
+And, when a Property HasInfo is provided to ensureProperty, propellor could
+explain, in the compile error, why it can't let the user do that.
+> Done this and also used custom errors when properties' types don't let
+> them be combined. --[[Joey]]
+The new type-errors library builds a lot of stuff on top of this.
+Its ability to detect "stuckness" seems like it may be able to catch
+the very long type errors that we sometimes see when using propellor, and
+whittle them down to a more useful error. --[[Joey]]
+> > Actually I think the stuckness would not help with that, though it
+> > could help with other mistakes. In particular, forgetting to provide
+> > a parameter to a property constructor can lead to a massive
+> > error message that leaks type family stuff from MetaTypes, due to
+> > the type checker getting stuck. Detecting that and replacing it with
+> > a simpler error would be a big improvement. Such large error messages
+> > can make ghc use an excessive amount of memory. --[[Joey]]
[[!tag user/joey]]