[Haskell-beginners] Converting a data type to an abstract data type
Rein Henrichs
rein.henrichs at gmail.com
Thu Sep 17 06:49:01 UTC 2015
> Are type signatures used sparingly in most Haskell code?
No, generally most Haskell code uses explicit top-level type signatures
everywhere. They provide useful guidance to the developer as much as (if
not more so than) the compiler.
If possible, you could use a type synonym for your type which keeps
changing. That way there would be only one place to make the change.
On Wed, Sep 16, 2015 at 6:43 PM Ryan Warner <ryan.warner.mn+
haskell at gmail.com> wrote:
> On Wed, Sep 16, 2015 at 11:58 AM Kim-Ee Yeoh <ky3 at atamo.com> wrote:
>
>>
>> you could leave out signatures and let the compiler infer them for you.
>> That way, there's so much you no longer need to refactor.
>>
>>
> Thanks for pointing that out. I hadn't recognized that yet. Are type
> signatures used sparingly in most Haskell code? Or as you say, is it coming
> to formalize the signatures once the exploration is complete?
>
> -Ryan
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150917/2e3f50e8/attachment.html>
More information about the Beginners
mailing list