File tree Expand file tree Collapse file tree 13 files changed +39
-1
lines changed Expand file tree Collapse file tree 13 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ should target this file (`CHANGELOG_NEXT`).
99
1010### Compiler changes
1111
12+ * Fixed missing handling of dotted patterns See
13+ [ #3669 ] ( https://github.com/idris-lang/Idris2/issues/3669 ) ,
14+ [ comment] ( https://github.com/idris-lang/Idris2/issues/3644#issuecomment-3286320272 ) .
1215* Removed modules and functions moved to ` base ` :
1316 - ` Libraries.Data.Fin ` → ` Data.Fin `
1417 - ` Libraries.Data.IOArray ` → ` Data.IOArray `
@@ -22,7 +25,6 @@ should target this file (`CHANGELOG_NEXT`).
2225 - ` Libraries.Data.SortedMap ` → ` Data.SortedMap `
2326 - ` Libraries.Data.SortedSet ` → ` Data.SortedSet `
2427 - ` Libraries.Utils.Binary.bufferData' ` → ` Data.Buffer.bufferData' `
25-
2628* Removed unused functions:
2729 - ` Libraries.Data.List.Extra ` : ` breakAfter ` , ` splitAfter ` and ` zipMaybe `
2830 - ` Libraries.Data.List.Quantifiers.Extra.tabulate ` .
Original file line number Diff line number Diff line change @@ -798,6 +798,8 @@ sameType {ns} fc phase fn env (p :: xs)
798798 headEq (NPrimVal _ c) (NPrimVal _ c') _ = c == c'
799799 headEq (NType {}) (NType {}) _ = True
800800 headEq (NApp _ (NRef _ n) _ ) (NApp _ (NRef _ n') _ ) RunTime = n == n'
801+ headEq (NErased _ (Dotted x)) y ph = headEq x y ph
802+ headEq x (NErased _ (Dotted y)) ph = headEq x y ph
801803 headEq (NErased {}) _ RunTime = True
802804 headEq _ (NErased {}) RunTime = True
803805 headEq _ _ _ = False
Original file line number Diff line number Diff line change @@ -221,6 +221,8 @@ mutual
221221 = findUsed env (findUsed env used ty) tm
222222 findUsed env used (TForce fc r tm)
223223 = findUsed env used tm
224+ findUsed env used (Erased fc (Dotted tm))
225+ = findUsed env used tm
224226 findUsed env used _ = used
225227
226228 findUsedInBinder : {vars : _} ->
Original file line number Diff line number Diff line change @@ -162,6 +162,8 @@ mutual
162162 = mkTerm fn mty exps (arg :: autos) named
163163 mkTerm (INamedApp fc fn nm arg) mty exps autos named
164164 = mkTerm fn mty exps autos ((nm, arg) :: named)
165+ mkTerm (IMustUnify fc r tm) mty exps autos named
166+ = Erased fc . Dotted <$> mkTerm tm mty exps autos named
165167 mkTerm (IPrimVal fc c) _ _ _ _ = pure (PrimVal fc c)
166168 mkTerm (IAlternative _ (UniqueDefault tm) _ ) mty exps autos named
167169 = mkTerm tm mty exps autos named
Original file line number Diff line number Diff line change 1+ data Identity : Type -> Type where
2+ MkIdentity : (a : Type ) -> a -> Identity a
3+
4+ foo : Identity Bool -> ()
5+ foo (MkIdentity . (Bool ) True ) = ()
6+ foo (MkIdentity . (Bool ) False ) = ()
Original file line number Diff line number Diff line change 1+ 1/1: Building DottedType (DottedType.idr)
Original file line number Diff line number Diff line change 1+ . ../../../testutils.sh
2+
3+ check DottedType.idr
Original file line number Diff line number Diff line change 1+ data Identity : Type -> Type where
2+ MkIdentity : (a : Type ) -> a -> Identity a
3+
4+ foo : Identity Bool -> Void -> ()
5+ foo (MkIdentity . (Bool ) True ) _ impossible
6+ foo (MkIdentity . (Bool ) False ) _ impossible
Original file line number Diff line number Diff line change 1+ 1/1: Building DottedTypeImpossible (DottedTypeImpossible.idr)
Original file line number Diff line number Diff line change 1+ . ../../../testutils.sh
2+
3+ check DottedTypeImpossible.idr
You can’t perform that action at this time.
0 commit comments