@@ -21,6 +21,7 @@ module Data.Syntax.Indent (
22import Control.Category
22import Control.Category
23import Control.Category.Reader
23import Control.Category.Reader
24+import Control.Category.Structures
24import Control.SIArrow
25import Control.SIArrow
25import Data.Syntax
26import Data.Syntax
26import Data.Syntax.Char
27import Data.Syntax.Char
@@ -28,10 +29,10 @@ import Data.Syntax.Combinator
28import Prelude hiding (takeWhile, take, id, (.))
29import Prelude hiding (takeWhile, take, id, (.))
30-- | Adds indentation to a syntax description.
31-- | Adds indentation to a syntax description.
31−newtype Indent cat a b = Indent { unIndent :: ReaderCT (Int, cat () ()) cat a b }
32+newtype Indent cat a b = Indent { getIndent :: ReaderCT (Int, cat () ()) cat a b }
32− deriving (Category, Products, Coproducts, CategoryPlus, SIArrow)
33+ deriving (Category, Products, Coproducts, CatPlus, SIArrow)
34−instance CategoryTrans Indent where
35+instance CatTrans Indent where
35 clift = Indent . clift
36 clift = Indent . clift
37-- Generalized newtype deriving cannot derive this :(
38-- Generalized newtype deriving cannot derive this :(