Open plredmond opened 2 years ago
Thanks @plredmond. Probably a dive into the elaboration code is worth to understand and fix this failure.
One side question is whether LH should be in the business of analyzing these automatically derived instances.
It shouldn't and I thought there was already a flag to skip doing that?
On Wed, Jun 29, 2022 at 5:18 AM Facundo Domínguez @.***> wrote:
Thanks @plredmond https://urldefense.com/v3/__https://github.com/plredmond__;!!Mih3wA!G4XWnHS_YRzugZgHwbmJkvjt1jWbaNQO_MVlzyS_1PqnDVdJOHGwhjCfk-67U3r1KV4zhDTB-2s_q3r22vhnZvtr$. Probably a dive into the elaboration code is worth to understand and fix this failure.
One side question is whether LH should be in the business of analyzing these automatically derived instances.
— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/ucsd-progsys/liquidhaskell/issues/2019*issuecomment-1169910022__;Iw!!Mih3wA!G4XWnHS_YRzugZgHwbmJkvjt1jWbaNQO_MVlzyS_1PqnDVdJOHGwhjCfk-67U3r1KV4zhDTB-2s_q3r22nAfrYj4$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAMS4OEFVS3MTIQBCMBD2J3VRQ5H7ANCNFSM52EO4L7Q__;!!Mih3wA!G4XWnHS_YRzugZgHwbmJkvjt1jWbaNQO_MVlzyS_1PqnDVdJOHGwhjCfk-67U3r1KV4zhDTB-2s_q3r22vSvJGaB$ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@plredmond does this work with --no-class-check
?
I tried adding {-@ LIQUID "--no-class-check" @-}
to the file, but it did not resolve the issue.
[Edit: {-@ LIQUID "--skip-module" @-}
resolves it, but that has other implications.]
@lkuper hit this bug today because the tip of one of our development branches derives generic instances of data structures for serialization (https://github.com/lsd-ucsc/cbcast-lh/blob/964f6452612e8d4045210cd40f18af5d0a52dba9/lib/CBCAST.hs#L57-L59)
Ugh sorry about that. Probably best to
(Till this is fixed)
On Thu, Jul 14, 2022 at 3:23 PM plredmond @.***> wrote:
@lkuper https://urldefense.com/v3/__https://github.com/lkuper__;!!Mih3wA!B6SKyShQVCiocfzqYfS8EB0GpZgWQ4__QnbNEUVGlAJkBB2ydUB-vuQw5Q9SuP08rPqzn2O9B9tFfxvC-rHWdzY4$ hit this bug today because the tip of one of our development branches derives generic instances of data structures for serialization ( https://github.com/lsd-ucsc/cbcast-lh/blob/964f6452612e8d4045210cd40f18af5d0a52dba9/lib/CBCAST.hs#L57-L59 https://urldefense.com/v3/__https://github.com/lsd-ucsc/cbcast-lh/blob/964f6452612e8d4045210cd40f18af5d0a52dba9/lib/CBCAST.hs*L57-L59__;Iw!!Mih3wA!B6SKyShQVCiocfzqYfS8EB0GpZgWQ4__QnbNEUVGlAJkBB2ydUB-vuQw5Q9SuP08rPqzn2O9B9tFfxvC-ohKS_q2$ )
— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/ucsd-progsys/liquidhaskell/issues/2019*issuecomment-1184952335__;Iw!!Mih3wA!B6SKyShQVCiocfzqYfS8EB0GpZgWQ4__QnbNEUVGlAJkBB2ydUB-vuQw5Q9SuP08rPqzn2O9B9tFfxvC-nTlaKjk$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAMS4OEIOFOQ6KYVN2VB3EDVUCHOFANCNFSM52EO4L7Q__;!!Mih3wA!B6SKyShQVCiocfzqYfS8EB0GpZgWQ4__QnbNEUVGlAJkBB2ydUB-vuQw5Q9SuP08rPqzn2O9B9tFfxvC-klq0NLv$ . You are receiving this because you commented.Message ID: @.***>
Repro code
Repro7.hs
```haskell {-# LANGUAGE DeriveGeneric #-} module Repro7 where import GHC.Generics (Generic) {-@ data D = D { x::Nat, y::() } @-} data D = D { x::Int, y::() } deriving Generic ```Expected behavior
Actual behavior
"elaborate solver" crash
``` [22 of 23] Compiling Repro7 **** LIQUID: ERROR *************************************************************Nat
toInt
in refinement fixes.Nat
to{z:Int | z < 0}
does not fix (so it seems any refinement causes the problem).()
to another type such asBool
does not fix (so it seems the issue is related to having multiple fields, possibly something to do with the:*:
constructor inGHC.Generics
).Versions affected