Skip to content

Smart constructor for Symbol rather than requiring -XOverloadedLists #297

@ocramz

Description

@ocramz

It took me a minute to realize coffeeTeaAutomaton only works when OverloadedLists is on. Requiring the extension runs the risk of breaking other code in a module (just happened to me), which is not ideal.

Feature request : Can we have smart constructors for Symbol ? e.g.

symbol :: a -> Label a
symbol = Symbol 

and

symbols :: Foldable t => t a -> Label a
symbols = foldr ((<>) . Symbol) Zero

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions