
12 Mar
2013
12 Mar
'13
6:42 a.m.
Hi I have such a stack data structure: datamystack =Empty |Elem Char mystack derivingShow I'm trying to get the head of the stack using this: pophead :: Stack -> Char pophead Empty = Empty pophead (Element x stack) = x And I'm getting this error for the last sentence of the function : Not in scope: data constructor `Stack' Can you tell me how to fix it? Thanks.