Tag: haskell
-
Is it possible, using PHOAS, to evaluate a term to normal form, and then stringify it?
6 From this Haskell Cafe post, and borrowing some code examples from jyp, we can construct a simple PHOAS evaluator in Haskell as: {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} import Data.Char data Term v t where Var :: v t -> Term v t App :: Term v (a -> b) -> Term…
-
How to use function withSizedList?
9 I know this is a little vague question but I have tried to find an answer and I couldn’t. Can any one provide a single reasonable example on how to use the function withSizedList from vector-sized package? The context is that I am building some french deck package. I’ve decided to go into type…