Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error: ambiguous take and drop #39

Open
deyaaeldeen opened this issue Jan 24, 2018 · 0 comments
Open

Compilation error: ambiguous take and drop #39

deyaaeldeen opened this issue Jan 24, 2018 · 0 comments

Comments

@deyaaeldeen
Copy link

I get this error compiling using GHC 8.2.2

[12 of 23] Compiling Language.Python.Common.LexerUtils ( src/Language/Python/Common/LexerUtils.hs, .stack-work/dist/x86_64-osx/Cabal-2.0.1.1/build/Language/Python/Common/LexerUtils.o )

    /private/var/folders/1h/zmwb8fgs24l0djxm06mn_d600000gq/T/stack29031/language-python-0.5.4/src/Language/Python/Common/LexerUtils.hs:98:14: error:
        Ambiguous occurrence ‘take’
        It could refer to either ‘Prelude.take’,
                                 imported from ‘Prelude’ at src/Language/Python/Common/LexerUtils.hs:14:8-40
                                 (and originally defined in ‘GHC.List’)
                              or ‘Map.take’,
                                 imported from ‘Data.Map’ at src/Language/Python/Common/LexerUtils.hs:19:1-49
                                 (and originally defined in ‘Data.Map.Internal’)
       |
    98 |    literal = take len str
       |              ^^^^

    /private/var/folders/1h/zmwb8fgs24l0djxm06mn_d600000gq/T/stack29031/language-python-0.5.4/src/Language/Python/Common/LexerUtils.hs:123:17: error:
        Ambiguous occurrence ‘drop’
        It could refer to either ‘Prelude.drop’,
                                 imported from ‘Prelude’ at src/Language/Python/Common/LexerUtils.hs:14:8-40
                                 (and originally defined in ‘GHC.List’)
                              or ‘Map.drop’,
                                 imported from ‘Data.Map’ at src/Language/Python/Common/LexerUtils.hs:19:1-49
                                 (and originally defined in ‘Data.Map.Internal’)
        |
    123 |    = toBinary . drop 2
        |                 ^^^^

    /private/var/folders/1h/zmwb8fgs24l0djxm06mn_d600000gq/T/stack29031/language-python-0.5.4/src/Language/Python/Common/LexerUtils.hs:139:26: error:
        Ambiguous occurrence ‘take’
        It could refer to either ‘Prelude.take’,
                                 imported from ‘Prelude’ at src/Language/Python/Common/LexerUtils.hs:14:8-40
                                 (and originally defined in ‘GHC.List’)
                              or ‘Map.take’,
                                 imported from ‘Data.Map’ at src/Language/Python/Common/LexerUtils.hs:19:1-49
                                 (and originally defined in ‘Data.Map.Internal’)
        |
    139 |    return $ toToken loc (take len str)
        |                          ^^^^


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant