[Haskell-cafe] Domain specific error messages

Corentin Dupont corentin.dupont at gmail.com
Thu Feb 5 09:54:21 UTC 2015


Hi all,
I have been very interested by this discussion when Alberto started it.
As there been any progress?
The problem is very acute in the Nomyx game I'm developing (www.nomyx.com).
The game is based on a DSL, it's working well, but at the moment only
expert Haskell developers can play...
I think cryptic error messages is part of the problem.
How to improve that?
For example, a common error message is the following:

Won't Compile
<interactive>:5:28:
    Couldn't match type ‘'NoEffect’ with ‘'Effect’
    Expected type: Exp Effect ()
      Actual type: Exp NoEffect ()
    In the expression: e_1
    In the expression: (let e_1 = do { ... } in e_1) :: Exp Effect ()

It's not so helpful and exposing Nomyx internals.
A better error message would be to hint that the player forgot a
"liftEffect" instruction.

The only quick-and-dirty solution I see is to pattern-match for it and
display an additional hint line...





On Mon, Nov 24, 2014 at 10:47 PM, Alberto G. Corona <agocorona at gmail.com>
wrote:

> That is fantastic news. Very nice to know that the project is alive and
> with aims to produce tangible results.
>
> As Felipe said, please ping your advances there. To add some estimated
> dates would be fantastic.
>
> 2014-11-24 17:37 GMT+01:00 Felipe Lessa <felipe.lessa at gmail.com>:
>
>> On 24-11-2014 06:27, Alejandro Serrano Mena wrote:
>> > At Utrecht University we are currently tackling this problem, in the
>> > form of the DOMain Specific Type Error Diagnosis (DOMSTED) Project [1].
>> > So at least we have one person (me) working full-time on it, plus my
>> > supervisor Jurriaan Hage, which had already worked in a similar project
>> > for Haskell 98 which produced the Helium [2] compiler.
>> > We are slowly building step towards a nice way to create domain specific
>> > error messages, and we expect to have some nice results soon :)
>> > Of course, if you have any ideas on how to improve error messages, feel
>> > free to contact me :)
>>
>> It would be nice if you could ping relevant issues (such as [1]) stating
>> that you're researching on this topic.
>>
>> Cheers,
>>
>> [1] https://ghc.haskell.org/trac/ghc/ticket/7870
>>
>> --
>> Felipe.
>>
>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>>
>
>
> --
> Alberto.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20150205/a31c1f19/attachment.html>


More information about the Haskell-Cafe mailing list