[darcs-devel] Greetings and some questions

Dino Morelli dino at ui3.info
Mon Oct 2 08:19:00 PDT 2006


On Mon, 2 Oct 2006, Eric Y. Kow wrote:

>> I was thinking about it, and if nobody thinks it's too nitpicky, it would
>> be somewhat better if the string literal "--case-ok" wasn't used here
>> (and also in Add.lhs)  I was tinkering with some code as shown below to
>> extract the long option name programmatically.
>
> Good thought.  Perhaps you could make a function like
>  getLongDarcsOption :: DarcsOption -> String
>  -- I am horrible with function names; pick something reasonable
>
> So that you can just say (getLongDarcsOption allow_caseonly).
>
> This has the added benefit of avoiding stuff like head.
>

Ok, I figured I'd make this:

    DarcsArguments.getLongDarcsOptString :: DarcsOption -> String

Also, I see a lot of underscore-style functions like
get_long_darcs_opt_string. Is there a naming preference for this project?


Working on implementation, I needed to import to get this function for
DarcsArguments:

    import DarcsCommands ( get_long_option )


And I'm getting an error:

    Module imports form a cycle for modules:
      Test
        imports: IO DarcsUtils Lock RepoPrefs DarcsArguments DarcsRepo
                 PatchInfo PatchCore Patch Workaround Directory Monad
                 System DarcsUtils
      DarcsArguments
        imports: Bug DarcsCommands Workaround Printer SlurpDirectory
                 DarcsRepo Repository DarcsFlags PatchMatchData
                 FilePathUtils
                 DarcsURL RepoPrefs DarcsUtils PatchShow PatchInfo Patch
                 Char Monad
                 Maybe System List System.Directory System.Console.GetOpt
      DarcsCommands
        imports: Printer ArgumentDefaults DarcsUtils DarcsArguments
                 Workaround Global Test System.Exit Control.Exception
                 List Monad System.Console.GetOpt
      ArgumentDefaults imports: RepoPrefs DarcsArguments Maybe Monad
    make: *** [.depend] Error 1


Not sure what to do about it.

Thank you

-- 
  .~.    Dino Morelli
  /V\    email: dino at ui3.info
/( )\   irc: dwm
^^-^^   preferred distro: Debian GNU/Linux  http://www.debian.org




More information about the darcs-devel mailing list