Copyright | (C) 2016 Csongor Kiss |
---|---|
License | BSD3 |
Maintainer | Csongor Kiss <kiss.csongor.kiss@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe |
Language | Haskell2010 |
The list zipper data structure with a focused element (at the type-level).
Used for storing the registers and the instructions because of its performance benefits.
Documentation
Polymorphic list zipper.
Some functions that operate on Zippers are partial. Instead of having to mess with promoted Maybes and whatnot, this constructor represent an erroneous operation.
type family FromList xs :: Zipper k Source
Construct `Zipper a` from `[a]`. The list must contain at least one element for the Zipper to be valid. The resulting Zipper focuses on the first element of the list, the tail of the list is found to the right.
type family ToList zipper :: [k] Source
Create a list from the Zipper by appending together the left lift, the focused element and the right list in this order.