- LFCon con True -> CONSTR_NOCAF
- LFCon con False -> CONSTR
- LFReEntrant _ _ _ _ -> FUN
- LFTuple _ _ -> CONSTR
- LFThunk _ _ _ _ (SelectorThunk _) -> THUNK_SELECTOR
- LFThunk _ _ _ _ _ -> THUNK
- _ -> panic "getClosureType"
+ LFCon con True -> CONSTR_NOCAF
+ LFCon con False -> CONSTR
+ LFReEntrant _ _ _ _ _ _ -> FUN
+ LFTuple _ _ -> CONSTR
+ LFThunk _ _ _ _ (SelectorThunk _) _ _ -> THUNK_SELECTOR
+ LFThunk _ _ _ True _ _ _ -> THUNK
+ LFThunk _ _ _ False _ _ _ -> FUN
+ _ -> panic "getClosureType"
+
+-- we *do* get non-updatable top-level thunks sometimes. eg. f = g
+-- gets compiled to a jump to g (if g has non-zero arity), instead of
+-- messing around with update frames and PAPs. We set the closure type
+-- to FUN_STATIC in this case.