[Haskell-beginners] Converting a data type to an abstract data type

Christopher Allen cma at bitemyapp.com
Mon Sep 14 18:24:43 UTC 2015


Maybe Alan Zimmerman's Haskell refactorer project is pertinent? I don't
think they're anything ready-to-use though.

On Mon, Sep 14, 2015 at 1:23 PM, Ryan Warner <
ryan.warner.mn+haskell at gmail.com> wrote:

> I had defined a data type similar to the following:
>
> data Record = Record { name :: String, age :: Int }
>
> Later, I realized I needed it be an ADT defined like:
> data Record a = Record { name :: String, age :: Int, resource :: a }
>
> The change turned out to be fairly well contained and probably only took
> me a half hour to propagate up. However, I see the potential for this to be
> a bigger job. Are there any editors that automate that kind of refactoring?
>
> -Ryan
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>


-- 
Chris Allen
Currently working on http://haskellbook.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150914/b6683eff/attachment.html>


More information about the Beginners mailing list