Skip to content

Deriving push for function types should be possible, but even with a wrapped data type is broken. #232

@dorchard

Description

@dorchard

We would like to be able to do

push @(->)

to get the function (a -> b)[r] -> a [r] -> b [r] but this currently does not parse. When investigating I tried to make a wrapper:

data Fun a b = Fun (a -> b)

but push @ Fun gives:

Granule> :t push @ Fun
grepl: Cannot push derive for type a0 -> a1
CallStack (from HasCallStack):
  error, called at src/Language/Granule/Synthesis/Deriving.hs:243:3 in granule-frontend-0.9.5.0-5UdUxTp5lHb2yDT2r0aV24:Language.Granule.Synthesis.Deriving

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions