यह शायद एक बेवकूफ सवाल यह है की एक उपयोग से उत्पन्न होने अनुमान नहीं किया जा सका, लेकिन क्यों इस समारोह(घिरा A1) 'minBound'
myTest :: (Bounded a) => a
myTest = minBound :: a
typecheck नहीं करता है?
यह
myTest' :: Int
myTest' = minBound :: Int
काम करता है और वे यह काम करने के लिए आपको मेरे लिए एक ही लगता है, सिवाय इसके कि एक पूर्व टाइप करने के लिए होता है (जैसे myTest :: इंट)।
त्रुटि मैं
• Could not deduce (Bounded a1) arising from a use of ‘minBound’
from the context: Bounded a
bound by the type signature for:
myTest :: Bounded a => a