From 33b45128b99539a8e0521e68b28b65e6de4782c3 Mon Sep 17 00:00:00 2001 From: Julien Moutinho <julm@sourcephile.fr> Date: Tue, 23 Aug 2022 04:50:18 +0200 Subject: [PATCH] doc: fix typos --- src/Symantic/Parser/Grammar/View.hs | 3 +-- src/Symantic/Parser/Machine/Optimize.hs | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Symantic/Parser/Grammar/View.hs b/src/Symantic/Parser/Grammar/View.hs index 6bdc983..f5486d2 100644 --- a/src/Symantic/Parser/Grammar/View.hs +++ b/src/Symantic/Parser/Grammar/View.hs @@ -22,8 +22,7 @@ import Symantic.Parser.Grammar.ObserveSharing import qualified Symantic.Parser.Grammar.Production as Prod -- * Type 'ViewGrammar' -newtype ViewGrammar (showName::Bool) a = ViewGrammar { unViewGrammar :: - Tree.Tree (String, String) } +newtype ViewGrammar (showName::Bool) a = ViewGrammar { unViewGrammar :: Tree.Tree (String, String) } viewGrammar :: ViewGrammar sN a -> ViewGrammar sN a viewGrammar = id diff --git a/src/Symantic/Parser/Machine/Optimize.hs b/src/Symantic/Parser/Machine/Optimize.hs index 986eb57..47c6bfb 100644 --- a/src/Symantic/Parser/Machine/Optimize.hs +++ b/src/Symantic/Parser/Machine/Optimize.hs @@ -33,8 +33,8 @@ data family Instr type instance Derived (Instr instr repr inp vs) = repr inp vs -- | Convenient utility to pattern-match a 'SomeInstr'. -pattern Instr :: Typeable comb => - Instr comb repr inp vs a -> +pattern Instr :: Typeable instr => + Instr instr repr inp vs a -> SomeInstr repr inp vs a pattern Instr x <- (unSomeInstr -> Just x) @@ -49,7 +49,7 @@ pattern Instr x <- (unSomeInstr -> Just x) -- As in 'SomeComb', a first pass of optimizations -- is directly applied in it -- to avoid introducing an extra newtype, --- this also gives a more undestandable code. +-- this also gives a more understandable code. data SomeInstr repr inp vs a = forall instr. ( Derivable (Instr instr repr inp vs) @@ -60,9 +60,9 @@ type instance Derived (SomeInstr repr inp vs) = repr inp vs instance Derivable (SomeInstr repr inp vs) where derive (SomeInstr x) = derive x --- | @(unSomeInstr i :: 'Maybe' ('Instr' comb repr inp vs a))@ +-- | @(unSomeInstr i :: 'Maybe' ('Instr' instr repr inp vs a))@ -- extract the data-constructor from the given 'SomeInstr' --- iif. it belongs to the @('Instr' comb repr a)@ data-instance. +-- iif. it belongs to the @('Instr' instr repr a)@ data-instance. unSomeInstr :: forall instr repr inp vs a. Typeable instr => -- 2.47.2