Skip to content

Commit

Permalink
Add pattern by hand
Browse files Browse the repository at this point in the history
  • Loading branch information
jborkowski committed Sep 5, 2023
1 parent 60bf482 commit 6050c5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/Language/PureScript/Constants/Libs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Protolude qualified as P
import Data.String (IsString)
import Language.PureScript.Constants.TH qualified as TH
import Language.PureScript.PSString (PSString)
import Language.PureScript.Names (Ident (..), Qualified (..), QualifiedBy (..))

-- Core lib values

Expand Down Expand Up @@ -273,3 +274,6 @@ $(TH.declare do
TH.var "hasFieldRecord"

)

pattern IsSymbolDict :: Qualified Ident
pattern IsSymbolDict = Qualified (ByModuleName M_Data_Symbol) (Ident "IsSymbol$Dict")
2 changes: 1 addition & 1 deletion src/Language/PureScript/CoreFn/Optimizer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ optimizeRecordGetField
(App _
(Var _ C.I_hasFieldRecord)
(App _
(Var _ C.I_IsSymbol)
(Var _ C.IsSymbolDict)
(Literal _ (ObjectLiteral
[ ("reflectSymbol", Abs _ _
(Literal _ (StringLiteral label)))
Expand Down

0 comments on commit 6050c5c

Please sign in to comment.