[GHC] #10592: Allow cycles in class declarations
GHC
ghc-devs at haskell.org
Wed Jul 1 05:14:21 UTC 2015
#10592: Allow cycles in class declarations
-------------------------------------+-------------------------------------
Reporter: | Owner:
MikeIzbicki | Status: new
Type: feature | Milestone:
request | Version: 7.10.1
Priority: normal | Operating System: Unknown/Multiple
Component: Compiler | Type of failure: None/Unknown
(Type checker) | Blocked By:
Keywords: | Related Tickets:
Architecture: |
Unknown/Multiple |
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
In particular, I would like to have a class hierarchy that looks like:
{{{
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
type family Scalar x
class Field (Scalar x) => Vector x
class Vector x => Field x
}}}
It is the case that every field is a vector, and the scalar associated
with every vector is a field. But we can't currently enforce that.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10592>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list