
10 Sep
2016
10 Sep
'16
5:47 p.m.
Hello Uneeb, instances of class Stack are defined for *s*. empty's *return* type is *s a* *empty* does not take any arguments. GHCi is confused about *empty*'s *return* type. option 1: try adding *return* type at prompt e.g.: empty::ListStack Int instead of just empty option 2: add *a* as Stack class parameter i.e.: class Stack s *a* where ... then if you define only 1 instance, interactive will probably assume that you expect *empty* to return that (the only one defined) type see if this works