Skip to content

Support mutually recursive types with autoHsType #19

@yveshauser

Description

@yveshauser

I'm using the branch upstream-convertible-hstype.

The example

open import Class.HasHsType
open import Tactic.Derive.HsType

module Issue.Example where

data X : Set
data Y : Set

data X where
  MkX : Y  X

data Y where
  MkY : X  Y

instance
  HSTy-X : HasHsType X
  HSTy-Y : HasHsType Y

  HSTy-X = autoHsType X
  HSTy-Y = autoHsType Y

generates

data X = MkX (MAlonzo.Code.Class.HasHsType.HasHsType.HsType MAlonzo.Code.Issue.Example.HSTy-Y)
  deriving (Show, Eq, Generic)
data Y = MkY MAlonzo.Code.Issue.Example._.X
  deriving (Show, Eq, Generic)

where I would expect

data X = MkX MAlonzo.Code.Issue.Example.Y
  deriving (Show, Eq, Generic)
data Y = MkY MAlonzo.Code.Issue.Example.X
  deriving (Show, Eq, Generic)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions