We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be useful and relatively easy to add support for associated types to type classes. Here's an example:
open import Haskell.Prelude record Collection (c : Set) : Set₁ where field Elem : Set empty : c insert : Elem → c → c member : Elem → c → Bool toList : c → List Elem open Collection {{...}} public {-# COMPILE AGDA2HS Collection class #-} instance iCollectionList : {{Eq a}} → Collection (List a) iCollectionList {a} = record { Elem = a ; empty = [] ; insert = _∷_ ; member = elem ; toList = id } {-# COMPILE AGDA2HS iCollectionList #-}
Currently this produces a panic in agda2hs:
agda2hs
Panic: Pattern match failure in 'do' block at src/Agda2Hs/Compile/Term.hs:147:7-26
The text was updated successfully, but these errors were encountered:
To think about: how to support the case when Elem is an associated data type?
Elem
Sorry, something went wrong.
No branches or pull requests
It would be useful and relatively easy to add support for associated types to type classes. Here's an example:
Currently this produces a panic in
agda2hs
:The text was updated successfully, but these errors were encountered: