
25 Dec
2015
25 Dec
'15
7:56 p.m.
Hello Abhijit a properly formatted statement as you intended it is: instance Functor (Pair1 m n) where fmap f (Pair1 (x,y,z))=Pair1 (f x,y,z) note the indent before fmap. without the tab, fmap f (Pair1 (x,y,z))=Pair1 (f x,y,z) is just a stand alone function delcaration if you enter instance.. line #1 but not the fmap line #2, you will see the same warning you are seeing. if you enter #2 but not #1, this line: getPair1 $ fmap (*100) (Pair1 (2,3,1)) will work fine too. basically, flush (no indent) line begins a new code block