diff --git a/doc/HOWTO_IMPLEMENT_A_FUNCTOR.org b/doc/HOWTO_IMPLEMENT_A_FUNCTOR.org index d879fd245b25e4d181c35e6d81ed02cc3b25863b..8ec28a4f15fdc972531d9e878d9e75163a33ae11 100644 --- a/doc/HOWTO_IMPLEMENT_A_FUNCTOR.org +++ b/doc/HOWTO_IMPLEMENT_A_FUNCTOR.org @@ -8,7 +8,7 @@ for concise technical documentation. Some basic Haskell knowledge is assumed. We're going to implement a simple version of the Powerset functor with functor syntax ~P(X)~ and morphism syntax ~{a, b, ...}~. -* Create a Haskell module +* Creating a Haskell module Create a new file called ~SimplePowerset.hs~ in the directory ~src/Copar/Functors/~ with the following content: @@ -19,7 +19,7 @@ module Copar.Functors.SimplePowerset (simplePowerset) where and add the new module to the other functor modules in `copar.cabal`. -* Create a datatype for the functor +* Creating a datatype for the functor Let's create a new Haskell type for our functor: @@ -68,7 +68,7 @@ stack exec -- copar help functors should now include the new =SimplePowerset= functor. -* Implement the refinement Interface +* Implementing the refinement Interface The refinement interface is the heart of our functor. It determines how partition refinement works for our type of transition system. @@ -133,7 +133,7 @@ On the other hand, ~update~ is a little more complicated. It takes as arguments the list of labels of edges into a subblock, the ~Weight~ into the corresponding super block, and returns a tuple. -* Implement a functor expression parser +* Implementing a functor expression parser Each functor in CoPaR has a functor expression parser, which are combined to parse the first line of the input file to determine the functor for the @@ -161,7 +161,7 @@ simplePowerset = FunctorDescription } #+END_SRC -* Implement a morphism parser +* Implementing a morphism parser The next thing the functor needs is a parser for the morphism syntax.