Skip to content

Latest commit

 

History

History
139 lines (130 loc) · 8.73 KB

TODO.org

File metadata and controls

139 lines (130 loc) · 8.73 KB

HaRe todo

renaming : check that new name is not the same as the old

when using a cabal sandbox with ‘cabal add-source’, refactor into the added src too

Renaming does not rename exported type in exports list

– See /home/alanz/mysrc/github/alanz/htelehash/src/TeleHash/Utils.hs.2014-04-03T13:03:21+0200 renaming HashContainer to HashCrypto at (97,11)

Renaming in htelehash Switch.hs complains of Crypto1a.hs not loaded

(1137,7) rename mpath to path send mpath msg mto = do [Just /home/alanz/mysrc/github/alanz/htelehash/htelehash.cabal]) Refactoring failed: “attempting to use module `main:TeleHash.Crypto1a’ (/home/alanz/mysrc/github/alanz/htelehash/src/TeleHash/Crypto1a.hs) which is not loaded

alanz@alanz-laptop:~/mysrc/github/alanz/htelehash$ ghc-hare -v rename ./src/TeleHash/Switch.hs path 1137 7 initGhcSession:targets=([“TeleHash.Switch”,”TeleHash.Utils”,”TeleHash.Crypto1a”,”TeleHash.Packet”],[”home/alanz/mysrc/github/alanz/htelehash./ping.hs”],[],[]) initGhcSession:(libTgts,exeTgts)=([“TeleHash.Switch”,”TeleHash.Utils”,”TeleHash.Crypto1a”,”TeleHash.Packet”],[”home/alanz/mysrc/github/alanz/htelehash./ping.hs”]) Renaming.comp: (fileName,newName,(row,col))=(“./src/TeleHash/Switch.hs”,”path”,(1137,7)) activateModule:([“/home/alanz/mysrc/github/alanz/htelehash/ping.hs”],TeleHash.Switch) ensureTargetLoaded: loading:[“/home/alanz/mysrc/github/alanz/htelehash/ping.hs”] (error “attempting to use module `main:TeleHash.Crypto1a’ (/home/alanz/mysrc/github/alanz/htelehash/src/TeleHash/Crypto1a.hs) which is not loaded\n”[Just “/home/alanz/mysrc/github/alanz/htelehash/htelehash.cabal”])

root cause is program cannot load due to syntax errors. Provide decent error reporting

cannot select (data) item to be renamed from the module exports list

when renaming, tell the user the original name, in the elisp

liftToTopLevel does not update the signature when adding a param

e.g.for lifting ‘uses’ in MoveDef.hs line 1374 now complains about requiring an existential type.

  • Consider offering a version that does the lift but comments out the proposed signature

rationalise all the various hsFreeAndDeclaredXX functions

The elisp test for buffers to save includes directories that have been modified

Provide a warning if refactoring is done on code using CPP.

State that refactoring may only affect current flags code, not others.

Make undo (M-x u) undo a refactoring.

add tests for command-line invocation of ghc-hare

look at using ordnub

check .lhs support

add command line param to turn off timestamping of log lines when -v

add more granularity on logging control, e.g wether to show tokens while working, whether to dump initial AST

Look at refactoring Data.Vault.Lazy. Uses include process

[2013-09-09 Mon]

Use null instead of isEmptyList/nonEmptyList

after accepting a refactoring, reload the buffer into emacs

add a “roundtrip” function to ghc-hare to simply parse and output a file, comparing for fidelity

clientModsAndFiles must take the nub of all files generated from the various targets

use GHC.NameSet for hsFreeAndDeclaredGhc,hsVisibleDs etc

manage RefactGhc to separate Hare exceptions from GHC ones

see http://parenz.wordpress.com/2013/07/23/on-custom-error-handlers-for-ghc-api/

elisp: cancel option is not implemented

SwapArgs does not process client files

demote does not process client files

provide simple wrapper for one-file refactor in the API

note: haddock 2.11.0 builds the 7.4.2 docs without problem

renaming: what if the old name appears in comments too?

from ChrisDone for ghci-ng

<chrisdone> 1) extraction: from f x y = … → (\x y -> …) or <chrisdone> 2) expansion: from g = f a b → f = (\x y -> ) a b <chrisdone> er <chrisdone> 2) expansion: from g = f a b → g = (\x y -> ) a b

from the source files

Check that the components are in range

[2013-07-11 Thu] file:.//src/Language/Haskell/Refact/Utils/TokenUtils.hs::– TODO: check that the components are in range

This should be in splitSubToks

[2013-07-11 Thu] file:.//src/Language/Haskell/Refact/Utils/TokenUtils.hs::then – TODO: This should be in splitSubToks

Calculate end gap in splitSubToks

[2013-07-11 Thu] file:.//src/Language/Haskell/Refact/Utils/TokenUtils.hs::egs = (0,0) – TODO: calculate this

Consider comment boundaries in splitSubToks

[2013-07-11 Thu] file:./src/Language/Haskell/Refact/Utils/TokenUtils.hs::– TODO: ignoring comment boundaries to start

goDeleteGapsToks - use start and end toks not sspan, there may be comments

[2013-07-11 Thu] file:.//src/Language/Haskell/Refact/Utils/TokenUtils.hs::– TODO: use actual first and last toks, may be comments

goDeleteGapsToks : deal with deletion within a line

[2013-07-11 Thu] file:./src/Language/Haskell/Refact/Utils/TokenUtils.hs::– TODO: what about deletion within a line?

This looks like a no-op?

[2013-07-11 Thu] file:./src/Language/Haskell/Refact/Utils/TokenUtils.hs::– TODO: This looks like a no-op?

move buffers-saved test into hare-refactor-command

[2013-07-20 Sat] file:~/mysrc/github/alanz/HaRe/elisp/hare.el::TODO: move this test into hare-refactor-command

Complete SwapArgs

[2013-07-23 Tue] file:~/mysrc/github/alanz/HaRe/src/Language/Haskell/Refact/SwapArgs.hs::module Language.Haskell.Refact.SwapArgs (swapArgs) where

“renamePN:***ERROR**:do not use getSrcSpan”

Consider using a generic zipper, and UpUntil to find the nearest enclosing SrcSpan

Seems the problem is that the existing spans may have been modified. So, drill down into the token tree to the closest enclosing span, and use the toks from that.

No. Problem is that we are trying to work with a type declaration, it is in a different place in the RenamedSourcs, so getSrcSpan returns wrong point. [2013-07-23 Tue] file:~/mysrc/github/alanz/HaRe/src/Language/Haskell/Refact/Utils/TypeUtils.hs::logm $ “renamePN:***ERROR**:do not use getSrcSpan”

cmdtheline 0.2.2 has broken output for –help

[2013-07-31 Wed] file:~/mysrc/github/erudify/colog/colog.cabal::cmdtheline >= 0.2 && < 0.2.2,

Changes required to GHC

Currently WarningD decls are discarded in the renamer. Bring them through.

Bring mfn through the renamer - #9988

https://ghc.haskell.org/trac/ghc/ticket/9988

Todos

Turn the GHC annotation test checker into a library utility <2015-07-17 Fri 11:01>