You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.
I've written a custom function called includeSnippet with the following signature
includeSnippet :: FilePath -> Text -> LaTeXT IO Text
In my .htex file I include
\begin{haskellpragmas}
{-# LANGUAGE OverloadedStrings #-}
\end{haskellpragmas}
However, if I don't use pack for the second argument haskintex gives the following error:
$ haskintex -verbose -keep test_3.htex
Info: memotree does not exist.
-> Using empty memotree.
Enabled flags: keep, verbose.
Reading test_3.htex...
Creating Haskell source file Haskintex_test_3.hs...
Evaluating expressions in test_3.htex...
Evaluation (IO LaTeX): execLaTeXT (includeSnippet "src/fact.hs" "ex1" >>= verbatim)
Warning: Error while evaluating the expression.
Compiler error:
<interactive>:2:42: error:
• Couldn't match expected type ‘Text’ with actual type ‘[Char]’
• In the second argument of ‘includeSnippet’, namely ‘"ex1"’
In the first argument of ‘(>>=)’, namely
‘includeSnippet "src/fact.hs" "ex1"’
In the first argument of ‘execLaTeXT’, namely
‘(includeSnippet "src/fact.hs" "ex1" >>= verbatim)’
File test_3.tex already exists. Overwrite? (use -overwrite to overwrite by default) y
Writing final file at test_3.tex...
End of processing of file test_3.htex.
It seems that during evaluation of the \iohatex{...} expressions, pragmas are ignored.
The text was updated successfully, but these errors were encountered:
You are right, pragmas do not affect evaluation of either \hatex{...} or \iohatex{...}. There is no trivial fix for this. What I can do is parse the pragmas and then pass them to the evaluation.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I've written a custom function called
includeSnippet
with the following signatureIn my
.htex
file I includeHowever, if I don't use
pack
for the second argumenthaskintex
gives the following error:It seems that during evaluation of the
\iohatex{...}
expressions, pragmas are ignored.The text was updated successfully, but these errors were encountered: