mirror of https://github.com/Wilfred/difftastic/
200 lines
4.8 KiB
Plaintext
200 lines
4.8 KiB
Plaintext
================================================================================
|
|
signature: basic
|
|
================================================================================
|
|
|
|
a :: a -> A -> A a
|
|
|
|
---
|
|
|
|
(haskell
|
|
(signature
|
|
name: (variable)
|
|
type: (fun
|
|
(type_name (type_variable))
|
|
(fun
|
|
(type_name (type))
|
|
(type_apply (type_name (type)) (type_name (type_variable)))))))
|
|
|
|
================================================================================
|
|
signature: forall
|
|
================================================================================
|
|
|
|
a :: forall a (a :: * -> Type) . (∀ a . a -> a) -> A a
|
|
|
|
---
|
|
|
|
(haskell
|
|
(signature
|
|
(variable)
|
|
(forall
|
|
(quantifiers
|
|
(type_variable)
|
|
(annotated_type_variable (type_variable) (fun (type_star) (type_name (type)))))
|
|
(fun
|
|
(type_parens
|
|
(forall
|
|
(quantifiers (type_variable))
|
|
(fun (type_name (type_variable)) (type_name (type_variable)))))
|
|
(type_apply (type_name (type)) (type_name (type_variable)))))))
|
|
|
|
|
|
================================================================================
|
|
signature: multi method operator
|
|
================================================================================
|
|
|
|
(<), (<=), (>=), (>) :: a
|
|
|
|
---
|
|
|
|
(haskell
|
|
(signature
|
|
(operator)
|
|
(comma)
|
|
(operator)
|
|
(comma)
|
|
(operator)
|
|
(comma)
|
|
(operator)
|
|
(type_name (type_variable))))
|
|
|
|
|
|
================================================================================
|
|
signature: alternating forall/context/arrow
|
|
================================================================================
|
|
|
|
a :: A a => ∀ a . a ++ a => a -> ∀ a . a -> A => A => A a
|
|
|
|
---
|
|
|
|
(haskell
|
|
(signature
|
|
name: (variable)
|
|
type: (context
|
|
(constraint class: (class_name (type)) (type_name (type_variable)))
|
|
(forall
|
|
(quantifiers (type_variable))
|
|
(context
|
|
(constraint
|
|
(type_infix
|
|
left: (type_name (type_variable))
|
|
op: (type_operator)
|
|
right: (type_name (type_variable))))
|
|
(fun
|
|
(type_name (type_variable))
|
|
(forall
|
|
(quantifiers (type_variable))
|
|
(fun
|
|
(type_name (type_variable))
|
|
(context
|
|
(constraint class: (class_name (type)))
|
|
(context
|
|
(constraint class: (class_name (type)))
|
|
(type_apply (type_name (type)) (type_name (type_variable)))))))))))))
|
|
|
|
================================================================================
|
|
signature: parenthesized operator fun
|
|
================================================================================
|
|
|
|
(<>) = a
|
|
|
|
---
|
|
|
|
(haskell (function (operator) (exp_name (variable))))
|
|
|
|
================================================================================
|
|
signature: operator starting with hash
|
|
================================================================================
|
|
|
|
(#!) :: a
|
|
|
|
---
|
|
|
|
(haskell
|
|
(signature
|
|
(operator)
|
|
(type_name (type_variable))))
|
|
|
|
|
|
================================================================================
|
|
signature: HKT annotation
|
|
================================================================================
|
|
|
|
a :: (a :: (* -> *) -> *) -> a
|
|
|
|
---
|
|
|
|
(haskell
|
|
(signature
|
|
(variable)
|
|
(fun
|
|
(type_name
|
|
(annotated_type_variable
|
|
(type_variable)
|
|
(fun
|
|
(type_parens (fun (type_star) (type_star)))
|
|
(type_star))))
|
|
(type_name (type_variable)))))
|
|
|
|
================================================================================
|
|
signature: partial
|
|
================================================================================
|
|
|
|
a :: A -> _ -> (_, a) -> _a
|
|
|
|
---
|
|
|
|
(haskell
|
|
(signature
|
|
(variable)
|
|
(fun
|
|
(type_name (type))
|
|
(fun
|
|
(type_name (type_variable))
|
|
(fun
|
|
(type_tuple (type_name (type_variable)) (comma) (type_name (type_variable)))
|
|
(type_name (type_variable)))))))
|
|
|
|
================================================================================
|
|
signature: unboxed tuple
|
|
================================================================================
|
|
|
|
a :: (# A, A #)
|
|
|
|
---
|
|
|
|
(haskell (signature (variable) (type_unboxed_tuple (type_name (type)) (comma) (type_name (type)))))
|
|
|
|
================================================================================
|
|
signature: splice
|
|
================================================================================
|
|
|
|
a :: a -> $(a ''A) -> a
|
|
|
|
---
|
|
|
|
(haskell
|
|
(signature
|
|
(variable)
|
|
(fun
|
|
(type_name (type_variable))
|
|
(fun
|
|
(splice (exp_parens (exp_apply (exp_name (variable)) (exp_th_quoted_name (type_name (type))))))
|
|
(type_name (type_variable))))))
|
|
|
|
================================================================================
|
|
signature: quasiquote
|
|
================================================================================
|
|
|
|
a :: a -> [a|a|] -> a
|
|
|
|
---
|
|
|
|
(haskell
|
|
(signature
|
|
(variable)
|
|
(fun
|
|
(type_name (type_variable))
|
|
(fun
|
|
(quasiquote (quasiquote_start) (quoter) (quasiquote_bar) (quasiquote_body))
|
|
(type_name (type_variable))))))
|