tests: add more tests
[haskell/symantic-parser.git] / src / Symantic / Parser / Machine / Optimize.hs
index 986eb5754b5eaf8c835259128e2bff6c402d7e09..9f71142b3bbaba8751e33cfe5c0f0f158100fb57 100644 (file)
@@ -19,7 +19,7 @@ import Type.Reflection (Typeable, typeRep, eqTypeRep, (:~~:)(..))
 import qualified Data.Functor as Functor
 import qualified Language.Haskell.TH as TH
 
-import Symantic.Derive
+import Symantic.Syntaxes.Derive
 import Symantic.Parser.Grammar
 import Symantic.Parser.Machine.Input
 import Symantic.Parser.Machine.Instructions
@@ -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 =>