quickspec icon indicating copy to clipboard operation
quickspec copied to clipboard

Language-specific formatters

Open isovector opened this issue 4 years ago • 0 comments

Someone (I can't remember who, sorry!) suggested that QuickSpec support a more generalized test formatter, capable of writing tests for languages other than Haskell. This seems extremely valuable to me, so I wanted to sketch out what I've been thinking. Happy to send a PR if you're interested, @nick8325 .

data Equation = Equation
  { binders :: [(Name, Type)]
  , lhs :: Expr
  , rhs :: Expr
  , ty :: Type
  , eqSort :: EqualitySort
  }

--   '==' vs '=~='
data EqualitySort = Equational | Observational

customFormatter :: (Equation -> String) -> PrintStyle

plus maybe some formatters for expressing Exprs in different ways.

isovector avatar Sep 25 '20 07:09 isovector