1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00
semantic/app/Main.hs
2015-11-18 13:23:47 -08:00

28 lines
658 B
Haskell

module Main where
import Diff
import Patch
import Term
import Syntax
import Control.Comonad.Cofree
import Control.Monad.Free
import Data.Map
a :: Term String Info
a = Info :< (Keyed $ fromList [
("hello", Info :< Indexed [ Info :< Leaf "hi" ]),
("goodbye", Info :< Leaf "goodbye") ])
b :: Term String Info
b = Info :< (Keyed $ fromList [
("hello", Info :< Indexed []),
("goodbye", Info :< Indexed []) ])
d :: Diff String Info
d = Free $ Keyed $ fromList [
("hello", Free $ Indexed [ Pure . Delete $ Info :< Leaf "hi" ]),
("goodbye", Pure $ Replace (Info :< Leaf "goodbye") (Info :< Indexed [])) ]
main :: IO ()
main = putStrLn "hello world"