ucsd-progsys / liquidhaskell

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

Missing Annotations (with GHC 7.10) #460

Open ranjitjhala opened 9 years ago

ranjitjhala commented 9 years ago

(I thought this was fixed but maybe this is a different problem.)

When I run tests/todo/bar.hs I don't get the right annotation for the recursive call to bar. Is this because of the SourceSpanTick issues? Or something else?

For example, the LOCBINDS trace in Annotate.hs yields this in 784

Trace: [LOCBINDS: ] : [(SrcSpanOneLine {srcSpanFile = "tmp/bar.hs", srcSpanLine = 11, srcSpanSCol = 14, srcSpanECol = 17},(Nothing,[a] -> {v : Int | v >= 0})),(SrcSpanOneLine {srcSpanFile = "tmp/bar.hs", srcSpanLine = 8, srcSpanSCol = 18, srcSpanECol = 24},(Just "lq_anf__dMc",Int)),(SrcSpanOneLine {srcSpanFile = "tmp/bar.hs", srcSpanLine = 11, srcSpanSCol = 14, srcSpanECol = 19},(Just "lq_anf__dMe",Int)),(SrcSpanOneLine {srcSpanFile = "tmp/bar.hs", srcSpanLine = 7, srcSpanSCol = 14, srcSpanECol = 15},(Just "GHC.Types.I#",x1:Int# -> {v : Int | v == (x1 : int)})),(SrcSpanOneLine {srcSpanFile = "tmp/bar.hs", srcSpanLine = 7, srcSpanSCol = 1, srcSpanECol = 4},(Just "Bar.bar",[a] -> {v : Int | v >= 0})),(SrcSpanOneLine {srcSpanFile = "tmp/bar.hs", srcSpanLine = 8, srcSpanSCol = 16, srcSpanECol = 17},(Nothing,x1:Int -> x2:Int -> {v : Int | v == x1 + x2})),(SrcSpanOneLine {srcSpanFile = "tmp/bar.hs", srcSpanLine = 11, srcSpanSCol = 18, srcSpanECol = 19},(Just "z",{v : [a] | v == z})),(SrcSpanOneLine {srcSpanFile = "tmp/bar.hs", srcSpanLine = 11, srcSpanSCol = 12, srcSpanECol = 13},(Nothing,x1:Int -> x2:Int -> {v : Int | v == x1 + x2})),(SrcSpanOneLine {srcSpanFile = "tmp/bar.hs", srcSpanLine = 11, srcSpanSCol = 10, srcSpanECol = 11},(Just "lq_anf__dMd",Int)),(SrcSpanOneLine {srcSpanFile = "tmp/bar.hs", srcSpanLine = 8, srcSpanSCol = 22, srcSpanECol = 24},(Just "xs",{v : [a] | v == xs})),(SrcSpanOneLine {srcSpanFile = "tmp/bar.hs", srcSpanLine = 8, srcSpanSCol = 14, srcSpanECol = 15},(Just "lq_anf__dMb",Int)),(SrcSpanOneLine {srcSpanFile = "tmp/bar.hs", srcSpanLine = 11, srcSpanSCol = 1, srcSpanECol = 5},(Just "Bar.flig",[a] -> Int)),(SrcSpanOneLine {srcSpanFile = "tmp/bar.hs", srcSpanLine = 11, srcSpanSCol = 6, srcSpanECol = 7},(Just "z",[a])),(SrcSpanOneLine {srcSpanFile = "tmp/bar.hs", srcSpanLine = 8, srcSpanSCol = 18, srcSpanECol = 21},(Just "Bar.bar",[a] -> {v : Int | v >= 0}))]

but this in 710 (note it has no info for the binder at line 8:18-21

Trace: [LOCBINDS:] : [(SrcSpanOneLine "tmp/bar.hs" 8 18 24,(Just "lq_anf__dwz",Int))
                      ,(SrcSpanOneLine "tmp/bar.hs" 7 14 15,(Just "GHC.Types.I#",x1:Int# -> {v : Int | v == (x1 : int)})),(SrcSpanOneLine "tmp/bar.hs" 7 1 4,(Just "Bar.bar",[a] -> {v : Int | v >= 0})),(SrcSpanOneLine "tmp/bar.hs" 8 16 17,(Nothing,x1:Int -> x2:Int -> {v : Int | v == x1 + x2})),(SrcSpanOneLine "tmp/bar.hs" 8 22 24,(Just "xs",{v : [a] | v == xs})),(SrcSpanOneLine "tmp/bar.hs" 8 14 15,(Just "lq_anf__dwy",Int))]

@gridaphobe can you look into this when you get a chance? (not super pressing)

gridaphobe commented 9 years ago

That's strange, I ended up reverting to our custom desugarer for 710, so I wouldn't expect this difference.. Will investigate!

ranjitjhala commented 9 years ago

Yes it may be something else though, not sure what...

On Sep 20, 2015, at 9:49 PM, Eric Seidel notifications@github.com wrote:

That's strange, I ended up reverting to our custom desugarer for 710, so I wouldn't expect this difference.. Will investigate!

— Reply to this email directly or view it on GitHub.

gridaphobe commented 8 years ago

Ugh, tests/todo/bar.hs doesn't seem to exist anymore..