open import Agda.Builtin.Bool open import Agda.Builtin.Equality data D : Set where c : {{ i : true ≡ false }} → D pattern ff = c {{ () }} works : D → D works ff works' : D → D works' c = c test : D → D test c = ff
The test
fails with an unsolved constraint:
_i_12
: Agda.Builtin.Bool.Bool.true Agda.Builtin.Equality.≡
Agda.Builtin.Bool.Bool.false
The code to translate a pattern synonym with absurd pattern to an expression is this one (last line):
patternToExpr :: Pattern -> Expr patternToExpr = \case VarP x -> Var (unBind x) ConP _ c ps -> Con c `app` map (fmap (fmap patternToExpr)) ps ProjP _ o ds -> Proj o ds DefP _ fs ps -> Def (headAmbQ fs) `app` map (fmap (fmap patternToExpr)) ps WildP _ -> Underscore emptyMetaInfo AsP _ _ p -> patternToExpr p DotP _ e -> e AbsurdP _ -> Underscore emptyMetaInfo -- TODO: could this happen?There are two problems:
The second problem is a consequence of rejecting the semantics of {{_}}
suggested in #2172, but after #7173 we have some machinery to fix this.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4