Well it compiles after some rearrangements
    
    
    #module eqc.nim
    
    import eq_impl
    
    type Eq* = concept x, y
      eq(x, y) is bool
      ne(x, y) is bool
    
    func is_symmetric*(x, y: Eq): bool =
      eq(x, y) == eq(y, x)
    
    #module eq_impl.nim
    
    func eq*(x, y: int): bool = x == y
    func ne*(x, y: int): bool = x != y
    
    import eqc
    
    assert int is Eq
    assert eq(3, 3)
    assert is_symmetric(3, 4)
    
    
    
    
    Run

explanations:

  * eq.nim had to be renamed due to name collision
  * import eqc has to be behind the func/proc definitions due to forwarding. 


Reply via email to