I'm really new to parsing in Haskell, but it's mostly making sense.

I'm working on building a Templating program mostly to learn parsing better; templates can interpolate values in via `{{ value }}` notation.

Here's my current parser,

```
data Template a = Template [Either String a]
data Directive = Directive String

templateFromFile :: FilePath -> IO (Either ParseError (Template Directive))
templateFromFile = parseFromFile templateParser

templateParser :: Parser (Template Directive)
templateParser = do
  tmp <- template
  eof
  return tmp

template :: Parser (Template Directive)
template = Template <$> many (dir <|> txt)
    where
      dir = Right <$> directive
      txt = Left <$> many1 (anyChar <* notFollowedBy directive)

directive :: Parser Directive
directive = do
  _ <- string "{{"
  txt <- manyTill anyChar (string "}}")
  return $ Directive txt

```

Then I run it on a file something like this:

```
{{ value }}

This is normal Text

{{ expression }}

```

When I run this using `templateFromFile "./template.txt"` I get the error:

```
Left "./template.txt" (line 5, column 17):
unexpected Directive " expression "

```

Why is this happening and how can I fix it?

My basic understanding is that `many1 (anyChar <* notFollowedBy directive)`
should grab all of the characters up until the start of the next directive, then should fail and return the list of characters up till that point; then
it should fall back to the previous `many` and should try parsing `dir` again and should succeed; clearly something else is happening though. I'm
having trouble figuring out how to parse things *between* other things when
the parsers mostly overlap.

I'd love some tips on how to structure this all more idiomatically, please let me know if I'm doing something in a silly way. Cheers! Thanks for your time!