Skip to content

Commit

Permalink
Merge pull request #14 from LiamGoodacre/feature/rowproxies
Browse files Browse the repository at this point in the history
Add proxies for row and RowList
  • Loading branch information
paf31 committed Jul 19, 2017
2 parents 471bc5b + d4c565e commit 5b70a6f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Type/Prelude.purs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ import Type.Data.Ordering (kind Ordering, LT, EQ, GT, OProxy(..), class IsOrderi
import Type.Proxy (Proxy(..))
import Type.Data.Symbol (SProxy(..), class IsSymbol, reflectSymbol, reifySymbol, class CompareSymbol, compareSymbol, class AppendSymbol, appendSymbol)
import Type.Equality (class TypeEquals, from, to)
import Type.Row (class RowLacks, class RowToList, class ListToRow)
import Type.Row (class RowLacks, class RowToList, class ListToRow, RProxy(..), RLProxy(..))

8 changes: 7 additions & 1 deletion src/Type/Row.purs
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
module Type.Row
( class RowLacks
( RProxy(..)
, class RowLacks
, class RowLacking
, kind RowList
, Nil
, Cons
, RLProxy(..)
, class RowToList
, class ListToRow
) where

data RProxy (row :: # Type) = RProxy

-- Must not be exported
foreign import data Entry :: Type

Expand Down Expand Up @@ -43,6 +47,8 @@ foreign import kind RowList
foreign import data Nil :: RowList
foreign import data Cons :: Symbol -> Type -> RowList -> RowList

data RLProxy (rowList :: RowList) = RLProxy

-- | Extract the collection of entries in a closed row of types.
-- | The list of entries is sorted by label and preserves duplicates.
-- | The inverse of this operation is `ListToRow`.
Expand Down

0 comments on commit 5b70a6f

Please sign in to comment.