How to call a function without parameters from an instance?
Suppose you have a class: class AClass a where func:: Intinstance AClass SomeTree where func = 0instance AClass Double where func = 1 How do I call the function func? Answer {-# LANGUAGE AllowAmbiguousTypes, TypeApplications #-}class AClass a where func: : Intinstance AClass SomeTree where func = 0instance AClass Double where func = 1foo :: Intfoo = func @SomeTree + func @Double {-# LANGUAGE ScopedTypeVariables, UnicodeSyntax #-}bar :: ? a . AClass a => a -> Intbar _ = func @a