ucsd-progsys / liquidhaskell

Liquid Types For Haskell
BSD 3-Clause "New" or "Revised" License
1.17k stars 131 forks source link

The sort GHC.Natural.Natural is not numeric #1500

Open CodiePP opened 5 years ago

CodiePP commented 5 years ago

in Control.Concurrent.STM.TBQueue

function newTBQueue :: Natural -> STM (TBQueue a) requires a "Natural" argument.

LH complains that this cannot be compared (==) to an int.

Adding {-@ embed GHC.Natural.Natural as int @-} solved the problem. But, could this be added to the specs in "include/GHC" ?


liquid: LiquidHaskell Version 0.8.6.0 (compiled from develop)

ranjitjhala commented 5 years ago

Hi @CodiePP -- yes sure, you could add this. Do you want to submit a PR?

ranjitjhala commented 5 years ago

And thanks!!