#4894: Missing improvement for fun. deps.
----------------------------------------+-----------------------------------
    Reporter:  diatchki                 |        Owner:              
        Type:  bug                      |       Status:  new         
    Priority:  normal                   |    Milestone:              
   Component:  Compiler (Type checker)  |      Version:  7.1         
    Keywords:                           |     Testcase:              
   Blockedby:                           |   Difficulty:              
          Os:  Unknown/Multiple         |     Blocking:              
Architecture:  Unknown/Multiple         |      Failure:  None/Unknown
----------------------------------------+-----------------------------------

Comment(by diatchki):

 (Thanks for the link, I've been looking at an older version of the paper).

 I had forgotten that FC already had a built-in "axiom" construct.  With
 this, I think that the only thing that would need to change is to
 generalize axioms to allow them to have parameters.  This is a
 generalization because we can use it to express conditional equalities.

 Then, what I was trying to say above amounts to: a class declaration with
 FDs
 {{{
 class C a b | a -> b, b -> a where ...
 }}}

 translates in FC to:
 {{{
 data C a b where ...

 axiom C_fd0 a b1 b2 : (C a b1, C a b2) => (b1 ~ b2)
 axiom C_fd1 a1 a2 b : (C a1 b, C a2 b) => (a1 ~ a2)
 }}}
 (I wrote the axiom parameters using "(...) =>" to mimic Hashell's
 notation)

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4894#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to