Skip to content

Commit

Permalink
temp hack to filter for hornlikes; to remove after implementing preva…
Browse files Browse the repository at this point in the history
…lidation
  • Loading branch information
ym-han committed Aug 29, 2023
1 parent c83f9e5 commit dc3e009
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import LS.Rule qualified as L4 (Rule(..))
import LS.XPile.LogicalEnglish.Types
import LS.XPile.LogicalEnglish.ValidateL4Input
(L4Rules, ValidHornls, Unvalidated,
check, refine, loadRawL4AsUnvalid)
check, refine, loadRawL4AsUnvalid, isHornlike)
import LS.XPile.LogicalEnglish.SimplifyL4 (SimpL4(..), SimL4Error(..), simplifyL4hc) -- TODO: Add import list
import LS.XPile.LogicalEnglish.IdVars (idVarsInHC)
import LS.XPile.LogicalEnglish.GenNLAs (nlasFromVarsHC)
Expand Down Expand Up @@ -101,8 +101,10 @@ allNLAs = foldMap nlasFromVarsHC


simplifyL4hcs :: [L4.Rule] -> SimpL4 [SimpleL4HC]
simplifyL4hcs = traverse simplifyL4hc

simplifyL4hcs = traverse simplifyL4hc . filter isHornlike
{- ^ IMPT TODO: move `filter isHornlike` to prevalidation step when implementing that.
This is a temp hack to avoid crashes due to NatL4 app's poor architecture
-}

xpileSimplifiedL4HCs :: [SimpleL4HC] -> String
xpileSimplifiedL4HCs simpL4HCs =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ module LS.XPile.LogicalEnglish.ValidateL4Input
, check
, refine
, loadRawL4AsUnvalid

, isHornlike -- TODO: TEMP export; will remove this after implementing the prevalidation
)
where

Expand Down

0 comments on commit dc3e009

Please sign in to comment.