-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Generate Reason types from Haskell -- -- Please see the README on GitHub at -- https://github.com/abarbu/reason-export#readme @package reason-export @version 0.1.1.0 -- | Generate Reason types, JSON decoders & JSON encoders from Haskell -- datatypes. module Reason data Options Options :: (Text -> Text) -> Options [fieldLabelModifier] :: Options -> Text -> Text defaultOptions :: Options -- | Add an instance to the set. require :: Text -> RenderM () data Spec Spec :: [Text] -> [Text] -> Spec [namespace] :: Spec -> [Text] [declarations] :: Spec -> [Text] specsToDir :: [Spec] -> FilePath -> IO () moduleSpecWith :: Options -> [Text] -> RenderM () -> Spec moduleSpec :: [Text] -> RenderM () -> Spec class HasReasonComparable a toReasonComparable :: HasReasonComparable a => a -> ReasonPrimitive class GenericReasonValue f genericToReasonValue :: GenericReasonValue f => f a -> ReasonValue class GenericReasonConstructor f genericToReasonConstructor :: GenericReasonConstructor f => f a -> ReasonConstructor class GenericReasonDatatype f genericToReasonDatatype :: GenericReasonDatatype f => f a -> ReasonDatatype class ReasonType a toReasonType :: ReasonType a => a -> ReasonDatatype toReasonType :: (ReasonType a, Generic a, GenericReasonDatatype (Rep a)) => a -> ReasonDatatype data ReasonValue ReasonRef :: Text -> ReasonValue ReasonEmpty :: ReasonValue ReasonPrimitiveRef :: ReasonPrimitive -> ReasonValue Values :: ReasonValue -> ReasonValue -> ReasonValue ReasonField :: Text -> ReasonValue -> ReasonValue data ReasonConstructor NamedConstructor :: Text -> ReasonValue -> ReasonConstructor RecordConstructor :: Text -> ReasonValue -> ReasonConstructor MultipleConstructors :: [ReasonConstructor] -> ReasonConstructor data ReasonPrimitive RInt :: ReasonPrimitive RInt64 :: ReasonPrimitive RFloat :: ReasonPrimitive RBool :: ReasonPrimitive RChar :: ReasonPrimitive RString :: ReasonPrimitive RTimePosix :: ReasonPrimitive RUnit :: ReasonPrimitive RList :: ReasonDatatype -> ReasonPrimitive ROption :: ReasonDatatype -> ReasonPrimitive RTuple2 :: ReasonDatatype -> ReasonDatatype -> ReasonPrimitive RTuple3 :: ReasonDatatype -> ReasonDatatype -> ReasonDatatype -> ReasonPrimitive RMap :: ReasonPrimitive -> ReasonDatatype -> ReasonPrimitive data ReasonDatatype ReasonDatatype :: Text -> ReasonConstructor -> ReasonDatatype ReasonPrimitive :: ReasonPrimitive -> ReasonDatatype -- | Whether a set of constructors is an enumeration, i.e. whether they -- lack values. data A = A | B | C would be simple data A = A Int | B | C -- would not be simple. isEnumeration :: ReasonConstructor -> Bool primitiveName :: ReasonPrimitive -> Text toReasonTypeRefWith :: ReasonType a => Options -> a -> Text toReasonTypeRef :: ReasonType a => a -> Text toReasonTypeSourceWith :: ReasonType a => Options -> a -> Text toReasonTypeSource :: ReasonType a => a -> Text renderType :: ReasonType a => a -> RenderM () toReasonEncoderRefWith :: ReasonType a => Options -> a -> Text toReasonEncoderRef :: ReasonType a => a -> Text toReasonEncoderSourceWith :: ReasonType a => Options -> a -> Text toReasonEncoderSource :: ReasonType a => a -> Text renderEncoder :: ReasonType a => a -> RenderM () toReasonDecoderRefWith :: ReasonType a => Options -> a -> Text toReasonDecoderRef :: ReasonType a => a -> Text toReasonDecoderSourceWith :: ReasonType a => Options -> a -> Text toReasonDecoderSource :: ReasonType a => a -> Text renderDecoder :: ReasonType a => a -> RenderM ()