[m-rev.] for review: auto detection of library grades
Paul Bone
paul at bone.id.au
Tue Sep 3 16:40:30 AEST 2013
On Tue, Sep 03, 2013 at 04:12:48PM +1000, Paul Bone wrote:
> On Wed, Aug 28, 2013 at 05:47:00PM +1000, Julien Fischer wrote:
> > + globals.lookup_bool_option(Globals, auto_detect_libgrades, AutoDetect),
> > + (
> > + AutoDetect = yes,
> > + ( if
> > + % Was the standard library directory set on the command line?
> > + % + globals.lookup_maybe_string_option(Globals,
> > + mercury_standard_library_directory, MaybeStdLibDir),
> > + MaybeStdLibDir = yes(MerStdLibDir)
>
> Some strange formatting in your patch.
>
> > + then
> > + do_auto_detect_libgrades(MerStdLibDir, GradeOpts, !IO)
> > + else if
> > + % Was the standard library directory set using the
> > + % MERCURY_STDLIB_DIR variable?
> > + MaybeConfigMerStdLibDir = yes([MerStdLibDir])
> > + then
> > + do_auto_detect_libgrades(MerStdLibDir, GradeOpts, !IO)
> > + else
> > + GradeOpts = [] + )
>
> You can factor out common code by putting both ITE conditions in a
> disjunction and then using a single then branch.
Actually never mind, since this produces a value it'd be nondet.
--
Paul Bone
http://www.bone.id.au
More information about the reviews
mailing list