Declaration of type class with nullary class method yields internal error
Consider the following type class declaration:
class Arbitrary a where
arbitrary :: IO a
Compiling a module including this declaration results in the following error message from the Curry frontend:
kics2-frontend: Internal error: Base.Typing.matchType: (TypeApply (TypeConstructor (QualIdent {qidModule = Just (ModuleIdent {midPosition = NoPos, midQualifiers = ["Prelude"]}), qidIdent = Ident {idPosition = Position {file = "/net/medoc/home/jrt/forschung/quickchance/2018-QuickChance/.cpm/packages/pflp-1.0.1/src/.curry/PFLP.icurry", line = 8, column = 12}, idName = "IO", idUnique = 0}})) (TypeVariable 0)) (TypeArrow (TypeConstructor (QualIdent {qidModule = Nothing, qidIdent = Ident {idPosition = NoPos, idName = "()", idUnique = 0}})) (TypeApply (TypeConstructor (QualIdent {qidModule = Just (ModuleIdent {midPosition = NoPos, midQualifiers = ["Prelude"]}), qidIdent = Ident {idPosition = Position {file = "/net/medoc/home/jrt/forschung/quickchance/2018-QuickChance/.cpm/packages/pflp-1.0.1/src/.curry/PFLP.icurry", line = 8, column = 12}, idName = "IO", idUnique = 0}})) (TypeVariable (-1))))
CallStack (from HasCallStack):
error, called at src/Base/Messages.hs:78:21 in main:Base.Messages
kics2c: *** UserException: Illegal source program