equal
deleted
inserted
replaced
181 str "newtype" |
181 str "newtype" |
182 :: print_typdecl tyvars (deresolve_tyco tyco, vs) |
182 :: print_typdecl tyvars (deresolve_tyco tyco, vs) |
183 :: str "=" |
183 :: str "=" |
184 :: (str o deresolve_const) co |
184 :: (str o deresolve_const) co |
185 :: print_typ tyvars BR ty |
185 :: print_typ tyvars BR ty |
186 :: (if deriving_show tyco then [str "deriving (Read, Show)"] else []) |
186 :: (if deriving_show tyco then [str "deriving (Prelude.Read, Prelude.Show)"] else []) |
187 ) |
187 ) |
188 end |
188 end |
189 | print_stmt (Type_Constructor tyco, Code_Thingol.Datatype (vs, co :: cos)) = |
189 | print_stmt (Type_Constructor tyco, Code_Thingol.Datatype (vs, co :: cos)) = |
190 let |
190 let |
191 val tyvars = intro_vars vs reserved; |
191 val tyvars = intro_vars vs reserved; |
199 str "data" |
199 str "data" |
200 :: print_typdecl tyvars (deresolve_tyco tyco, vs) |
200 :: print_typdecl tyvars (deresolve_tyco tyco, vs) |
201 :: str "=" |
201 :: str "=" |
202 :: print_co co |
202 :: print_co co |
203 :: map ((fn p => Pretty.block [str "| ", p]) o print_co) cos |
203 :: map ((fn p => Pretty.block [str "| ", p]) o print_co) cos |
204 @ (if deriving_show tyco then [str "deriving (Read, Show)"] else []) |
204 @ (if deriving_show tyco then [str "deriving (Prelude.Read, Prelude.Show)"] else []) |
205 ) |
205 ) |
206 end |
206 end |
207 | print_stmt (Type_Class class, Code_Thingol.Class (v, (classrels, classparams))) = |
207 | print_stmt (Type_Class class, Code_Thingol.Class (v, (classrels, classparams))) = |
208 let |
208 let |
209 val tyvars = intro_vars [v] reserved; |
209 val tyvars = intro_vars [v] reserved; |