Skip to content

Haskell backend prints a list [Char] containing characters as string #359

Closed

Description

@andreasabel

Grammar

(:[]). [Char] ::= "*" Char ";";
(:).   [Char] ::= "*" Char ";" [Char];

and input

* 'A';
* 'B';
* 'C';

results in printed output

"ABC"

The other backends print this correctly.

Activity

  1. added
    listsConcerning list categories and separator/terminator/delimiter pragmas
    printerConcerning the generated printer
    on Apr 24, 2021
  2. added this to the 2.9.2 milestone on May 2, 2021
  3. andreasabel commented on May 2, 2021

    @andreasabel
    MemberAuthor

    The overloaded prt function can naturally not deal with both of [Char] and String, since these are the same type. Should not be a problem with Text tokens, though.

    A way to fix this would be to have a non-overloaded printing function for String, so it does not clash with [Char].

  4. self-assigned this
    on May 2, 2021
  5. andreasabel commented on May 2, 2021

    @andreasabel
    MemberAuthor
    • If category [Char] is used, we now have printString instead of instance Print String.
    • Method prtList has been removed from class Print.
  6. added a commit that references this issue on May 2, 2021
  7. added a commit that references this issue on Mar 1, 2026
    5e94845
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

HaskellbuglistsConcerning list categories and separator/terminator/delimiter pragmasprinterConcerning the generated printer

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions