-
Notifications
You must be signed in to change notification settings - Fork 2
ddssff/module-management
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This package has a successor: https://github.com/ddssff/refact-global-hse Fork of <http://hackage.haskell.org/package/module-management> improving hmm & knowledge of more fixities (Data.Lens). Dependency on template-haskell is definitely not to be taken seriously. Unsupported: CPP directives. It is difficult to see how this could be implemented. Bugs: 1. If you have a standalone derived instance of a type alias, it won't notice that the constructors of the original type are required. E.g.: import Some.Module (Bar(..)) type Foo Bar deriving instance Show Foo With this input, cleanImports will remove the "(..)" from the Bar import and the resulting file will not compile. "deriving instance Show Bar" will work correctly. 2. Leaves behind some .imports files 3. Template haskell will occasionally mess it up 4. When it modifies an export list, all comments get stripped out. 5. When it modifies an export list, some export symbols get re-ordered. Bugs in CLI.hs: 0. with haskeline sometimes there is no newline added before the prompt 1. split Main.hs when file Main exists leads to crashes (fixed?) 2. UI: split could take the module name too 3. completion might be extended to accept regex / wildcards 4. don't quit when something goes wrong, it should be possible to start over with what the previous settings were (dir and verse) (slightly done now?) 5. options for: skip files that don't parse? 6. \EOT doesn't work 7. move cabal-file related items into library To Do: 1. Make sure original file is left as backup, not some intermediate. Or eliminate backup files, you should really run this on files under version control. 2. Global cleanups: eliminate exports that are never imported 3. Global cleanups: eliminate declarations that are not exported. 4. Move nested declarations to the top level, adding arguments as necessary. Also, move top level declarations into a nested position if they are only used in one place, removing arguments if possible. 5. Show how to do a completely self contained split, writing source, splitting, reading back in and parsing.
About
Clean up Haskell imports, split and merge Haskell modules
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published