SR23
SR23

Reputation: 49

Why complains Haskell parse error on input `|' in this Function?

I was supposed to write a little function in Haskell, which should erase elements, which are twice in the list. Unfortunately, Haskell complains " parse error on input `|' ". Could anyone help me with that?

makeSets=mSet[]s
         where 
            mSet stack []=stack
            mSet stack (x:xs)
                             |contains stack x=mSetstack xs
                             | otherwise =mSet (x:stack) xs
                                          where 
                                                contains [] thing=False
                                                contains (x:xs)thing
                                                                     | x==thing=True
                                                                     |otherwise=contains xs thing

Upvotes: 0

Views: 1574

Answers (1)

amalloy
amalloy

Reputation: 92067

You are mixing tabs and spaces, which is no good when indentation is significant. Use either all spaces (strongly recommended), or all tabs.

Upvotes: 5

Related Questions