Skip to content

Commit

Permalink
Fix parse error on older GHC
Browse files Browse the repository at this point in the history
  • Loading branch information
chaserhkj committed Feb 4, 2024
1 parent 3667a06 commit 39fb1ec
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions source/src/BNFC/Backend/TreeSitter/CFtoTreeSitter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,15 @@ type CatOpt = CatOpt' Cat

-- | type class for OCat or Cat
class UnwrapCat a where
-- | unwrap to original Cat
unwrap:: a -> Cat

instance UnwrapCat Cat where
unwrap = id

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

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

0 comments on commit 39fb1ec

Please sign in to comment.