Commit 37a594c2 authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.
Browse files

Fix assertion and default case for GADT record selectors

Mon Sep 18 17:16:10 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
  * Fix assertion and default case for GADT record selectors
  Sun Aug  6 20:53:39 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
    * Fix assertion and default case for GADT record selectors
    Wed Aug  2 11:04:21 EDT 2006  kevind@bu.edu
parent 71cad0e1
......@@ -551,7 +551,7 @@ mkRecordSelId tycon field_label
-- foo = /\a. \t:T. case t of { MkT f -> f a }
mk_alt data_con
= ASSERT2( res_ty `tcEqType` field_tau, ppr data_con $$ ppr res_ty $$ ppr field_tau )
= ASSERT2( res_ty `tcEqType` field_ty, ppr data_con $$ ppr res_ty $$ ppr field_ty )
mkReboxingAlt rebox_uniqs data_con (ex_tvs ++ co_tvs ++ arg_vs) rhs
where
-- get pattern binders with types appropriately instantiated
......@@ -581,7 +581,7 @@ mkRecordSelId tycon field_label
the_arg_id = assoc "mkRecordSelId:mk_alt" (field_lbls `zip` field_vs) field_label
field_lbls = dataConFieldLabels data_con
error_expr = mkRuntimeErrorApp rEC_SEL_ERROR_ID field_tau full_msg
error_expr = mkRuntimeErrorApp rEC_SEL_ERROR_ID field_ty full_msg
full_msg = showSDoc (sep [text "No match in record selector", ppr sel_id])
-- unbox a product type...
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment