Hi,

I read here:

www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Exception.html

that this is declared:

---
class (Typeable e, Show e) => Exception e where
  toException :: e -> SomeException
  fromException :: SomeException -> Maybe e
---

I understand this means Excepton is a class. But
after I try:

---
instance Exception DbError where
---

GHC says:

Type constructor `Exception' used as a class
In the instance declaration for `Exception DbError'

Isn't Exception a class? If it is, what is the proper
way to have an Exception instance for my type?

Thanks,
Maurício

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to