Skip to content

Instantly share code, notes, and snippets.

@lspitzner
lspitzner / Djinn-env
Last active August 29, 2015 14:10
post correspondence problem in djinn env, assuming that recursive data types are allowed
-- a djinn environment that encodes an instance of the
-- post correspondence problem. it requires recursive data
-- types.
data Foo a b x y = Foo (Bar a b (a x) (b (a (a y))))
(Bar a b (a (b x)) (a (a y)))
(Bar a b (b (b (a x))) (b (b y)))
-- we need duplicate to enforce N>=1
data Bar a b x y = Bar (Bar a b (a x) (b (a (a y))))
{-# LANGUAGE Arrows, TemplateHaskell #-}
module Main where
import Prelude hiding (id, init, (.))
import Control.Arrow
import Control.Category