Skip to content

Commit

Permalink
Support older GHC versions
Browse files Browse the repository at this point in the history
  • Loading branch information
chaserhkj committed Feb 4, 2024
1 parent ff24228 commit 3667a06
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/src/BNFC/Backend/TreeSitter/CFtoTreeSitter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ instance UnwrapCat Cat where

instance UnwrapCat CatOpt where
-- | unwrap to original Cat
unwrap (Always c) = c
unwrap (Optional c) = c
unwrap c = case c of
Always ct -> ct
Optional ct -> ct

-- | Rule with RHS tagged
data RuleOpt = Rule' {srcRule::Rule, taggedRhs::SentFormOpt}
Expand Down

0 comments on commit 3667a06

Please sign in to comment.