Menu

#101 Importing existing source is rude

open
nobody
Bug (46)
6
2012-12-06
2009-09-02
No

Proper functioning is dependent on the new build targets architecture; see https://sourceforge.net/tracker/?func=detail&aid=2849371&group_id=108233&atid=1000719

When creating a new project in an existing Haskell source directory, the following things happen:
- A .cabal file is created, even if one already exists (possibly with a different name than the project).
- The same goes for Setup.(l)hs.
- src, bin and out directories are unconditionally created.

Instead, if a .cabal file is detected in the new project root:
- the .cabal file should be assigned to the project (even if it has a different name);
- Setup.(l)hs should be used if present, created otherwise;
- output directories specified in the .cabal file should be created.

If no .cabal file is detected:
- the directory containing the sources could be detected (but requires parsing of the "module X.Y.Z" line to do it properly!)
- the bin and out directories could be set to their defaults

Discussion

MongoDB Logo MongoDB