turingMachine-1.0.0.0: An implementation of Turing Machine and Automaton

Copyright(c) Jorge Santiago Alvarez Cuadros 2016
LicenseGPL-3
Maintainersanjorgek@ciencias.unam.mx
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010
Extensions
  • MonoLocalBinds
  • TypeFamilies
  • TypeSynonymInstances
  • FlexibleInstances
  • ConstrainedClassMethods
  • MultiParamTypeClasses
  • KindSignatures
  • TypeOperators
  • ExplicitNamespaces

Math.Model.Turing.TwoWays

Description

Two ways turing machine

Synopsis

Documentation

data Tape a Source #

Constructors

T [a] a [a] 

Instances

Functor Tape Source # 

Methods

fmap :: (a -> b) -> Tape a -> Tape b #

(<$) :: a -> Tape b -> Tape a #

Applicative Tape Source # 

Methods

pure :: a -> Tape a #

(<*>) :: Tape (a -> b) -> Tape a -> Tape b #

liftA2 :: (a -> b -> c) -> Tape a -> Tape b -> Tape c #

(*>) :: Tape a -> Tape b -> Tape b #

(<*) :: Tape a -> Tape b -> Tape a #

Tapeable Tape Symbol Source #
>>> let tapeLifted = (liftTape "word")::Tape Symbol
>>> tapeLifted
T "" 'w' "ord"
TuringM Tape Symbol LRS Source # 
Tapeable Tape [Symbol] Source # 
TuringM Tape [Symbol] LRS Source # 

Methods

moveHead :: LRS -> Tape [Symbol] -> Tape [Symbol] Source #

Eq a => Eq (Tape a) Source # 

Methods

(==) :: Tape a -> Tape a -> Bool #

(/=) :: Tape a -> Tape a -> Bool #

Show a => Show (Tape a) Source # 

Methods

showsPrec :: Int -> Tape a -> ShowS #

show :: Tape a -> String #

showList :: [Tape a] -> ShowS #

(Eq s, Monoid s) => Monoid (Tape s) Source # 

Methods

mempty :: Tape s #

mappend :: Tape s -> Tape s -> Tape s #

mconcat :: [Tape s] -> Tape s #