New instance declaration for Show

后端 未结 3 963
我寻月下人不归
我寻月下人不归 2021-02-01 14:50

I\'m trying to add an instance declaration in Haskell for a new data type I\'ve created unsuccessfully. Here what I\'ve tried so far:

data Prediction = Predictio         


        
3条回答
  •  日久生厌
    2021-02-01 15:14

    Replace your last line with:

    instance Show Prediction where
        show = showPrediction
    

提交回复
热议问题