Fpenguin23
Fpenguin23

Reputation: 1

haskell syntax error in operator usage

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?

Upvotes: -1

Views: 108

Answers (1)

user1804599
user1804599

Reputation:

Use backticks instead of single quotes.

Upvotes: 4

Related Questions