-1

on ghci I want to use functions as infix functions. For example, I want to use the function div like this

3 'div' 2

but after do that on ghci, my ghci shows Syntax error message like this

<interactive>:3:3:
    Syntax error on 'div'
    Perhaps you intended to use -XTemplateHaskell

Is it normal? cause I've seen that kind of usage several times. And if it isn't normal, what I have to do?

1 Answer 1

4

Use backticks instead of single quotes.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.