Idris2/tests/idris2/literate006/expected
Edwin Brady 251d77b92d Swap 'False' and 'True' constructors
It has always bothered me that 'False' got mapped to tag 1 and 'True'
got mapped to tag 0. This doesn't change much in practice (except that
perhaps a code generator might notice some useful things in intToBool)
but I'm changing it now anyway. Also added a couple of inlinings of
boolean operations.
2021-05-09 20:08:38 +01:00

18 lines
513 B
Plaintext

1/1: Building Door (Door.lidr)
Main> > (val # y) => ?now_4
Main> > (False # d) => ?now_4
> (True # d) => ?now_5
Main> 0 m : Type -> Type
1 d : Door Open
x : Integer
0 r : Res Bool (\r => Door (if r then Open else Closed))
------------------------------
now_2 : Use Many m ()
Main> 0 m : Type -> Type
1 d : Door Closed
x : Integer
0 r : Res Bool (\r => Door (if r then Open else Closed))
------------------------------
now_3 : Use Many m ()
Main> Bye for now!