Skip to content

Simple layout polymorphic function fails #396

@amblafont

Description

@amblafont

Cogent fails to compile this function, on master:

main : all (l :~ {a : U8} ). {a : U8} layout l -> {a : U8} layout l
main x = x

I get the output:

Parsing...
Resolving dependencies...
Typechecking...
Error: The layout of type 
   R ❲a : U8 (present) | ✗❳ [U]
 does not fit the layout of type 
   R ❲a : U8 (present) | ✗❳ [W] ()
   in the definition at ("simplepoly.cogent" (line 3, column 1))
   for the function main
Error: The layout of type 
   R ❲a : U8 (present) | ✗❳ [U]
 does not fit the layout of type 
   R ❲a : U8 (present) | ✗❳ [W] ()
   in the definition at ("simplepoly.cogent" (line 3, column 1))
   for the function main
Compilation failed!

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