Skip to content

Respect the prelude's import lists #274

@gelisam

Description

@gelisam

Since I'm only importing the Text type, not all of the functions from that module, it should be unambiguous that filter refers to Prelude.filter:

$ cat ~/.hawk/prelude.hs
import Prelude
import Data.Text (Text)

$ hawk 'filter odd [1,2,3]'
error: Won't compile:
    Ambiguous occurrence ‘filter’
It could refer to
    either ‘Prelude.filter’,
        imported from ‘Prelude’ (and originally defined in ‘GHC.List’)
    or ‘Data.Text.filter’, imported from ‘Data.Text’

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