Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype QualifiedProperName = QualifiedProperName {
- getQualifiedProperName :: forall a. QualifiedName (ProperName a)
- qualifiedProperName :: QualifiedName (ProperName a) -> QualifiedProperName
- newtype ProperName = ProperName {
- _getProperName :: forall a. Name (ProperName a)
- properName :: Name (ProperName a) -> ProperName
- getProperName :: forall a. ProperName -> Name (ProperName a)
- newtype QualifiedOpName = QualifiedOpName {
- getQualifiedOpName :: forall a. QualifiedName (OpName a)
- qualifiedOpName :: QualifiedName (OpName a) -> QualifiedOpName
- newtype OpName = OpName {}
- opName :: Name (OpName a) -> OpName
- placeholder :: SourceToken
- unexpectedName :: SourceToken -> Name Ident
- unexpectedQual :: SourceToken -> QualifiedName Ident
- unexpectedLabel :: SourceToken -> Label
- unexpectedExpr :: Monoid a => [SourceToken] -> Expr a
- unexpectedBinder :: Monoid a => [SourceToken] -> Binder a
- unexpectedRecordUpdate :: Monoid a => [SourceToken] -> RecordUpdate a
- unexpectedRecordLabeled :: [SourceToken] -> RecordLabeled a
- rangeToks :: TokenRange -> [SourceToken]
- unexpectedToks :: (a -> TokenRange) -> ([SourceToken] -> b) -> ParserErrorType -> a -> Parser b
- separated :: [(SourceToken, a)] -> Separated a
- internalError :: String -> a
- toModuleName :: SourceToken -> [Text] -> Parser (Maybe ModuleName)
- upperToModuleName :: SourceToken -> Parser (Name ModuleName)
- toQualifiedName :: (Text -> a) -> SourceToken -> Parser (QualifiedName a)
- toName :: (Text -> a) -> SourceToken -> Parser (Name a)
- toLabel :: SourceToken -> Label
- toString :: SourceToken -> (SourceToken, PSString)
- toChar :: SourceToken -> (SourceToken, Char)
- toNumber :: SourceToken -> (SourceToken, Either Integer Double)
- toInt :: SourceToken -> (SourceToken, Integer)
- toBoolean :: SourceToken -> (SourceToken, Bool)
- toConstraint :: forall a. Monoid a => Type a -> Parser (Constraint a)
- isConstrained :: Type a -> Bool
- toBinderConstructor :: Monoid a => NonEmpty (Binder a) -> Parser (Binder a)
- toRecordFields :: Monoid a => Separated (Either (RecordLabeled (Expr a)) (RecordUpdate a)) -> Parser (Either (Separated (RecordLabeled (Expr a))) (Separated (RecordUpdate a)))
- checkFundeps :: ClassHead a -> Parser ()
- data TmpModuleDecl a
- = TmpImport (ImportDecl a)
- | TmpChain (Separated (Declaration a))
- toModuleDecls :: Monoid a => [TmpModuleDecl a] -> Parser ([ImportDecl a], [Declaration a])
- checkNoWildcards :: Type a -> Parser ()
- checkNoForalls :: Type a -> Parser ()
- revert :: Parser a -> SourceToken -> Parser a
- reservedNames :: Set Text
- isValidModuleNamespace :: Text -> Bool
- isLeftFatArrow :: Text -> Bool
Documentation
newtype QualifiedProperName Source #
A newtype for a qualified proper name whose ProperNameType has not yet been determined. This is a workaround for Happy's limited support for polymorphism; it is used inside the parser to allow us to write just one parser for qualified proper names which can be used for all of the different ProperNameTypes (via a call to getQualifiedProperName).
QualifiedProperName | |
|
newtype ProperName Source #
A newtype for a proper name whose ProperNameType has not yet been determined. This is a workaround for Happy's limited support for polymorphism; it is used inside the parser to allow us to write just one parser for proper names which can be used for all of the different ProperNameTypes (via a call to getProperName).
ProperName | |
|
properName :: Name (ProperName a) -> ProperName Source #
getProperName :: forall a. ProperName -> Name (ProperName a) Source #
newtype QualifiedOpName Source #
A newtype for a qualified operator name whose OpNameType has not yet been determined. This is a workaround for Happy's limited support for polymorphism; it is used inside the parser to allow us to write just one parser for qualified operator names which can be used for all of the different OpNameTypes (via a call to getQualifiedOpName).
QualifiedOpName | |
|
qualifiedOpName :: QualifiedName (OpName a) -> QualifiedOpName Source #
A newtype for a operator name whose OpNameType has not yet been determined. This is a workaround for Happy's limited support for polymorphism; it is used inside the parser to allow us to write just one parser for operator names which can be used for all of the different OpNameTypes (via a call to getOpName).
unexpectedName :: SourceToken -> Name Ident Source #
unexpectedLabel :: SourceToken -> Label Source #
unexpectedExpr :: Monoid a => [SourceToken] -> Expr a Source #
unexpectedBinder :: Monoid a => [SourceToken] -> Binder a Source #
unexpectedRecordUpdate :: Monoid a => [SourceToken] -> RecordUpdate a Source #
unexpectedRecordLabeled :: [SourceToken] -> RecordLabeled a Source #
rangeToks :: TokenRange -> [SourceToken] Source #
unexpectedToks :: (a -> TokenRange) -> ([SourceToken] -> b) -> ParserErrorType -> a -> Parser b Source #
separated :: [(SourceToken, a)] -> Separated a Source #
internalError :: String -> a Source #
toModuleName :: SourceToken -> [Text] -> Parser (Maybe ModuleName) Source #
upperToModuleName :: SourceToken -> Parser (Name ModuleName) Source #
toQualifiedName :: (Text -> a) -> SourceToken -> Parser (QualifiedName a) Source #
toLabel :: SourceToken -> Label Source #
toString :: SourceToken -> (SourceToken, PSString) Source #
toChar :: SourceToken -> (SourceToken, Char) Source #
toNumber :: SourceToken -> (SourceToken, Either Integer Double) Source #
toInt :: SourceToken -> (SourceToken, Integer) Source #
toBoolean :: SourceToken -> (SourceToken, Bool) Source #
toConstraint :: forall a. Monoid a => Type a -> Parser (Constraint a) Source #
isConstrained :: Type a -> Bool Source #
toRecordFields :: Monoid a => Separated (Either (RecordLabeled (Expr a)) (RecordUpdate a)) -> Parser (Either (Separated (RecordLabeled (Expr a))) (Separated (RecordUpdate a))) Source #
checkFundeps :: ClassHead a -> Parser () Source #
data TmpModuleDecl a Source #
TmpImport (ImportDecl a) | |
TmpChain (Separated (Declaration a)) |
Instances
Show a => Show (TmpModuleDecl a) Source # | |
Defined in Language.PureScript.CST.Utils showsPrec :: Int -> TmpModuleDecl a -> ShowS # show :: TmpModuleDecl a -> String # showList :: [TmpModuleDecl a] -> ShowS # |
toModuleDecls :: Monoid a => [TmpModuleDecl a] -> Parser ([ImportDecl a], [Declaration a]) Source #
checkNoWildcards :: Type a -> Parser () Source #
checkNoForalls :: Type a -> Parser () Source #
reservedNames :: Set Text Source #
isValidModuleNamespace :: Text -> Bool Source #
isLeftFatArrow :: Text -> Bool Source #
This is to keep the Parser.y
file ASCII, otherwise happy
will break
in non-unicode locales.
Related GHC issue: https://gitlab.haskell.org/ghc/ghc/issues/8167