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

amindfv at gmail.com amindfv at gmail.com
Mon Sep 14 21:01:25 UTC 2015


The term you're looking for is "parameterized," not "abstract." An abstract data type is something else.

Can't help with your original question though, sorry!

tom


El Sep 14, 2015, a las 14:23, Ryan Warner <ryan.warner.mn+haskell at gmail.com> escribió:

> 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


More information about the Beginners mailing list