- spec o = comm ++ decl
- where decl = case o of
- PrimOpSpec { name = n, ty = t } -> wrapOp n ++ " :: " ++ pprTy t
- PseudoOpSpec { name = n, ty = t } -> wrapOp n ++ " :: " ++ pprTy t
- PrimTypeSpec { ty = t } -> "data " ++ pprTy t
- Section { } -> ""
+ spec o = comm : decls
+ where decls = case o of
+ PrimOpSpec { name = n, ty = t } ->
+ [ wrapOp n ++ " :: " ++ pprTy t,
+ wrapOp n ++ " = let x = x in x" ]
+ PseudoOpSpec { name = n, ty = t } ->
+ [ wrapOp n ++ " :: " ++ pprTy t,
+ wrapOp n ++ " = let x = x in x" ]
+ PrimTypeSpec { ty = t } ->
+ [ "data " ++ pprTy t ]
+ Section { } -> []