, commandType -- private
, pureInlineInterp
+ , pureBlockInterp
)
where
-> SystemConfig
-> IO InlineElement
}
+ | BlockCommandInterpreter {
+ bciName :: String
+ , bciInterpret :: BlockCommand
+ -> Maybe Page
+ -> Storage
+ -> SystemConfig
+ -> IO BlockElement
+ }
commandName :: Interpreter -> String
commandName (InlineCommandInterpreter name _) = name
+commandName (BlockCommandInterpreter name _) = name
commandType :: Interpreter -> CommandType
commandType (InlineCommandInterpreter _ _) = InlineCommandType
+commandType (BlockCommandInterpreter _ _) = BlockCommandType
pureInlineInterp :: String
-> Interpreter
pureInlineInterp name f
= InlineCommandInterpreter name $ \ cmd page _ _ -> return $ f cmd page
+
+
+pureBlockInterp :: String
+ -> (BlockCommand -> Maybe Page -> BlockElement)
+ -> Interpreter
+pureBlockInterp name f
+ = BlockCommandInterpreter name $ \ cmd page _ _ -> return $ f cmd page