Skip to content

Kind inference crash #5566

Open
Open
@pchiusano

Description

To reproduce, clone @pchiusano/arcella/@pchiusano/kind-inference-bug blah, then put the following in a scratch file:

main1 : '{IO, Exception} Text
main1 = Cloud.main do 
  t = Cloud.submit Environment.default() do 
    N = 20000
    t0 = time.monotonic!
    ns = List.range 0 N |> List.map (i -> (tokenize (nat i), i))
    _ = MemTrie.fromList ns
    t1 = time.monotonic! 
    t1 - t0 |> Duration.toText
  t

type TokenTrie a 
  = TokenTrie (Optional a) 
              (TokenTrie a) 
              (TokenTrie a) 
              (Map Bytes (TokenTrie a))  
  | Empty

Save, then do run main1, you'll get:

Encountered exception:
[typeConstraintTree] Ref lookup failure: ReferenceDerived (Id "nk9jfsoidsc5h3nhcf1p6528t6c5hqui3hridbvaqnruel4jns3qo6plgups2sgi82c9jgt9ba1qlkum1bdjdgp75h7si2thbo7tcfg" 0)
CallStack (from HasCallStack):
  error, called at src/Unison/KindInference/Generate.hs:97:22 in unison-parser-typechecker-0.0.0-JliU30UQmMa2dDW5SxUdL:Unison.KindInference.Generate

Tested on mac with version 0.5.32

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions