Skip to content

AtIndex with destructed parameterised type #255

@1BAH

Description

@1BAH
import Derivation.DepTyCheck.Gen

%default total

data BoolableTy : Bool -> Type where
    T : BoolableTy True
    F : BoolableTy False

record Wrapper where
    constructor W
    Arg   : BoolableTy bool

data AtIndex : (wrap : Wrapper) ->
               (arg : BoolableTy predicate) ->
               Type where
    Here : {pred : Bool} -> {arg : BoolableTy pred} -> AtIndex (W arg) arg

atIndexGen : Fuel ->
            (v : Bool) ->
            (w : Wrapper) ->
            (arg   : BoolableTy v) ->
            Gen MaybeEmpty $ AtIndex w arg

Derivation fails with error:

[ build ] Error: While processing right hand side of atIndexGen. Error during reflection: While processing right hand side
[ build ] of $resolved15024,<AtIndex.AtIndex>[0, 1, 2, 3]. While processing right hand side
[ build ] of with block in $resolved15024,<AtIndex.AtIndex>[0, 1, 2, 3],<<AtIndex.Here>>. to_be_deceqed^^pred0 is not accessible in this context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    derive: coreSomething in between single type generator and its constructorsissue: bad messageWhen library reports some problem badlypart: derivationRelated to automated derivation of generatorsstatus: confirmed bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions