Skip to content

Commit

Permalink
Add option to run Anoma tests in non-debug mode (#3144)
Browse files Browse the repository at this point in the history
> ⚠️ Based on #3142

When using AnomaTestModeFull the compilation tests are run in debug
mode, with stdlib interception and run using the raw nock (without
stdlib interception).

---------

Co-authored-by: Jan Mas Rovira <[email protected]>
  • Loading branch information
paulcadman and janmasrovira authored Nov 7, 2024
1 parent 0714391 commit 6ed5e13
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 41 deletions.
19 changes: 19 additions & 0 deletions src/Juvix/Compiler/Nockma/Language.hs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,25 @@ isAtom = not . isCell
atomHint :: Lens' (Atom a) (Maybe AtomHint)
atomHint = atomInfo . atomInfoHint

-- | Removes all extra information recursively
removeInfoRec :: Term a -> Term a
removeInfoRec = go
where
go :: Term a -> Term a
go = \case
TermAtom a -> TermAtom (goAtom a)
TermCell a -> TermCell (goCell a)

goAtom :: Atom a -> Atom a
goAtom (Atom _atom _) =
Atom
{ _atomInfo = emptyAtomInfo,
_atom
}

goCell :: Cell a -> Cell a
goCell (Cell l r) = Cell (go l) (go r)

termLoc :: Lens' (Term a) (Maybe Interval)
termLoc f = \case
TermAtom a -> TermAtom <$> atomLoc f a
Expand Down
Loading

0 comments on commit 6ed5e13

Please sign in to comment.