use list instead of deque

fogti
Aug 26, 2024, 9:55 PM
X4IQZMO364GSCFRZ2TCWVQEP7NB4MSFB6HUZVXFMYZFJZSAZEIKQC

Dependencies

  • [2] JDF4JUMS some attempts at abstract syntax
  • [3] HQ2ZYTX5 add comment lexing and remove references stuff
  • [4] 6XMVEBZA add simple stuff (e.g. haskell basics)
  • [5] QXX6KTFX Syntax.Abstract: implement eval
  • [6] GMGXNJEP add back more stuff from yanais

Change contents

  • edit in core/lib/GardGround/Syntax/Abstract.hs at line 15
    [2.209][2.209:246]()
    import qualified Deque.Strict as Deq
  • edit in core/lib/GardGround/Syntax/Abstract.hs at line 33
    [2.773][2.773:801]()
    type Deque a = Deq.Deque a
  • replacement in core/lib/GardGround/Syntax/Abstract.hs at line 35
    [2.870][2.870:1005]()
    -- values at the front are applied first, further applications get appended to back
    data Neutral = Neutral NeutralRoot (Deque Value)
    [2.870]
    [2.1005]
    -- inner (later) values are applied first, further applications get appended to front
    data Neutral = Neutral NeutralRoot [Value]
  • replacement in core/lib/GardGround/Syntax/Abstract.hs at line 57
    [2.1783][2.1783:1871]()
    vapp (VNeutral (Neutral nam xs)) = \v -> Right . VNeutral . Neutral nam $ Deq.snoc v xs
    [2.1783]
    [2.1871]
    vapp (VNeutral (Neutral nam xs)) = \v -> Right . VNeutral . Neutral nam $ v:xs
  • replacement in core/lib/GardGround/Syntax/Abstract.hs at line 83
    [2.2457][2.2457:2542]()
    boundfree >>= \bf -> foldM (\a b -> EApply a <$> quote i b) (ENeutralRoot bf) xs
    [2.2457]
    [2.2542]
    boundfree >>= \bf -> foldM (\a b -> EApply a <$> quote i b) (ENeutralRoot bf) (reverse xs)
  • edit in core/gardground-core.cabal at line 44
    [3.5290][2.2971:3004]()
    , deque ^>= 0.4.0.0