├── .github └── workflows │ ├── haskell-ci.yml │ └── hlint.yml ├── .gitignore ├── .hlint.yaml ├── .travis.yml ├── CHANGELOG ├── LICENSE ├── README.md ├── Setup.hs ├── apply-refact.cabal ├── hie.yaml ├── src ├── Main.hs └── Refact │ ├── Apply.hs │ ├── Compat.hs │ ├── Fixity.hs │ ├── Internal.hs │ ├── Options.hs │ ├── Run.hs │ └── Utils.hs ├── stack.yaml └── tests ├── Test.hs └── examples ├── AndList.hs ├── AndList.hs.expected ├── AndList.hs.refact ├── ArithSeq.hs ├── ArithSeq.hs.expected ├── ArithSeq.hs.refact ├── Async.hs ├── Async.hs.expected ├── Async.hs.refact ├── Backquotes.hs ├── Backquotes.hs.expected ├── Backquotes.hs.refact ├── Bracket0.hs ├── Bracket0.hs.expected ├── Bracket0.hs.refact ├── Bracket1.hs ├── Bracket1.hs.expected ├── Bracket1.hs.refact ├── Bracket10.hs ├── Bracket10.hs.expected ├── Bracket10.hs.refact ├── Bracket11.hs ├── Bracket11.hs.expected ├── Bracket11.hs.refact ├── Bracket12.hs ├── Bracket12.hs.expected ├── Bracket12.hs.refact ├── Bracket13.hs ├── Bracket13.hs.expected ├── Bracket13.hs.refact ├── Bracket14.hs ├── Bracket14.hs.expected ├── Bracket14.hs.refact ├── Bracket15.hs ├── Bracket15.hs.expected ├── Bracket15.hs.refact ├── Bracket16.hs ├── Bracket16.hs.expected ├── Bracket16.hs.refact ├── Bracket17.hs ├── Bracket17.hs.expected ├── Bracket17.hs.refact ├── Bracket18.hs ├── Bracket18.hs.expected ├── Bracket18.hs.refact ├── Bracket19.hs ├── Bracket19.hs.expected ├── Bracket19.hs.refact ├── Bracket2.hs ├── Bracket2.hs.expected ├── Bracket2.hs.refact ├── Bracket20.hs ├── Bracket20.hs.expected ├── Bracket20.hs.refact ├── Bracket21.hs ├── Bracket21.hs.expected ├── Bracket21.hs.refact ├── Bracket22.hs ├── Bracket22.hs.expected ├── Bracket22.hs.refact ├── Bracket23.hs ├── Bracket23.hs.expected ├── Bracket23.hs.refact ├── Bracket24.hs ├── Bracket24.hs.expected ├── Bracket24.hs.refact ├── Bracket25.hs ├── Bracket25.hs.expected ├── Bracket25.hs.refact ├── Bracket26.hs ├── Bracket26.hs.expected ├── Bracket26.hs.refact ├── Bracket27.hs ├── Bracket27.hs.expected ├── Bracket27.hs.refact ├── Bracket28.hs ├── Bracket28.hs.expected ├── Bracket28.hs.refact ├── Bracket29.hs ├── Bracket29.hs.expected ├── Bracket29.hs.refact ├── Bracket3.hs ├── Bracket3.hs.expected ├── Bracket3.hs.refact ├── Bracket30.hs ├── Bracket30.hs.expected ├── Bracket30.hs.refact ├── Bracket31.hs ├── Bracket31.hs.expected ├── Bracket31.hs.refact ├── Bracket32.hs ├── Bracket32.hs.expected ├── Bracket32.hs.refact ├── Bracket33.hs ├── Bracket33.hs.expected ├── Bracket33.hs.refact ├── Bracket34.hs ├── Bracket34.hs.expected ├── Bracket34.hs.refact ├── Bracket35.hs ├── Bracket35.hs.expected ├── Bracket35.hs.refact ├── Bracket36.hs ├── Bracket36.hs.expected ├── Bracket36.hs.refact ├── Bracket37.hs ├── Bracket37.hs.expected ├── Bracket37.hs.refact ├── Bracket38.hs ├── Bracket38.hs.expected ├── Bracket38.hs.refact ├── Bracket39.hs ├── Bracket39.hs.expected ├── Bracket39.hs.refact ├── Bracket4.hs ├── Bracket4.hs.expected ├── Bracket4.hs.refact ├── Bracket40.hs ├── Bracket40.hs.expected ├── Bracket40.hs.refact ├── Bracket41.hs ├── Bracket41.hs.expected ├── Bracket41.hs.refact ├── Bracket42.hs ├── Bracket42.hs.expected ├── Bracket42.hs.refact ├── Bracket43.hs ├── Bracket43.hs.expected ├── Bracket43.hs.refact ├── Bracket44.hs ├── Bracket44.hs.expected ├── Bracket44.hs.refact ├── Bracket45.hs ├── Bracket45.hs.expected ├── Bracket45.hs.refact ├── Bracket46.hs ├── Bracket46.hs.expected ├── Bracket46.hs.refact ├── Bracket47.hs ├── Bracket47.hs.expected ├── Bracket47.hs.refact ├── Bracket5.hs ├── Bracket5.hs.expected ├── Bracket5.hs.refact ├── Bracket6.hs ├── Bracket6.hs.expected ├── Bracket6.hs.refact ├── Bracket7.hs ├── Bracket7.hs.expected ├── Bracket7.hs.refact ├── Bracket8.hs ├── Bracket8.hs.expected ├── Bracket8.hs.refact ├── Bracket9.hs ├── Bracket9.hs.expected ├── Bracket9.hs.refact ├── Comment0.hs ├── Comment0.hs.expected ├── Comment0.hs.refact ├── Comment1.hs ├── Comment1.hs.expected ├── Comment1.hs.refact ├── Comment10.hs ├── Comment10.hs.expected ├── Comment10.hs.refact ├── Comment2.hs ├── Comment2.hs.expected ├── Comment2.hs.refact ├── Comment3.hs ├── Comment3.hs.expected ├── Comment3.hs.refact ├── Comment4.hs ├── Comment4.hs.expected ├── Comment4.hs.refact ├── Comment5.hs ├── Comment5.hs.expected ├── Comment5.hs.refact ├── Comment6.hs ├── Comment6.hs.expected ├── Comment6.hs.refact ├── Comment7.hs ├── Comment7.hs.expected ├── Comment7.hs.refact ├── Comment8.hs ├── Comment8.hs.expected ├── Comment8.hs.refact ├── Comment9.hs ├── Comment9.hs.expected ├── Comment9.hs.refact ├── Default0.hs ├── Default0.hs.expected ├── Default0.hs.refact ├── Default1.hs ├── Default1.hs.expected ├── Default1.hs.refact ├── Default10.hs ├── Default10.hs.expected ├── Default10.hs.refact ├── Default100.hs ├── Default100.hs.expected ├── Default100.hs.refact ├── Default101.hs ├── Default101.hs.expected ├── Default101.hs.refact ├── Default102.hs ├── Default102.hs.expected ├── Default102.hs.refact ├── Default103.hs ├── Default103.hs.expected ├── Default103.hs.refact ├── Default104.hs ├── Default104.hs.expected ├── Default104.hs.refact ├── Default105.hs ├── Default105.hs.expected ├── Default105.hs.refact ├── Default106.hs ├── Default106.hs.expected ├── Default106.hs.refact ├── Default107.hs ├── Default107.hs.expected ├── Default107.hs.refact ├── Default108.hs ├── Default108.hs.expected ├── Default108.hs.refact ├── Default109.hs ├── Default109.hs.expected ├── Default109.hs.refact ├── Default11.hs ├── Default11.hs.expected ├── Default11.hs.refact ├── Default110.hs ├── Default110.hs.expected ├── Default110.hs.refact ├── Default111.hs ├── Default111.hs.expected ├── Default111.hs.refact ├── Default112.hs ├── Default112.hs.expected ├── Default112.hs.refact ├── Default113.hs ├── Default113.hs.expected ├── Default113.hs.refact ├── Default114.hs ├── Default114.hs.expected ├── Default114.hs.refact ├── Default115.hs ├── Default115.hs.expected ├── Default115.hs.refact ├── Default116.hs ├── Default116.hs.expected ├── Default116.hs.refact ├── Default117.hs ├── Default117.hs.expected ├── Default117.hs.refact ├── Default118.hs ├── Default118.hs.expected ├── Default118.hs.refact ├── Default119.hs ├── Default119.hs.expected ├── Default119.hs.refact ├── Default12.hs ├── Default12.hs.expected ├── Default12.hs.refact ├── Default120.hs ├── Default120.hs.expected ├── Default120.hs.refact ├── Default121.hs ├── Default121.hs.expected ├── Default121.hs.refact ├── Default122.hs ├── Default122.hs.expected ├── Default122.hs.refact ├── Default123.hs ├── Default123.hs.expected ├── Default123.hs.refact ├── Default124.hs ├── Default124.hs.expected ├── Default124.hs.refact ├── Default125.hs ├── Default125.hs.expected ├── Default125.hs.refact ├── Default126.hs ├── Default126.hs.expected ├── Default126.hs.refact ├── Default127.hs ├── Default127.hs.expected ├── Default127.hs.refact ├── Default128.hs ├── Default128.hs.expected ├── Default128.hs.refact ├── Default13.hs ├── Default13.hs.expected ├── Default13.hs.refact ├── Default14.hs ├── Default14.hs.expected ├── Default14.hs.refact ├── Default15.hs ├── Default15.hs.expected ├── Default15.hs.refact ├── Default16.hs ├── Default16.hs.expected ├── Default16.hs.refact ├── Default17.hs ├── Default17.hs.expected ├── Default17.hs.refact ├── Default18.hs ├── Default18.hs.expected ├── Default18.hs.refact ├── Default19.hs ├── Default19.hs.expected ├── Default19.hs.refact ├── Default2.hs ├── Default2.hs.expected ├── Default2.hs.refact ├── Default20.hs ├── Default20.hs.expected ├── Default20.hs.refact ├── Default21.hs ├── Default21.hs.expected ├── Default21.hs.refact ├── Default22.hs ├── Default22.hs.expected ├── Default22.hs.refact ├── Default23.hs ├── Default23.hs.expected ├── Default23.hs.refact ├── Default24.hs ├── Default24.hs.expected ├── Default24.hs.refact ├── Default25.hs ├── Default25.hs.expected ├── Default25.hs.refact ├── Default26.hs ├── Default26.hs.expected ├── Default26.hs.refact ├── Default27.hs ├── Default27.hs.expected ├── Default27.hs.refact ├── Default28.hs ├── Default28.hs.expected ├── Default28.hs.refact ├── Default29.hs ├── Default29.hs.expected ├── Default29.hs.refact ├── Default3.hs ├── Default3.hs.expected ├── Default3.hs.refact ├── Default30.hs ├── Default30.hs.expected ├── Default30.hs.refact ├── Default31.hs ├── Default31.hs.expected ├── Default31.hs.refact ├── Default32.hs ├── Default32.hs.expected ├── Default32.hs.refact ├── Default33.hs ├── Default33.hs.expected ├── Default33.hs.refact ├── Default34.hs ├── Default34.hs.expected ├── Default34.hs.refact ├── Default35.hs ├── Default35.hs.expected ├── Default35.hs.refact ├── Default36.hs ├── Default36.hs.expected ├── Default36.hs.refact ├── Default37.hs ├── Default37.hs.expected ├── Default37.hs.refact ├── Default38.hs ├── Default38.hs.expected ├── Default38.hs.refact ├── Default39.hs ├── Default39.hs.expected ├── Default39.hs.refact ├── Default4.hs ├── Default4.hs.expected ├── Default4.hs.refact ├── Default40.hs ├── Default40.hs.expected ├── Default40.hs.refact ├── Default41.hs ├── Default41.hs.expected ├── Default41.hs.refact ├── Default42.hs ├── Default42.hs.expected ├── Default42.hs.refact ├── Default43.hs ├── Default43.hs.expected ├── Default43.hs.refact ├── Default44.hs ├── Default44.hs.expected ├── Default44.hs.refact ├── Default45.hs ├── Default45.hs.expected ├── Default45.hs.refact ├── Default46.hs ├── Default46.hs.expected ├── Default46.hs.refact ├── Default47.hs ├── Default47.hs.expected ├── Default47.hs.refact ├── Default48.hs ├── Default48.hs.expected ├── Default48.hs.refact ├── Default49.hs ├── Default49.hs.expected ├── Default49.hs.refact ├── Default5.hs ├── Default5.hs.expected ├── Default5.hs.refact ├── Default50.hs ├── Default50.hs.expected ├── Default50.hs.refact ├── Default51.hs ├── Default51.hs.expected ├── Default51.hs.refact ├── Default52.hs ├── Default52.hs.expected ├── Default52.hs.refact ├── Default53.hs ├── Default53.hs.expected ├── Default53.hs.refact ├── Default54.hs ├── Default54.hs.expected ├── Default54.hs.refact ├── Default55.hs ├── Default55.hs.expected ├── Default55.hs.refact ├── Default56.hs ├── Default56.hs.expected ├── Default56.hs.refact ├── Default57.hs ├── Default57.hs.expected ├── Default57.hs.refact ├── Default58.hs ├── Default58.hs.expected ├── Default58.hs.refact ├── Default59.hs ├── Default59.hs.expected ├── Default59.hs.refact ├── Default6.hs ├── Default6.hs.expected ├── Default6.hs.refact ├── Default60.hs ├── Default60.hs.expected ├── Default60.hs.refact ├── Default61.hs ├── Default61.hs.expected ├── Default61.hs.refact ├── Default62.hs ├── Default62.hs.expected ├── Default62.hs.refact ├── Default63.hs ├── Default63.hs.expected ├── Default63.hs.refact ├── Default64.hs ├── Default64.hs.expected ├── Default64.hs.refact ├── Default65.hs ├── Default65.hs.expected ├── Default65.hs.refact ├── Default66.hs ├── Default66.hs.expected ├── Default66.hs.refact ├── Default67.hs ├── Default67.hs.expected ├── Default67.hs.refact ├── Default68.hs ├── Default68.hs.expected ├── Default68.hs.refact ├── Default69.hs ├── Default69.hs.expected ├── Default69.hs.refact ├── Default7.hs ├── Default7.hs.expected ├── Default7.hs.refact ├── Default70.hs ├── Default70.hs.expected ├── Default70.hs.refact ├── Default71.hs ├── Default71.hs.expected ├── Default71.hs.refact ├── Default72.hs ├── Default72.hs.expected ├── Default72.hs.refact ├── Default73.hs ├── Default73.hs.expected ├── Default73.hs.refact ├── Default74.hs ├── Default74.hs.expected ├── Default74.hs.refact ├── Default75.hs ├── Default75.hs.expected ├── Default75.hs.refact ├── Default76.hs ├── Default76.hs.expected ├── Default76.hs.refact ├── Default77.hs ├── Default77.hs.expected ├── Default77.hs.refact ├── Default78.hs ├── Default78.hs.expected ├── Default78.hs.refact ├── Default79.hs ├── Default79.hs.expected ├── Default79.hs.refact ├── Default8.hs ├── Default8.hs.expected ├── Default8.hs.refact ├── Default80.hs ├── Default80.hs.expected ├── Default80.hs.refact ├── Default81.hs ├── Default81.hs.expected ├── Default81.hs.refact ├── Default82.hs ├── Default82.hs.expected ├── Default82.hs.refact ├── Default83.hs ├── Default83.hs.expected ├── Default83.hs.refact ├── Default84.hs ├── Default84.hs.expected ├── Default84.hs.refact ├── Default85.hs ├── Default85.hs.expected ├── Default85.hs.refact ├── Default86.hs ├── Default86.hs.expected ├── Default86.hs.refact ├── Default87.hs ├── Default87.hs.expected ├── Default87.hs.refact ├── Default88.hs ├── Default88.hs.expected ├── Default88.hs.refact ├── Default89.hs ├── Default89.hs.expected ├── Default89.hs.refact ├── Default9.hs ├── Default9.hs.expected ├── Default9.hs.refact ├── Default90.hs ├── Default90.hs.expected ├── Default90.hs.refact ├── Default91.hs ├── Default91.hs.expected ├── Default91.hs.refact ├── Default92.hs ├── Default92.hs.expected ├── Default92.hs.refact ├── Default93.hs ├── Default93.hs.expected ├── Default93.hs.refact ├── Default94.hs ├── Default94.hs.expected ├── Default94.hs.refact ├── Default95.hs ├── Default95.hs.expected ├── Default95.hs.refact ├── Default96.hs ├── Default96.hs.expected ├── Default96.hs.refact ├── Default97.hs ├── Default97.hs.expected ├── Default97.hs.refact ├── Default98.hs ├── Default98.hs.expected ├── Default98.hs.refact ├── Default99.hs ├── Default99.hs.expected ├── Default99.hs.refact ├── Dollar0.hs ├── Dollar0.hs.expected ├── Dollar0.hs.refact ├── Duplicate0.hs ├── Duplicate0.hs.expected ├── Duplicate0.hs.refact ├── Duplicate1.hs ├── Duplicate1.hs.expected ├── Duplicate1.hs.refact ├── Duplicate2.hs ├── Duplicate2.hs.expected ├── Duplicate2.hs.refact ├── Duplicate3.hs ├── Duplicate3.hs.expected ├── Duplicate3.hs.refact ├── Duplicate4.hs ├── Duplicate4.hs.expected ├── Duplicate4.hs.refact ├── Duplicate5.hs ├── Duplicate5.hs.expected ├── Duplicate5.hs.refact ├── Duplicate6.hs ├── Duplicate6.hs.expected ├── Duplicate6.hs.refact ├── EtaReduceLocalTypeSig.hs ├── EtaReduceLocalTypeSig.hs.expected ├── EtaReduceLocalTypeSig.hs.refact ├── Extensions0.hs ├── Extensions0.hs.expected ├── Extensions0.hs.refact ├── Extensions10.hs ├── Extensions10.hs.expected ├── Extensions10.hs.refact ├── Extensions11.hs ├── Extensions11.hs.expected ├── Extensions11.hs.refact ├── Extensions12.hs ├── Extensions12.hs.expected ├── Extensions12.hs.refact ├── Extensions13.hs ├── Extensions13.hs.expected ├── Extensions13.hs.refact ├── Extensions14.hs ├── Extensions14.hs.expected ├── Extensions14.hs.refact ├── Extensions15.hs ├── Extensions15.hs.expected ├── Extensions15.hs.refact ├── Extensions16.hs ├── Extensions16.hs.expected ├── Extensions16.hs.refact ├── Extensions17.hs ├── Extensions17.hs.expected ├── Extensions17.hs.refact ├── Extensions18.hs ├── Extensions18.hs.expected ├── Extensions18.hs.refact ├── Extensions19.hs ├── Extensions19.hs.expected ├── Extensions19.hs.refact ├── Extensions2.hs ├── Extensions2.hs.expected ├── Extensions2.hs.refact ├── Extensions20.hs ├── Extensions20.hs.expected ├── Extensions20.hs.refact ├── Extensions21.hs ├── Extensions21.hs.expected ├── Extensions21.hs.refact ├── Extensions22.hs ├── Extensions22.hs.expected ├── Extensions22.hs.refact ├── Extensions23.hs ├── Extensions23.hs.expected ├── Extensions23.hs.refact ├── Extensions24.hs ├── Extensions24.hs.expected ├── Extensions24.hs.refact ├── Extensions25.hs ├── Extensions25.hs.expected ├── Extensions25.hs.refact ├── Extensions26.hs ├── Extensions26.hs.expected ├── Extensions26.hs.refact ├── Extensions27.hs ├── Extensions27.hs.expected ├── Extensions27.hs.refact ├── Extensions28.hs ├── Extensions28.hs.expected ├── Extensions28.hs.refact ├── Extensions29.hs ├── Extensions29.hs.expected ├── Extensions29.hs.refact ├── Extensions3.hs ├── Extensions3.hs.expected ├── Extensions3.hs.refact ├── Extensions4.hs ├── Extensions4.hs.expected ├── Extensions4.hs.refact ├── Extensions5.hs ├── Extensions5.hs.expected ├── Extensions5.hs.refact ├── Extensions6.hs ├── Extensions6.hs.expected ├── Extensions6.hs.refact ├── Extensions7.hs ├── Extensions7.hs.expected ├── Extensions7.hs.refact ├── Extensions8.hs ├── Extensions8.hs.expected ├── Extensions8.hs.refact ├── Extensions9.hs ├── Extensions9.hs.expected ├── Extensions9.hs.refact ├── Fixity.hs ├── Fixity.hs.expected ├── Fixity.hs.refact ├── Import0.hs ├── Import0.hs.expected ├── Import0.hs.refact ├── Import1.hs ├── Import1.hs.expected ├── Import1.hs.refact ├── Import10.hs ├── Import10.hs.expected ├── Import10.hs.refact ├── Import11.hs ├── Import11.hs.expected ├── Import11.hs.refact ├── Import12.hs ├── Import12.hs.expected ├── Import12.hs.refact ├── Import13.hs ├── Import13.hs.expected ├── Import13.hs.refact ├── Import14.hs ├── Import14.hs.expected ├── Import14.hs.refact ├── Import15.hs ├── Import15.hs.expected ├── Import15.hs.refact ├── Import16.hs ├── Import16.hs.expected ├── Import16.hs.refact ├── Import17.hs ├── Import17.hs.expected ├── Import17.hs.refact ├── Import18.hs ├── Import18.hs.expected ├── Import18.hs.refact ├── Import19.hs ├── Import19.hs.expected ├── Import19.hs.refact ├── Import2.hs ├── Import2.hs.expected ├── Import2.hs.refact ├── Import20.hs ├── Import20.hs.expected ├── Import20.hs.refact ├── Import21.hs ├── Import21.hs.expected ├── Import21.hs.refact ├── Import22.hs ├── Import22.hs.expected ├── Import22.hs.refact ├── Import3.hs ├── Import3.hs.expected ├── Import3.hs.refact ├── Import4.hs ├── Import4.hs.expected ├── Import4.hs.refact ├── Import5.hs ├── Import5.hs.expected ├── Import5.hs.refact ├── Import6.hs ├── Import6.hs.expected ├── Import6.hs.refact ├── Import7.hs ├── Import7.hs.expected ├── Import7.hs.refact ├── Import8.hs ├── Import8.hs.expected ├── Import8.hs.refact ├── Import9.hs ├── Import9.hs.expected ├── Import9.hs.refact ├── Lambda0.hs ├── Lambda0.hs.expected ├── Lambda0.hs.refact ├── Lambda1.hs ├── Lambda1.hs.expected ├── Lambda1.hs.refact ├── Lambda10.hs ├── Lambda10.hs.expected ├── Lambda10.hs.refact ├── Lambda11.hs ├── Lambda11.hs.expected ├── Lambda11.hs.refact ├── Lambda12.hs ├── Lambda12.hs.expected ├── Lambda12.hs.refact ├── Lambda13.hs ├── Lambda13.hs.expected ├── Lambda13.hs.refact ├── Lambda14.hs ├── Lambda14.hs.expected ├── Lambda14.hs.refact ├── Lambda15.hs ├── Lambda15.hs.expected ├── Lambda15.hs.refact ├── Lambda16.hs ├── Lambda16.hs.expected ├── Lambda16.hs.refact ├── Lambda17.hs ├── Lambda17.hs.expected ├── Lambda17.hs.refact ├── Lambda18.hs ├── Lambda18.hs.expected ├── Lambda18.hs.refact ├── Lambda19.hs ├── Lambda19.hs.expected ├── Lambda19.hs.refact ├── Lambda2.hs ├── Lambda2.hs.expected ├── Lambda2.hs.refact ├── Lambda20.hs ├── Lambda20.hs.expected ├── Lambda20.hs.refact ├── Lambda21.hs ├── Lambda21.hs.expected ├── Lambda21.hs.refact ├── Lambda22.hs ├── Lambda22.hs.expected ├── Lambda22.hs.refact ├── Lambda23.hs ├── Lambda23.hs.expected ├── Lambda23.hs.refact ├── Lambda24.hs ├── Lambda24.hs.expected ├── Lambda24.hs.refact ├── Lambda25.hs ├── Lambda25.hs.expected ├── Lambda25.hs.refact ├── Lambda26.hs ├── Lambda26.hs.expected ├── Lambda26.hs.refact ├── Lambda27.hs ├── Lambda27.hs.expected ├── Lambda27.hs.refact ├── Lambda28.hs ├── Lambda28.hs.expected ├── Lambda28.hs.refact ├── Lambda29.hs ├── Lambda29.hs.expected ├── Lambda29.hs.refact ├── Lambda3.hs ├── Lambda3.hs.expected ├── Lambda3.hs.refact ├── Lambda30.hs ├── Lambda30.hs.expected ├── Lambda30.hs.refact ├── Lambda31.hs ├── Lambda31.hs.expected ├── Lambda31.hs.refact ├── Lambda32.hs ├── Lambda32.hs.expected ├── Lambda32.hs.refact ├── Lambda33.hs ├── Lambda33.hs.expected ├── Lambda33.hs.refact ├── Lambda34.hs ├── Lambda34.hs.expected ├── Lambda34.hs.refact ├── Lambda35.hs ├── Lambda35.hs.expected ├── Lambda35.hs.refact ├── Lambda36.hs ├── Lambda36.hs.expected ├── Lambda36.hs.refact ├── Lambda37.hs ├── Lambda37.hs.expected ├── Lambda37.hs.refact ├── Lambda38.hs ├── Lambda38.hs.expected ├── Lambda38.hs.refact ├── Lambda39.hs ├── Lambda39.hs.expected ├── Lambda39.hs.refact ├── Lambda4.hs ├── Lambda4.hs.expected ├── Lambda4.hs.refact ├── Lambda40.hs ├── Lambda40.hs.expected ├── Lambda40.hs.refact ├── Lambda41.hs ├── Lambda41.hs.expected ├── Lambda41.hs.refact ├── Lambda5.hs ├── Lambda5.hs.expected ├── Lambda5.hs.refact ├── Lambda6.hs ├── Lambda6.hs.expected ├── Lambda6.hs.refact ├── Lambda7.hs ├── Lambda7.hs.expected ├── Lambda7.hs.refact ├── Lambda8.hs ├── Lambda8.hs.expected ├── Lambda8.hs.refact ├── Lambda9.hs ├── Lambda9.hs.expected ├── Lambda9.hs.refact ├── LambdaCase01.hs ├── LambdaCase01.hs.expected ├── LambdaCase01.hs.refact ├── List0.hs ├── List0.hs.expected ├── List0.hs.refact ├── List1.hs ├── List1.hs.expected ├── List1.hs.refact ├── List10.hs ├── List10.hs.expected ├── List10.hs.refact ├── List11.hs ├── List11.hs.expected ├── List11.hs.refact ├── List12.hs ├── List12.hs.expected ├── List12.hs.refact ├── List13.hs ├── List13.hs.expected ├── List13.hs.refact ├── List14.hs ├── List14.hs.expected ├── List14.hs.refact ├── List2.hs ├── List2.hs.expected ├── List2.hs.refact ├── List3.hs ├── List3.hs.expected ├── List3.hs.refact ├── List4.hs ├── List4.hs.expected ├── List4.hs.refact ├── List5.hs ├── List5.hs.expected ├── List5.hs.refact ├── List6.hs ├── List6.hs.expected ├── List6.hs.refact ├── List7.hs ├── List7.hs.expected ├── List7.hs.refact ├── List8.hs ├── List8.hs.expected ├── List8.hs.refact ├── List9.hs ├── List9.hs.expected ├── List9.hs.refact ├── ListRec0.hs ├── ListRec0.hs.expected ├── ListRec0.hs.refact ├── ListRec1.hs ├── ListRec1.hs.expected ├── ListRec1.hs.refact ├── ListRec2.hs ├── ListRec2.hs.expected ├── ListRec2.hs.refact ├── ListRec3.hs ├── ListRec3.hs.expected ├── ListRec3.hs.refact ├── ListRec4.hs ├── ListRec4.hs.expected ├── ListRec4.hs.refact ├── ListRec5.hs ├── ListRec5.hs.expected ├── ListRec5.hs.refact ├── ListRec6.hs ├── ListRec6.hs.expected ├── ListRec6.hs.refact ├── ListRec7.hs ├── ListRec7.hs.expected ├── ListRec7.hs.refact ├── ListRec8.hs ├── ListRec8.hs.expected ├── ListRec8.hs.refact ├── Monad0.hs ├── Monad0.hs.expected ├── Monad0.hs.refact ├── Monad1.hs ├── Monad1.hs.expected ├── Monad1.hs.refact ├── Monad10.hs ├── Monad10.hs.expected ├── Monad10.hs.refact ├── Monad11.hs ├── Monad11.hs.expected ├── Monad11.hs.refact ├── Monad12.hs ├── Monad12.hs.expected ├── Monad12.hs.refact ├── Monad13.hs ├── Monad13.hs.expected ├── Monad13.hs.refact ├── Monad14.hs ├── Monad14.hs.expected ├── Monad14.hs.refact ├── Monad15.hs ├── Monad15.hs.expected ├── Monad15.hs.refact ├── Monad16.hs ├── Monad16.hs.expected ├── Monad16.hs.refact ├── Monad17.hs ├── Monad17.hs.expected ├── Monad17.hs.refact ├── Monad18.hs ├── Monad18.hs.expected ├── Monad18.hs.refact ├── Monad19.hs ├── Monad19.hs.expected ├── Monad19.hs.refact ├── Monad2.hs ├── Monad2.hs.expected ├── Monad2.hs.refact ├── Monad3.hs ├── Monad3.hs.expected ├── Monad3.hs.refact ├── Monad4.hs ├── Monad4.hs.expected ├── Monad4.hs.refact ├── Monad5.hs ├── Monad5.hs.expected ├── Monad5.hs.refact ├── Monad6.hs ├── Monad6.hs.expected ├── Monad6.hs.refact ├── Monad7.hs ├── Monad7.hs.expected ├── Monad7.hs.refact ├── Monad8.hs ├── Monad8.hs.expected ├── Monad8.hs.refact ├── Monad9.hs ├── Monad9.hs.expected ├── Monad9.hs.refact ├── Naming0.hs ├── Naming0.hs.expected ├── Naming0.hs.refact ├── Naming1.hs ├── Naming1.hs.expected ├── Naming1.hs.refact ├── Naming10.hs ├── Naming10.hs.expected ├── Naming10.hs.refact ├── Naming11.hs ├── Naming11.hs.expected ├── Naming11.hs.refact ├── Naming12.hs ├── Naming12.hs.expected ├── Naming12.hs.refact ├── Naming13.hs ├── Naming13.hs.expected ├── Naming13.hs.refact ├── Naming14.hs ├── Naming14.hs.expected ├── Naming14.hs.refact ├── Naming15.hs ├── Naming15.hs.expected ├── Naming15.hs.refact ├── Naming16.hs ├── Naming16.hs.expected ├── Naming16.hs.refact ├── Naming2.hs ├── Naming2.hs.expected ├── Naming2.hs.refact ├── Naming3.hs ├── Naming3.hs.expected ├── Naming3.hs.refact ├── Naming4.hs ├── Naming4.hs.expected ├── Naming4.hs.refact ├── Naming5.hs ├── Naming5.hs.expected ├── Naming5.hs.refact ├── Naming6.hs ├── Naming6.hs.expected ├── Naming6.hs.refact ├── Naming7.hs ├── Naming7.hs.expected ├── Naming7.hs.refact ├── Naming8.hs ├── Naming8.hs.expected ├── Naming8.hs.refact ├── Naming9.hs ├── Naming9.hs.expected ├── Naming9.hs.refact ├── NegApp.hs ├── NegApp.hs.expected ├── NegApp.hs.refact ├── NegLit.hs ├── NegLit.hs.expected ├── NegLit.hs.refact ├── ParseErrorNoHint.hs ├── ParseErrorNoHint.hs.expected ├── ParseErrorNoHint.hs.refact ├── Pragma0.hs ├── Pragma0.hs.expected ├── Pragma0.hs.refact ├── Pragma1.hs ├── Pragma1.hs.expected ├── Pragma1.hs.refact ├── Pragma10.hs ├── Pragma10.hs.expected ├── Pragma10.hs.refact ├── Pragma2.hs ├── Pragma2.hs.expected ├── Pragma2.hs.refact ├── Pragma3.hs ├── Pragma3.hs.expected ├── Pragma3.hs.refact ├── Pragma4.hs ├── Pragma4.hs.expected ├── Pragma4.hs.refact ├── Pragma5.hs ├── Pragma5.hs.expected ├── Pragma5.hs.refact ├── Pragma6.hs ├── Pragma6.hs.expected ├── Pragma6.hs.refact ├── Pragma7.hs ├── Pragma7.hs.expected ├── Pragma7.hs.refact ├── Pragma8.hs ├── Pragma8.hs.expected ├── Pragma8.hs.refact ├── Pragma9.hs ├── Pragma9.hs.expected ├── Pragma9.hs.refact ├── RedundantDo.hs ├── RedundantDo.hs.expected ├── RedundantDo.hs.refact ├── Remote.hs ├── Remote.hs.expected ├── Remote.hs.refact ├── Sequence.hs ├── Sequence.hs.expected ├── Sequence.hs.refact ├── Structure0.hs ├── Structure0.hs.expected ├── Structure0.hs.refact ├── Structure1.hs ├── Structure1.hs.expected ├── Structure1.hs.refact ├── Structure10.hs ├── Structure10.hs.expected ├── Structure10.hs.refact ├── Structure11.hs ├── Structure11.hs.expected ├── Structure11.hs.refact ├── Structure12.hs ├── Structure12.hs.expected ├── Structure12.hs.refact ├── Structure13.hs ├── Structure13.hs.expected ├── Structure13.hs.refact ├── Structure14.hs ├── Structure14.hs.expected ├── Structure14.hs.refact ├── Structure15.hs ├── Structure15.hs.expected ├── Structure15.hs.refact ├── Structure16.hs ├── Structure16.hs.expected ├── Structure16.hs.refact ├── Structure17.hs ├── Structure17.hs.expected ├── Structure17.hs.refact ├── Structure18.hs ├── Structure18.hs.expected ├── Structure18.hs.refact ├── Structure19.hs ├── Structure19.hs.expected ├── Structure19.hs.refact ├── Structure2.hs ├── Structure2.hs.expected ├── Structure2.hs.refact ├── Structure20.hs ├── Structure20.hs.expected ├── Structure20.hs.refact ├── Structure21.hs ├── Structure21.hs.expected ├── Structure21.hs.refact ├── Structure22.hs ├── Structure22.hs.expected ├── Structure22.hs.refact ├── Structure23.hs ├── Structure23.hs.expected ├── Structure23.hs.refact ├── Structure3.hs ├── Structure3.hs.expected ├── Structure3.hs.refact ├── Structure4.hs ├── Structure4.hs.expected ├── Structure4.hs.refact ├── Structure5.hs ├── Structure5.hs.expected ├── Structure5.hs.refact ├── Structure6.hs ├── Structure6.hs.expected ├── Structure6.hs.refact ├── Structure7.hs ├── Structure7.hs.expected ├── Structure7.hs.refact ├── Structure8.hs ├── Structure8.hs.expected ├── Structure8.hs.refact ├── Structure9.hs ├── Structure9.hs.expected ├── Structure9.hs.refact ├── Test0.hs ├── Test0.hs.expected ├── Test0.hs.refact ├── Test1.hs ├── Test1.hs.expected ├── Test1.hs.refact ├── Test10.hs ├── Test10.hs.expected ├── Test10.hs.refact ├── Test11.hs ├── Test11.hs.expected ├── Test11.hs.refact ├── Test12.hs ├── Test12.hs.expected ├── Test12.hs.refact ├── Test13.hs ├── Test13.hs.expected ├── Test13.hs.refact ├── Test14.hs ├── Test14.hs.expected ├── Test14.hs.refact ├── Test15.hs ├── Test15.hs.expected ├── Test15.hs.refact ├── Test16.hs ├── Test16.hs.expected ├── Test16.hs.refact ├── Test17.hs ├── Test17.hs.expected ├── Test17.hs.refact ├── Test18.hs ├── Test18.hs.expected ├── Test18.hs.refact ├── Test19.hs ├── Test19.hs.expected ├── Test19.hs.refact ├── Test2.hs ├── Test2.hs.expected ├── Test2.hs.refact ├── Test20.hs ├── Test20.hs.expected ├── Test20.hs.refact ├── Test21.hs ├── Test21.hs.expected ├── Test21.hs.refact ├── Test22.hs ├── Test22.hs.expected ├── Test22.hs.refact ├── Test23.hs ├── Test23.hs.expected ├── Test23.hs.refact ├── Test24.hs ├── Test24.hs.expected ├── Test24.hs.refact ├── Test25.hs ├── Test25.hs.expected ├── Test25.hs.refact ├── Test26.hs ├── Test26.hs.expected ├── Test26.hs.refact ├── Test27.hs ├── Test27.hs.expected ├── Test27.hs.refact ├── Test28.hs ├── Test28.hs.expected ├── Test28.hs.refact ├── Test29.hs ├── Test29.hs.expected ├── Test29.hs.refact ├── Test3.hs ├── Test3.hs.expected ├── Test3.hs.refact ├── Test30.hs ├── Test30.hs.expected ├── Test30.hs.refact ├── Test31.hs ├── Test31.hs.expected ├── Test31.hs.refact ├── Test32.hs ├── Test32.hs.expected ├── Test32.hs.refact ├── Test33.hs ├── Test33.hs.expected ├── Test33.hs.refact ├── Test34.hs ├── Test34.hs.expected ├── Test34.hs.refact ├── Test35.hs ├── Test35.hs.expected ├── Test35.hs.refact ├── Test37.hs ├── Test37.hs.expected ├── Test37.hs.refact ├── Test38.hs ├── Test38.hs.expected ├── Test38.hs.refact ├── Test4.hs ├── Test4.hs.expected ├── Test4.hs.refact ├── Test5.hs ├── Test5.hs.expected ├── Test5.hs.refact ├── Test6.hs ├── Test6.hs.expected ├── Test6.hs.refact ├── Test7.hs ├── Test7.hs.expected ├── Test7.hs.refact ├── Test8.hs ├── Test8.hs.expected ├── Test8.hs.refact ├── Test9.hs ├── Test9.hs.expected ├── Test9.hs.refact ├── Uncurry.hs ├── Uncurry.hs.expected ├── Uncurry.hs.refact ├── Unsafe0.hs ├── Unsafe0.hs.expected ├── Unsafe0.hs.refact ├── Unsafe1.hs ├── Unsafe1.hs.expected ├── Unsafe1.hs.refact ├── Unsafe2.hs ├── Unsafe2.hs.expected ├── Unsafe2.hs.refact ├── Unsafe3.hs ├── Unsafe3.hs.expected ├── Unsafe3.hs.refact ├── Unsafe4.hs ├── Unsafe4.hs.expected ├── Unsafe4.hs.refact ├── Unsafe5.hs ├── Unsafe5.hs.expected ├── Unsafe5.hs.refact ├── Unsafe6.hs ├── Unsafe6.hs.expected ├── Unsafe6.hs.refact ├── Unsafe7.hs ├── Unsafe7.hs.expected ├── Unsafe7.hs.refact ├── Unsafe8.hs ├── Unsafe8.hs.expected ├── Unsafe8.hs.refact ├── lambda42.hs ├── lambda42.hs.expected ├── lambda42.hs.refact ├── typetest.hs ├── typetest.hs.expected └── typetest.hs.refact /.gitignore: -------------------------------------------------------------------------------- 1 | .stack-work/ 2 | stack.yaml.lock 3 | tests/examples/*.out 4 | shell.nix 5 | tags 6 | dist/ 7 | dist-newstyle/ 8 | .pre-commit-config.yaml 9 | -------------------------------------------------------------------------------- /.hlint.yaml: -------------------------------------------------------------------------------- 1 | - ignore: {name: "Reduce duplication"} 2 | -------------------------------------------------------------------------------- /Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /hie.yaml: -------------------------------------------------------------------------------- 1 | cradle: {cabal: {component: "exe:refactor"}} 2 | -------------------------------------------------------------------------------- /src/Main.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import Refact.Run (refactMain) 4 | 5 | main :: IO () 6 | main = refactMain 7 | -------------------------------------------------------------------------------- /stack.yaml: -------------------------------------------------------------------------------- 1 | resolver: lts-17.2 2 | 3 | packages: 4 | - . 5 | -------------------------------------------------------------------------------- /tests/examples/AndList.hs: -------------------------------------------------------------------------------- 1 | athing = and [a, b] 2 | -------------------------------------------------------------------------------- /tests/examples/AndList.hs.expected: -------------------------------------------------------------------------------- 1 | athing = a && b 2 | -------------------------------------------------------------------------------- /tests/examples/ArithSeq.hs: -------------------------------------------------------------------------------- 1 | x = f $ [1,2..5] 2 | -------------------------------------------------------------------------------- /tests/examples/ArithSeq.hs.expected: -------------------------------------------------------------------------------- 1 | x = f [1,2..5] 2 | -------------------------------------------------------------------------------- /tests/examples/Backquotes.hs: -------------------------------------------------------------------------------- 1 | foo = zipWith SymInfo [0 ..] (repeat ty) 2 | -------------------------------------------------------------------------------- /tests/examples/Backquotes.hs.expected: -------------------------------------------------------------------------------- 1 | foo = map (`SymInfo` ty) [0 ..] 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket0.hs: -------------------------------------------------------------------------------- 1 | yes = (f x) x 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket0.hs.expected: -------------------------------------------------------------------------------- 1 | yes = f x x 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket1.hs: -------------------------------------------------------------------------------- 1 | no = f (x x) -------------------------------------------------------------------------------- /tests/examples/Bracket1.hs.expected: -------------------------------------------------------------------------------- 1 | no = f (x x) -------------------------------------------------------------------------------- /tests/examples/Bracket1.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket10.hs: -------------------------------------------------------------------------------- 1 | yes = [(foo bar)] -------------------------------------------------------------------------------- /tests/examples/Bracket10.hs.expected: -------------------------------------------------------------------------------- 1 | yes = [foo bar] 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket11.hs: -------------------------------------------------------------------------------- 1 | yes = foo ((x y), z) -------------------------------------------------------------------------------- /tests/examples/Bracket11.hs.expected: -------------------------------------------------------------------------------- 1 | yes = foo (x y, z) 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket12.hs: -------------------------------------------------------------------------------- 1 | yes = C { f = (e h) } -------------------------------------------------------------------------------- /tests/examples/Bracket12.hs.expected: -------------------------------------------------------------------------------- 1 | yes = C { f = e h } 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket13.hs: -------------------------------------------------------------------------------- 1 | yes = \ x -> (x && x) 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket13.hs.expected: -------------------------------------------------------------------------------- 1 | yes x = x && x 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket14.hs: -------------------------------------------------------------------------------- 1 | no = \(x -> y) -> z -------------------------------------------------------------------------------- /tests/examples/Bracket14.hs.expected: -------------------------------------------------------------------------------- 1 | no (x -> y) = z 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket15.hs: -------------------------------------------------------------------------------- 1 | yes = (`foo` (bar baz)) -------------------------------------------------------------------------------- /tests/examples/Bracket15.hs.expected: -------------------------------------------------------------------------------- 1 | yes = (`foo` bar baz) 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket16.hs: -------------------------------------------------------------------------------- 1 | main = do f; (print x) -------------------------------------------------------------------------------- /tests/examples/Bracket16.hs.expected: -------------------------------------------------------------------------------- 1 | main = do f; print x 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket17.hs: -------------------------------------------------------------------------------- 1 | foo :: (Int -> Int) -> Int -------------------------------------------------------------------------------- /tests/examples/Bracket17.hs.expected: -------------------------------------------------------------------------------- 1 | foo :: (Int -> Int) -> Int -------------------------------------------------------------------------------- /tests/examples/Bracket17.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket18.hs: -------------------------------------------------------------------------------- 1 | foo :: Int -> (Int -> Int) -------------------------------------------------------------------------------- /tests/examples/Bracket18.hs.expected: -------------------------------------------------------------------------------- 1 | foo :: Int -> (Int -> Int) -------------------------------------------------------------------------------- /tests/examples/Bracket18.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket19.hs: -------------------------------------------------------------------------------- 1 | foo :: (Maybe Int) -> a -------------------------------------------------------------------------------- /tests/examples/Bracket19.hs.expected: -------------------------------------------------------------------------------- 1 | foo :: Maybe Int -> a 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket2.hs: -------------------------------------------------------------------------------- 1 | yes = (foo) -------------------------------------------------------------------------------- /tests/examples/Bracket2.hs.expected: -------------------------------------------------------------------------------- 1 | yes = foo 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket20.hs: -------------------------------------------------------------------------------- 1 | instance Named (DeclHead S) -------------------------------------------------------------------------------- /tests/examples/Bracket20.hs.expected: -------------------------------------------------------------------------------- 1 | instance Named (DeclHead S) -------------------------------------------------------------------------------- /tests/examples/Bracket20.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket21.hs: -------------------------------------------------------------------------------- 1 | data Foo = Foo {foo :: (Maybe Foo)} -------------------------------------------------------------------------------- /tests/examples/Bracket21.hs.expected: -------------------------------------------------------------------------------- 1 | data Foo = Foo {foo :: Maybe Foo} 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket22.hs: -------------------------------------------------------------------------------- 1 | foo (True) = 1 -------------------------------------------------------------------------------- /tests/examples/Bracket22.hs.expected: -------------------------------------------------------------------------------- 1 | foo True = 1 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket23.hs: -------------------------------------------------------------------------------- 1 | foo ((True)) = 1 -------------------------------------------------------------------------------- /tests/examples/Bracket23.hs.expected: -------------------------------------------------------------------------------- 1 | foo True = 1 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket24.hs: -------------------------------------------------------------------------------- 1 | no = groupFsts . sortFst $ mr -------------------------------------------------------------------------------- /tests/examples/Bracket24.hs.expected: -------------------------------------------------------------------------------- 1 | no = groupFsts . sortFst $ mr -------------------------------------------------------------------------------- /tests/examples/Bracket24.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket25.hs: -------------------------------------------------------------------------------- 1 | yes = split "to" $ names -------------------------------------------------------------------------------- /tests/examples/Bracket25.hs.expected: -------------------------------------------------------------------------------- 1 | yes = split "to" names 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket26.hs: -------------------------------------------------------------------------------- 1 | yes = white $ keysymbol -------------------------------------------------------------------------------- /tests/examples/Bracket26.hs.expected: -------------------------------------------------------------------------------- 1 | yes = white keysymbol 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket27.hs: -------------------------------------------------------------------------------- 1 | yes = operator foo $ operator -------------------------------------------------------------------------------- /tests/examples/Bracket27.hs.expected: -------------------------------------------------------------------------------- 1 | yes = operator foo operator 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket28.hs: -------------------------------------------------------------------------------- 1 | no = operator foo $ operator bar -------------------------------------------------------------------------------- /tests/examples/Bracket28.hs.expected: -------------------------------------------------------------------------------- 1 | no = operator foo $ operator bar -------------------------------------------------------------------------------- /tests/examples/Bracket28.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket29.hs: -------------------------------------------------------------------------------- 1 | yes = return $ Record{a=b} -------------------------------------------------------------------------------- /tests/examples/Bracket29.hs.expected: -------------------------------------------------------------------------------- 1 | yes = return $ Record{a=b} -------------------------------------------------------------------------------- /tests/examples/Bracket29.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket3.hs: -------------------------------------------------------------------------------- 1 | yes = (foo bar) -------------------------------------------------------------------------------- /tests/examples/Bracket3.hs.expected: -------------------------------------------------------------------------------- 1 | yes = foo bar 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket30.hs: -------------------------------------------------------------------------------- 1 | yes = (b $ c d) ++ e -------------------------------------------------------------------------------- /tests/examples/Bracket30.hs.expected: -------------------------------------------------------------------------------- 1 | yes = b (c d) ++ e 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket31.hs: -------------------------------------------------------------------------------- 1 | yes = (a b $ c d) ++ e -------------------------------------------------------------------------------- /tests/examples/Bracket31.hs.expected: -------------------------------------------------------------------------------- 1 | yes = a b (c d) ++ e 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket32.hs: -------------------------------------------------------------------------------- 1 | no = (f . g $ a) ++ e -------------------------------------------------------------------------------- /tests/examples/Bracket32.hs.expected: -------------------------------------------------------------------------------- 1 | no = (f . g $ a) ++ e -------------------------------------------------------------------------------- /tests/examples/Bracket32.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket33.hs: -------------------------------------------------------------------------------- 1 | no = quickCheck ((\h -> cySucc h == succ h) :: Hygiene -> Bool) -------------------------------------------------------------------------------- /tests/examples/Bracket33.hs.expected: -------------------------------------------------------------------------------- 1 | no = quickCheck ((\h -> cySucc h == succ h) :: Hygiene -> Bool) -------------------------------------------------------------------------------- /tests/examples/Bracket33.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket34.hs: -------------------------------------------------------------------------------- 1 | foo = (case x of y -> z; q -> w) :: Int -------------------------------------------------------------------------------- /tests/examples/Bracket34.hs.expected: -------------------------------------------------------------------------------- 1 | foo = (case x of y -> z; q -> w) :: Int -------------------------------------------------------------------------------- /tests/examples/Bracket34.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket35.hs: -------------------------------------------------------------------------------- 1 | main = do a += b . c; return $ a . b -------------------------------------------------------------------------------- /tests/examples/Bracket35.hs.expected: -------------------------------------------------------------------------------- 1 | main = do a += b . c; return $ a . b -------------------------------------------------------------------------------- /tests/examples/Bracket35.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket36.hs: -------------------------------------------------------------------------------- 1 | main = 1; {-# ANN module ("HLint: ignore Use camelCase" :: String) #-} -------------------------------------------------------------------------------- /tests/examples/Bracket36.hs.expected: -------------------------------------------------------------------------------- 1 | main = 1; {-# ANN module ("HLint: ignore Use camelCase" :: String) #-} -------------------------------------------------------------------------------- /tests/examples/Bracket36.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket37.hs: -------------------------------------------------------------------------------- 1 | main = 1; {-# ANN module (1 + (2)) #-} -------------------------------------------------------------------------------- /tests/examples/Bracket37.hs.expected: -------------------------------------------------------------------------------- 1 | main = 1; {-# ANN module (1 + 2) #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket38.hs: -------------------------------------------------------------------------------- 1 | y = f(x1) + g(Foo.x2) 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket38.hs.expected: -------------------------------------------------------------------------------- 1 | y = f x1 + g Foo.x2 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket39.hs: -------------------------------------------------------------------------------- 1 | x = do(y) 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket39.hs.expected: -------------------------------------------------------------------------------- 1 | x = do y 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket4.hs: -------------------------------------------------------------------------------- 1 | yes = foo (bar) -------------------------------------------------------------------------------- /tests/examples/Bracket4.hs.expected: -------------------------------------------------------------------------------- 1 | yes = foo bar 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket40.hs: -------------------------------------------------------------------------------- 1 | x = do(Foo.y) 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket40.hs.expected: -------------------------------------------------------------------------------- 1 | x = do Foo.y 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket41.hs: -------------------------------------------------------------------------------- 1 | x = do(Foo.foo bar) 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket41.hs.expected: -------------------------------------------------------------------------------- 1 | x = do Foo.foo bar 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket42.hs: -------------------------------------------------------------------------------- 1 | foo :: (HasCallStack) => Int 2 | foo = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/Bracket42.hs.expected: -------------------------------------------------------------------------------- 1 | foo :: HasCallStack => Int 2 | foo = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/Bracket43.hs: -------------------------------------------------------------------------------- 1 | foo :: ((Eq Int)) => Int 2 | foo = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/Bracket43.hs.expected: -------------------------------------------------------------------------------- 1 | foo :: (Eq Int) => Int 2 | foo = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/Bracket44.hs: -------------------------------------------------------------------------------- 1 | foo :: ((Eq) Int) => Int 2 | foo = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/Bracket44.hs.expected: -------------------------------------------------------------------------------- 1 | foo :: (Eq Int) => Int 2 | foo = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/Bracket45.hs: -------------------------------------------------------------------------------- 1 | foo :: (Eq) (Int) => Int 2 | foo = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/Bracket45.hs.expected: -------------------------------------------------------------------------------- 1 | foo :: Eq Int => Int 2 | foo = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/Bracket46.hs: -------------------------------------------------------------------------------- 1 | foo :: ((HasCallStack)) => Int 2 | foo = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/Bracket46.hs.expected: -------------------------------------------------------------------------------- 1 | foo :: HasCallStack => Int 2 | foo = undefined 3 | -------------------------------------------------------------------------------- /tests/examples/Bracket47.hs: -------------------------------------------------------------------------------- 1 | yes = curry (uncurry (+)) 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket47.hs.expected: -------------------------------------------------------------------------------- 1 | yes = (+) 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket5.hs: -------------------------------------------------------------------------------- 1 | yes = foo ((x x)) -------------------------------------------------------------------------------- /tests/examples/Bracket5.hs.expected: -------------------------------------------------------------------------------- 1 | yes = foo (x x) 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket6.hs: -------------------------------------------------------------------------------- 1 | yes = (f x) ||| y -------------------------------------------------------------------------------- /tests/examples/Bracket6.hs.expected: -------------------------------------------------------------------------------- 1 | yes = f x ||| y 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket7.hs: -------------------------------------------------------------------------------- 1 | yes = if (f x) then y else z -------------------------------------------------------------------------------- /tests/examples/Bracket7.hs.expected: -------------------------------------------------------------------------------- 1 | yes = if f x then y else z 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket8.hs: -------------------------------------------------------------------------------- 1 | yes = if x then (f y) else z -------------------------------------------------------------------------------- /tests/examples/Bracket8.hs.expected: -------------------------------------------------------------------------------- 1 | yes = if x then f y else z 2 | -------------------------------------------------------------------------------- /tests/examples/Bracket9.hs: -------------------------------------------------------------------------------- 1 | yes = (a foo) :: Int -------------------------------------------------------------------------------- /tests/examples/Bracket9.hs.expected: -------------------------------------------------------------------------------- 1 | yes = a foo :: Int 2 | -------------------------------------------------------------------------------- /tests/examples/Comment0.hs: -------------------------------------------------------------------------------- 1 | {- MISSING HASH #-} -------------------------------------------------------------------------------- /tests/examples/Comment0.hs.expected: -------------------------------------------------------------------------------- 1 | {-# MISSING HASH #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Comment1.hs: -------------------------------------------------------------------------------- 1 | -- {- INLINE X -} -------------------------------------------------------------------------------- /tests/examples/Comment1.hs.expected: -------------------------------------------------------------------------------- 1 | -- {- INLINE X -} -------------------------------------------------------------------------------- /tests/examples/Comment1.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Comment2.hs: -------------------------------------------------------------------------------- 1 | {- INLINE Y -} -------------------------------------------------------------------------------- /tests/examples/Comment2.hs.expected: -------------------------------------------------------------------------------- 1 | {-# INLINE Y #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Comment3.hs: -------------------------------------------------------------------------------- 1 | {- INLINE[~k] f -} -------------------------------------------------------------------------------- /tests/examples/Comment3.hs.expected: -------------------------------------------------------------------------------- 1 | {-# INLINE[~k] f #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Comment4.hs: -------------------------------------------------------------------------------- 1 | {- NOINLINE Y -} -------------------------------------------------------------------------------- /tests/examples/Comment4.hs.expected: -------------------------------------------------------------------------------- 1 | {-# NOINLINE Y #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Comment5.hs: -------------------------------------------------------------------------------- 1 | {- UNKNOWN Y -} -------------------------------------------------------------------------------- /tests/examples/Comment5.hs.expected: -------------------------------------------------------------------------------- 1 | {- UNKNOWN Y -} -------------------------------------------------------------------------------- /tests/examples/Comment5.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Comment6.hs: -------------------------------------------------------------------------------- 1 | -- INLINE X -------------------------------------------------------------------------------- /tests/examples/Comment6.hs.expected: -------------------------------------------------------------------------------- 1 | -- INLINE X -------------------------------------------------------------------------------- /tests/examples/Comment6.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Comment8.hs: -------------------------------------------------------------------------------- 1 | -- input 2 | foo = f {- comment attached to <$> -} <$> {- comment attached to x -} x >>= g 3 | -------------------------------------------------------------------------------- /tests/examples/Comment8.hs.expected: -------------------------------------------------------------------------------- 1 | -- input 2 | foo = f {- comment attached to <$> -} <$> {- comment attached to x -} x >>= g 3 | -------------------------------------------------------------------------------- /tests/examples/Comment9.hs: -------------------------------------------------------------------------------- 1 | -- input 2 | foo = f <$> {- comment attached to x -} x >>= g 3 | -------------------------------------------------------------------------------- /tests/examples/Comment9.hs.expected: -------------------------------------------------------------------------------- 1 | -- input 2 | foo = {- comment attached to x -}x >>= g . f 3 | -------------------------------------------------------------------------------- /tests/examples/Default0.hs: -------------------------------------------------------------------------------- 1 | yes = concat . map f -------------------------------------------------------------------------------- /tests/examples/Default0.hs.expected: -------------------------------------------------------------------------------- 1 | yes = concatMap f 2 | -------------------------------------------------------------------------------- /tests/examples/Default1.hs: -------------------------------------------------------------------------------- 1 | yes = foo . bar . concat . map f . baz . bar -------------------------------------------------------------------------------- /tests/examples/Default1.hs.expected: -------------------------------------------------------------------------------- 1 | yes = foo . bar . concatMap f . baz . bar 2 | -------------------------------------------------------------------------------- /tests/examples/Default10.hs: -------------------------------------------------------------------------------- 1 | yes = not (a /= b) -------------------------------------------------------------------------------- /tests/examples/Default10.hs.expected: -------------------------------------------------------------------------------- 1 | yes = a == b 2 | -------------------------------------------------------------------------------- /tests/examples/Default100.hs: -------------------------------------------------------------------------------- 1 | foo = return $! 1 -------------------------------------------------------------------------------- /tests/examples/Default100.hs.expected: -------------------------------------------------------------------------------- 1 | foo = return $! 1 -------------------------------------------------------------------------------- /tests/examples/Default100.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default101.hs: -------------------------------------------------------------------------------- 1 | foo = return $! "test" 2 | -------------------------------------------------------------------------------- /tests/examples/Default101.hs.expected: -------------------------------------------------------------------------------- 1 | foo = return $! "test" 2 | -------------------------------------------------------------------------------- /tests/examples/Default101.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default102.hs: -------------------------------------------------------------------------------- 1 | bar = [x| (x,_) <- pts] -------------------------------------------------------------------------------- /tests/examples/Default102.hs.expected: -------------------------------------------------------------------------------- 1 | bar = [x| (x,_) <- pts] -------------------------------------------------------------------------------- /tests/examples/Default102.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default103.hs: -------------------------------------------------------------------------------- 1 | return' x = x `seq` return x -------------------------------------------------------------------------------- /tests/examples/Default103.hs.expected: -------------------------------------------------------------------------------- 1 | return' x = x `seq` return x -------------------------------------------------------------------------------- /tests/examples/Default103.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default104.hs: -------------------------------------------------------------------------------- 1 | foo = last (sortBy (compare `on` fst) xs) -------------------------------------------------------------------------------- /tests/examples/Default104.hs.expected: -------------------------------------------------------------------------------- 1 | foo = maximumBy (compare `on` fst) xs 2 | -------------------------------------------------------------------------------- /tests/examples/Default105.hs: -------------------------------------------------------------------------------- 1 | g = \ f -> parseFile f >>= (\ cu -> return (f, cu)) -------------------------------------------------------------------------------- /tests/examples/Default105.hs.expected: -------------------------------------------------------------------------------- 1 | g f = parseFile f >>= (\ cu -> return (f, cu)) 2 | -------------------------------------------------------------------------------- /tests/examples/Default106.hs: -------------------------------------------------------------------------------- 1 | foo = bar $ \(x,y) -> x x y -------------------------------------------------------------------------------- /tests/examples/Default106.hs.expected: -------------------------------------------------------------------------------- 1 | foo = bar $ \(x,y) -> x x y -------------------------------------------------------------------------------- /tests/examples/Default106.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default107.hs: -------------------------------------------------------------------------------- 1 | foo = qux (\x -> f x >>= g) 2 | -------------------------------------------------------------------------------- /tests/examples/Default107.hs.expected: -------------------------------------------------------------------------------- 1 | foo = qux (f Control.Monad.>=> g) 2 | -------------------------------------------------------------------------------- /tests/examples/Default108.hs: -------------------------------------------------------------------------------- 1 | foo = qux (\f -> h f >>= g) 2 | -------------------------------------------------------------------------------- /tests/examples/Default108.hs.expected: -------------------------------------------------------------------------------- 1 | foo = qux (h Control.Monad.>=> g) 2 | -------------------------------------------------------------------------------- /tests/examples/Default109.hs: -------------------------------------------------------------------------------- 1 | foo = qux (\f -> h f >>= f) 2 | -------------------------------------------------------------------------------- /tests/examples/Default109.hs.expected: -------------------------------------------------------------------------------- 1 | foo = qux (\f -> h f >>= f) 2 | -------------------------------------------------------------------------------- /tests/examples/Default109.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default11.hs: -------------------------------------------------------------------------------- 1 | yes = qux (if a then 1 else if b then 1 else 2) 2 | -------------------------------------------------------------------------------- /tests/examples/Default11.hs.expected: -------------------------------------------------------------------------------- 1 | yes = qux (if a || b then 1 else 2) 2 | -------------------------------------------------------------------------------- /tests/examples/Default110.hs: -------------------------------------------------------------------------------- 1 | foo = bar $ \x -> [x,y] -------------------------------------------------------------------------------- /tests/examples/Default110.hs.expected: -------------------------------------------------------------------------------- 1 | foo = bar $ \x -> [x,y] -------------------------------------------------------------------------------- /tests/examples/Default110.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default111.hs: -------------------------------------------------------------------------------- 1 | foo = bar $ \x -> [z,y] -------------------------------------------------------------------------------- /tests/examples/Default111.hs.expected: -------------------------------------------------------------------------------- 1 | foo = bar $ const [z, y] 2 | -------------------------------------------------------------------------------- /tests/examples/Default112.hs: -------------------------------------------------------------------------------- 1 | f condition tChar tBool = if condition then _monoField tChar else _monoField tBool -------------------------------------------------------------------------------- /tests/examples/Default112.hs.expected: -------------------------------------------------------------------------------- 1 | f condition tChar tBool = if condition then _monoField tChar else _monoField tBool -------------------------------------------------------------------------------- /tests/examples/Default112.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default113.hs: -------------------------------------------------------------------------------- 1 | foo = maybe Bar{..} id -------------------------------------------------------------------------------- /tests/examples/Default113.hs.expected: -------------------------------------------------------------------------------- 1 | foo = Data.Maybe.fromMaybe Bar{..} 2 | -------------------------------------------------------------------------------- /tests/examples/Default114.hs: -------------------------------------------------------------------------------- 1 | foo = (\a -> Foo {..}) 1 -------------------------------------------------------------------------------- /tests/examples/Default114.hs.expected: -------------------------------------------------------------------------------- 1 | foo = (\a -> Foo {..}) 1 -------------------------------------------------------------------------------- /tests/examples/Default114.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default115.hs: -------------------------------------------------------------------------------- 1 | foo = zipWith SymInfo [0 ..] (repeat ty) -------------------------------------------------------------------------------- /tests/examples/Default115.hs.expected: -------------------------------------------------------------------------------- 1 | foo = map (\ x -> SymInfo x ty) [0 ..] 2 | -------------------------------------------------------------------------------- /tests/examples/Default116.hs: -------------------------------------------------------------------------------- 1 | import Prelude 2 | yes = flip mapM -------------------------------------------------------------------------------- /tests/examples/Default116.hs.expected: -------------------------------------------------------------------------------- 1 | import Prelude 2 | yes = Control.Monad.forM 3 | -------------------------------------------------------------------------------- /tests/examples/Default117.hs: -------------------------------------------------------------------------------- 1 | import Control.Monad 2 | yes = flip mapM -------------------------------------------------------------------------------- /tests/examples/Default117.hs.expected: -------------------------------------------------------------------------------- 1 | import Control.Monad 2 | yes = forM 3 | -------------------------------------------------------------------------------- /tests/examples/Default118.hs: -------------------------------------------------------------------------------- 1 | import Control.Monad(forM) 2 | yes = flip mapM -------------------------------------------------------------------------------- /tests/examples/Default118.hs.expected: -------------------------------------------------------------------------------- 1 | import Control.Monad(forM) 2 | yes = forM 3 | -------------------------------------------------------------------------------- /tests/examples/Default119.hs: -------------------------------------------------------------------------------- 1 | import Control.Monad(forM_) 2 | yes = flip mapM -------------------------------------------------------------------------------- /tests/examples/Default119.hs.expected: -------------------------------------------------------------------------------- 1 | import Control.Monad(forM_) 2 | yes = Control.Monad.forM 3 | -------------------------------------------------------------------------------- /tests/examples/Default12.hs: -------------------------------------------------------------------------------- 1 | no = if a then 1 else if b then 3 else 2 -------------------------------------------------------------------------------- /tests/examples/Default12.hs.expected: -------------------------------------------------------------------------------- 1 | no 2 | | a = 1 3 | | b = 3 4 | | otherwise = 2 5 | -------------------------------------------------------------------------------- /tests/examples/Default120.hs: -------------------------------------------------------------------------------- 1 | import qualified Control.Monad 2 | yes = flip mapM -------------------------------------------------------------------------------- /tests/examples/Default120.hs.expected: -------------------------------------------------------------------------------- 1 | import qualified Control.Monad 2 | yes = Control.Monad.forM 3 | -------------------------------------------------------------------------------- /tests/examples/Default121.hs: -------------------------------------------------------------------------------- 1 | import qualified Control.Monad as CM 2 | yes = flip mapM -------------------------------------------------------------------------------- /tests/examples/Default121.hs.expected: -------------------------------------------------------------------------------- 1 | import qualified Control.Monad as CM 2 | yes = CM.forM 3 | -------------------------------------------------------------------------------- /tests/examples/Default122.hs: -------------------------------------------------------------------------------- 1 | import qualified Control.Monad as CM(forM,filterM) 2 | yes = flip mapM -------------------------------------------------------------------------------- /tests/examples/Default122.hs.expected: -------------------------------------------------------------------------------- 1 | import qualified Control.Monad as CM(forM,filterM) 2 | yes = CM.forM 3 | -------------------------------------------------------------------------------- /tests/examples/Default123.hs: -------------------------------------------------------------------------------- 1 | import Control.Monad as CM(forM,filterM) 2 | yes = flip mapM -------------------------------------------------------------------------------- /tests/examples/Default123.hs.expected: -------------------------------------------------------------------------------- 1 | import Control.Monad as CM(forM,filterM) 2 | yes = forM 3 | -------------------------------------------------------------------------------- /tests/examples/Default124.hs: -------------------------------------------------------------------------------- 1 | import Control.Monad hiding (forM) 2 | yes = flip mapM -------------------------------------------------------------------------------- /tests/examples/Default124.hs.expected: -------------------------------------------------------------------------------- 1 | import Control.Monad hiding (forM) 2 | yes = Control.Monad.forM 3 | -------------------------------------------------------------------------------- /tests/examples/Default125.hs: -------------------------------------------------------------------------------- 1 | import Control.Monad hiding (filterM) 2 | yes = flip mapM -------------------------------------------------------------------------------- /tests/examples/Default125.hs.expected: -------------------------------------------------------------------------------- 1 | import Control.Monad hiding (filterM) 2 | yes = forM 3 | -------------------------------------------------------------------------------- /tests/examples/Default126.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default127.hs: -------------------------------------------------------------------------------- 1 | import Text.Blaze.Html5.Attributes as A 2 | main = A.id (stringValue id') -------------------------------------------------------------------------------- /tests/examples/Default127.hs.expected: -------------------------------------------------------------------------------- 1 | import Text.Blaze.Html5.Attributes as A 2 | main = A.id (stringValue id') -------------------------------------------------------------------------------- /tests/examples/Default127.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default128.hs: -------------------------------------------------------------------------------- 1 | foo = qux (\x -> f x >>= g) 2 | -------------------------------------------------------------------------------- /tests/examples/Default128.hs.expected: -------------------------------------------------------------------------------- 1 | foo = qux (f Control.Monad.>=> g) 2 | -------------------------------------------------------------------------------- /tests/examples/Default13.hs: -------------------------------------------------------------------------------- 1 | yes = a >>= return . bob -------------------------------------------------------------------------------- /tests/examples/Default13.hs.expected: -------------------------------------------------------------------------------- 1 | yes = bob <$> a 2 | -------------------------------------------------------------------------------- /tests/examples/Default14.hs: -------------------------------------------------------------------------------- 1 | yes = (x !! 0) + (x !! 2) -------------------------------------------------------------------------------- /tests/examples/Default14.hs.expected: -------------------------------------------------------------------------------- 1 | yes = (head x) + (x !! 2) 2 | -------------------------------------------------------------------------------- /tests/examples/Default15.hs: -------------------------------------------------------------------------------- 1 | yes = if b < 42 then [a] else [] -------------------------------------------------------------------------------- /tests/examples/Default15.hs.expected: -------------------------------------------------------------------------------- 1 | yes = [a | b < 42] 2 | -------------------------------------------------------------------------------- /tests/examples/Default16.hs: -------------------------------------------------------------------------------- 1 | no = take n (foo xs) == "hello" -------------------------------------------------------------------------------- /tests/examples/Default16.hs.expected: -------------------------------------------------------------------------------- 1 | no = take n (foo xs) == "hello" -------------------------------------------------------------------------------- /tests/examples/Default16.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default17.hs: -------------------------------------------------------------------------------- 1 | yes = head (reverse xs) -------------------------------------------------------------------------------- /tests/examples/Default17.hs.expected: -------------------------------------------------------------------------------- 1 | yes = last xs 2 | -------------------------------------------------------------------------------- /tests/examples/Default18.hs: -------------------------------------------------------------------------------- 1 | yes = reverse xs `isPrefixOf` reverse ys -------------------------------------------------------------------------------- /tests/examples/Default18.hs.expected: -------------------------------------------------------------------------------- 1 | yes = isSuffixOf xs ys 2 | -------------------------------------------------------------------------------- /tests/examples/Default19.hs: -------------------------------------------------------------------------------- 1 | no = putStrLn $ show (length xs) ++ "Test" -------------------------------------------------------------------------------- /tests/examples/Default19.hs.expected: -------------------------------------------------------------------------------- 1 | no = putStrLn $ show (length xs) ++ "Test" -------------------------------------------------------------------------------- /tests/examples/Default19.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default2.hs: -------------------------------------------------------------------------------- 1 | yes = map f (map g x) -------------------------------------------------------------------------------- /tests/examples/Default2.hs.expected: -------------------------------------------------------------------------------- 1 | yes = map (f . g) x 2 | -------------------------------------------------------------------------------- /tests/examples/Default20.hs: -------------------------------------------------------------------------------- 1 | yes = ftable ++ map (\ (c, x) -> (toUpper c, urlEncode x)) ftable -------------------------------------------------------------------------------- /tests/examples/Default20.hs.expected: -------------------------------------------------------------------------------- 1 | yes = ftable ++ map (Data.Bifunctor.bimap toUpper urlEncode) ftable 2 | -------------------------------------------------------------------------------- /tests/examples/Default21.hs: -------------------------------------------------------------------------------- 1 | yes = map (\(a,b) -> a) xs -------------------------------------------------------------------------------- /tests/examples/Default21.hs.expected: -------------------------------------------------------------------------------- 1 | yes = map (fst) xs 2 | -------------------------------------------------------------------------------- /tests/examples/Default22.hs: -------------------------------------------------------------------------------- 1 | yes = map (\(a,_) -> a) xs -------------------------------------------------------------------------------- /tests/examples/Default22.hs.expected: -------------------------------------------------------------------------------- 1 | yes = map (fst) xs 2 | -------------------------------------------------------------------------------- /tests/examples/Default23.hs: -------------------------------------------------------------------------------- 1 | yes = readFile $ args !! 0 -------------------------------------------------------------------------------- /tests/examples/Default23.hs.expected: -------------------------------------------------------------------------------- 1 | yes = readFile $ head args 2 | -------------------------------------------------------------------------------- /tests/examples/Default24.hs: -------------------------------------------------------------------------------- 1 | yes = if Debug `elem` opts then ["--debug"] else [] -------------------------------------------------------------------------------- /tests/examples/Default24.hs.expected: -------------------------------------------------------------------------------- 1 | yes = ["--debug" | Debug `elem` opts] 2 | -------------------------------------------------------------------------------- /tests/examples/Default25.hs.expected: -------------------------------------------------------------------------------- 1 | yes = qux (if nullPS s || (headPS s /= '\n') then return False else alter_input tailPS >> return True ) 2 | 3 | -------------------------------------------------------------------------------- /tests/examples/Default26.hs: -------------------------------------------------------------------------------- 1 | yes = if foo then do stuff; moreStuff; lastOfTheStuff else return () 2 | -------------------------------------------------------------------------------- /tests/examples/Default26.hs.expected: -------------------------------------------------------------------------------- 1 | yes = Control.Monad.when foo $ do stuff; moreStuff; lastOfTheStuff 2 | 3 | -------------------------------------------------------------------------------- /tests/examples/Default27.hs: -------------------------------------------------------------------------------- 1 | yes = if foo then stuff else return () -------------------------------------------------------------------------------- /tests/examples/Default27.hs.expected: -------------------------------------------------------------------------------- 1 | yes = Control.Monad.when foo stuff 2 | -------------------------------------------------------------------------------- /tests/examples/Default28.hs: -------------------------------------------------------------------------------- 1 | yes = foo $ \(a, b) -> (a, y + b) 2 | -------------------------------------------------------------------------------- /tests/examples/Default28.hs.expected: -------------------------------------------------------------------------------- 1 | yes = foo $ Data.Bifunctor.second ((+) y) 2 | -------------------------------------------------------------------------------- /tests/examples/Default29.hs: -------------------------------------------------------------------------------- 1 | no = foo $ \(a, b) -> (a, a + b) -------------------------------------------------------------------------------- /tests/examples/Default29.hs.expected: -------------------------------------------------------------------------------- 1 | no = foo $ \(a, b) -> (a, a + b) -------------------------------------------------------------------------------- /tests/examples/Default29.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default3.hs: -------------------------------------------------------------------------------- 1 | yes = concat.map (\x->if x==e then l' else [x]) -------------------------------------------------------------------------------- /tests/examples/Default3.hs.expected: -------------------------------------------------------------------------------- 1 | yes = concatMap (\x->if x==e then l' else [x]) 2 | -------------------------------------------------------------------------------- /tests/examples/Default30.hs: -------------------------------------------------------------------------------- 1 | yes = map (uncurry (+)) $ zip [1 .. 5] [6 .. 10] -------------------------------------------------------------------------------- /tests/examples/Default30.hs.expected: -------------------------------------------------------------------------------- 1 | yes = zipWith (curry (uncurry (+))) [1 .. 5] [6 .. 10] 2 | -------------------------------------------------------------------------------- /tests/examples/Default31.hs: -------------------------------------------------------------------------------- 1 | no = do iter <- textBufferGetTextIter tb ; textBufferSelectRange tb iter iter -------------------------------------------------------------------------------- /tests/examples/Default31.hs.expected: -------------------------------------------------------------------------------- 1 | no = do iter <- textBufferGetTextIter tb ; textBufferSelectRange tb iter iter -------------------------------------------------------------------------------- /tests/examples/Default31.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default32.hs: -------------------------------------------------------------------------------- 1 | no = flip f x $ \y -> y*y+y -------------------------------------------------------------------------------- /tests/examples/Default32.hs.expected: -------------------------------------------------------------------------------- 1 | no = flip f x $ \y -> y*y+y -------------------------------------------------------------------------------- /tests/examples/Default32.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default33.hs: -------------------------------------------------------------------------------- 1 | no = \x -> f x (g x) -------------------------------------------------------------------------------- /tests/examples/Default33.hs.expected: -------------------------------------------------------------------------------- 1 | no x = f x (g x) 2 | -------------------------------------------------------------------------------- /tests/examples/Default34.hs: -------------------------------------------------------------------------------- 1 | no = foo (\ v -> f v . g) -------------------------------------------------------------------------------- /tests/examples/Default34.hs.expected: -------------------------------------------------------------------------------- 1 | no = foo (\ v -> f v . g) -------------------------------------------------------------------------------- /tests/examples/Default34.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default35.hs: -------------------------------------------------------------------------------- 1 | yes = concat . intersperse " " -------------------------------------------------------------------------------- /tests/examples/Default35.hs.expected: -------------------------------------------------------------------------------- 1 | yes = unwords 2 | -------------------------------------------------------------------------------- /tests/examples/Default36.hs: -------------------------------------------------------------------------------- 1 | yes = Prelude.concat $ intersperse " " xs -------------------------------------------------------------------------------- /tests/examples/Default36.hs.expected: -------------------------------------------------------------------------------- 1 | yes = unwords xs 2 | -------------------------------------------------------------------------------- /tests/examples/Default37.hs: -------------------------------------------------------------------------------- 1 | yes = concat $ Data.List.intersperse " " xs -------------------------------------------------------------------------------- /tests/examples/Default37.hs.expected: -------------------------------------------------------------------------------- 1 | yes = unwords xs 2 | -------------------------------------------------------------------------------- /tests/examples/Default38.hs: -------------------------------------------------------------------------------- 1 | yes = if a then True else False -------------------------------------------------------------------------------- /tests/examples/Default38.hs.expected: -------------------------------------------------------------------------------- 1 | yes = a 2 | -------------------------------------------------------------------------------- /tests/examples/Default39.hs: -------------------------------------------------------------------------------- 1 | yes = if x then true else False -------------------------------------------------------------------------------- /tests/examples/Default39.hs.expected: -------------------------------------------------------------------------------- 1 | yes = x && true 2 | -------------------------------------------------------------------------------- /tests/examples/Default4.hs: -------------------------------------------------------------------------------- 1 | yes = f x where f x = concat . map head -------------------------------------------------------------------------------- /tests/examples/Default4.hs.expected: -------------------------------------------------------------------------------- 1 | yes = f x where f x = concatMap head 2 | -------------------------------------------------------------------------------- /tests/examples/Default40.hs: -------------------------------------------------------------------------------- 1 | yes = elem x y -------------------------------------------------------------------------------- /tests/examples/Default40.hs.expected: -------------------------------------------------------------------------------- 1 | yes = x `elem` y 2 | -------------------------------------------------------------------------------- /tests/examples/Default41.hs: -------------------------------------------------------------------------------- 1 | yes = foo (elem x y) -------------------------------------------------------------------------------- /tests/examples/Default41.hs.expected: -------------------------------------------------------------------------------- 1 | yes = foo (x `elem` y) 2 | -------------------------------------------------------------------------------- /tests/examples/Default42.hs: -------------------------------------------------------------------------------- 1 | no = x `elem` y -------------------------------------------------------------------------------- /tests/examples/Default42.hs.expected: -------------------------------------------------------------------------------- 1 | no = x `elem` y -------------------------------------------------------------------------------- /tests/examples/Default42.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default43.hs: -------------------------------------------------------------------------------- 1 | no = elem 1 [] : [] -------------------------------------------------------------------------------- /tests/examples/Default43.hs.expected: -------------------------------------------------------------------------------- 1 | no = [elem 1 []] 2 | -------------------------------------------------------------------------------- /tests/examples/Default44.hs: -------------------------------------------------------------------------------- 1 | test a = foo (\x -> True) -------------------------------------------------------------------------------- /tests/examples/Default44.hs.expected: -------------------------------------------------------------------------------- 1 | test a = foo (const True) 2 | -------------------------------------------------------------------------------- /tests/examples/Default45.hs: -------------------------------------------------------------------------------- 1 | h a = flip f x (y z) -------------------------------------------------------------------------------- /tests/examples/Default45.hs.expected: -------------------------------------------------------------------------------- 1 | h a = f (y z) x 2 | -------------------------------------------------------------------------------- /tests/examples/Default46.hs: -------------------------------------------------------------------------------- 1 | h a = flip f x $ y z -------------------------------------------------------------------------------- /tests/examples/Default46.hs.expected: -------------------------------------------------------------------------------- 1 | h a = flip f x $ y z -------------------------------------------------------------------------------- /tests/examples/Default46.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default47.hs: -------------------------------------------------------------------------------- 1 | yes x = case x of {True -> a ; False -> b} -------------------------------------------------------------------------------- /tests/examples/Default47.hs.expected: -------------------------------------------------------------------------------- 1 | yes x = if x then a else b 2 | -------------------------------------------------------------------------------- /tests/examples/Default48.hs: -------------------------------------------------------------------------------- 1 | yes x = case x of {False -> a ; _ -> b} -------------------------------------------------------------------------------- /tests/examples/Default48.hs.expected: -------------------------------------------------------------------------------- 1 | yes x = if x then b else a 2 | -------------------------------------------------------------------------------- /tests/examples/Default49.hs: -------------------------------------------------------------------------------- 1 | no = const . ok . toResponse $ "saved" -------------------------------------------------------------------------------- /tests/examples/Default49.hs.expected: -------------------------------------------------------------------------------- 1 | no = const . ok . toResponse $ "saved" -------------------------------------------------------------------------------- /tests/examples/Default49.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default5.hs: -------------------------------------------------------------------------------- 1 | yes = concat . map f . g -------------------------------------------------------------------------------- /tests/examples/Default5.hs.expected: -------------------------------------------------------------------------------- 1 | yes = concatMap f . g 2 | -------------------------------------------------------------------------------- /tests/examples/Default50.hs: -------------------------------------------------------------------------------- 1 | yes = case x z of Nothing -> y z; Just pat -> pat 2 | -------------------------------------------------------------------------------- /tests/examples/Default50.hs.expected: -------------------------------------------------------------------------------- 1 | yes = case x z of Nothing -> y z; Just pat -> pat 2 | -------------------------------------------------------------------------------- /tests/examples/Default50.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default51.hs: -------------------------------------------------------------------------------- 1 | yes = if p then s else return () -------------------------------------------------------------------------------- /tests/examples/Default51.hs.expected: -------------------------------------------------------------------------------- 1 | yes = Control.Monad.when p s 2 | -------------------------------------------------------------------------------- /tests/examples/Default52.hs: -------------------------------------------------------------------------------- 1 | error = a $$$$ b $$$$ c ==> a . b $$$$$ c -------------------------------------------------------------------------------- /tests/examples/Default52.hs.expected: -------------------------------------------------------------------------------- 1 | error = a $$$$ b $$$$ c ==> a . b $$$$$ c -------------------------------------------------------------------------------- /tests/examples/Default52.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default53.hs: -------------------------------------------------------------------------------- 1 | yes = when (not . null $ asdf) 2 | -------------------------------------------------------------------------------- /tests/examples/Default53.hs.expected: -------------------------------------------------------------------------------- 1 | yes = unless (null asdf) 2 | -------------------------------------------------------------------------------- /tests/examples/Default54.hs: -------------------------------------------------------------------------------- 1 | yes = id 1 -------------------------------------------------------------------------------- /tests/examples/Default54.hs.expected: -------------------------------------------------------------------------------- 1 | yes = 1 2 | -------------------------------------------------------------------------------- /tests/examples/Default55.hs: -------------------------------------------------------------------------------- 1 | yes = case concat (map f x) of [] -> [] -------------------------------------------------------------------------------- /tests/examples/Default55.hs.expected: -------------------------------------------------------------------------------- 1 | yes = case concatMap f x of [] -> [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default56.hs: -------------------------------------------------------------------------------- 1 | yes = [v | v <- xs] -------------------------------------------------------------------------------- /tests/examples/Default56.hs.expected: -------------------------------------------------------------------------------- 1 | yes = xs 2 | -------------------------------------------------------------------------------- /tests/examples/Default57.hs: -------------------------------------------------------------------------------- 1 | no = [Left x | Left x <- xs] -------------------------------------------------------------------------------- /tests/examples/Default57.hs.expected: -------------------------------------------------------------------------------- 1 | no = [Left x | Left x <- xs] -------------------------------------------------------------------------------- /tests/examples/Default57.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default58.hs: -------------------------------------------------------------------------------- 1 | when p s = if p then s else return () -------------------------------------------------------------------------------- /tests/examples/Default58.hs.expected: -------------------------------------------------------------------------------- 1 | when p s = if p then s else return () -------------------------------------------------------------------------------- /tests/examples/Default58.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default59.hs: -------------------------------------------------------------------------------- 1 | no = x ^^ 18.5 -------------------------------------------------------------------------------- /tests/examples/Default59.hs.expected: -------------------------------------------------------------------------------- 1 | no = x ^^ 18.5 -------------------------------------------------------------------------------- /tests/examples/Default59.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default6.hs: -------------------------------------------------------------------------------- 1 | yes = concat $ map f x -------------------------------------------------------------------------------- /tests/examples/Default6.hs.expected: -------------------------------------------------------------------------------- 1 | yes = concatMap f x 2 | -------------------------------------------------------------------------------- /tests/examples/Default60.hs: -------------------------------------------------------------------------------- 1 | instance Arrow (->) where first f = f *** id -------------------------------------------------------------------------------- /tests/examples/Default60.hs.expected: -------------------------------------------------------------------------------- 1 | instance Arrow (->) where first f = f *** id -------------------------------------------------------------------------------- /tests/examples/Default60.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default61.hs: -------------------------------------------------------------------------------- 1 | yes = fromInteger 12 -------------------------------------------------------------------------------- /tests/examples/Default61.hs.expected: -------------------------------------------------------------------------------- 1 | yes = 12 2 | -------------------------------------------------------------------------------- /tests/examples/Default62.hs: -------------------------------------------------------------------------------- 1 | import Prelude hiding (catch); no = catch -------------------------------------------------------------------------------- /tests/examples/Default62.hs.expected: -------------------------------------------------------------------------------- 1 | import Prelude hiding (catch); no = catch -------------------------------------------------------------------------------- /tests/examples/Default62.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default63.hs: -------------------------------------------------------------------------------- 1 | import Control.Exception as E; no = E.catch -------------------------------------------------------------------------------- /tests/examples/Default63.hs.expected: -------------------------------------------------------------------------------- 1 | import Control.Exception as E; no = E.catch -------------------------------------------------------------------------------- /tests/examples/Default63.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default64.hs: -------------------------------------------------------------------------------- 1 | main = do f; putStrLn $ show x -------------------------------------------------------------------------------- /tests/examples/Default64.hs.expected: -------------------------------------------------------------------------------- 1 | main = do f; print x 2 | -------------------------------------------------------------------------------- /tests/examples/Default65.hs: -------------------------------------------------------------------------------- 1 | main = map (writer,) $ map arcObj $ filter (rdfPredEq (Res dctreferences)) ts -------------------------------------------------------------------------------- /tests/examples/Default65.hs.expected: -------------------------------------------------------------------------------- 1 | main = map ((writer,) . arcObj) (filter (rdfPredEq (Res dctreferences)) ts) 2 | -------------------------------------------------------------------------------- /tests/examples/Default66.hs: -------------------------------------------------------------------------------- 1 | h x y = return $! (x, y) -------------------------------------------------------------------------------- /tests/examples/Default66.hs.expected: -------------------------------------------------------------------------------- 1 | h x y = return (x, y) 2 | -------------------------------------------------------------------------------- /tests/examples/Default67.hs: -------------------------------------------------------------------------------- 1 | h x y = return $! x -------------------------------------------------------------------------------- /tests/examples/Default67.hs.expected: -------------------------------------------------------------------------------- 1 | h x y = return $! x -------------------------------------------------------------------------------- /tests/examples/Default67.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default68.hs: -------------------------------------------------------------------------------- 1 | getInt = do { x <- readIO "0"; return $! (x :: Int) } -------------------------------------------------------------------------------- /tests/examples/Default68.hs.expected: -------------------------------------------------------------------------------- 1 | getInt = do { x <- readIO "0"; return $! (x :: Int) } -------------------------------------------------------------------------------- /tests/examples/Default68.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default69.hs: -------------------------------------------------------------------------------- 1 | foo = evaluate [12] -------------------------------------------------------------------------------- /tests/examples/Default69.hs.expected: -------------------------------------------------------------------------------- 1 | foo = return [12] 2 | -------------------------------------------------------------------------------- /tests/examples/Default7.hs: -------------------------------------------------------------------------------- 1 | yes = "test" ++ concatMap (' ':) ["of","this"] 2 | -------------------------------------------------------------------------------- /tests/examples/Default7.hs.expected: -------------------------------------------------------------------------------- 1 | yes = unwords ("test" : ["of","this"]) 2 | -------------------------------------------------------------------------------- /tests/examples/Default70.hs: -------------------------------------------------------------------------------- 1 | test = qux (\ a -> f a >>= \ b -> return (a, b)) 2 | -------------------------------------------------------------------------------- /tests/examples/Default70.hs.expected: -------------------------------------------------------------------------------- 1 | test = qux (\ a -> f a >>= \ b -> return (a, b)) 2 | -------------------------------------------------------------------------------- /tests/examples/Default70.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default71.hs: -------------------------------------------------------------------------------- 1 | fooer input = catMaybes . map Just $ input -------------------------------------------------------------------------------- /tests/examples/Default71.hs.expected: -------------------------------------------------------------------------------- 1 | fooer = catMaybes . map Just 2 | -------------------------------------------------------------------------------- /tests/examples/Default72.hs: -------------------------------------------------------------------------------- 1 | yes = mapMaybe id -------------------------------------------------------------------------------- /tests/examples/Default72.hs.expected: -------------------------------------------------------------------------------- 1 | yes = catMaybes 2 | -------------------------------------------------------------------------------- /tests/examples/Default73.hs: -------------------------------------------------------------------------------- 1 | main = print $ map (\_->5) [2,3,5] -------------------------------------------------------------------------------- /tests/examples/Default73.hs.expected: -------------------------------------------------------------------------------- 1 | main = print $ map (const 5) [2,3,5] 2 | -------------------------------------------------------------------------------- /tests/examples/Default74.hs: -------------------------------------------------------------------------------- 1 | main = head $ drop n x -------------------------------------------------------------------------------- /tests/examples/Default74.hs.expected: -------------------------------------------------------------------------------- 1 | main = x !! max 0 n 2 | -------------------------------------------------------------------------------- /tests/examples/Default75.hs: -------------------------------------------------------------------------------- 1 | main = head $ drop (-3) x -------------------------------------------------------------------------------- /tests/examples/Default75.hs.expected: -------------------------------------------------------------------------------- 1 | main = head $ x 2 | -------------------------------------------------------------------------------- /tests/examples/Default76.hs: -------------------------------------------------------------------------------- 1 | main = head $ drop 2 x -------------------------------------------------------------------------------- /tests/examples/Default76.hs.expected: -------------------------------------------------------------------------------- 1 | main = x !! 2 2 | -------------------------------------------------------------------------------- /tests/examples/Default77.hs: -------------------------------------------------------------------------------- 1 | main = drop 0 x -------------------------------------------------------------------------------- /tests/examples/Default77.hs.expected: -------------------------------------------------------------------------------- 1 | main = x 2 | -------------------------------------------------------------------------------- /tests/examples/Default78.hs: -------------------------------------------------------------------------------- 1 | main = take 0 x -------------------------------------------------------------------------------- /tests/examples/Default78.hs.expected: -------------------------------------------------------------------------------- 1 | main = [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default79.hs: -------------------------------------------------------------------------------- 1 | main = take (-5) x -------------------------------------------------------------------------------- /tests/examples/Default79.hs.expected: -------------------------------------------------------------------------------- 1 | main = [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default8.hs: -------------------------------------------------------------------------------- 1 | yes = if f a then True else b -------------------------------------------------------------------------------- /tests/examples/Default8.hs.expected: -------------------------------------------------------------------------------- 1 | yes = f a || b 2 | -------------------------------------------------------------------------------- /tests/examples/Default80.hs: -------------------------------------------------------------------------------- 1 | main = take (-y) x -------------------------------------------------------------------------------- /tests/examples/Default80.hs.expected: -------------------------------------------------------------------------------- 1 | main = take (-y) x -------------------------------------------------------------------------------- /tests/examples/Default80.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default81.hs: -------------------------------------------------------------------------------- 1 | main = take 4 x -------------------------------------------------------------------------------- /tests/examples/Default81.hs.expected: -------------------------------------------------------------------------------- 1 | main = take 4 x -------------------------------------------------------------------------------- /tests/examples/Default81.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default82.hs: -------------------------------------------------------------------------------- 1 | main = let (first, rest) = (takeWhile p l, dropWhile p l) in rest -------------------------------------------------------------------------------- /tests/examples/Default82.hs.expected: -------------------------------------------------------------------------------- 1 | main = let (first, rest) = span p l in rest 2 | -------------------------------------------------------------------------------- /tests/examples/Default83.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | main = map $ \ d -> ([| $d |], [| $d |]) 3 | -------------------------------------------------------------------------------- /tests/examples/Default83.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | main = map $ \ d -> ([| $d |], [| $d |]) 3 | -------------------------------------------------------------------------------- /tests/examples/Default83.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default84.hs: -------------------------------------------------------------------------------- 1 | pairs (x:xs) = map (\y -> (x,y)) xs ++ pairs xs -------------------------------------------------------------------------------- /tests/examples/Default84.hs.expected: -------------------------------------------------------------------------------- 1 | pairs (x:xs) = map (\y -> (x,y)) xs ++ pairs xs 2 | -------------------------------------------------------------------------------- /tests/examples/Default85.hs: -------------------------------------------------------------------------------- 1 | {-# ANN foo "HLint: ignore" #-};foo = map f (map g x) -------------------------------------------------------------------------------- /tests/examples/Default85.hs.expected: -------------------------------------------------------------------------------- 1 | {-# ANN foo "HLint: ignore" #-};foo = map f (map g x) -------------------------------------------------------------------------------- /tests/examples/Default85.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default86.hs: -------------------------------------------------------------------------------- 1 | yes = fmap lines $ abc 123 -------------------------------------------------------------------------------- /tests/examples/Default86.hs.expected: -------------------------------------------------------------------------------- 1 | yes = lines <$> abc 123 2 | -------------------------------------------------------------------------------- /tests/examples/Default87.hs: -------------------------------------------------------------------------------- 1 | no = fmap lines $ abc $ def 123 -------------------------------------------------------------------------------- /tests/examples/Default87.hs.expected: -------------------------------------------------------------------------------- 1 | no = fmap lines $ abc $ def 123 -------------------------------------------------------------------------------- /tests/examples/Default87.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default88.hs: -------------------------------------------------------------------------------- 1 | test = foo . not . not -------------------------------------------------------------------------------- /tests/examples/Default88.hs.expected: -------------------------------------------------------------------------------- 1 | test = foo . id 2 | -------------------------------------------------------------------------------- /tests/examples/Default89.hs: -------------------------------------------------------------------------------- 1 | test = map (not . not) xs -------------------------------------------------------------------------------- /tests/examples/Default89.hs.expected: -------------------------------------------------------------------------------- 1 | test = map (id) xs 2 | -------------------------------------------------------------------------------- /tests/examples/Default9.hs: -------------------------------------------------------------------------------- 1 | yes = not (a == b) -------------------------------------------------------------------------------- /tests/examples/Default9.hs.expected: -------------------------------------------------------------------------------- 1 | yes = a /= b 2 | -------------------------------------------------------------------------------- /tests/examples/Default90.hs: -------------------------------------------------------------------------------- 1 | used = not . not . any (`notElem` special) . fst . derives -------------------------------------------------------------------------------- /tests/examples/Default90.hs.expected: -------------------------------------------------------------------------------- 1 | used = any (`notElem` special) . fst . derives 2 | -------------------------------------------------------------------------------- /tests/examples/Default91.hs: -------------------------------------------------------------------------------- 1 | test = foo . id . map -------------------------------------------------------------------------------- /tests/examples/Default91.hs.expected: -------------------------------------------------------------------------------- 1 | test = foo . map 2 | -------------------------------------------------------------------------------- /tests/examples/Default92.hs: -------------------------------------------------------------------------------- 1 | test = food id xs -------------------------------------------------------------------------------- /tests/examples/Default92.hs.expected: -------------------------------------------------------------------------------- 1 | test = food id xs -------------------------------------------------------------------------------- /tests/examples/Default92.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default93.hs: -------------------------------------------------------------------------------- 1 | yes = baz baz >> return () -------------------------------------------------------------------------------- /tests/examples/Default93.hs.expected: -------------------------------------------------------------------------------- 1 | yes = Control.Monad.void (baz baz) 2 | -------------------------------------------------------------------------------- /tests/examples/Default94.hs: -------------------------------------------------------------------------------- 1 | no = foo >>= bar >>= something >>= elsee >> return () -------------------------------------------------------------------------------- /tests/examples/Default94.hs.expected: -------------------------------------------------------------------------------- 1 | no = foo >>= bar >>= something >>= elsee >> return () -------------------------------------------------------------------------------- /tests/examples/Default94.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default95.hs: -------------------------------------------------------------------------------- 1 | no = f (#) x -------------------------------------------------------------------------------- /tests/examples/Default95.hs.expected: -------------------------------------------------------------------------------- 1 | no = f (#) x -------------------------------------------------------------------------------- /tests/examples/Default95.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Default96.hs: -------------------------------------------------------------------------------- 1 | data Pair = P {a :: !Int}; foo = return $! P{a=undefined} -------------------------------------------------------------------------------- /tests/examples/Default96.hs.expected: -------------------------------------------------------------------------------- 1 | data Pair = P {a :: !Int}; foo = return $! P{a=undefined} 2 | -------------------------------------------------------------------------------- /tests/examples/Default97.hs: -------------------------------------------------------------------------------- 1 | data Pair = P {a :: !Int}; foo = return $! P undefined -------------------------------------------------------------------------------- /tests/examples/Default97.hs.expected: -------------------------------------------------------------------------------- 1 | data Pair = P {a :: !Int}; foo = return $! P undefined 2 | -------------------------------------------------------------------------------- /tests/examples/Default98.hs: -------------------------------------------------------------------------------- 1 | foo = return $! Just undefined -------------------------------------------------------------------------------- /tests/examples/Default98.hs.expected: -------------------------------------------------------------------------------- 1 | foo = return (Just undefined) 2 | -------------------------------------------------------------------------------- /tests/examples/Default99.hs: -------------------------------------------------------------------------------- 1 | foo = return $! (a,b) -------------------------------------------------------------------------------- /tests/examples/Default99.hs.expected: -------------------------------------------------------------------------------- 1 | foo = return (a,b) 2 | -------------------------------------------------------------------------------- /tests/examples/Dollar0.hs: -------------------------------------------------------------------------------- 1 | yes = concat $ concat $ map f x 2 | -------------------------------------------------------------------------------- /tests/examples/Dollar0.hs.expected: -------------------------------------------------------------------------------- 1 | yes = concat $ concatMap f x 2 | -------------------------------------------------------------------------------- /tests/examples/Duplicate0.hs: -------------------------------------------------------------------------------- 1 | main = do a; a; a; a -------------------------------------------------------------------------------- /tests/examples/Duplicate0.hs.expected: -------------------------------------------------------------------------------- 1 | main = do a; a; a; a -------------------------------------------------------------------------------- /tests/examples/Duplicate0.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Duplicate1.hs: -------------------------------------------------------------------------------- 1 | main = do a; a; a; a; a; a -------------------------------------------------------------------------------- /tests/examples/Duplicate1.hs.expected: -------------------------------------------------------------------------------- 1 | main = do a; a; a; a; a; a 2 | -------------------------------------------------------------------------------- /tests/examples/Duplicate2.hs: -------------------------------------------------------------------------------- 1 | main = do a; a; a; a; a; a; a -------------------------------------------------------------------------------- /tests/examples/Duplicate2.hs.expected: -------------------------------------------------------------------------------- 1 | main = do a; a; a; a; a; a; a 2 | -------------------------------------------------------------------------------- /tests/examples/Duplicate3.hs: -------------------------------------------------------------------------------- 1 | main = do (do b; a; a; a); do (do c; a; a; a) 2 | -------------------------------------------------------------------------------- /tests/examples/Duplicate3.hs.expected: -------------------------------------------------------------------------------- 1 | main = do (do b; a; a; a); do (do c; a; a; a) 2 | -------------------------------------------------------------------------------- /tests/examples/Duplicate4.hs: -------------------------------------------------------------------------------- 1 | main = do a; a; a; b; a; a; a -------------------------------------------------------------------------------- /tests/examples/Duplicate4.hs.expected: -------------------------------------------------------------------------------- 1 | main = do a; a; a; b; a; a; a 2 | -------------------------------------------------------------------------------- /tests/examples/Duplicate5.hs: -------------------------------------------------------------------------------- 1 | main = do a; a; a; b; a; a -------------------------------------------------------------------------------- /tests/examples/Duplicate5.hs.expected: -------------------------------------------------------------------------------- 1 | main = do a; a; a; b; a; a -------------------------------------------------------------------------------- /tests/examples/Duplicate5.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Duplicate6.hs: -------------------------------------------------------------------------------- 1 | foo = a where {a = 1; b = 2; c = 3}; bar = a where {a = 1; b = 2; c = 3} -------------------------------------------------------------------------------- /tests/examples/Duplicate6.hs.expected: -------------------------------------------------------------------------------- 1 | foo = a where {a = 1; b = 2; c = 3}; bar = a where {a = 1; b = 2; c = 3} 2 | -------------------------------------------------------------------------------- /tests/examples/EtaReduceLocalTypeSig.hs: -------------------------------------------------------------------------------- 1 | f :: String -> String 2 | f x = show x 3 | where y :: String 4 | y = "foo" 5 | -------------------------------------------------------------------------------- /tests/examples/EtaReduceLocalTypeSig.hs.expected: -------------------------------------------------------------------------------- 1 | f :: String -> String 2 | f = show 3 | where y :: String 4 | y = "foo" 5 | -------------------------------------------------------------------------------- /tests/examples/Extensions0.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Arrows #-} 2 | f = id -------------------------------------------------------------------------------- /tests/examples/Extensions0.hs.expected: -------------------------------------------------------------------------------- 1 | 2 | f = id 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions10.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ImplicitParams, BangPatterns #-} 2 | sort :: (?cmp :: a -> a -> Bool) => [a] -> [a] 3 | sort !f = undefined -------------------------------------------------------------------------------- /tests/examples/Extensions10.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Extensions11.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE KindSignatures #-} 2 | data Set (cxt :: * -> *) a = Set [a] -------------------------------------------------------------------------------- /tests/examples/Extensions11.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE KindSignatures #-} 2 | data Set (cxt :: * -> *) a = Set [a] 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions12.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RecordWildCards #-} 2 | record field = Record{..} -------------------------------------------------------------------------------- /tests/examples/Extensions12.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RecordWildCards #-} 2 | record field = Record{..} -------------------------------------------------------------------------------- /tests/examples/Extensions12.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Extensions13.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RecordWildCards #-} 2 | record = 1 -------------------------------------------------------------------------------- /tests/examples/Extensions13.hs.expected: -------------------------------------------------------------------------------- 1 | 2 | record = 1 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions14.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnboxedTuples #-} 2 | record = 1 -------------------------------------------------------------------------------- /tests/examples/Extensions14.hs.expected: -------------------------------------------------------------------------------- 1 | 2 | record = 1 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions15.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | foo -------------------------------------------------------------------------------- /tests/examples/Extensions15.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | foo -------------------------------------------------------------------------------- /tests/examples/Extensions15.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Extensions16.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-} 2 | record = 1 -------------------------------------------------------------------------------- /tests/examples/Extensions16.hs.expected: -------------------------------------------------------------------------------- 1 | 2 | record = 1 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions17.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-} 2 | newtype Foo = Foo Int deriving Data -------------------------------------------------------------------------------- /tests/examples/Extensions17.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveDataTypeable #-} 2 | newtype Foo = Foo Int deriving Data 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions18.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-} 2 | data Foo = Foo Int deriving Data -------------------------------------------------------------------------------- /tests/examples/Extensions18.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveDataTypeable #-} 2 | data Foo = Foo Int deriving Data 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions19.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-} 2 | newtype Foo = Foo Int deriving Class -------------------------------------------------------------------------------- /tests/examples/Extensions19.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GeneralizedNewtypeDeriving #-} 2 | newtype Foo = Foo Int deriving Class 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions2.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs, ParallelListComp, ImplicitParams #-} 2 | f = [(a,c) | a <- b | c <- d] 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions2.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs, ParallelListComp #-} 2 | f = [(a,c) | a <- b | c <- d] 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions20.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-} 2 | data Foo = Foo Int deriving Class -------------------------------------------------------------------------------- /tests/examples/Extensions20.hs.expected: -------------------------------------------------------------------------------- 1 | 2 | data Foo = Foo Int deriving Class 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions21.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveFunctor #-} 2 | data Foo = Foo Int deriving Functor -------------------------------------------------------------------------------- /tests/examples/Extensions21.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveFunctor #-} 2 | data Foo = Foo Int deriving Functor 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions22.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveFunctor #-} 2 | newtype Foo = Foo Int deriving Functor -------------------------------------------------------------------------------- /tests/examples/Extensions22.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveFunctor #-} 2 | newtype Foo = Foo Int deriving Functor -------------------------------------------------------------------------------- /tests/examples/Extensions22.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Extensions23.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GeneralizedNewtypeDeriving #-} 2 | newtype Foo = Foo Int deriving Functor -------------------------------------------------------------------------------- /tests/examples/Extensions23.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GeneralizedNewtypeDeriving #-} 2 | newtype Foo = Foo Int deriving Functor -------------------------------------------------------------------------------- /tests/examples/Extensions23.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Extensions24.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GeneralizedNewtypeDeriving #-} 2 | newtype Foo = Foo Int deriving Data -------------------------------------------------------------------------------- /tests/examples/Extensions24.hs.expected: -------------------------------------------------------------------------------- 1 | 2 | newtype Foo = Foo Int deriving Data 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions25.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveFunctor, GeneralizedNewtypeDeriving, StandaloneDeriving #-} 2 | deriving instance Functor Bar -------------------------------------------------------------------------------- /tests/examples/Extensions25.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveFunctor, GeneralizedNewtypeDeriving, StandaloneDeriving #-} 2 | deriving instance Functor Bar -------------------------------------------------------------------------------- /tests/examples/Extensions25.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Extensions26.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveFunctor, GeneralizedNewtypeDeriving, StandaloneDeriving #-} 2 | deriving instance Show Bar -------------------------------------------------------------------------------- /tests/examples/Extensions26.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE StandaloneDeriving #-} 2 | deriving instance Show Bar 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions27.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveGeneric, GeneralizedNewtypeDeriving #-} 2 | newtype Micro = Micro Int deriving Generic -------------------------------------------------------------------------------- /tests/examples/Extensions27.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveGeneric #-} 2 | newtype Micro = Micro Int deriving Generic 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions28.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnboxedTuples #-} 2 | f :: Int -> (# Int, Int #) -------------------------------------------------------------------------------- /tests/examples/Extensions28.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnboxedTuples #-} 2 | f :: Int -> (# Int, Int #) -------------------------------------------------------------------------------- /tests/examples/Extensions28.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Extensions29.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnboxedTuples #-} 2 | f :: x -> (x, x); f x = (x, x) -------------------------------------------------------------------------------- /tests/examples/Extensions29.hs.expected: -------------------------------------------------------------------------------- 1 | 2 | f :: x -> (x, x); f x = (x, x) 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions3.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE EmptyDataDecls #-} 2 | data Foo -------------------------------------------------------------------------------- /tests/examples/Extensions3.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE EmptyDataDecls #-} 2 | data Foo -------------------------------------------------------------------------------- /tests/examples/Extensions3.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Extensions4.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | $(deriveNewtypes typeInfo) -------------------------------------------------------------------------------- /tests/examples/Extensions4.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | $(deriveNewtypes typeInfo) -------------------------------------------------------------------------------- /tests/examples/Extensions4.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Extensions5.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | main = foo ''Bar -------------------------------------------------------------------------------- /tests/examples/Extensions5.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | main = foo ''Bar -------------------------------------------------------------------------------- /tests/examples/Extensions5.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Extensions6.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternGuards #-} 2 | test = case x of _ | y <- z -> w -------------------------------------------------------------------------------- /tests/examples/Extensions6.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternGuards #-} 2 | test = case x of _ | y <- z -> w -------------------------------------------------------------------------------- /tests/examples/Extensions6.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Extensions7.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell,EmptyDataDecls #-} 2 | $(fmap return $ dataD (return []) (mkName "Void") [] [] []) -------------------------------------------------------------------------------- /tests/examples/Extensions7.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell,EmptyDataDecls #-} 2 | $(return <$> dataD (return []) (mkName "Void") [] [] []) 3 | -------------------------------------------------------------------------------- /tests/examples/Extensions8.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RecursiveDo #-} 2 | main = mdo x <- y; return y -------------------------------------------------------------------------------- /tests/examples/Extensions8.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RecursiveDo #-} 2 | main = mdo x <- y; return y -------------------------------------------------------------------------------- /tests/examples/Extensions8.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Extensions9.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RecursiveDo #-} 2 | main = do {rec {x <- return 1}; print x} -------------------------------------------------------------------------------- /tests/examples/Extensions9.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RecursiveDo #-} 2 | main = do {rec {x <- return 1}; print x} -------------------------------------------------------------------------------- /tests/examples/Extensions9.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Fixity.hs: -------------------------------------------------------------------------------- 1 | simple = h <$> (f $ g $ h t) 2 | 3 | simple = h <$> (f :+ g :+ h t) 4 | 5 | simple = h <$> (f `elem` h `elem` h) 6 | -------------------------------------------------------------------------------- /tests/examples/Import0.hs: -------------------------------------------------------------------------------- 1 | import A; import A -------------------------------------------------------------------------------- /tests/examples/Import0.hs.expected: -------------------------------------------------------------------------------- 1 | import A; 2 | -------------------------------------------------------------------------------- /tests/examples/Import1.hs: -------------------------------------------------------------------------------- 1 | import A; import A; import A -------------------------------------------------------------------------------- /tests/examples/Import1.hs.expected: -------------------------------------------------------------------------------- 1 | import A; 2 | -------------------------------------------------------------------------------- /tests/examples/Import10.hs: -------------------------------------------------------------------------------- 1 | import A as A -------------------------------------------------------------------------------- /tests/examples/Import10.hs.expected: -------------------------------------------------------------------------------- 1 | import A 2 | -------------------------------------------------------------------------------- /tests/examples/Import11.hs: -------------------------------------------------------------------------------- 1 | import qualified A as A -------------------------------------------------------------------------------- /tests/examples/Import11.hs.expected: -------------------------------------------------------------------------------- 1 | import qualified A 2 | -------------------------------------------------------------------------------- /tests/examples/Import12.hs: -------------------------------------------------------------------------------- 1 | import A; import B; import A -------------------------------------------------------------------------------- /tests/examples/Import12.hs.expected: -------------------------------------------------------------------------------- 1 | import A; import B; 2 | -------------------------------------------------------------------------------- /tests/examples/Import13.hs: -------------------------------------------------------------------------------- 1 | import qualified A; import A -------------------------------------------------------------------------------- /tests/examples/Import13.hs.expected: -------------------------------------------------------------------------------- 1 | import qualified A; import A -------------------------------------------------------------------------------- /tests/examples/Import13.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Import14.hs: -------------------------------------------------------------------------------- 1 | import B; import A; import A -------------------------------------------------------------------------------- /tests/examples/Import14.hs.expected: -------------------------------------------------------------------------------- 1 | import B; import A; 2 | -------------------------------------------------------------------------------- /tests/examples/Import15.hs: -------------------------------------------------------------------------------- 1 | import A hiding(Foo); import A hiding(Bar) -------------------------------------------------------------------------------- /tests/examples/Import15.hs.expected: -------------------------------------------------------------------------------- 1 | import A hiding(Foo); import A hiding(Bar) -------------------------------------------------------------------------------- /tests/examples/Import15.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Import16.hs: -------------------------------------------------------------------------------- 1 | import List -------------------------------------------------------------------------------- /tests/examples/Import16.hs.expected: -------------------------------------------------------------------------------- 1 | import List -------------------------------------------------------------------------------- /tests/examples/Import16.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Import17.hs: -------------------------------------------------------------------------------- 1 | import qualified List -------------------------------------------------------------------------------- /tests/examples/Import17.hs.expected: -------------------------------------------------------------------------------- 1 | import qualified List -------------------------------------------------------------------------------- /tests/examples/Import17.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Import18.hs: -------------------------------------------------------------------------------- 1 | import Char(foo) -------------------------------------------------------------------------------- /tests/examples/Import18.hs.expected: -------------------------------------------------------------------------------- 1 | import Char(foo) -------------------------------------------------------------------------------- /tests/examples/Import18.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Import19.hs: -------------------------------------------------------------------------------- 1 | import IO(foo) -------------------------------------------------------------------------------- /tests/examples/Import19.hs.expected: -------------------------------------------------------------------------------- 1 | import IO(foo) -------------------------------------------------------------------------------- /tests/examples/Import19.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Import2.hs: -------------------------------------------------------------------------------- 1 | import A(Foo) ; import A -------------------------------------------------------------------------------- /tests/examples/Import2.hs.expected: -------------------------------------------------------------------------------- 1 | import A 2 | -------------------------------------------------------------------------------- /tests/examples/Import20.hs: -------------------------------------------------------------------------------- 1 | import IO as X -------------------------------------------------------------------------------- /tests/examples/Import20.hs.expected: -------------------------------------------------------------------------------- 1 | import IO as X -------------------------------------------------------------------------------- /tests/examples/Import20.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Import21.hs: -------------------------------------------------------------------------------- 1 | module Foo(module A, baz, module B, module C) where; import A; import D; import B(map,filter); import C 2 | -------------------------------------------------------------------------------- /tests/examples/Import21.hs.expected: -------------------------------------------------------------------------------- 1 | module Foo(module A, baz, module B, module C) where; import A; import D; import B(map,filter); import C 2 | -------------------------------------------------------------------------------- /tests/examples/Import21.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Import22.hs: -------------------------------------------------------------------------------- 1 | module Foo(module A, baz, module B, module X) where; import A; import B; import X 2 | -------------------------------------------------------------------------------- /tests/examples/Import22.hs.expected: -------------------------------------------------------------------------------- 1 | module Foo(module A, baz, module B, module X) where; import A; import B; import X 2 | -------------------------------------------------------------------------------- /tests/examples/Import22.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Import3.hs: -------------------------------------------------------------------------------- 1 | import A(Bar(..)); import {-# SOURCE #-} A -------------------------------------------------------------------------------- /tests/examples/Import3.hs.expected: -------------------------------------------------------------------------------- 1 | import A(Bar(..)); import {-# SOURCE #-} A -------------------------------------------------------------------------------- /tests/examples/Import3.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Import4.hs: -------------------------------------------------------------------------------- 1 | import A; import B -------------------------------------------------------------------------------- /tests/examples/Import4.hs.expected: -------------------------------------------------------------------------------- 1 | import A; import B -------------------------------------------------------------------------------- /tests/examples/Import4.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Import5.hs: -------------------------------------------------------------------------------- 1 | import A(B) ; import A(C) -------------------------------------------------------------------------------- /tests/examples/Import5.hs.expected: -------------------------------------------------------------------------------- 1 | import A ( B, C ) ; 2 | -------------------------------------------------------------------------------- /tests/examples/Import6.hs: -------------------------------------------------------------------------------- 1 | import A; import A hiding (C) -------------------------------------------------------------------------------- /tests/examples/Import6.hs.expected: -------------------------------------------------------------------------------- 1 | import A; 2 | -------------------------------------------------------------------------------- /tests/examples/Import7.hs: -------------------------------------------------------------------------------- 1 | import A; import A as Y -------------------------------------------------------------------------------- /tests/examples/Import7.hs.expected: -------------------------------------------------------------------------------- 1 | import A as Y 2 | -------------------------------------------------------------------------------- /tests/examples/Import8.hs: -------------------------------------------------------------------------------- 1 | import A; import qualified A as Y -------------------------------------------------------------------------------- /tests/examples/Import8.hs.expected: -------------------------------------------------------------------------------- 1 | import A; import qualified A as Y -------------------------------------------------------------------------------- /tests/examples/Import8.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Import9.hs: -------------------------------------------------------------------------------- 1 | import A as B; import A as C -------------------------------------------------------------------------------- /tests/examples/Import9.hs.expected: -------------------------------------------------------------------------------- 1 | import A as B; import A as C -------------------------------------------------------------------------------- /tests/examples/Import9.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda0.hs: -------------------------------------------------------------------------------- 1 | f a = \x -> x + x -------------------------------------------------------------------------------- /tests/examples/Lambda0.hs.expected: -------------------------------------------------------------------------------- 1 | f a x = x + x 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda1.hs: -------------------------------------------------------------------------------- 1 | f a = \a -> a + a -------------------------------------------------------------------------------- /tests/examples/Lambda1.hs.expected: -------------------------------------------------------------------------------- 1 | f _ a = a + a 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda10.hs: -------------------------------------------------------------------------------- 1 | f = foo (flip op x) -------------------------------------------------------------------------------- /tests/examples/Lambda10.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo (flip op x) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda11.hs: -------------------------------------------------------------------------------- 1 | f = flip op x -------------------------------------------------------------------------------- /tests/examples/Lambda11.hs.expected: -------------------------------------------------------------------------------- 1 | f = flip op x -------------------------------------------------------------------------------- /tests/examples/Lambda11.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda12.hs: -------------------------------------------------------------------------------- 1 | f = foo (flip (*) x) -------------------------------------------------------------------------------- /tests/examples/Lambda12.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo (flip (*) x) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda13.hs: -------------------------------------------------------------------------------- 1 | f = foo (flip (-) x) -------------------------------------------------------------------------------- /tests/examples/Lambda13.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo (flip (-) x) -------------------------------------------------------------------------------- /tests/examples/Lambda13.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda14.hs: -------------------------------------------------------------------------------- 1 | f = foo (\x y -> fun x y) -------------------------------------------------------------------------------- /tests/examples/Lambda14.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo (\x y -> fun x y) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda15.hs: -------------------------------------------------------------------------------- 1 | f = foo (\x y -> x + y) -------------------------------------------------------------------------------- /tests/examples/Lambda15.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo ((+)) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda16.hs: -------------------------------------------------------------------------------- 1 | f = foo (\x -> x * y) -------------------------------------------------------------------------------- /tests/examples/Lambda16.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo (* y) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda17.hs: -------------------------------------------------------------------------------- 1 | f = foo (\x -> x # y) -------------------------------------------------------------------------------- /tests/examples/Lambda17.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo (\x -> x # y) -------------------------------------------------------------------------------- /tests/examples/Lambda17.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda18.hs: -------------------------------------------------------------------------------- 1 | f = foo (\x -> \y -> x x y y) -------------------------------------------------------------------------------- /tests/examples/Lambda18.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo (\ x y -> x x y y) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda19.hs: -------------------------------------------------------------------------------- 1 | f = foo (\x -> \x -> foo x x) -------------------------------------------------------------------------------- /tests/examples/Lambda19.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo (\ _ x -> foo x x) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda2.hs: -------------------------------------------------------------------------------- 1 | f a = \x -> x + x where _ = test -------------------------------------------------------------------------------- /tests/examples/Lambda2.hs.expected: -------------------------------------------------------------------------------- 1 | f a = \x -> x + x where _ = test -------------------------------------------------------------------------------- /tests/examples/Lambda2.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda20.hs: -------------------------------------------------------------------------------- 1 | f = foo (\(x:xs) -> \x -> foo x x) -------------------------------------------------------------------------------- /tests/examples/Lambda20.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo (\ (_ : xs) x -> foo x x) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda21.hs: -------------------------------------------------------------------------------- 1 | f = foo (\x -> \y -> \z -> x x y y z z) -------------------------------------------------------------------------------- /tests/examples/Lambda21.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo (\ x y z -> x x y y z z) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda22.hs: -------------------------------------------------------------------------------- 1 | x ! y = fromJust $ lookup x y -------------------------------------------------------------------------------- /tests/examples/Lambda22.hs.expected: -------------------------------------------------------------------------------- 1 | x ! y = fromJust $ lookup x y -------------------------------------------------------------------------------- /tests/examples/Lambda22.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda23.hs: -------------------------------------------------------------------------------- 1 | f = foo (\i -> writeIdea (getClass i) i) -------------------------------------------------------------------------------- /tests/examples/Lambda23.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo (\i -> writeIdea (getClass i) i) -------------------------------------------------------------------------------- /tests/examples/Lambda23.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda24.hs: -------------------------------------------------------------------------------- 1 | f = bar (flip Foo.bar x) -------------------------------------------------------------------------------- /tests/examples/Lambda24.hs.expected: -------------------------------------------------------------------------------- 1 | f = bar (flip Foo.bar x) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda25.hs: -------------------------------------------------------------------------------- 1 | f = a b (\x -> c x d) -------------------------------------------------------------------------------- /tests/examples/Lambda25.hs.expected: -------------------------------------------------------------------------------- 1 | f = a b (`c` d) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda26.hs: -------------------------------------------------------------------------------- 1 | yes = \x -> a x where -------------------------------------------------------------------------------- /tests/examples/Lambda26.hs.expected: -------------------------------------------------------------------------------- 1 | yes = \x -> a x where 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda27.hs: -------------------------------------------------------------------------------- 1 | yes = \x y -> op y x where -------------------------------------------------------------------------------- /tests/examples/Lambda27.hs.expected: -------------------------------------------------------------------------------- 1 | yes = flip op where 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda28.hs: -------------------------------------------------------------------------------- 1 | f = \y -> nub $ reverse y where -------------------------------------------------------------------------------- /tests/examples/Lambda28.hs.expected: -------------------------------------------------------------------------------- 1 | f = nub . reverse where 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda29.hs: -------------------------------------------------------------------------------- 1 | f = \z -> foo $ bar $ baz z where -------------------------------------------------------------------------------- /tests/examples/Lambda29.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo . bar . baz where 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda3.hs: -------------------------------------------------------------------------------- 1 | f = \x -> x + x -------------------------------------------------------------------------------- /tests/examples/Lambda3.hs.expected: -------------------------------------------------------------------------------- 1 | f x = x + x 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda30.hs: -------------------------------------------------------------------------------- 1 | f = \z -> foo $ bar x $ baz z where -------------------------------------------------------------------------------- /tests/examples/Lambda30.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo . bar x . baz where 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda31.hs: -------------------------------------------------------------------------------- 1 | f = \z -> foo $ z $ baz z where -------------------------------------------------------------------------------- /tests/examples/Lambda31.hs.expected: -------------------------------------------------------------------------------- 1 | f = \z -> foo $ z $ baz z where 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda32.hs: -------------------------------------------------------------------------------- 1 | f = \x -> bar map (filter x) where -------------------------------------------------------------------------------- /tests/examples/Lambda32.hs.expected: -------------------------------------------------------------------------------- 1 | f = bar map . filter where 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda33.hs: -------------------------------------------------------------------------------- 1 | f = bar &+& \x -> f (g x) -------------------------------------------------------------------------------- /tests/examples/Lambda33.hs.expected: -------------------------------------------------------------------------------- 1 | f = bar &+& \x -> f (g x) -------------------------------------------------------------------------------- /tests/examples/Lambda33.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda34.hs: -------------------------------------------------------------------------------- 1 | foo = [\column -> set column [treeViewColumnTitle := printf "%s (match %d)" name (length candidnates)]] -------------------------------------------------------------------------------- /tests/examples/Lambda34.hs.expected: -------------------------------------------------------------------------------- 1 | foo = [\column -> set column [treeViewColumnTitle := printf "%s (match %d)" name (length candidnates)]] -------------------------------------------------------------------------------- /tests/examples/Lambda34.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda35.hs: -------------------------------------------------------------------------------- 1 | foo = [\x -> x] -------------------------------------------------------------------------------- /tests/examples/Lambda35.hs.expected: -------------------------------------------------------------------------------- 1 | foo = [id] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda36.hs: -------------------------------------------------------------------------------- 1 | foo = [\m x -> insert x x m] -------------------------------------------------------------------------------- /tests/examples/Lambda36.hs.expected: -------------------------------------------------------------------------------- 1 | foo = [\m x -> insert x x m] -------------------------------------------------------------------------------- /tests/examples/Lambda36.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda37.hs: -------------------------------------------------------------------------------- 1 | foo d a c b = bar (flux ++ quux) c b where flux = d 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda37.hs.expected: -------------------------------------------------------------------------------- 1 | foo d a = bar (flux ++ quux) where flux = d 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda38.hs: -------------------------------------------------------------------------------- 1 | foo a b c = bar (flux ++ quux) c where flux = c -------------------------------------------------------------------------------- /tests/examples/Lambda38.hs.expected: -------------------------------------------------------------------------------- 1 | foo a b c = bar (flux ++ quux) c where flux = c -------------------------------------------------------------------------------- /tests/examples/Lambda38.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda39.hs: -------------------------------------------------------------------------------- 1 | yes = foo (\x -> Just x) -------------------------------------------------------------------------------- /tests/examples/Lambda39.hs.expected: -------------------------------------------------------------------------------- 1 | yes = foo (\x -> Just x) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda4.hs: -------------------------------------------------------------------------------- 1 | fun x y z = f x y z -------------------------------------------------------------------------------- /tests/examples/Lambda4.hs.expected: -------------------------------------------------------------------------------- 1 | fun = f 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda40.hs: -------------------------------------------------------------------------------- 1 | foo = bar (\x -> (x `f`)) -------------------------------------------------------------------------------- /tests/examples/Lambda40.hs.expected: -------------------------------------------------------------------------------- 1 | foo = bar (\x -> (x `f`)) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda40.hs.refact: -------------------------------------------------------------------------------- 1 | [("tests/examples/Lambda40.hs:1:12-24: Warning: Avoid lambda\nFound:\n \\ x -> (x `f`)\nPerhaps:\n f\n",[])] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda41.hs: -------------------------------------------------------------------------------- 1 | baz = bar (\x -> (x +)) -------------------------------------------------------------------------------- /tests/examples/Lambda41.hs.expected: -------------------------------------------------------------------------------- 1 | baz = bar (\x -> (x +)) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda41.hs.refact: -------------------------------------------------------------------------------- 1 | [("tests/examples/Lambda41.hs:1:12-22: Warning: Avoid lambda\nFound:\n \\ x -> (x +)\nPerhaps:\n (+)\n",[])] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda5.hs: -------------------------------------------------------------------------------- 1 | fun x y z = f x x y z -------------------------------------------------------------------------------- /tests/examples/Lambda5.hs.expected: -------------------------------------------------------------------------------- 1 | fun x = f x x 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda6.hs: -------------------------------------------------------------------------------- 1 | fun x y z = f g z -------------------------------------------------------------------------------- /tests/examples/Lambda6.hs.expected: -------------------------------------------------------------------------------- 1 | fun x y = f g 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda7.hs: -------------------------------------------------------------------------------- 1 | fun mr = y mr -------------------------------------------------------------------------------- /tests/examples/Lambda7.hs.expected: -------------------------------------------------------------------------------- 1 | fun = y 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda8.hs: -------------------------------------------------------------------------------- 1 | f = foo ((*) x) -------------------------------------------------------------------------------- /tests/examples/Lambda8.hs.expected: -------------------------------------------------------------------------------- 1 | f = foo ((*) x) 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda8.hs.refact: -------------------------------------------------------------------------------- 1 | [("tests/examples/Lambda8.hs:1:9-15: Suggestion: Use section\nFound:\n ((*) x)\nPerhaps:\n (x *)\n",[])] 2 | -------------------------------------------------------------------------------- /tests/examples/Lambda9.hs: -------------------------------------------------------------------------------- 1 | f = (*) x -------------------------------------------------------------------------------- /tests/examples/Lambda9.hs.expected: -------------------------------------------------------------------------------- 1 | f = (*) x -------------------------------------------------------------------------------- /tests/examples/Lambda9.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/List0.hs: -------------------------------------------------------------------------------- 1 | yes = 1:2:[] -------------------------------------------------------------------------------- /tests/examples/List0.hs.expected: -------------------------------------------------------------------------------- 1 | yes = [1, 2] 2 | -------------------------------------------------------------------------------- /tests/examples/List1.hs: -------------------------------------------------------------------------------- 1 | yes = ['h','e','l','l','o'] -------------------------------------------------------------------------------- /tests/examples/List1.hs.expected: -------------------------------------------------------------------------------- 1 | yes = ['h','e','l','l','o'] -------------------------------------------------------------------------------- /tests/examples/List1.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/List10.hs: -------------------------------------------------------------------------------- 1 | yes = if x == e then l2 ++ xs else [x] ++ check_elem xs -------------------------------------------------------------------------------- /tests/examples/List10.hs.expected: -------------------------------------------------------------------------------- 1 | yes = if x == e then l2 ++ xs else x : check_elem xs 2 | -------------------------------------------------------------------------------- /tests/examples/List11.hs: -------------------------------------------------------------------------------- 1 | data Yes = Yes (Maybe [Char]) -------------------------------------------------------------------------------- /tests/examples/List11.hs.expected: -------------------------------------------------------------------------------- 1 | data Yes = Yes (Maybe [Char]) 2 | -------------------------------------------------------------------------------- /tests/examples/List12.hs: -------------------------------------------------------------------------------- 1 | yes = y :: [Char] -> a -------------------------------------------------------------------------------- /tests/examples/List12.hs.expected: -------------------------------------------------------------------------------- 1 | yes = y :: [Char] -> a -------------------------------------------------------------------------------- /tests/examples/List12.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/List13.hs: -------------------------------------------------------------------------------- 1 | instance C [Char] -------------------------------------------------------------------------------- /tests/examples/List13.hs.expected: -------------------------------------------------------------------------------- 1 | instance C [Char] -------------------------------------------------------------------------------- /tests/examples/List13.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/List14.hs: -------------------------------------------------------------------------------- 1 | foo = [a b] ++ xs -------------------------------------------------------------------------------- /tests/examples/List14.hs.expected: -------------------------------------------------------------------------------- 1 | foo = a b : xs 2 | -------------------------------------------------------------------------------- /tests/examples/List2.hs: -------------------------------------------------------------------------------- 1 | yes (1:2:[]) = 1 -------------------------------------------------------------------------------- /tests/examples/List2.hs.expected: -------------------------------------------------------------------------------- 1 | yes [1, 2] = 1 2 | -------------------------------------------------------------------------------- /tests/examples/List3.hs: -------------------------------------------------------------------------------- 1 | yes ['h','e'] = 1 -------------------------------------------------------------------------------- /tests/examples/List3.hs.expected: -------------------------------------------------------------------------------- 1 | yes ['h','e'] = 1 -------------------------------------------------------------------------------- /tests/examples/List3.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/List4.hs: -------------------------------------------------------------------------------- 1 | yes = [x] ++ xs -------------------------------------------------------------------------------- /tests/examples/List4.hs.expected: -------------------------------------------------------------------------------- 1 | yes = x : xs 2 | -------------------------------------------------------------------------------- /tests/examples/List5.hs: -------------------------------------------------------------------------------- 1 | no = "x" ++ xs -------------------------------------------------------------------------------- /tests/examples/List5.hs.expected: -------------------------------------------------------------------------------- 1 | no = "x" ++ xs -------------------------------------------------------------------------------- /tests/examples/List5.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/List6.hs: -------------------------------------------------------------------------------- 1 | no = [x] ++ xs ++ ys -------------------------------------------------------------------------------- /tests/examples/List6.hs.expected: -------------------------------------------------------------------------------- 1 | no = [x] ++ xs ++ ys -------------------------------------------------------------------------------- /tests/examples/List6.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/List7.hs: -------------------------------------------------------------------------------- 1 | no = xs ++ [x] ++ ys -------------------------------------------------------------------------------- /tests/examples/List7.hs.expected: -------------------------------------------------------------------------------- 1 | no = xs ++ [x] ++ ys -------------------------------------------------------------------------------- /tests/examples/List7.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/List8.hs: -------------------------------------------------------------------------------- 1 | yes = [if a then b else c] ++ xs -------------------------------------------------------------------------------- /tests/examples/List8.hs.expected: -------------------------------------------------------------------------------- 1 | yes = (if a then b else c) : xs 2 | -------------------------------------------------------------------------------- /tests/examples/List9.hs: -------------------------------------------------------------------------------- 1 | yes = [1] : [2] : [3] : [4] : [5] : [] -------------------------------------------------------------------------------- /tests/examples/List9.hs.expected: -------------------------------------------------------------------------------- 1 | yes = [[1], [2], [3], [4], [5]] 2 | -------------------------------------------------------------------------------- /tests/examples/ListRec0.hs: -------------------------------------------------------------------------------- 1 | f (x:xs) = negate x + f xs ; f [] = 0 -------------------------------------------------------------------------------- /tests/examples/ListRec0.hs.expected: -------------------------------------------------------------------------------- 1 | f xs = foldr ((+) . negate) 0 xs 2 | -------------------------------------------------------------------------------- /tests/examples/ListRec1.hs: -------------------------------------------------------------------------------- 1 | f (x:xs) = x + 1 : f xs ; f [] = [] -------------------------------------------------------------------------------- /tests/examples/ListRec1.hs.expected: -------------------------------------------------------------------------------- 1 | f xs = map (+ 1) xs 2 | -------------------------------------------------------------------------------- /tests/examples/ListRec2.hs: -------------------------------------------------------------------------------- 1 | f z (x:xs) = f (z*x) xs ; f z [] = z -------------------------------------------------------------------------------- /tests/examples/ListRec2.hs.expected: -------------------------------------------------------------------------------- 1 | f z xs = foldl (*) z xs 2 | -------------------------------------------------------------------------------- /tests/examples/ListRec3.hs: -------------------------------------------------------------------------------- 1 | f a (x:xs) b = x + a + b : f a xs b ; f a [] b = [] -------------------------------------------------------------------------------- /tests/examples/ListRec3.hs.expected: -------------------------------------------------------------------------------- 1 | f a xs b = map (\ x -> x + a + b) xs 2 | -------------------------------------------------------------------------------- /tests/examples/ListRec4.hs: -------------------------------------------------------------------------------- 1 | f [] a = return a ; f (x:xs) a = a + x >>= \fax -> f xs fax -------------------------------------------------------------------------------- /tests/examples/ListRec4.hs.expected: -------------------------------------------------------------------------------- 1 | f xs a = foldM (+) a xs 2 | -------------------------------------------------------------------------------- /tests/examples/ListRec5.hs: -------------------------------------------------------------------------------- 1 | foos [] x = x; foos (y:ys) x = foo y $ foos ys x -------------------------------------------------------------------------------- /tests/examples/ListRec5.hs.expected: -------------------------------------------------------------------------------- 1 | foos ys x = foldr foo x ys 2 | -------------------------------------------------------------------------------- /tests/examples/ListRec6.hs: -------------------------------------------------------------------------------- 1 | f [] y = y; f (x:xs) y = f xs $ g x y -------------------------------------------------------------------------------- /tests/examples/ListRec6.hs.expected: -------------------------------------------------------------------------------- 1 | f xs y = foldl (flip g) y xs 2 | -------------------------------------------------------------------------------- /tests/examples/ListRec7.hs: -------------------------------------------------------------------------------- 1 | f [] y = y; f (x : xs) y = let z = g x y in f xs z -------------------------------------------------------------------------------- /tests/examples/ListRec7.hs.expected: -------------------------------------------------------------------------------- 1 | f xs y = foldl (flip g) y xs 2 | -------------------------------------------------------------------------------- /tests/examples/ListRec8.hs: -------------------------------------------------------------------------------- 1 | f [] y = y; f (x:xs) y = f xs (f xs z) -------------------------------------------------------------------------------- /tests/examples/ListRec8.hs.expected: -------------------------------------------------------------------------------- 1 | f [] y = y; f (x:xs) y = f xs (f xs z) -------------------------------------------------------------------------------- /tests/examples/ListRec8.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Monad0.hs: -------------------------------------------------------------------------------- 1 | yes = do mapM print a; return b -------------------------------------------------------------------------------- /tests/examples/Monad0.hs.expected: -------------------------------------------------------------------------------- 1 | yes = do mapM_ print a; return b 2 | -------------------------------------------------------------------------------- /tests/examples/Monad1.hs: -------------------------------------------------------------------------------- 1 | no = mapM print a -------------------------------------------------------------------------------- /tests/examples/Monad1.hs.expected: -------------------------------------------------------------------------------- 1 | no = mapM print a -------------------------------------------------------------------------------- /tests/examples/Monad1.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Monad10.hs: -------------------------------------------------------------------------------- 1 | yes = do x <- return y; foo x 2 | -------------------------------------------------------------------------------- /tests/examples/Monad10.hs.expected: -------------------------------------------------------------------------------- 1 | yes = do let x = y; foo x 2 | -------------------------------------------------------------------------------- /tests/examples/Monad11.hs: -------------------------------------------------------------------------------- 1 | yes = do x <- return $ y + z; foo x -------------------------------------------------------------------------------- /tests/examples/Monad11.hs.expected: -------------------------------------------------------------------------------- 1 | yes = do let x = y + z; foo x 2 | -------------------------------------------------------------------------------- /tests/examples/Monad12.hs: -------------------------------------------------------------------------------- 1 | no = do x <- return x; foo x -------------------------------------------------------------------------------- /tests/examples/Monad12.hs.expected: -------------------------------------------------------------------------------- 1 | no = do x <- return x; foo x -------------------------------------------------------------------------------- /tests/examples/Monad12.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Monad13.hs: -------------------------------------------------------------------------------- 1 | no = do x <- return y; x <- return y; foo x -------------------------------------------------------------------------------- /tests/examples/Monad13.hs.expected: -------------------------------------------------------------------------------- 1 | no = do x <- return y; x <- return y; foo x -------------------------------------------------------------------------------- /tests/examples/Monad13.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Monad14.hs: -------------------------------------------------------------------------------- 1 | yes = do forM files $ \x -> return (); return () -------------------------------------------------------------------------------- /tests/examples/Monad14.hs.expected: -------------------------------------------------------------------------------- 1 | yes = do forM_ files $ \x -> return (); return () 2 | -------------------------------------------------------------------------------- /tests/examples/Monad15.hs: -------------------------------------------------------------------------------- 1 | yes = do if a then forM x y else sequence z q; return () -------------------------------------------------------------------------------- /tests/examples/Monad15.hs.expected: -------------------------------------------------------------------------------- 1 | yes = do if a then forM_ x y else sequence_ z q; return () 2 | -------------------------------------------------------------------------------- /tests/examples/Monad16.hs: -------------------------------------------------------------------------------- 1 | yes = do case a of {_ -> forM x y; x:xs -> forM x xs}; return () -------------------------------------------------------------------------------- /tests/examples/Monad16.hs.expected: -------------------------------------------------------------------------------- 1 | yes = do case a of {_ -> forM_ x y; x:xs -> forM_ x xs}; return () 2 | -------------------------------------------------------------------------------- /tests/examples/Monad17.hs: -------------------------------------------------------------------------------- 1 | foldM_ f a xs = foldM f a xs >> return () -------------------------------------------------------------------------------- /tests/examples/Monad17.hs.expected: -------------------------------------------------------------------------------- 1 | foldM_ f a xs = Control.Monad.void (foldM f a xs) 2 | -------------------------------------------------------------------------------- /tests/examples/Monad18.hs: -------------------------------------------------------------------------------- 1 | folder f a xs = foldM f a xs >> return () -------------------------------------------------------------------------------- /tests/examples/Monad18.hs.expected: -------------------------------------------------------------------------------- 1 | folder f a xs = Control.Monad.void (foldM f a xs) 2 | -------------------------------------------------------------------------------- /tests/examples/Monad19.hs: -------------------------------------------------------------------------------- 1 | yes = mapM async ds >>= mapM wait >> return () -------------------------------------------------------------------------------- /tests/examples/Monad19.hs.expected: -------------------------------------------------------------------------------- 1 | yes = mapM async ds >>= mapM_ wait >> return () 2 | -------------------------------------------------------------------------------- /tests/examples/Monad2.hs: -------------------------------------------------------------------------------- 1 | no = do foo ; mapM print a -------------------------------------------------------------------------------- /tests/examples/Monad2.hs.expected: -------------------------------------------------------------------------------- 1 | no = do foo ; mapM print a -------------------------------------------------------------------------------- /tests/examples/Monad2.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Monad3.hs: -------------------------------------------------------------------------------- 1 | yes = do (bar+foo) 2 | -------------------------------------------------------------------------------- /tests/examples/Monad3.hs.expected: -------------------------------------------------------------------------------- 1 | yes = do bar+foo 2 | -------------------------------------------------------------------------------- /tests/examples/Monad4.hs: -------------------------------------------------------------------------------- 1 | no = do bar ; foo -------------------------------------------------------------------------------- /tests/examples/Monad4.hs.expected: -------------------------------------------------------------------------------- 1 | no = do bar ; foo -------------------------------------------------------------------------------- /tests/examples/Monad4.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Monad5.hs: -------------------------------------------------------------------------------- 1 | yes = do bar; a <- foo; return a -------------------------------------------------------------------------------- /tests/examples/Monad5.hs.expected: -------------------------------------------------------------------------------- 1 | yes = do bar; foo; 2 | -------------------------------------------------------------------------------- /tests/examples/Monad6.hs: -------------------------------------------------------------------------------- 1 | no = do bar; a <- foo; return b -------------------------------------------------------------------------------- /tests/examples/Monad6.hs.expected: -------------------------------------------------------------------------------- 1 | no = do bar; a <- foo; return b -------------------------------------------------------------------------------- /tests/examples/Monad6.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Monad7.hs: -------------------------------------------------------------------------------- 1 | yes = do x <- bar; x -------------------------------------------------------------------------------- /tests/examples/Monad7.hs.expected: -------------------------------------------------------------------------------- 1 | yes = do join bar; 2 | -------------------------------------------------------------------------------- /tests/examples/Monad8.hs: -------------------------------------------------------------------------------- 1 | no = do x <- bar; x; x -------------------------------------------------------------------------------- /tests/examples/Monad8.hs.expected: -------------------------------------------------------------------------------- 1 | no = do x <- bar; x; x -------------------------------------------------------------------------------- /tests/examples/Monad8.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Monad9.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RecursiveDo #-} 2 | no = mdo hook <- mkTrigger pat (act >> rmHook hook) ; return hook 3 | -------------------------------------------------------------------------------- /tests/examples/Monad9.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RecursiveDo #-} 2 | no = mdo hook <- mkTrigger pat (act >> rmHook hook) ; return hook 3 | -------------------------------------------------------------------------------- /tests/examples/Monad9.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Naming0.hs: -------------------------------------------------------------------------------- 1 | data Yes = Foo | Bar'Test -------------------------------------------------------------------------------- /tests/examples/Naming0.hs.expected: -------------------------------------------------------------------------------- 1 | data Yes = Foo | Bar'Test -------------------------------------------------------------------------------- /tests/examples/Naming0.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Naming1.hs: -------------------------------------------------------------------------------- 1 | data Yes = Bar | Test_Bar -------------------------------------------------------------------------------- /tests/examples/Naming1.hs.expected: -------------------------------------------------------------------------------- 1 | data Yes = Bar | Test_Bar 2 | -------------------------------------------------------------------------------- /tests/examples/Naming10.hs: -------------------------------------------------------------------------------- 1 | data Yes = FOO_A | Foo_B -------------------------------------------------------------------------------- /tests/examples/Naming10.hs.expected: -------------------------------------------------------------------------------- 1 | data Yes = FOO_A | Foo_B 2 | -------------------------------------------------------------------------------- /tests/examples/Naming11.hs: -------------------------------------------------------------------------------- 1 | case_foo = 1 -------------------------------------------------------------------------------- /tests/examples/Naming11.hs.expected: -------------------------------------------------------------------------------- 1 | case_foo = 1 -------------------------------------------------------------------------------- /tests/examples/Naming11.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Naming12.hs: -------------------------------------------------------------------------------- 1 | cast_foo = 1 -------------------------------------------------------------------------------- /tests/examples/Naming12.hs.expected: -------------------------------------------------------------------------------- 1 | cast_foo = 1 2 | -------------------------------------------------------------------------------- /tests/examples/Naming13.hs: -------------------------------------------------------------------------------- 1 | replicateM_ = 1 -------------------------------------------------------------------------------- /tests/examples/Naming13.hs.expected: -------------------------------------------------------------------------------- 1 | replicateM_ = 1 -------------------------------------------------------------------------------- /tests/examples/Naming13.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Naming14.hs: -------------------------------------------------------------------------------- 1 | _foo__ = 1 -------------------------------------------------------------------------------- /tests/examples/Naming14.hs.expected: -------------------------------------------------------------------------------- 1 | _foo__ = 1 -------------------------------------------------------------------------------- /tests/examples/Naming14.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Naming15.hs: -------------------------------------------------------------------------------- 1 | section_1_1 = 1 -------------------------------------------------------------------------------- /tests/examples/Naming15.hs.expected: -------------------------------------------------------------------------------- 1 | section_1_1 = 1 -------------------------------------------------------------------------------- /tests/examples/Naming15.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Naming16.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash #-} 2 | 3 | runMutator# = 1 4 | -------------------------------------------------------------------------------- /tests/examples/Naming16.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash #-} 2 | 3 | runMutator# = 1 4 | -------------------------------------------------------------------------------- /tests/examples/Naming16.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Naming2.hs: -------------------------------------------------------------------------------- 1 | data No = a :::: b -------------------------------------------------------------------------------- /tests/examples/Naming2.hs.expected: -------------------------------------------------------------------------------- 1 | data No = a :::: b -------------------------------------------------------------------------------- /tests/examples/Naming2.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Naming3.hs: -------------------------------------------------------------------------------- 1 | data Yes = Foo {bar_cap :: Int} -------------------------------------------------------------------------------- /tests/examples/Naming3.hs.expected: -------------------------------------------------------------------------------- 1 | data Yes = Foo {bar_cap :: Int} 2 | -------------------------------------------------------------------------------- /tests/examples/Naming4.hs: -------------------------------------------------------------------------------- 1 | data No = FOO | BarBAR | BarBBar -------------------------------------------------------------------------------- /tests/examples/Naming4.hs.expected: -------------------------------------------------------------------------------- 1 | data No = FOO | BarBAR | BarBBar -------------------------------------------------------------------------------- /tests/examples/Naming4.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Naming5.hs: -------------------------------------------------------------------------------- 1 | yes_foo = yes_foo + yes_foo -------------------------------------------------------------------------------- /tests/examples/Naming5.hs.expected: -------------------------------------------------------------------------------- 1 | yes_foo = yes_foo + yes_foo 2 | -------------------------------------------------------------------------------- /tests/examples/Naming6.hs: -------------------------------------------------------------------------------- 1 | no = 1 where yes_foo = 2 -------------------------------------------------------------------------------- /tests/examples/Naming6.hs.expected: -------------------------------------------------------------------------------- 1 | no = 1 where yes_foo = 2 -------------------------------------------------------------------------------- /tests/examples/Naming6.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Naming7.hs: -------------------------------------------------------------------------------- 1 | a -== b = 1 -------------------------------------------------------------------------------- /tests/examples/Naming7.hs.expected: -------------------------------------------------------------------------------- 1 | a -== b = 1 -------------------------------------------------------------------------------- /tests/examples/Naming7.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Naming8.hs: -------------------------------------------------------------------------------- 1 | myTest = 1; my_test = 1 -------------------------------------------------------------------------------- /tests/examples/Naming8.hs.expected: -------------------------------------------------------------------------------- 1 | myTest = 1; my_test = 1 -------------------------------------------------------------------------------- /tests/examples/Naming8.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Naming9.hs: -------------------------------------------------------------------------------- 1 | semiring'laws = 1 -------------------------------------------------------------------------------- /tests/examples/Naming9.hs.expected: -------------------------------------------------------------------------------- 1 | semiring'laws = 1 -------------------------------------------------------------------------------- /tests/examples/Naming9.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/NegApp.hs: -------------------------------------------------------------------------------- 1 | y = x < - 2 * (3) 2 | -------------------------------------------------------------------------------- /tests/examples/NegApp.hs.expected: -------------------------------------------------------------------------------- 1 | y = x < - 2 * 3 2 | -------------------------------------------------------------------------------- /tests/examples/NegLit.hs: -------------------------------------------------------------------------------- 1 | a = -b/c 2 | -------------------------------------------------------------------------------- /tests/examples/NegLit.hs.expected: -------------------------------------------------------------------------------- 1 | a = -b/c 2 | -------------------------------------------------------------------------------- /tests/examples/NegLit.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/ParseErrorNoHint.hs: -------------------------------------------------------------------------------- 1 | (this code does not parse 2 | -------------------------------------------------------------------------------- /tests/examples/ParseErrorNoHint.hs.expected: -------------------------------------------------------------------------------- 1 | (this code does not parse 2 | -------------------------------------------------------------------------------- /tests/examples/ParseErrorNoHint.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Pragma0.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -cpp #-} -------------------------------------------------------------------------------- /tests/examples/Pragma0.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE CPP #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Pragma1.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS -cpp #-} -------------------------------------------------------------------------------- /tests/examples/Pragma1.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE CPP #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Pragma10.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DataKinds #-} 2 | {-# LANGUAGE GADTs, DataKinds #-} 3 | -------------------------------------------------------------------------------- /tests/examples/Pragma10.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DataKinds, GADTs #-} 2 | 3 | -------------------------------------------------------------------------------- /tests/examples/Pragma2.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_YHC -cpp #-} -------------------------------------------------------------------------------- /tests/examples/Pragma2.hs.expected: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_YHC -cpp #-} -------------------------------------------------------------------------------- /tests/examples/Pragma2.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Pragma3.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -XFoo #-} -------------------------------------------------------------------------------- /tests/examples/Pragma3.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Foo #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Pragma4.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -fglasgow-exts #-} -------------------------------------------------------------------------------- /tests/examples/Pragma5.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoMonomorphismRestriction, GADTs, NoMonomorphismRestriction #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Pragma5.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoMonomorphismRestriction, GADTs #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Pragma6.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Pragma6.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Pragma6.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Pragma7.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -XGADTs -main-is Baz #-} 2 | -------------------------------------------------------------------------------- /tests/examples/Pragma7.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | {-# OPTIONS_GHC -main-is Baz #-} 3 | -------------------------------------------------------------------------------- /tests/examples/Pragma8.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -XGADTs #-} 2 | {-# LANGUAGE GADTs, NoMonomorphismRestriction #-} 3 | -------------------------------------------------------------------------------- /tests/examples/Pragma8.hs.expected: -------------------------------------------------------------------------------- 1 | 2 | {-# LANGUAGE GADTs, NoMonomorphismRestriction #-} 3 | -------------------------------------------------------------------------------- /tests/examples/Pragma9.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | {-# LANGUAGE DataKinds #-} 3 | -------------------------------------------------------------------------------- /tests/examples/Pragma9.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | {-# LANGUAGE DataKinds #-} 3 | -------------------------------------------------------------------------------- /tests/examples/Pragma9.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/RedundantDo.hs: -------------------------------------------------------------------------------- 1 | foo = do 2 | case x of 3 | True -> foo 4 | False -> foo 5 | -------------------------------------------------------------------------------- /tests/examples/RedundantDo.hs.expected: -------------------------------------------------------------------------------- 1 | foo = do 2 | if x then foo else foo 3 | -------------------------------------------------------------------------------- /tests/examples/Structure0.hs: -------------------------------------------------------------------------------- 1 | yes x y = if a then b else if c then d else e -------------------------------------------------------------------------------- /tests/examples/Structure0.hs.expected: -------------------------------------------------------------------------------- 1 | yes x y 2 | | a = b 3 | | c = d 4 | | otherwise = e 5 | -------------------------------------------------------------------------------- /tests/examples/Structure1.hs: -------------------------------------------------------------------------------- 1 | x `yes` y = if a then b else if c then d else e -------------------------------------------------------------------------------- /tests/examples/Structure1.hs.expected: -------------------------------------------------------------------------------- 1 | x `yes` y 2 | | a = b 3 | | c = d 4 | | otherwise = e 5 | -------------------------------------------------------------------------------- /tests/examples/Structure10.hs: -------------------------------------------------------------------------------- 1 | foo (Bar _ _ _ _) = x -------------------------------------------------------------------------------- /tests/examples/Structure10.hs.expected: -------------------------------------------------------------------------------- 1 | foo (Bar {}) = x 2 | -------------------------------------------------------------------------------- /tests/examples/Structure11.hs: -------------------------------------------------------------------------------- 1 | foo (Bar _ x _ _) = x -------------------------------------------------------------------------------- /tests/examples/Structure11.hs.expected: -------------------------------------------------------------------------------- 1 | foo (Bar _ x _ _) = x -------------------------------------------------------------------------------- /tests/examples/Structure11.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Structure12.hs: -------------------------------------------------------------------------------- 1 | foo (Bar _ _) = x -------------------------------------------------------------------------------- /tests/examples/Structure12.hs.expected: -------------------------------------------------------------------------------- 1 | foo (Bar _ _) = x -------------------------------------------------------------------------------- /tests/examples/Structure12.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Structure13.hs: -------------------------------------------------------------------------------- 1 | foo = case f v of _ -> x -------------------------------------------------------------------------------- /tests/examples/Structure13.hs.expected: -------------------------------------------------------------------------------- 1 | foo = x 2 | -------------------------------------------------------------------------------- /tests/examples/Structure14.hs: -------------------------------------------------------------------------------- 1 | foo = case v of v -> x -------------------------------------------------------------------------------- /tests/examples/Structure14.hs.expected: -------------------------------------------------------------------------------- 1 | foo = x 2 | -------------------------------------------------------------------------------- /tests/examples/Structure15.hs: -------------------------------------------------------------------------------- 1 | foo = case v of z -> z -------------------------------------------------------------------------------- /tests/examples/Structure15.hs.expected: -------------------------------------------------------------------------------- 1 | foo = case v of z -> z -------------------------------------------------------------------------------- /tests/examples/Structure15.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Structure16.hs: -------------------------------------------------------------------------------- 1 | foo = case v of _ | False -> x -------------------------------------------------------------------------------- /tests/examples/Structure16.hs.expected: -------------------------------------------------------------------------------- 1 | foo = case v of _ | False -> x -------------------------------------------------------------------------------- /tests/examples/Structure16.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Structure17.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns #-} 2 | foo = case v of !True -> x 3 | -------------------------------------------------------------------------------- /tests/examples/Structure17.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns #-} 2 | foo = case v of True -> x 3 | -------------------------------------------------------------------------------- /tests/examples/Structure18.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns #-} 2 | foo = case v of !(Just x) -> x 3 | -------------------------------------------------------------------------------- /tests/examples/Structure18.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns #-} 2 | foo = case v of (Just x) -> x 3 | -------------------------------------------------------------------------------- /tests/examples/Structure19.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns #-} 2 | foo = case v of !(x : xs) -> x 3 | -------------------------------------------------------------------------------- /tests/examples/Structure19.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns #-} 2 | foo = case v of (x : xs) -> x 3 | -------------------------------------------------------------------------------- /tests/examples/Structure2.hs: -------------------------------------------------------------------------------- 1 | no x y = if a then b else c -------------------------------------------------------------------------------- /tests/examples/Structure2.hs.expected: -------------------------------------------------------------------------------- 1 | no x y = if a then b else c -------------------------------------------------------------------------------- /tests/examples/Structure2.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Structure20.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns #-} 2 | foo = case v of !1 -> x 3 | -------------------------------------------------------------------------------- /tests/examples/Structure20.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns #-} 2 | foo = case v of 1 -> x 3 | -------------------------------------------------------------------------------- /tests/examples/Structure21.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns #-} 2 | foo = case v of !x -> x 3 | -------------------------------------------------------------------------------- /tests/examples/Structure21.hs.expected: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns #-} 2 | foo = case v of !x -> x 3 | -------------------------------------------------------------------------------- /tests/examples/Structure21.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Structure22.hs: -------------------------------------------------------------------------------- 1 | foo = let ~x = 1 in y -------------------------------------------------------------------------------- /tests/examples/Structure22.hs.expected: -------------------------------------------------------------------------------- 1 | foo = let x = 1 in y 2 | -------------------------------------------------------------------------------- /tests/examples/Structure23.hs: -------------------------------------------------------------------------------- 1 | foo = let ~(x:xs) = y in z -------------------------------------------------------------------------------- /tests/examples/Structure23.hs.expected: -------------------------------------------------------------------------------- 1 | foo = let ~(x:xs) = y in z -------------------------------------------------------------------------------- /tests/examples/Structure23.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Structure3.hs: -------------------------------------------------------------------------------- 1 | foo b | c <- f b = c + b -------------------------------------------------------------------------------- /tests/examples/Structure3.hs.expected: -------------------------------------------------------------------------------- 1 | foo b | c <- f b = c + b -------------------------------------------------------------------------------- /tests/examples/Structure3.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Structure4.hs: -------------------------------------------------------------------------------- 1 | foo b | c <- f b = c where f = here -------------------------------------------------------------------------------- /tests/examples/Structure4.hs.expected: -------------------------------------------------------------------------------- 1 | foo b | c <- f b = c where f = here -------------------------------------------------------------------------------- /tests/examples/Structure4.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Structure5.hs: -------------------------------------------------------------------------------- 1 | foo b | c <- f b = c where foo = b -------------------------------------------------------------------------------- /tests/examples/Structure5.hs.expected: -------------------------------------------------------------------------------- 1 | foo b | c <- f b = c where foo = b -------------------------------------------------------------------------------- /tests/examples/Structure5.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Structure6.hs: -------------------------------------------------------------------------------- 1 | foo b | c <- f b = c 2 | | c <- f b = c -------------------------------------------------------------------------------- /tests/examples/Structure6.hs.expected: -------------------------------------------------------------------------------- 1 | foo b | c <- f b = c 2 | | c <- f b = c -------------------------------------------------------------------------------- /tests/examples/Structure6.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Structure7.hs: -------------------------------------------------------------------------------- 1 | foo x = yes x x where yes x y = if a then b else if c then d else e -------------------------------------------------------------------------------- /tests/examples/Structure8.hs: -------------------------------------------------------------------------------- 1 | foo x | otherwise = y -------------------------------------------------------------------------------- /tests/examples/Structure8.hs.expected: -------------------------------------------------------------------------------- 1 | foo x = y 2 | -------------------------------------------------------------------------------- /tests/examples/Structure9.hs: -------------------------------------------------------------------------------- 1 | foo x | a = b | True = d -------------------------------------------------------------------------------- /tests/examples/Structure9.hs.expected: -------------------------------------------------------------------------------- 1 | foo x | a = b | otherwise = d 2 | -------------------------------------------------------------------------------- /tests/examples/Test0.hs: -------------------------------------------------------------------------------- 1 | main = readFile "foo" >>= putStr 2 | -------------------------------------------------------------------------------- /tests/examples/Test0.hs.expected: -------------------------------------------------------------------------------- 1 | main = readFile "foo" >>= putStr 2 | -------------------------------------------------------------------------------- /tests/examples/Test0.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test1.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test10.hs: -------------------------------------------------------------------------------- 1 | type Ignore_Test = Int -------------------------------------------------------------------------------- /tests/examples/Test10.hs.expected: -------------------------------------------------------------------------------- 1 | type Ignore_Test = Int 2 | -------------------------------------------------------------------------------- /tests/examples/Test11.hs: -------------------------------------------------------------------------------- 1 | annTest = foldl -------------------------------------------------------------------------------- /tests/examples/Test11.hs.expected: -------------------------------------------------------------------------------- 1 | annTest = foldl -------------------------------------------------------------------------------- /tests/examples/Test11.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test12.hs: -------------------------------------------------------------------------------- 1 | annTest2 = foldl -------------------------------------------------------------------------------- /tests/examples/Test12.hs.expected: -------------------------------------------------------------------------------- 1 | annTest2 = foldl -------------------------------------------------------------------------------- /tests/examples/Test12.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test13.hs: -------------------------------------------------------------------------------- 1 | annTest3 = scanr -------------------------------------------------------------------------------- /tests/examples/Test13.hs.expected: -------------------------------------------------------------------------------- 1 | annTest3 = scanr -------------------------------------------------------------------------------- /tests/examples/Test13.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test14.hs: -------------------------------------------------------------------------------- 1 | type Ann_Test = Int -------------------------------------------------------------------------------- /tests/examples/Test14.hs.expected: -------------------------------------------------------------------------------- 1 | type Ann_Test = Int 2 | -------------------------------------------------------------------------------- /tests/examples/Test15.hs: -------------------------------------------------------------------------------- 1 | concatMap f x = concat (map f x) -------------------------------------------------------------------------------- /tests/examples/Test15.hs.expected: -------------------------------------------------------------------------------- 1 | concatMap f x = concat (map f x) -------------------------------------------------------------------------------- /tests/examples/Test15.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test16.hs: -------------------------------------------------------------------------------- 1 | concatMop f x = concat (map f x) -------------------------------------------------------------------------------- /tests/examples/Test16.hs.expected: -------------------------------------------------------------------------------- 1 | concatMop f x = concatMap f x 2 | -------------------------------------------------------------------------------- /tests/examples/Test17.hs: -------------------------------------------------------------------------------- 1 | yes = 1 * 2+3 -------------------------------------------------------------------------------- /tests/examples/Test17.hs.expected: -------------------------------------------------------------------------------- 1 | yes = 1 * 2+3 -------------------------------------------------------------------------------- /tests/examples/Test17.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test18.hs: -------------------------------------------------------------------------------- 1 | import Foo; test = Foo.id 1 -------------------------------------------------------------------------------- /tests/examples/Test18.hs.expected: -------------------------------------------------------------------------------- 1 | import Foo; test = Foo.id 1 -------------------------------------------------------------------------------- /tests/examples/Test18.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test19.hs: -------------------------------------------------------------------------------- 1 | test = head -------------------------------------------------------------------------------- /tests/examples/Test19.hs.expected: -------------------------------------------------------------------------------- 1 | test = head -------------------------------------------------------------------------------- /tests/examples/Test19.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test2.hs: -------------------------------------------------------------------------------- 1 | import Prelude as Prelude2 2 | yes = Prelude2.readFile "foo" >>= putStr 3 | -------------------------------------------------------------------------------- /tests/examples/Test2.hs.expected: -------------------------------------------------------------------------------- 1 | import Prelude as Prelude2 2 | yes = Prelude2.readFile "foo" >>= putStr 3 | -------------------------------------------------------------------------------- /tests/examples/Test2.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test20.hs: -------------------------------------------------------------------------------- 1 | import Array; test = Array.head -------------------------------------------------------------------------------- /tests/examples/Test20.hs.expected: -------------------------------------------------------------------------------- 1 | import Array; test = Array.head -------------------------------------------------------------------------------- /tests/examples/Test20.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test21.hs: -------------------------------------------------------------------------------- 1 | test = Array.head -------------------------------------------------------------------------------- /tests/examples/Test21.hs.expected: -------------------------------------------------------------------------------- 1 | test = Array.head -------------------------------------------------------------------------------- /tests/examples/Test21.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test22.hs: -------------------------------------------------------------------------------- 1 | test = head -------------------------------------------------------------------------------- /tests/examples/Test22.hs.expected: -------------------------------------------------------------------------------- 1 | test = head -------------------------------------------------------------------------------- /tests/examples/Test22.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test23.hs: -------------------------------------------------------------------------------- 1 | import qualified Array; test = head -------------------------------------------------------------------------------- /tests/examples/Test23.hs.expected: -------------------------------------------------------------------------------- 1 | import qualified Array; test = head -------------------------------------------------------------------------------- /tests/examples/Test23.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test24.hs: -------------------------------------------------------------------------------- 1 | import Array(tail); test = head -------------------------------------------------------------------------------- /tests/examples/Test24.hs.expected: -------------------------------------------------------------------------------- 1 | import Array(tail); test = head -------------------------------------------------------------------------------- /tests/examples/Test24.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test25.hs: -------------------------------------------------------------------------------- 1 | import Array(head); test = head -------------------------------------------------------------------------------- /tests/examples/Test25.hs.expected: -------------------------------------------------------------------------------- 1 | import Array(head); test = head -------------------------------------------------------------------------------- /tests/examples/Test25.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test26.hs: -------------------------------------------------------------------------------- 1 | import Array as A; test = A.head -------------------------------------------------------------------------------- /tests/examples/Test26.hs.expected: -------------------------------------------------------------------------------- 1 | import Array as A; test = A.head -------------------------------------------------------------------------------- /tests/examples/Test26.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test27.hs: -------------------------------------------------------------------------------- 1 | test = tail -------------------------------------------------------------------------------- /tests/examples/Test27.hs.expected: -------------------------------------------------------------------------------- 1 | test = tail -------------------------------------------------------------------------------- /tests/examples/Test27.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test28.hs: -------------------------------------------------------------------------------- 1 | import qualified Array as B; test = tail -------------------------------------------------------------------------------- /tests/examples/Test28.hs.expected: -------------------------------------------------------------------------------- 1 | import qualified Array as B; test = tail -------------------------------------------------------------------------------- /tests/examples/Test28.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test29.hs: -------------------------------------------------------------------------------- 1 | import Control.Arrow; test = id *** id -------------------------------------------------------------------------------- /tests/examples/Test29.hs.expected: -------------------------------------------------------------------------------- 1 | import Control.Arrow; test = second id 2 | -------------------------------------------------------------------------------- /tests/examples/Test3.hs: -------------------------------------------------------------------------------- 1 | yes = 32 :: Int -------------------------------------------------------------------------------- /tests/examples/Test3.hs.expected: -------------------------------------------------------------------------------- 1 | yes = 32 :: Int -------------------------------------------------------------------------------- /tests/examples/Test3.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test30.hs: -------------------------------------------------------------------------------- 1 | test = id Control.Arrow.*** id -------------------------------------------------------------------------------- /tests/examples/Test30.hs.expected: -------------------------------------------------------------------------------- 1 | test = second id 2 | -------------------------------------------------------------------------------- /tests/examples/Test31.hs: -------------------------------------------------------------------------------- 1 | import Control.Arrow as Q; test = id Q.*** id -------------------------------------------------------------------------------- /tests/examples/Test31.hs.expected: -------------------------------------------------------------------------------- 1 | import Control.Arrow as Q; test = second id 2 | -------------------------------------------------------------------------------- /tests/examples/Test32.hs: -------------------------------------------------------------------------------- 1 | zip [1..length x] -------------------------------------------------------------------------------- /tests/examples/Test32.hs.expected: -------------------------------------------------------------------------------- 1 | zip [1..length x] -------------------------------------------------------------------------------- /tests/examples/Test32.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test33.hs: -------------------------------------------------------------------------------- 1 | zip [1..length x] x -------------------------------------------------------------------------------- /tests/examples/Test33.hs.expected: -------------------------------------------------------------------------------- 1 | zip [1..length x] x -------------------------------------------------------------------------------- /tests/examples/Test33.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test34.hs: -------------------------------------------------------------------------------- 1 | {-# ANN module "HLint: ignore Unused LANGUAGE pragma" #-} 2 | {-# LANGUAGE RecordWildCards #-} -------------------------------------------------------------------------------- /tests/examples/Test34.hs.expected: -------------------------------------------------------------------------------- 1 | {-# ANN module "HLint: ignore Unused LANGUAGE pragma" #-} 2 | {-# LANGUAGE RecordWildCards #-} -------------------------------------------------------------------------------- /tests/examples/Test34.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test35.hs: -------------------------------------------------------------------------------- 1 | {-# ANN module "HLint: ignore Unused LANGUAGE pragma" #-} 2 | {-# LANGUAGE RecordWildCards #-} -------------------------------------------------------------------------------- /tests/examples/Test35.hs.expected: -------------------------------------------------------------------------------- 1 | {-# ANN module "HLint: ignore Unused LANGUAGE pragma" #-} 2 | {-# LANGUAGE RecordWildCards #-} -------------------------------------------------------------------------------- /tests/examples/Test35.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test37.hs: -------------------------------------------------------------------------------- 1 | {-# ANN lam "HLint: ignore Redundant lambda" #-} 2 | lam = \x -> x x x -------------------------------------------------------------------------------- /tests/examples/Test37.hs.expected: -------------------------------------------------------------------------------- 1 | {-# ANN lam "HLint: ignore Redundant lambda" #-} 2 | lam = \x -> x x x -------------------------------------------------------------------------------- /tests/examples/Test37.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test38.hs: -------------------------------------------------------------------------------- 1 | {-# ANN module "HLint: ignore Reduce duplication" #-} 2 | dup = do a; a; a; a; a; a -------------------------------------------------------------------------------- /tests/examples/Test38.hs.expected: -------------------------------------------------------------------------------- 1 | {-# ANN module "HLint: ignore Reduce duplication" #-} 2 | dup = do a; a; a; a; a; a -------------------------------------------------------------------------------- /tests/examples/Test38.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test4.hs: -------------------------------------------------------------------------------- 1 | yes = before 12 -------------------------------------------------------------------------------- /tests/examples/Test4.hs.expected: -------------------------------------------------------------------------------- 1 | yes = before 12 -------------------------------------------------------------------------------- /tests/examples/Test4.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test5.hs: -------------------------------------------------------------------------------- 1 | ignoreTest = filter -------------------------------------------------------------------------------- /tests/examples/Test5.hs.expected: -------------------------------------------------------------------------------- 1 | ignoreTest = filter -------------------------------------------------------------------------------- /tests/examples/Test5.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test6.hs: -------------------------------------------------------------------------------- 1 | ignoreTest2 = filter -------------------------------------------------------------------------------- /tests/examples/Test6.hs.expected: -------------------------------------------------------------------------------- 1 | ignoreTest2 = filter -------------------------------------------------------------------------------- /tests/examples/Test6.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test7.hs: -------------------------------------------------------------------------------- 1 | ignoreTest3 = filter -------------------------------------------------------------------------------- /tests/examples/Test7.hs.expected: -------------------------------------------------------------------------------- 1 | ignoreTest3 = filter -------------------------------------------------------------------------------- /tests/examples/Test7.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test8.hs: -------------------------------------------------------------------------------- 1 | ignoreAny = scanr -------------------------------------------------------------------------------- /tests/examples/Test8.hs.expected: -------------------------------------------------------------------------------- 1 | ignoreAny = scanr -------------------------------------------------------------------------------- /tests/examples/Test8.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Test9.hs: -------------------------------------------------------------------------------- 1 | ignoreNew = foldr -------------------------------------------------------------------------------- /tests/examples/Test9.hs.expected: -------------------------------------------------------------------------------- 1 | ignoreNew = foldr -------------------------------------------------------------------------------- /tests/examples/Test9.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Uncurry.hs: -------------------------------------------------------------------------------- 1 | f p = fst p `func` snd p 2 | 3 | f p = fst p .= snd p 4 | -------------------------------------------------------------------------------- /tests/examples/Uncurry.hs.expected: -------------------------------------------------------------------------------- 1 | f p = uncurry func p 2 | 3 | f p = uncurry (.=) p 4 | -------------------------------------------------------------------------------- /tests/examples/Unsafe0.hs: -------------------------------------------------------------------------------- 1 | {-# NOINLINE slaves #-}; slaves = unsafePerformIO newIO -------------------------------------------------------------------------------- /tests/examples/Unsafe0.hs.expected: -------------------------------------------------------------------------------- 1 | {-# NOINLINE slaves #-}; slaves = unsafePerformIO newIO -------------------------------------------------------------------------------- /tests/examples/Unsafe0.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Unsafe1.hs: -------------------------------------------------------------------------------- 1 | slaves = unsafePerformIO Multimap.newIO -------------------------------------------------------------------------------- /tests/examples/Unsafe1.hs.expected: -------------------------------------------------------------------------------- 1 | 2 | {-# NOINLINE slaves #-} 3 | slaves = unsafePerformIO Multimap.newIO 4 | -------------------------------------------------------------------------------- /tests/examples/Unsafe2.hs: -------------------------------------------------------------------------------- 1 | slaves = unsafePerformIO $ f y where foo = 1 -------------------------------------------------------------------------------- /tests/examples/Unsafe2.hs.expected: -------------------------------------------------------------------------------- 1 | 2 | {-# NOINLINE slaves #-} 3 | slaves = unsafePerformIO $ f y where foo = 1 4 | -------------------------------------------------------------------------------- /tests/examples/Unsafe3.hs: -------------------------------------------------------------------------------- 1 | slaves v = unsafePerformIO $ Multimap.newIO where foo = 1 -------------------------------------------------------------------------------- /tests/examples/Unsafe3.hs.expected: -------------------------------------------------------------------------------- 1 | slaves v = unsafePerformIO Multimap.newIO where foo = 1 2 | -------------------------------------------------------------------------------- /tests/examples/Unsafe4.hs: -------------------------------------------------------------------------------- 1 | slaves v = x where x = unsafePerformIO $ Multimap.newIO -------------------------------------------------------------------------------- /tests/examples/Unsafe4.hs.expected: -------------------------------------------------------------------------------- 1 | slaves v = x where x = unsafePerformIO Multimap.newIO 2 | -------------------------------------------------------------------------------- /tests/examples/Unsafe5.hs: -------------------------------------------------------------------------------- 1 | slaves = x where x = unsafePerformIO Multimap.newIO 2 | -------------------------------------------------------------------------------- /tests/examples/Unsafe5.hs.expected: -------------------------------------------------------------------------------- 1 | 2 | {-# NOINLINE slaves #-} 3 | slaves = x where x = unsafePerformIO Multimap.newIO 4 | -------------------------------------------------------------------------------- /tests/examples/Unsafe6.hs: -------------------------------------------------------------------------------- 1 | slaves = unsafePerformIO . bar -------------------------------------------------------------------------------- /tests/examples/Unsafe6.hs.expected: -------------------------------------------------------------------------------- 1 | slaves = unsafePerformIO . bar -------------------------------------------------------------------------------- /tests/examples/Unsafe6.hs.refact: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/examples/Unsafe7.hs: -------------------------------------------------------------------------------- 1 | slaves = unsafePerformIO . baz $ x -------------------------------------------------------------------------------- /tests/examples/Unsafe7.hs.expected: -------------------------------------------------------------------------------- 1 | 2 | {-# NOINLINE slaves #-} 3 | slaves = unsafePerformIO . baz $ x 4 | -------------------------------------------------------------------------------- /tests/examples/Unsafe8.hs: -------------------------------------------------------------------------------- 1 | slaves = unsafePerformIO . baz $ x -------------------------------------------------------------------------------- /tests/examples/Unsafe8.hs.expected: -------------------------------------------------------------------------------- 1 | 2 | {-# NOINLINE slaves #-} 3 | slaves = unsafePerformIO . baz $ x 4 | -------------------------------------------------------------------------------- /tests/examples/lambda42.hs: -------------------------------------------------------------------------------- 1 | f :: Bool -> Integer 2 | f = (\ b -> (case b of 3 | False -> 1 4 | True -> 0)) -------------------------------------------------------------------------------- /tests/examples/lambda42.hs.expected: -------------------------------------------------------------------------------- 1 | f :: Bool -> Integer 2 | f b = case b of 3 | False -> 1 4 | True -> 0 5 | --------------------------------------------------------------------------------