Skip to content
This repository was archived by the owner on Oct 14, 2023. It is now read-only.
This repository was archived by the owner on Oct 14, 2023. It is now read-only.

has_repr and has_to_string type classes #1664

@leodemoura

Description

@leodemoura

The current type class has_to_string is similar to the Show Haskell typeclass.
The instances for string and char produced quoted values.

"abc" => "abc"
'a' => "a"

This is inconvenient since we often just need to convert a value (char, nat, string, int, etc) into a "plain" string (no quotes). @johoelzl suggested we add a has_repr type class. The idea is to rename the current has_to_string type class to has_repr, and add a new has_to_string whose instances are supposed to produce plain (i.e., no quotes) strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions