[m-rev.] for review: add string.line type

Peter Ross pro at missioncriticalit.com
Fri Apr 20 11:21:24 AEST 2007


On 4/20/07, Peter Wang <wangp at students.csse.unimelb.edu.au> wrote:
> @@ -9092,6 +9095,21 @@
>      )
>  ].
>
> +:- instance stream.reader(io.input_stream, text_file, io, io.error)
> +    where
> +[
> +    ( get(Stream, Result, !IO) :-
> +        io.read_file_as_string(Stream, Result0, !IO),
> +        (
> +            Result0 = ok(String),
> +            Result = ok(text_file(String))
> +        ;
> +            Result0 = error(_PartialString, Error),
> +            Result = error(Error)
> +        )
> +    )
> +].
> +
You shouldn't be ignoring the PartialString it should also be in the
error, we should also have similar behaviour for a line.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list