Termination check on unionWith

后端 未结 2 870
醉话见心
醉话见心 2021-01-24 06:51

I\'m having a problem with termination checking, very similar to the one described in this question and also this Agda bug report/feature request.

The problem is convinc

2条回答
  •  太阳男子
    2021-01-24 07:35

    Here's an alternative based on sized types, based on the answer to this later question. You can pick up the Data.Extended-key module from here, or you can tweak the code below so that it uses Data.AVL.Extended-key from the standard library instead.

    Preamble:

    {-# OPTIONS --sized-types #-}
    
    open import Relation.Binary renaming (IsStrictTotalOrder to IsSTO)
    open import Relation.Binary.PropositionalEquality as P using (_≡_)
    
    -- A list of (key, value) pairs, sorted by key in strictly descending order.
    module Temp
       {

提交回复
热议问题