Skip to content

Commit

Permalink
weed
Browse files Browse the repository at this point in the history
  • Loading branch information
vmchale committed Feb 20, 2025
1 parent f1078f1 commit 27dd3e6
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/E.hs
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
module E ( D (..), L (..)
, nz, ni1, nzSh, n1, nec
, nz, nzSh, n1, nec
, pr, pr1, pc, psh
, (#*)
) where

import Sh

nz, ni1 :: I a -> D
nz :: I a -> D
nz (Ix _ i) | i>0 = S
nz (StaPlus _ i j) = nz i#|nz j
nz (StaMul _ i j) = nz i#*nz j
nz _ = Z

ni1 (Ix _ i) | i>1 = S
ni1 (StaPlus _ i j) = ni1 i#|ni1 j
ni1 (StaMul _ i j) = nz i#*ni1 j #| ni1 i#*nz j
ni1 _ = Z

ip1 :: I a -> L
ip1 (Ix x i) | i>0 = ip (Ix x (i-1))
ip1 (StaPlus x i (Ix x0 i0)) | i0>0 = ip (StaPlus x i (Ix x0 (i0-1)))
Expand Down

0 comments on commit 27dd3e6

Please sign in to comment.