{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreifvxwcqdpwpmorakmxyajyp6gyxki45oihxjzwhfvq4uwneuxkxwe",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mmtfhwl77522"
},
"path": "/t/why-no-exposed-nulladdr-literal/14157#post_3",
"publishedAt": "2026-05-27T11:18:33.000Z",
"site": "https://discourse.haskell.org",
"textContent": "thesnakefromthelemma:\n\n>\n> myNullAddr# :: MyAddr#\n> myNullAddr# = WrapAddr# nullAddr#\n>\n>\n> but this is of course disallowed, being an unlifted top-level binding. Fair enough!\n\nI’m not sure it is fair, or at least there could in principle be an exception for values, and a newtype constructor applied to a value would be value. Maybe that adds too much extra complexity to be worth it.\n\nthesnakefromthelemma:\n\n> the best workaround of which I’m currently aware is to use the standard top-level-unlifted-value binding trick\n\nYeah, that’s what I’ve been using.\n\njaror:\n\n> I expected this:\n>\n>\n> myNullAddr# :: (() :: Constraint) => MyAddr#\n> myNullAddr# = WrapAddr# nullAddr#\n>\n>\n> Which makes is basically as easy to use as the pattern synonym.\n\nThat’s a nice alternative!",
"title": "Why no exposed `NullAddr#` literal?"
}