Module
Bismuth
- Package
- purescript-bismuth
- Repository
- justinwoo/purescript-bismuth
#toFlow Source
toFlow :: forall a. HasFlowRep a => a -> a
Identity function to apply the HasFlowRep constraint
#generateFlowType Source
generateFlowType :: forall a. HasFlowRep a => String -> Proxy a -> String
Generate a Flow type signature for a given type. Takes the name to be used as an arg.
#generateFlowType' Source
generateFlowType' :: forall a. HasFlowRep a => String -> a -> String
A convenience function for generating types taking a concrete value over a proxy.
#toFlowRep' Source
toFlowRep' :: forall a. HasFlowRep a => a -> String
A convenience function for getting the flow rep of a concrete value
#HasFlowRep Source
class HasFlowRep a where
Members
Instances
HasFlowRep Number
HasFlowRep String
HasFlowRep Boolean
HasFlowRep Foreign
HasFlowRep Unit
(HasFlowRep a) => HasFlowRep (StrMap a)
(HasFlowRep a) => HasFlowRep (Nullable a)
(HasFlowRep a) => HasFlowRep (Array a)
(HasFlowRep a) => HasFlowRep (Eff e a)
(HasFlowRep a, HasFlowRep b) => HasFlowRep (a -> b)
(HasFlowRep a, HasFlowRep b, HasFlowRep c) => HasFlowRep (Fn2 a b c)
(RowToList row rl, HasFlowRepFields rl) => HasFlowRep (Record row)
(RowToList row rl, FakeSumRecordMembers rl) => HasFlowRep (Variant row)
#HasFlowRepFields Source
class HasFlowRepFields (rl :: RowList) where
Members
toFlowRepFields :: RLProxy rl -> List String
Instances
(HasFlowRepFields tail, IsSymbol name, HasFlowRep ty) => HasFlowRepFields (Cons name ty tail)
HasFlowRepFields Nil
#FakeSumRecordMembers Source
class FakeSumRecordMembers (rl :: RowList) where
Members
toFakeSumRecordMembers :: RLProxy rl -> List String
Instances
(FakeSumRecordMembers tail, IsSymbol name, HasFlowRep ty) => FakeSumRecordMembers (Cons name ty tail)
FakeSumRecordMembers Nil
- Modules
- Bismuth
- Bismuth.
LibDef
a Variant is represented by VariantRep, which is a newtype record of
newtype VariantRep a = VariantRep { type ∷ String , value ∷ a }
as seen here: https://github.com/natefaubion/purescript-variant/blob/aef507e2972d294ecd735575371eccbc61ac1ac4/src/Data/Variant/Internal.purs#L31