Safe Haskell | None |
---|---|
Language | Haskell2010 |
Uses a more involved example to test some
of the functionalities of generics-mrsop
.
- data Stmt var
- data Decl var
- data Exp var
- type FamStmtString = '[Stmt String, Exp String, Decl String]
- type CodesStmtString = '['['[K KString, I (S Z)], '[I (S Z), I Z, I Z], '[I Z, I Z], '[I (S Z)], '[I (S (S Z))], '[]], '['[K KString], '[K KString, I (S Z)], '[I (S Z), I (S Z)], '[I (S Z), I (S Z)], '[K KInt]], '['[K KString], '[K KString, K KString, I Z]]]
- pattern DeclStringDFun_ :: kon KString -> kon KString -> phi Z -> View kon phi (Lkup (S (S Z)) CodesStmtString)
- pattern DeclStringDVar_ :: kon KString -> View kon phi (Lkup (S (S Z)) CodesStmtString)
- pattern ExpStringELit_ :: kon KInt -> View kon phi (Lkup (S Z) CodesStmtString)
- pattern ExpStringESub_ :: phi (S Z) -> phi (S Z) -> View kon phi (Lkup (S Z) CodesStmtString)
- pattern ExpStringEAdd_ :: phi (S Z) -> phi (S Z) -> View kon phi (Lkup (S Z) CodesStmtString)
- pattern ExpStringECall_ :: kon KString -> phi (S Z) -> View kon phi (Lkup (S Z) CodesStmtString)
- pattern ExpStringEVar_ :: kon KString -> View kon phi (Lkup (S Z) CodesStmtString)
- pattern StmtStringSSkip_ :: View kon phi (Lkup Z CodesStmtString)
- pattern StmtStringSDecl_ :: phi (S (S Z)) -> View kon phi (Lkup Z CodesStmtString)
- pattern StmtStringSReturn_ :: phi (S Z) -> View kon phi (Lkup Z CodesStmtString)
- pattern StmtStringSSeq_ :: phi Z -> phi Z -> View kon phi (Lkup Z CodesStmtString)
- pattern StmtStringSIf_ :: phi (S Z) -> phi Z -> phi Z -> View kon phi (Lkup Z CodesStmtString)
- pattern StmtStringSAssign_ :: kon KString -> phi (S Z) -> View kon phi (Lkup Z CodesStmtString)
- pattern IdxDeclString :: forall (a :: Nat). () => forall (n :: Nat) (n1 :: Nat). ((~#) Nat Nat a (S n), (~#) Nat Nat n (S n1), (~#) Nat Nat n1 Z) => SNat a
- pattern IdxExpString :: forall (a :: Nat). () => forall (n :: Nat). ((~#) Nat Nat a (S n), (~#) Nat Nat n Z) => SNat a
- pattern IdxStmtString :: forall (a :: Nat). () => (~#) Nat Nat a Z => SNat a
- tyInfo_2 :: [Char]
- tyInfo_1 :: [Char]
- tyInfo_0 :: [Char]
- type FIX = Fix Singl CodesStmtString
- alphaEqD :: Decl String -> Decl String -> Bool
- test1 :: String -> String -> String -> Decl String
- test2 :: String -> String -> String -> Decl String
- test3 :: String -> String -> String -> Decl String
- (>>>) :: (a -> b) -> (b -> c) -> a -> c
- test4 :: Int -> Decl String
- test5 :: Maybe (Decl String)
Simple IMPerative Language:
SAssign var (Exp var) | |
SIf (Exp var) (Stmt var) (Stmt var) | |
SSeq (Stmt var) (Stmt var) | |
SReturn (Exp var) | |
SDecl (Decl var) | |
SSkip |
HasDatatypeInfo Kon Singl FamStmtString CodesStmtString Source # | |
Show var => Show (Stmt var) Source # | |
HasDatatypeInfo Kon Singl FamStmtString CodesStmtString Source # | |
Show var => Show (Decl var) Source # | |
HasDatatypeInfo Kon Singl FamStmtString CodesStmtString Source # | |
Show var => Show (Exp var) Source # | |
type CodesStmtString = '['['[K KString, I (S Z)], '[I (S Z), I Z, I Z], '[I Z, I Z], '[I (S Z)], '[I (S (S Z))], '[]], '['[K KString], '[K KString, I (S Z)], '[I (S Z), I (S Z)], '[I (S Z), I (S Z)], '[K KInt]], '['[K KString], '[K KString, K KString, I Z]]] Source #
pattern DeclStringDFun_ :: kon KString -> kon KString -> phi Z -> View kon phi (Lkup (S (S Z)) CodesStmtString) Source #
pattern DeclStringDVar_ :: kon KString -> View kon phi (Lkup (S (S Z)) CodesStmtString) Source #
pattern ExpStringELit_ :: kon KInt -> View kon phi (Lkup (S Z) CodesStmtString) Source #
pattern ExpStringESub_ :: phi (S Z) -> phi (S Z) -> View kon phi (Lkup (S Z) CodesStmtString) Source #
pattern ExpStringEAdd_ :: phi (S Z) -> phi (S Z) -> View kon phi (Lkup (S Z) CodesStmtString) Source #
pattern ExpStringECall_ :: kon KString -> phi (S Z) -> View kon phi (Lkup (S Z) CodesStmtString) Source #
pattern ExpStringEVar_ :: kon KString -> View kon phi (Lkup (S Z) CodesStmtString) Source #
pattern StmtStringSSkip_ :: View kon phi (Lkup Z CodesStmtString) Source #
pattern StmtStringSDecl_ :: phi (S (S Z)) -> View kon phi (Lkup Z CodesStmtString) Source #
pattern StmtStringSReturn_ :: phi (S Z) -> View kon phi (Lkup Z CodesStmtString) Source #
pattern StmtStringSSeq_ :: phi Z -> phi Z -> View kon phi (Lkup Z CodesStmtString) Source #
pattern StmtStringSIf_ :: phi (S Z) -> phi Z -> phi Z -> View kon phi (Lkup Z CodesStmtString) Source #
pattern StmtStringSAssign_ :: kon KString -> phi (S Z) -> View kon phi (Lkup Z CodesStmtString) Source #
pattern IdxDeclString :: forall (a :: Nat). () => forall (n :: Nat) (n1 :: Nat). ((~#) Nat Nat a (S n), (~#) Nat Nat n (S n1), (~#) Nat Nat n1 Z) => SNat a Source #
pattern IdxExpString :: forall (a :: Nat). () => forall (n :: Nat). ((~#) Nat Nat a (S n), (~#) Nat Nat n Z) => SNat a Source #