Skip to content

Is it possible (and sensible) to disable the monomorphism restriction when suggesting type sigs? #558

Closed
@expipiplus1

Description

@expipiplus1

Perhaps this is too simply solved by adding the extension pragma to the file, nevertheless I've bumped into a couple of times when writing something where I'd like to add a general sig to it, and HLS suggests the monomorphized version. I've not yet bumped into the converse problem.

An example:

(<||>) = liftA2 (||)

I'd like HLS to suggest (<||>) :: Applicative f => f Bool -> f Bool -> f Bool, however it currently suggests (<||>) :: (Char -> Bool) -> (Char -> Bool) -> Char -> Bool or something.

I assume that it would be computationally expensive (and potentially confusing) to juggle language extensions like this, but thought I'd mention anyway, feel free to close with prejudice :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions