[Haskell-cafe] an automatic refactoring idea
tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Thu Jan 21 09:12:53 UTC 2016
On Thu, Jan 21, 2016 at 12:08:42AM -0800, Jeffrey Brown wrote:
> I had a data structure with a redundant field . I refactored to make
> that field go away. Here is the code . The following is a simplification
> of it.
> I was using this type:
> data X = X1 | X2 Int
> To make the Int go away, I made a duplicate type:
> data X' = X1' | X2'
You might be interested in this, specifically the section "The limitations
of refactoring via modifying text files in place, and what to do instead"
More information about the Haskell-Cafe