You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been looking into using this library as part of a larger project and I have a quick question. From what I can figure out, an instance of HasClass is required to exist in order for a constraint to be available on a value. Based on local testing, my question is this: could the following instance declaration be used instead of needing to write an instance for every combination of constraint and data type?
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
instanceca=>HasClasscaTruewhere classDict _ _ _ =TDict
Forgive me for my ignorance if I'm incorrectly understanding how HasClass works, though I've done a bit of local testing as I said and this appears to work for some custom typeclasses defined in my code.
The text was updated successfully, but these errors were encountered:
I've been looking into using this library as part of a larger project and I have a quick question. From what I can figure out, an instance of
HasClass
is required to exist in order for a constraint to be available on a value. Based on local testing, my question is this: could the following instance declaration be used instead of needing to write an instance for every combination of constraint and data type?Forgive me for my ignorance if I'm incorrectly understanding how
HasClass
works, though I've done a bit of local testing as I said and this appears to work for some custom typeclasses defined in my code.The text was updated successfully, but these errors were encountered: