conal / reification-rules

GHC Core reification via rules
Other
6 stars 1 forks source link

Report which identifier failed to reify when there is an error #1

Closed gmalecha closed 8 years ago

gmalecha commented 8 years ago

Currently something like

 reify fmap ==> error "reifyE: Oops -- not eliminated"

which isn't very helpful in tracking down the problem.

conal commented 8 years ago

Now, compiling min :: Int -> Int -> Int (as in test/Basic.hs) leads to the following compile-time error message:

ghc: panic! (the 'impossible' happened)
  (GHC version 8.0.1 for x86_64-apple-darwin):
    reification residuals:
  [case evalP @ Int x_a7dm of wild_a7do { I# x1_a7dq [Dmd=<S,U>] ->
   case evalP @ Int y_a7dn of wild1_a7ds { I# y1_a7du [Dmd=<S,U>] ->
   case tagToEnum# @ Bool (<=# x1_a7dq y1_a7du) of _ [Occ=Dead] {
     False -> wild1_a7ds;
     True -> wild_a7do
   }
   }
   }]

I'm closing this issue for now, but please re-open it if problems arise. I don't yet have enough experience with this new flagging of reification residuals to be terribly confident.