mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-24 20:23:11 +03:00
Function mapping Not (x=True)
to x=False
was added for Bool
s (#322)
This commit is contained in:
parent
da0e056d7e
commit
c121181776
@ -97,3 +97,15 @@ export
|
||||
notOrIsAnd : (x, y : Bool) -> not (x || y) = not x && not y
|
||||
notOrIsAnd False _ = Refl
|
||||
notOrIsAnd True _ = Refl
|
||||
|
||||
-- Interaction with typelevel `Not`
|
||||
|
||||
export
|
||||
notTrueIsFalse : {1 x : Bool} -> Not (x = True) -> x = False
|
||||
notTrueIsFalse {x=False} _ = Refl
|
||||
notTrueIsFalse {x=True} f = absurd $ f Refl
|
||||
|
||||
export
|
||||
notFalseIsTrue : {1 x : Bool} -> Not (x = False) -> x = True
|
||||
notFalseIsTrue {x=True} _ = Refl
|
||||
notFalseIsTrue {x=False} f = absurd $ f Refl
|
||||
|
@ -3,4 +3,4 @@ casetot.idr:12:1--13:1:main is not covering at:
|
||||
12 main : IO ()
|
||||
13 main = do
|
||||
|
||||
Calls non covering function Main.case block in 2101(587)
|
||||
Calls non covering function Main.case block in 2101(617)
|
||||
|
Loading…
Reference in New Issue
Block a user