Class.hs 566 Bytes
Newer Older
1
module Copar.Coalgebra.Parser.Class
2 3 4 5 6 7
  ( MorphParser
  , ParseMorphism(..)
  ) where

import Data.Vector (Vector)

8
import Control.Monad.State.Strict (StateT)
9
import Copar.Coalgebra.Parser.Internal
10
import Copar.RefinementInterface
11
import Copar.Parser.Types
12

Thorsten Wißmann's avatar
Thorsten Wißmann committed
13 14
import Data.Text (Text,pack)

15
type MorphParser l f1 = StateT (ParserState l f1) Parser
16 17

class ParseMorphism f where
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
18 19
  parseMorphismPoint
    :: (Ord x)
20 21
    => f (MorphParser l f1 x)
    -> MorphParser l f1 (F1 f, Vector (x, Label f))
Thorsten Wißmann's avatar
Thorsten Wißmann committed
22 23
  printMorphismPoint :: f Text -> Text
  printMorphismPoint _ = pack "TODO"