
23 Nov
2005
23 Nov
'05
8:19 p.m.
The comments in HughesPJ say that empty is an identity for <> and $$, but the implementation doesn't satisfy either of these laws. Here are the implementations:
p $$ q = Above p False q
p <> q = Beside p False q
and definitions for empty and isEmpty:
empty = Empty
isEmpty Empty = True isEmpty _ = False
It's an easy fix, just adding these two lines before the current definitions of $$:
Empty $$ q = q p $$ Empty = p
And these before the current definition of <>:
Empty <> q = q p <> Empty = p
- Conal