propellor

propellor config for hosts.
git clone git://git.ricketyspace.net/propellor.git
Log | Files | Refs | LICENSE

use_ghc_8.0_custom_compile_errors.mdwn (1516B)


      1 <https://downloads.haskell.org/~ghc/8.0.1/docs/html/users_guide/glasgow_exts.html#custom-errors>
      2 
      3 This could be used in propellor to improve compile time errors.
      4 
      5 For example, a RevertableProperty is sometimes used where only a regular
      6 Property is accepted. In this case, the error could suggest that the user
      7 apply `setupRevertableProperty` to extract the setup side of the RevertableProperty.
      8 
      9 > I tried this, it didn't seem worth the complication however. --[[Joey]]
     10 
     11 And, when a Property HasInfo is provided to ensureProperty, propellor could
     12 explain, in the compile error, why it can't let the user do that.
     13 
     14 > Done this and also used custom errors when properties' types don't let
     15 > them be combined. --[[Joey]]
     16 
     17 The new type-errors library builds a lot of stuff on top of this.
     18 Its ability to detect "stuckness" seems like it may be able to catch
     19 the very long type errors that we sometimes see when using propellor, and
     20 whittle them down to a more useful error. --[[Joey]]
     21 
     22 > > Actually I think the stuckness would not help with that, though it
     23 > > could help with other mistakes. In particular, forgetting to provide
     24 > > a parameter to a property constructor can lead to a massive
     25 > > error message that leaks type family stuff from MetaTypes, due to
     26 > > the type checker getting stuck. Detecting that and replacing it with
     27 > > a simpler error would be a big improvement. Such large error messages
     28 > > can make ghc use an excessive amount of memory. --[[Joey]]
     29 
     30 now [[done]]! --[[Joey]]
     31 
     32 [[!tag user/joey]]