fix documentation for parsing libraries compatibility layers

This commit is contained in:
Mesabloo 2022-04-22 22:04:39 +02:00
parent 256a331ce5
commit eb980bd51c
3 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack
name: diagnose
version: 1.7.0
version: 1.7.1
synopsis: Beautiful error reporting done easily
description: This package provides a simple way of getting beautiful compiler/interpreter errors
using a very simple interface for the programmer.

View File

@ -1,5 +1,5 @@
name: diagnose
version: 1.7.0
version: 1.7.1
github: "mesabloo/diagnose"
license: BSD3
author: "Ghilain Bergeron"

View File

@ -133,7 +133,7 @@ import Error.Diagnose.Report as Export
-- Here are two examples of the same diagnostic, the first output with unicode characters, and the second output with ASCII characters:
--
-- > [error]: Error with one marker in bounds
-- > ╭─▶ test.zc@1:25-1:30
-- > ╭─▶ test.zc@1:25-1:30
-- > │
-- > 1 │ let id<a>(x : a) : a := x + 1
-- > • ┬────
@ -141,7 +141,7 @@ import Error.Diagnose.Report as Export
-- > ─────╯
--
-- > [error]: Error with one marker in bounds
-- > +-> test.zc@1:25-1:30
-- > +--> test.zc@1:25-1:30
-- > |
-- > 1 | let id<a>(x : a) : a := x + 1
-- > : ^----
@ -214,7 +214,7 @@ import Error.Diagnose.Report as Export
-- >
-- > case res of
-- > Left bundle ->
-- > let diag = errorDiagnosticFromBundle "Parse error on input" Nothing bundle
-- > let diag = errorDiagnosticFromBundle Nothing "Parse error on input" Nothing bundle
-- > -- Creates a new diagnostic with no default hints from the bundle returned by megaparsec
-- > diag' = addFile diag filename content
-- > -- Add the file used when parsing with the same filename given to 'MP.runParser'
@ -224,7 +224,7 @@ import Error.Diagnose.Report as Export
-- This example will return the following error message (assuming default instances for @'Error.Diagnose.Compat.Megaparsec.HasHints' 'Data.Void.Void' msg@):
--
-- > [error]: Parse error on input
-- > ╭─▶ <interactive>@1:6-1:7
-- > ╭─▶ <interactive>@1:6-1:7
-- > │
-- > 1 │ 00000a2223266
-- > • ┬
@ -255,7 +255,7 @@ import Error.Diagnose.Report as Export
-- >
-- > case res of
-- > Left error ->
-- > let diag = errorDiagnosticFromParseError "Parse error on input" Nothing error
-- > let diag = errorDiagnosticFromParseError Nothing "Parse error on input" Nothing error
-- > -- Creates a new diagnostic with no default hints from the bundle returned by megaparsec
-- > diag' = addFile diag filename content
-- > -- Add the file used when parsing with the same filename given to 'MP.runParser'
@ -265,7 +265,7 @@ import Error.Diagnose.Report as Export
-- This will output the following errr on @stderr@:
--
-- > [error]: Parse error on input
-- > ╭─▶ <interactive>@1:6-1:7
-- > ╭─▶ <interactive>@1:6-1:7
-- > │
-- > 1 │ 00000a2223266
-- > • ┬