Add example terms for testing
This commit is contained in:
parent
655fe97cbc
commit
52310c766f
2 changed files with 20 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ library
|
||||||
exposed-modules:
|
exposed-modules:
|
||||||
Propa.Lambda.Display
|
Propa.Lambda.Display
|
||||||
Propa.Lambda.Term
|
Propa.Lambda.Term
|
||||||
|
Propa.Prolog.Example
|
||||||
Propa.Prolog.Types
|
Propa.Prolog.Types
|
||||||
Propa.Prolog.Unify
|
Propa.Prolog.Unify
|
||||||
other-modules:
|
other-modules:
|
||||||
|
|
|
||||||
19
src/Propa/Prolog/Example.hs
Normal file
19
src/Propa/Prolog/Example.hs
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
|
||||||
|
module Propa.Prolog.Example where
|
||||||
|
|
||||||
|
import qualified Data.Text as T
|
||||||
|
|
||||||
|
import Propa.Prolog.Types
|
||||||
|
|
||||||
|
db :: Db T.Text
|
||||||
|
db =
|
||||||
|
[ Def "append" [Stat "nil" [], Var "Y", Var "Y"] []
|
||||||
|
, Def "append" [Stat "cons" [Var "X", Var "XS"], Var "Y", Stat "cons" [Var "X", Var "Z"]] [Stat "append" [Var "XS", Var "Y", Var "Z"]]
|
||||||
|
]
|
||||||
|
|
||||||
|
l12 :: Term T.Text
|
||||||
|
l12 = Stat "cons" [Stat "1" [], Stat "cons" [Stat "2" [], Stat "nil" []]]
|
||||||
|
|
||||||
|
l345 :: Term T.Text
|
||||||
|
l345 = Stat "cons" [Stat "3" [], Stat "cons" [Stat "4" [], Stat "cons" [Stat "5" [], Stat "nil" []]]]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue