haskell - Multiple declarations of 'MyModule.myTypeclassFunction' -
in main.hs
class aable getname :: aable → string class b bable getname :: bable → string
returns compilation error leksah/ghc
src\main.hs:23:4: multiple declarations of `main.getname' declared at: src\main.hs:20:4 src\main.hs:23:4
i need both able return name, different signification in both cases. should declare class , b in 2 different modules ?
kneejerk reaction: use show
. reading better, see want propably different semantically (despite identical type signatures). why not use different name? descriptiona
, descriptionb
perhaps? declaring them in different modules solve compilation error, (1) still have 2 different things same name , (2) whenever import both modules (unqualified), you'll same error.
Comments
Post a Comment