Skip to content

Commit

Permalink
fix case-on
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Feb 7, 2023
1 parent 1a1f249 commit aacbb65
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Juvix/Compiler/Backend/Geb/Pretty/Base.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ instance PrettyCode Case where
val <- ppArg _caseOn
left <- ppArg _caseLeft
right <- ppArg _caseRight
return $ kwCase <+> lty <+> rty <+> cod <+> val <+> left <+> right
return $ kwCaseOn <+> lty <+> rty <+> cod <+> val <+> left <+> right

instance PrettyCode Pair where
ppCode Pair {..} = do
Expand Down
3 changes: 3 additions & 0 deletions src/Juvix/Data/CodeAnn.hs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ kwLambda = keyword Str.lambdaUnicode
kwCase :: Doc Ann
kwCase = keyword Str.case_

kwCaseOn :: Doc Ann
kwCaseOn = keyword Str.caseOn

kwInclude :: Doc Ann
kwInclude = keyword Str.include

Expand Down
3 changes: 3 additions & 0 deletions src/Juvix/Extra/Strings.hs
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,9 @@ pair = "pair"
case_ :: (IsString s) => s
case_ = "case"

caseOn :: (IsString s) => s
caseOn = "case-on"

of_ :: (IsString s) => s
of_ = "of"

Expand Down

0 comments on commit aacbb65

Please sign in to comment.