{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreibncxd5wnj66sjjudfahhadubjxs2limfe6g4g244jqftbuspdece",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mmsrdjrlijb2"
},
"path": "/t/why-no-exposed-nulladdr-literal/14157#post_2",
"publishedAt": "2026-05-27T04:45:02.000Z",
"site": "https://discourse.haskell.org",
"textContent": "TIL pattern synonyms can be unlifted. But then a bidirectional pattern should work:\n\n\n pattern MyNullAddr# :: MyAddr#\n pattern MyNullAddr# <- ((\\(WrapAddr# x) -> eqAddr# nullAddr# x) -> 1#) where\n MyNullAddr# = WrapAddr# nullAddr#\n\n\nthesnakefromthelemma:\n\n> the standard top-level-unlifted-value binding trick\n\nI expected this:\n\n\n myNullAddr# :: (() :: Constraint) => MyAddr#\n myNullAddr# = WrapAddr# nullAddr#\n\n\nWhich makes is basically as easy to use as the pattern synonym.\n\nThe downside of this approach in general is that the value is not shared, but in this case it does not do any work so that shouldn’t be an issue. And the pattern synonym has the same downside.",
"title": "Why no exposed `NullAddr#` literal?"
}