Skip to content

Commit

Permalink
Fix typo (Procude -> Product)
Browse files Browse the repository at this point in the history
  • Loading branch information
fizruk committed Oct 23, 2024
1 parent 8f29488 commit 532705e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion haskell/soas/grammar/SOAS/Syntax.cf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ScopedTerm. ScopedTerm ::= Term ;
TypeVarIdent. TypeVarIdent ::= VarIdent ;

TypeFun. Type ::= Type1 "→" Type1 ;
TypeProduce. Type1 ::= Type1 "×" Type2 ;
TypeProduct. Type1 ::= Type1 "×" Type2 ;
TypeVar. Type2 ::= TypeVarIdent ;
coercions Type 2 ;
separator Type "," ;
Expand Down
4 changes: 2 additions & 2 deletions haskell/soas/src/Language/SOAS/Syntax/Abs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ data TypeVarIdent' a = TypeVarIdent a VarIdent
type Type = Type' BNFC'Position
data Type' a
= TypeFun a (Type' a) (Type' a)
| TypeProduce a (Type' a) (Type' a)
| TypeProduct a (Type' a) (Type' a)
| TypeVar a (TypeVarIdent' a)
deriving (C.Eq, C.Ord, C.Show, C.Read, C.Functor, C.Foldable, C.Traversable, C.Data, C.Typeable, C.Generic)

Expand Down Expand Up @@ -186,7 +186,7 @@ instance HasPosition TypeVarIdent where
instance HasPosition Type where
hasPosition = \case
TypeFun p _ _ -> p
TypeProduce p _ _ -> p
TypeProduct p _ _ -> p
TypeVar p _ -> p

instance HasPosition TypeBinders where
Expand Down
2 changes: 1 addition & 1 deletion haskell/soas/src/Language/SOAS/Syntax/Par.y
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ Type

Type1 :: { (Language.SOAS.Syntax.Abs.BNFC'Position, Language.SOAS.Syntax.Abs.Type) }
Type1
: Type1 '×' Type2 { (fst $1, Language.SOAS.Syntax.Abs.TypeProduce (fst $1) (snd $1) (snd $3)) }
: Type1 '×' Type2 { (fst $1, Language.SOAS.Syntax.Abs.TypeProduct (fst $1) (snd $1) (snd $3)) }
| Type2 { (fst $1, (snd $1)) }

Type2 :: { (Language.SOAS.Syntax.Abs.BNFC'Position, Language.SOAS.Syntax.Abs.Type) }
Expand Down
2 changes: 1 addition & 1 deletion haskell/soas/src/Language/SOAS/Syntax/Print.hs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ instance Print (Language.SOAS.Syntax.Abs.TypeVarIdent' a) where
instance Print (Language.SOAS.Syntax.Abs.Type' a) where
prt i = \case
Language.SOAS.Syntax.Abs.TypeFun _ type_1 type_2 -> prPrec i 0 (concatD [prt 1 type_1, doc (showString "\8594"), prt 1 type_2])
Language.SOAS.Syntax.Abs.TypeProduce _ type_1 type_2 -> prPrec i 1 (concatD [prt 1 type_1, doc (showString "\215"), prt 2 type_2])
Language.SOAS.Syntax.Abs.TypeProduct _ type_1 type_2 -> prPrec i 1 (concatD [prt 1 type_1, doc (showString "\215"), prt 2 type_2])
Language.SOAS.Syntax.Abs.TypeVar _ typevarident -> prPrec i 2 (concatD [prt 0 typevarident])

instance Print [Language.SOAS.Syntax.Abs.Type' a] where
Expand Down

0 comments on commit 532705e

Please sign in to comment.