packages feed

ghci4luatex 0.0 → 0.1

raw patch · 5 files changed

+60/−23 lines, 5 filesdep ~containersPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: containers

API changes (from Hackage documentation)

- Data.Memoizer.Commands: instance (GHC.Show.Show a, GHC.Show.Show b) => GHC.Show.Show (Data.Memoizer.Commands.CmdMemoizer a b)
- Data.Memoizer.Sessions: instance (GHC.Show.Show a, GHC.Show.Show b, GHC.Show.Show k) => GHC.Show.Show (Data.Memoizer.Sessions.SessionMemoizer k a b)
- System.Process.Ghci: instance GHC.Base.Monoid System.Process.Ghci.GhciResult
- System.Process.Ghci: instance GHC.Base.Semigroup System.Process.Ghci.GhciResult
- System.Process.Ghci: instance GHC.Generics.Generic System.Process.Ghci.GhciResult
- System.Process.Ghci: instance GHC.Show.Show System.Process.Ghci.GhciResult
+ Data.Memoizer.Commands: instance (GHC.Internal.Show.Show a, GHC.Internal.Show.Show b) => GHC.Internal.Show.Show (Data.Memoizer.Commands.CmdMemoizer a b)
+ Data.Memoizer.Sessions: instance (GHC.Internal.Show.Show a, GHC.Internal.Show.Show b, GHC.Internal.Show.Show k) => GHC.Internal.Show.Show (Data.Memoizer.Sessions.SessionMemoizer k a b)
+ System.Process.Ghci: instance GHC.Internal.Base.Monoid System.Process.Ghci.GhciResult
+ System.Process.Ghci: instance GHC.Internal.Base.Semigroup System.Process.Ghci.GhciResult
+ System.Process.Ghci: instance GHC.Internal.Generics.Generic System.Process.Ghci.GhciResult
+ System.Process.Ghci: instance GHC.Internal.Show.Show System.Process.Ghci.GhciResult

Files

CHANGELOG.md view
@@ -11,3 +11,6 @@ * A server that executes GHCi commands and memoizes the results * A LuaTeX package that sends commands to that server +# 0.1 - 2025-07-07++* Fix missing test for `cabal install ghci4luatex`
README.md view
@@ -2,7 +2,7 @@  [![Haskell](https://img.shields.io/badge/language-Haskell-orange.svg)](https://haskell.org) [![Hackage](https://img.shields.io/hackage/v/ghci4luatex.svg)](https://hackage.haskell.org/package/ghci4luatex)  [![BSD3 License](https://img.shields.io/badge/license-BSD3-blue.svg)](https://github.com/AliceRixte/ghci4luatex/LICENSE) -Run a GHCi session within a latex document :+Run a GHCi session within a LaTeX document :  * The `ghci` environment evaluates Haskell code without printing anything : @@ -22,25 +22,10 @@ The sum of $x$ and $y$ when $x = \hask{x}$ and $y = \hask{y}$ is $\hask{x + y}$. ``` -* You can use `HaTeX` : -```latex--\begin{ghci}-:set -XOverloadedStrings-\end{ghci}--\begin{ghci}-import Text.LaTeX--printTex = putStrLn . prettyLateX-\end{ghci}--\hask{printTex (section "A section using HaTeX")}-```--* Use any package you need by adding it to `package.yaml` (if the package is on Stackage) or to `stack.yaml` if it is your own package or only on Hackage.+## Documentation +You can find the full pdf documentation in [here](./doc/ghci-doc.pdf)  ## Quick start @@ -91,6 +76,54 @@  ``` latexmk -shell-escape -lualatex main.tex+```++## Use any Haskell library++### HaTeX++```latex++\begin{ghci}+:set -XOverloadedStrings+\end{ghci}++\begin{ghci}+import Text.LaTeX+import Text.LaTeX.Base.Pretty++printTex = putStrLn . prettyLaTeX+\end{ghci}++\hask{printTex (section "A section using HaTeX")}+```++### Diagrams++```latex++\usepackage{svg}++\begin{ghci}+{-# LANGUAGE NoMonomorphismRestriction #-}+{-# LANGUAGE FlexibleContexts          #-}+{-# LANGUAGE TypeFamilies              #-}++import Diagrams.Prelude hiding (section)+import Diagrams.Backend.SVG++myDia = circle 1 # fc green+\end{ghci}++\begin{ghci}+  renderSVG "myDia.svg" (dims2D 400 300) myDia+\end{ghci}++\begin{figure}[h]+  \centering+  \includesvg[width=0.2\textwidth]{myDia}+  \caption{A circle using Diagrams}+\end{figure} ```  ## Workflow with `lhs2tex` in Visual Studio Code with LaTeX workshop
doc/ghci-doc.pdf view

binary file changed (86148 → 86202 bytes)

doc/ghci-doc.tex view
@@ -91,8 +91,9 @@  \usepackage{fontawesome} % for \faExclamationTriangle icon -+\def\version{v0.1} +\date{\today \\[0.5em]\normalsize \texttt{\version}} %format ghci4luatex = "\text{GHCi for Lua\TeX}" %format luatex = "\text{Lua\TeX}" 
ghci4luatex.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           ghci4luatex-version:        0.0+version:        0.1 synopsis:       A GHCi session in LaTeX description:    Please see the README on GitHub at <https://github.com/AliceRixte/pandia/blob/main/ghci4luatex#readme> category:       Latex, Program@@ -47,7 +47,7 @@     , base >=4.18 && <5     , bytestring ==0.12.*     , cmdargs ==0.10.*-    , containers ==0.6.*+    , containers >=0.6 && <0.8     , network-simple ==0.4.*     , process >=1.6.25 && <1.7     , stm ==2.5.*@@ -68,7 +68,7 @@     , base >=4.18 && <5     , bytestring ==0.12.*     , cmdargs ==0.10.*-    , containers ==0.6.*+    , containers >=0.6 && <0.8     , ghci4luatex     , network-simple ==0.4.*     , process >=1.6.25 && <1.7@@ -92,7 +92,7 @@     , base >=4.18 && <5     , bytestring ==0.12.*     , cmdargs ==0.10.*-    , containers ==0.6.*+    , containers >=0.6 && <0.8     , ghci4luatex     , hspec >=2.11     , network-simple ==0.4.*