Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Ident = Ident {}
- newtype ExtIdent = ExtIdent (Either Int Text)
- data ImplExpl
- data Import pos
- = IVar pos Ident
- | IOpVar pos Ident
- | IEnum pos pos Ident
- | ICommentAbove (Comment pos) (Import pos)
- | ICommentAfter (Import pos) (Comment pos)
- | ICommentBelow (Import pos) (Comment pos)
- newtype ModuleName = ModuleName {
- unModuleName :: Text
- data InfixFixity
- data Fixity
- data Comment pos
- = LineComment pos Text pos
- | BlockComment pos Text pos
- data IStr (f :: Bool) e where
- type OpsTable = IntMap [(Fixity, Scoped ModuleName, Text)]
- data SomeIStr e = forall f.Typeable f => SomeIStr (IStr f e)
- toEitherList :: SomeIStr e -> [Either Text e]
- fromEitherList :: [Either Text e] -> SomeIStr e
- data Lit
- data Pat hash pos
- data PatF (hash :: Type) (pos :: Type) r
- = PVarF pos (Maybe Ident)
- | PEnumF pos hash (Scoped ModuleName) Ident
- | PLitF pos Lit
- | POneF pos r
- | PEmptyF pos
- | PTupleF pos (TList (r, Maybe pos)) pos
- | PCommentAboveF (Comment pos) r
- | PCommentAfterF r (Comment pos)
- | PCommentBelowF r (Comment pos)
- newtype TV = TV {}
- data BaseType
- data InfernoType
- data Expr hash pos where
- Var pos hash (Scoped ModuleName) ImplExpl
- OpVar pos hash (Scoped ModuleName) Ident
- TypeRep pos InfernoType
- Enum pos hash (Scoped ModuleName) Ident
- App (Expr hash pos) (Expr hash pos)
- Lam pos (NonEmpty (pos, Maybe ExtIdent)) pos (Expr hash pos)
- Let pos pos ImplExpl pos (Expr hash pos) pos (Expr hash pos)
- Lit pos Lit
- InterpolatedString pos (SomeIStr (pos, Expr hash pos, pos)) pos
- If pos (Expr hash pos) pos (Expr hash pos) pos (Expr hash pos)
- Op (Expr hash pos) pos hash (Int, InfixFixity) (Scoped ModuleName) Ident (Expr hash pos)
- PreOp pos hash Int (Scoped ModuleName) Ident (Expr hash pos)
- Tuple pos (TList (Expr hash pos, Maybe pos)) pos
- One pos (Expr hash pos)
- Empty pos
- Assert pos (Expr hash pos) pos (Expr hash pos)
- Case pos (Expr hash pos) pos (NonEmpty (pos, Pat hash pos, pos, Expr hash pos)) pos
- Array pos [(Expr hash pos, Maybe pos)] pos
- ArrayComp pos (Expr hash pos) pos (NonEmpty (pos, Ident, pos, Expr hash pos, Maybe pos)) (Maybe (pos, Expr hash pos)) pos
- CommentAbove (Comment pos) (Expr hash pos)
- CommentAfter (Expr hash pos) (Comment pos)
- CommentBelow (Expr hash pos) (Comment pos)
- Bracketed pos (Expr hash pos) pos
- RenameModule pos ModuleName pos ModuleName pos (Expr hash pos)
- OpenModule pos hash ModuleName [(Import pos, Maybe pos)] pos (Expr hash pos)
- pattern Var_ :: forall hash pos. hash -> Scoped ModuleName -> ImplExpl -> Expr hash pos
- pattern OpVar_ :: forall hash pos. hash -> Scoped ModuleName -> Ident -> Expr hash pos
- pattern TypeRep_ :: forall hash pos. InfernoType -> Expr hash pos
- pattern Enum_ :: forall hash pos. hash -> Scoped ModuleName -> Ident -> Expr hash pos
- pattern App_ :: forall hash pos. Expr hash pos -> Expr hash pos -> Expr hash pos
- pattern Lam_ :: forall hash pos. NonEmpty (pos, Maybe ExtIdent) -> Expr hash pos -> Expr hash pos
- pattern Let_ :: forall hash pos. ImplExpl -> Expr hash pos -> Expr hash pos -> Expr hash pos
- pattern Lit_ :: forall hash pos. Lit -> Expr hash pos
- pattern InterpolatedString_ :: forall hash pos. SomeIStr (pos, Expr hash pos, pos) -> Expr hash pos
- pattern If_ :: forall hash pos. Expr hash pos -> Expr hash pos -> Expr hash pos -> Expr hash pos
- pattern Op_ :: forall hash pos. Expr hash pos -> hash -> Scoped ModuleName -> Ident -> Expr hash pos -> Expr hash pos
- pattern PreOp_ :: forall hash pos. hash -> Scoped ModuleName -> Ident -> Expr hash pos -> Expr hash pos
- pattern Tuple_ :: forall hash pos. TList (Expr hash pos, Maybe pos) -> Expr hash pos
- pattern One_ :: forall hash pos. Expr hash pos -> Expr hash pos
- pattern Empty_ :: forall hash pos. Expr hash pos
- pattern Assert_ :: forall hash pos. Expr hash pos -> Expr hash pos -> Expr hash pos
- pattern Case_ :: forall hash pos. Expr hash pos -> NonEmpty (pos, Pat hash pos, pos, Expr hash pos) -> Expr hash pos
- pattern Array_ :: forall hash pos. [(Expr hash pos, Maybe pos)] -> Expr hash pos
- pattern ArrayComp_ :: forall hash pos. Expr hash pos -> NonEmpty (pos, Ident, pos, Expr hash pos, Maybe pos) -> Maybe (pos, Expr hash pos) -> Expr hash pos
- pattern Bracketed_ :: forall hash pos. Expr hash pos -> Expr hash pos
- pattern RenameModule_ :: forall hash pos. ModuleName -> ModuleName -> Expr hash pos -> Expr hash pos
- pattern OpenModule_ :: forall hash pos. ModuleName -> [(Import pos, Maybe pos)] -> Expr hash pos -> Expr hash pos
- class BlockUtils f where
- blockPosition :: f SourcePos -> (SourcePos, SourcePos)
- removeComments :: f pos -> f pos
- hasLeadingComment :: f pos -> Bool
- hasTrailingComment :: f pos -> Bool
- renameModule :: Scoped ModuleName -> f pos -> f pos
- class ElementPosition a where
- elementPosition :: SourcePos -> a -> (SourcePos, SourcePos)
- data TList a
- data SigVar
- data SourcePos = SourcePos {
- sourceName :: FilePath
- sourceLine :: !Pos
- sourceColumn :: !Pos
- data Scoped a
- = LocalScope
- | Scope a
- class Dependencies f hash where
- getDependencies :: Ord hash => f -> Set hash
- arbitraryName :: Gen Text
- collectArrs :: InfernoType -> [InfernoType]
- extractArgsAndPrettyPrint :: Expr hash pos -> ([Maybe Ident], Text)
- tListToList :: TList a -> [a]
- tListFromList :: [a] -> TList a
- sigVarToIdent :: SigVar -> Ident
- sigVarToExpr :: Scoped ModuleName -> SigVar -> Expr () ()
- patternToExpr :: Pat () () -> Expr () ()
- incSourceCol :: SourcePos -> Int -> SourcePos
- fromScoped :: a -> Scoped a -> a
- rws :: [Text]
- punctuate' :: Doc ann -> [Doc ann] -> [Doc ann]
- hideInternalIdents :: Expr hash pos -> Expr hash pos
- substInternalIdents :: Map Int (Either Int InfernoType) -> Expr hash pos -> Expr hash pos
- getIdentifierPositions :: Ident -> Expr a SourcePos -> [(SourcePos, SourcePos)]
Documentation
Instances
An extended identifier; either an internal (e.g., var$4) or a regular variable
Instances
Instances
IVar pos Ident | |
IOpVar pos Ident | |
IEnum pos pos Ident | |
ICommentAbove (Comment pos) (Import pos) | |
ICommentAfter (Import pos) (Comment pos) | |
ICommentBelow (Import pos) (Comment pos) |
Instances
newtype ModuleName Source #
Instances
data InfixFixity Source #
Instances
Instances
FromJSON Fixity Source # | |
ToJSON Fixity Source # | |
Defined in Inferno.Types.Syntax | |
Data Fixity Source # | |
Defined in Inferno.Types.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Fixity -> c Fixity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Fixity # toConstr :: Fixity -> Constr # dataTypeOf :: Fixity -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Fixity) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Fixity) # gmapT :: (forall b. Data b => b -> b) -> Fixity -> Fixity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Fixity -> r # gmapQ :: (forall d. Data d => d -> u) -> Fixity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Fixity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Fixity -> m Fixity # | |
Generic Fixity Source # | |
Show Fixity Source # | |
Eq Fixity Source # | |
Ord Fixity Source # | |
VCHashUpdate Fixity Source # | |
type Rep Fixity Source # | |
Defined in Inferno.Types.Syntax type Rep Fixity = D1 ('MetaData "Fixity" "Inferno.Types.Syntax" "inferno-types-0.1.0.0-EKMmIlZ8z5b3mVEUhFR81D" 'False) (C1 ('MetaCons "InfixOp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 InfixFixity)) :+: C1 ('MetaCons "PrefixOp" 'PrefixI 'False) (U1 :: Type -> Type)) |
LineComment pos Text pos | |
BlockComment pos Text pos |
Instances
data IStr (f :: Bool) e where Source #
ISEmpty :: IStr 'True e | |
ISStr :: Text -> IStr 'True e -> IStr 'False e | |
ISExpr :: Typeable f => e -> IStr f e -> IStr 'True e |
Instances
Foldable (IStr f) Source # | |
Defined in Inferno.Types.Syntax fold :: Monoid m => IStr f m -> m # foldMap :: Monoid m => (a -> m) -> IStr f a -> m # foldMap' :: Monoid m => (a -> m) -> IStr f a -> m # foldr :: (a -> b -> b) -> b -> IStr f a -> b # foldr' :: (a -> b -> b) -> b -> IStr f a -> b # foldl :: (b -> a -> b) -> b -> IStr f a -> b # foldl' :: (b -> a -> b) -> b -> IStr f a -> b # foldr1 :: (a -> a -> a) -> IStr f a -> a # foldl1 :: (a -> a -> a) -> IStr f a -> a # elem :: Eq a => a -> IStr f a -> Bool # maximum :: Ord a => IStr f a -> a # minimum :: Ord a => IStr f a -> a # | |
Traversable (IStr f) Source # | |
Functor (IStr f) Source # | |
(Typeable f, Data e) => Data (IStr f e) Source # | |
Defined in Inferno.Types.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> IStr f e -> c (IStr f e) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (IStr f e) # toConstr :: IStr f e -> Constr # dataTypeOf :: IStr f e -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (IStr f e)) # dataCast2 :: Typeable t => (forall d e0. (Data d, Data e0) => c (t d e0)) -> Maybe (c (IStr f e)) # gmapT :: (forall b. Data b => b -> b) -> IStr f e -> IStr f e # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> IStr f e -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> IStr f e -> r # gmapQ :: (forall d. Data d => d -> u) -> IStr f e -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> IStr f e -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> IStr f e -> m (IStr f e) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> IStr f e -> m (IStr f e) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> IStr f e -> m (IStr f e) # | |
Show e => Show (IStr f e) Source # | |
VCHashUpdate e => VCHashUpdate (IStr f e) Source # | |
Instances
Foldable SomeIStr Source # | |
Defined in Inferno.Types.Syntax fold :: Monoid m => SomeIStr m -> m # foldMap :: Monoid m => (a -> m) -> SomeIStr a -> m # foldMap' :: Monoid m => (a -> m) -> SomeIStr a -> m # foldr :: (a -> b -> b) -> b -> SomeIStr a -> b # foldr' :: (a -> b -> b) -> b -> SomeIStr a -> b # foldl :: (b -> a -> b) -> b -> SomeIStr a -> b # foldl' :: (b -> a -> b) -> b -> SomeIStr a -> b # foldr1 :: (a -> a -> a) -> SomeIStr a -> a # foldl1 :: (a -> a -> a) -> SomeIStr a -> a # elem :: Eq a => a -> SomeIStr a -> Bool # maximum :: Ord a => SomeIStr a -> a # minimum :: Ord a => SomeIStr a -> a # | |
Traversable SomeIStr Source # | |
Functor SomeIStr Source # | |
FromJSON e => FromJSON (SomeIStr e) Source # | |
ToJSON e => ToJSON (SomeIStr e) Source # | |
Defined in Inferno.Types.Syntax | |
Data e => Data (SomeIStr e) Source # | |
Defined in Inferno.Types.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SomeIStr e -> c (SomeIStr e) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SomeIStr e) # toConstr :: SomeIStr e -> Constr # dataTypeOf :: SomeIStr e -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SomeIStr e)) # dataCast2 :: Typeable t => (forall d e0. (Data d, Data e0) => c (t d e0)) -> Maybe (c (SomeIStr e)) # gmapT :: (forall b. Data b => b -> b) -> SomeIStr e -> SomeIStr e # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SomeIStr e -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SomeIStr e -> r # gmapQ :: (forall d. Data d => d -> u) -> SomeIStr e -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SomeIStr e -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SomeIStr e -> m (SomeIStr e) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SomeIStr e -> m (SomeIStr e) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SomeIStr e -> m (SomeIStr e) # | |
Show e => Show (SomeIStr e) Source # | |
Eq e => Eq (SomeIStr e) Source # | |
Ord e => Ord (SomeIStr e) Source # | |
VCHashUpdate e => VCHashUpdate (SomeIStr e) Source # | |
Instances
FromJSON Lit Source # | |
ToJSON Lit Source # | |
Defined in Inferno.Types.Syntax | |
Data Lit Source # | |
Defined in Inferno.Types.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Lit -> c Lit # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Lit # dataTypeOf :: Lit -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Lit) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Lit) # gmapT :: (forall b. Data b => b -> b) -> Lit -> Lit # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Lit -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Lit -> r # gmapQ :: (forall d. Data d => d -> u) -> Lit -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Lit -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Lit -> m Lit # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Lit -> m Lit # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Lit -> m Lit # | |
Generic Lit Source # | |
Show Lit Source # | |
Eq Lit Source # | |
Ord Lit Source # | |
ElementPosition Lit Source # | |
Defined in Inferno.Types.Syntax | |
VCHashUpdate Lit Source # | |
Pretty Lit Source # | |
Defined in Inferno.Types.Syntax | |
type Rep Lit Source # | |
Defined in Inferno.Types.Syntax type Rep Lit = D1 ('MetaData "Lit" "Inferno.Types.Syntax" "inferno-types-0.1.0.0-EKMmIlZ8z5b3mVEUhFR81D" 'False) ((C1 ('MetaCons "LInt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)) :+: C1 ('MetaCons "LDouble" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double))) :+: (C1 ('MetaCons "LText" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "LHex" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))) |
PVar pos (Maybe Ident) | |
PEnum pos hash (Scoped ModuleName) Ident | |
PLit pos Lit | |
POne pos (Pat hash pos) | |
PEmpty pos | |
PTuple pos (TList (Pat hash pos, Maybe pos)) pos | |
PCommentAbove (Comment pos) (Pat hash pos) | |
PCommentAfter (Pat hash pos) (Comment pos) | |
PCommentBelow (Pat hash pos) (Comment pos) |
Instances
Bifunctor Pat Source # | |
Foldable (Pat hash) Source # | |
Defined in Inferno.Types.Syntax fold :: Monoid m => Pat hash m -> m # foldMap :: Monoid m => (a -> m) -> Pat hash a -> m # foldMap' :: Monoid m => (a -> m) -> Pat hash a -> m # foldr :: (a -> b -> b) -> b -> Pat hash a -> b # foldr' :: (a -> b -> b) -> b -> Pat hash a -> b # foldl :: (b -> a -> b) -> b -> Pat hash a -> b # foldl' :: (b -> a -> b) -> b -> Pat hash a -> b # foldr1 :: (a -> a -> a) -> Pat hash a -> a # foldl1 :: (a -> a -> a) -> Pat hash a -> a # elem :: Eq a => a -> Pat hash a -> Bool # maximum :: Ord a => Pat hash a -> a # minimum :: Ord a => Pat hash a -> a # | |
Functor (Pat hash) Source # | |
BlockUtils (Pat hash) Source # | |
Defined in Inferno.Types.Syntax blockPosition :: Pat hash SourcePos -> (SourcePos, SourcePos) Source # removeComments :: Pat hash pos -> Pat hash pos Source # hasLeadingComment :: Pat hash pos -> Bool Source # hasTrailingComment :: Pat hash pos -> Bool Source # renameModule :: Scoped ModuleName -> Pat hash pos -> Pat hash pos Source # | |
(FromJSON hash, FromJSON pos) => FromJSON (Pat hash pos) Source # | |
(ToJSON pos, ToJSON hash) => ToJSON (Pat hash pos) Source # | |
Defined in Inferno.Types.Syntax | |
(Data hash, Data pos) => Data (Pat hash pos) Source # | |
Defined in Inferno.Types.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Pat hash pos -> c (Pat hash pos) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Pat hash pos) # toConstr :: Pat hash pos -> Constr # dataTypeOf :: Pat hash pos -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Pat hash pos)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Pat hash pos)) # gmapT :: (forall b. Data b => b -> b) -> Pat hash pos -> Pat hash pos # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Pat hash pos -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Pat hash pos -> r # gmapQ :: (forall d. Data d => d -> u) -> Pat hash pos -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Pat hash pos -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Pat hash pos -> m (Pat hash pos) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Pat hash pos -> m (Pat hash pos) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Pat hash pos -> m (Pat hash pos) # | |
Generic (Pat hash pos) Source # | |
(Show pos, Show hash) => Show (Pat hash pos) Source # | |
(Eq pos, Eq hash) => Eq (Pat hash pos) Source # | |
(Ord pos, Ord hash) => Ord (Pat hash pos) Source # | |
Defined in Inferno.Types.Syntax | |
(VCHashUpdate hash, VCHashUpdate a) => VCHashUpdate (Pat hash a) Source # | |
Pretty (Pat hash a) Source # | |
Defined in Inferno.Types.Syntax | |
Corecursive (Pat hash pos) Source # | |
Defined in Inferno.Types.Syntax embed :: Base (Pat hash pos) (Pat hash pos) -> Pat hash pos # ana :: (a -> Base (Pat hash pos) a) -> a -> Pat hash pos # apo :: (a -> Base (Pat hash pos) (Either (Pat hash pos) a)) -> a -> Pat hash pos # postpro :: Recursive (Pat hash pos) => (forall b. Base (Pat hash pos) b -> Base (Pat hash pos) b) -> (a -> Base (Pat hash pos) a) -> a -> Pat hash pos # gpostpro :: (Recursive (Pat hash pos), Monad m) => (forall b. m (Base (Pat hash pos) b) -> Base (Pat hash pos) (m b)) -> (forall c. Base (Pat hash pos) c -> Base (Pat hash pos) c) -> (a -> Base (Pat hash pos) (m a)) -> a -> Pat hash pos # | |
Recursive (Pat hash pos) Source # | |
Defined in Inferno.Types.Syntax project :: Pat hash pos -> Base (Pat hash pos) (Pat hash pos) # cata :: (Base (Pat hash pos) a -> a) -> Pat hash pos -> a # para :: (Base (Pat hash pos) (Pat hash pos, a) -> a) -> Pat hash pos -> a # gpara :: (Corecursive (Pat hash pos), Comonad w) => (forall b. Base (Pat hash pos) (w b) -> w (Base (Pat hash pos) b)) -> (Base (Pat hash pos) (EnvT (Pat hash pos) w a) -> a) -> Pat hash pos -> a # prepro :: Corecursive (Pat hash pos) => (forall b. Base (Pat hash pos) b -> Base (Pat hash pos) b) -> (Base (Pat hash pos) a -> a) -> Pat hash pos -> a # gprepro :: (Corecursive (Pat hash pos), Comonad w) => (forall b. Base (Pat hash pos) (w b) -> w (Base (Pat hash pos) b)) -> (forall c. Base (Pat hash pos) c -> Base (Pat hash pos) c) -> (Base (Pat hash pos) (w a) -> a) -> Pat hash pos -> a # | |
Dependencies (Pat hash pos) hash Source # | |
Defined in Inferno.Types.Syntax getDependencies :: Pat hash pos -> Set hash Source # | |
type Rep (Pat hash pos) Source # | |
Defined in Inferno.Types.Syntax type Rep (Pat hash pos) = D1 ('MetaData "Pat" "Inferno.Types.Syntax" "inferno-types-0.1.0.0-EKMmIlZ8z5b3mVEUhFR81D" 'False) (((C1 ('MetaCons "PVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 pos) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Ident))) :+: C1 ('MetaCons "PEnum" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 pos) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 hash)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Scoped ModuleName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)))) :+: (C1 ('MetaCons "PLit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 pos) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Lit)) :+: C1 ('MetaCons "POne" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 pos) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pat hash pos))))) :+: ((C1 ('MetaCons "PEmpty" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 pos)) :+: C1 ('MetaCons "PTuple" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 pos) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TList (Pat hash pos, Maybe pos))) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 pos)))) :+: (C1 ('MetaCons "PCommentAbove" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Comment pos)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pat hash pos))) :+: (C1 ('MetaCons "PCommentAfter" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pat hash pos)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Comment pos))) :+: C1 ('MetaCons "PCommentBelow" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pat hash pos)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Comment pos))))))) | |
type Base (Pat hash pos) Source # | |
Defined in Inferno.Types.Syntax |
data PatF (hash :: Type) (pos :: Type) r Source #
PVarF pos (Maybe Ident) | |
PEnumF pos hash (Scoped ModuleName) Ident | |
PLitF pos Lit | |
POneF pos r | |
PEmptyF pos | |
PTupleF pos (TList (r, Maybe pos)) pos | |
PCommentAboveF (Comment pos) r | |
PCommentAfterF r (Comment pos) | |
PCommentBelowF r (Comment pos) |
Instances
Foldable (PatF hash pos) Source # | |
Defined in Inferno.Types.Syntax fold :: Monoid m => PatF hash pos m -> m # foldMap :: Monoid m => (a -> m) -> PatF hash pos a -> m # foldMap' :: Monoid m => (a -> m) -> PatF hash pos a -> m # foldr :: (a -> b -> b) -> b -> PatF hash pos a -> b # foldr' :: (a -> b -> b) -> b -> PatF hash pos a -> b # foldl :: (b -> a -> b) -> b -> PatF hash pos a -> b # foldl' :: (b -> a -> b) -> b -> PatF hash pos a -> b # foldr1 :: (a -> a -> a) -> PatF hash pos a -> a # foldl1 :: (a -> a -> a) -> PatF hash pos a -> a # toList :: PatF hash pos a -> [a] # null :: PatF hash pos a -> Bool # length :: PatF hash pos a -> Int # elem :: Eq a => a -> PatF hash pos a -> Bool # maximum :: Ord a => PatF hash pos a -> a # minimum :: Ord a => PatF hash pos a -> a # | |
Traversable (PatF hash pos) Source # | |
Defined in Inferno.Types.Syntax | |
Functor (PatF hash pos) Source # | |
Instances
Arbitrary TV Source # | |
FromJSON TV Source # | |
FromJSONKey TV Source # | |
Defined in Inferno.Types.Syntax | |
ToJSON TV Source # | |
Defined in Inferno.Types.Syntax | |
ToJSONKey TV Source # | |
Defined in Inferno.Types.Syntax | |
Data TV Source # | |
Defined in Inferno.Types.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TV -> c TV # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TV # dataTypeOf :: TV -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TV) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TV) # gmapT :: (forall b. Data b => b -> b) -> TV -> TV # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TV -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TV -> r # gmapQ :: (forall d. Data d => d -> u) -> TV -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TV -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TV -> m TV # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TV -> m TV # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TV -> m TV # | |
Generic TV Source # | |
Show TV Source # | |
Serialize TV Source # | |
NFData TV Source # | |
Defined in Inferno.Types.Syntax | |
Eq TV Source # | |
Ord TV Source # | |
Hashable TV Source # | |
Defined in Inferno.Types.Syntax | |
VCHashUpdate TV Source # | |
Pretty TV Source # | |
Defined in Inferno.Types.Syntax | |
ToADTArbitrary TV Source # | |
Defined in Inferno.Types.Syntax toADTArbitrarySingleton :: Proxy TV -> Gen (ADTArbitrarySingleton TV) # toADTArbitrary :: Proxy TV -> Gen (ADTArbitrary TV) # | |
type Rep TV Source # | |
Defined in Inferno.Types.Syntax |
Instances
data InfernoType Source #
TVar TV | |
TBase BaseType | |
TArr InfernoType InfernoType | |
TArray InfernoType | |
TSeries InfernoType | |
TOptional InfernoType | |
TTuple (TList InfernoType) | |
TRep InfernoType |
Instances
Var pos hash (Scoped ModuleName) ImplExpl | |
OpVar pos hash (Scoped ModuleName) Ident | |
TypeRep pos InfernoType | |
Enum pos hash (Scoped ModuleName) Ident | |
App (Expr hash pos) (Expr hash pos) | |
Lam pos (NonEmpty (pos, Maybe ExtIdent)) pos (Expr hash pos) | |
Let pos pos ImplExpl pos (Expr hash pos) pos (Expr hash pos) | |
Lit pos Lit | |
InterpolatedString pos (SomeIStr (pos, Expr hash pos, pos)) pos | |
If pos (Expr hash pos) pos (Expr hash pos) pos (Expr hash pos) | |
Op (Expr hash pos) pos hash (Int, InfixFixity) (Scoped ModuleName) Ident (Expr hash pos) | |
PreOp pos hash Int (Scoped ModuleName) Ident (Expr hash pos) | |
Tuple pos (TList (Expr hash pos, Maybe pos)) pos | |
One pos (Expr hash pos) | |
Empty pos | |
Assert pos (Expr hash pos) pos (Expr hash pos) | |
Case pos (Expr hash pos) pos (NonEmpty (pos, Pat hash pos, pos, Expr hash pos)) pos | |
Array pos [(Expr hash pos, Maybe pos)] pos | |
ArrayComp pos (Expr hash pos) pos (NonEmpty (pos, Ident, pos, Expr hash pos, Maybe pos)) (Maybe (pos, Expr hash pos)) pos | |
CommentAbove (Comment pos) (Expr hash pos) | |
CommentAfter (Expr hash pos) (Comment pos) | |
CommentBelow (Expr hash pos) (Comment pos) | |
Bracketed pos (Expr hash pos) pos | |
RenameModule pos ModuleName pos ModuleName pos (Expr hash pos) | |
OpenModule pos hash ModuleName [(Import pos, Maybe pos)] pos (Expr hash pos) |
pattern Var_ :: forall hash pos. hash -> Scoped ModuleName -> ImplExpl -> Expr hash pos | |
pattern OpVar_ :: forall hash pos. hash -> Scoped ModuleName -> Ident -> Expr hash pos | |
pattern TypeRep_ :: forall hash pos. InfernoType -> Expr hash pos | |
pattern Enum_ :: forall hash pos. hash -> Scoped ModuleName -> Ident -> Expr hash pos | |
pattern App_ :: forall hash pos. Expr hash pos -> Expr hash pos -> Expr hash pos | |
pattern Lam_ :: forall hash pos. NonEmpty (pos, Maybe ExtIdent) -> Expr hash pos -> Expr hash pos | |
pattern Let_ :: forall hash pos. ImplExpl -> Expr hash pos -> Expr hash pos -> Expr hash pos | |
pattern Lit_ :: forall hash pos. Lit -> Expr hash pos | |
pattern InterpolatedString_ :: forall hash pos. SomeIStr (pos, Expr hash pos, pos) -> Expr hash pos | |
pattern If_ :: forall hash pos. Expr hash pos -> Expr hash pos -> Expr hash pos -> Expr hash pos | |
pattern Op_ :: forall hash pos. Expr hash pos -> hash -> Scoped ModuleName -> Ident -> Expr hash pos -> Expr hash pos | |
pattern PreOp_ :: forall hash pos. hash -> Scoped ModuleName -> Ident -> Expr hash pos -> Expr hash pos | |
pattern Tuple_ :: forall hash pos. TList (Expr hash pos, Maybe pos) -> Expr hash pos | |
pattern One_ :: forall hash pos. Expr hash pos -> Expr hash pos | |
pattern Empty_ :: forall hash pos. Expr hash pos | |
pattern Assert_ :: forall hash pos. Expr hash pos -> Expr hash pos -> Expr hash pos | |
pattern Case_ :: forall hash pos. Expr hash pos -> NonEmpty (pos, Pat hash pos, pos, Expr hash pos) -> Expr hash pos | |
pattern Array_ :: forall hash pos. [(Expr hash pos, Maybe pos)] -> Expr hash pos | |
pattern ArrayComp_ :: forall hash pos. Expr hash pos -> NonEmpty (pos, Ident, pos, Expr hash pos, Maybe pos) -> Maybe (pos, Expr hash pos) -> Expr hash pos | |
pattern Bracketed_ :: forall hash pos. Expr hash pos -> Expr hash pos | |
pattern RenameModule_ :: forall hash pos. ModuleName -> ModuleName -> Expr hash pos -> Expr hash pos | |
pattern OpenModule_ :: forall hash pos. ModuleName -> [(Import pos, Maybe pos)] -> Expr hash pos -> Expr hash pos |
Instances
class BlockUtils f where Source #
blockPosition :: f SourcePos -> (SourcePos, SourcePos) Source #
removeComments :: f pos -> f pos Source #
hasLeadingComment :: f pos -> Bool Source #
hasTrailingComment :: f pos -> Bool Source #
renameModule :: Scoped ModuleName -> f pos -> f pos Source #
Instances
class ElementPosition a where Source #
Instances
ElementPosition Ident Source # | |
Defined in Inferno.Types.Syntax | |
ElementPosition ImplExpl Source # | |
Defined in Inferno.Types.Syntax | |
ElementPosition Lit Source # | |
Defined in Inferno.Types.Syntax | |
ElementPosition ModuleName Source # | |
Defined in Inferno.Types.Syntax elementPosition :: SourcePos -> ModuleName -> (SourcePos, SourcePos) Source # | |
ElementPosition (Maybe Ident) Source # | |
Defined in Inferno.Types.Syntax |
Instances
Foldable TList Source # | |
Defined in Inferno.Types.Syntax fold :: Monoid m => TList m -> m # foldMap :: Monoid m => (a -> m) -> TList a -> m # foldMap' :: Monoid m => (a -> m) -> TList a -> m # foldr :: (a -> b -> b) -> b -> TList a -> b # foldr' :: (a -> b -> b) -> b -> TList a -> b # foldl :: (b -> a -> b) -> b -> TList a -> b # foldl' :: (b -> a -> b) -> b -> TList a -> b # foldr1 :: (a -> a -> a) -> TList a -> a # foldl1 :: (a -> a -> a) -> TList a -> a # elem :: Eq a => a -> TList a -> Bool # maximum :: Ord a => TList a -> a # minimum :: Ord a => TList a -> a # | |
Traversable TList Source # | |
Functor TList Source # | |
Arbitrary a => Arbitrary (TList a) Source # | |
FromJSON a => FromJSON (TList a) Source # | |
ToJSON a => ToJSON (TList a) Source # | |
Defined in Inferno.Types.Syntax | |
Data a => Data (TList a) Source # | |
Defined in Inferno.Types.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TList a -> c (TList a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (TList a) # toConstr :: TList a -> Constr # dataTypeOf :: TList a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (TList a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (TList a)) # gmapT :: (forall b. Data b => b -> b) -> TList a -> TList a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TList a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TList a -> r # gmapQ :: (forall d. Data d => d -> u) -> TList a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TList a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TList a -> m (TList a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TList a -> m (TList a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TList a -> m (TList a) # | |
Generic (TList a) Source # | |
Show a => Show (TList a) Source # | |
Serialize a => Serialize (TList a) Source # | |
NFData a => NFData (TList a) Source # | |
Defined in Inferno.Types.Syntax | |
Eq a => Eq (TList a) Source # | |
Ord a => Ord (TList a) Source # | |
Hashable a => Hashable (TList a) Source # | |
Defined in Inferno.Types.Syntax | |
VCHashUpdate a => VCHashUpdate (TList a) Source # | |
Arbitrary a => ToADTArbitrary (TList a) Source # | |
Defined in Inferno.Types.Syntax toADTArbitrarySingleton :: Proxy (TList a) -> Gen (ADTArbitrarySingleton (TList a)) # toADTArbitrary :: Proxy (TList a) -> Gen (ADTArbitrary (TList a)) # | |
type Rep (TList a) Source # | |
Defined in Inferno.Types.Syntax type Rep (TList a) = D1 ('MetaData "TList" "Inferno.Types.Syntax" "inferno-types-0.1.0.0-EKMmIlZ8z5b3mVEUhFR81D" 'False) (C1 ('MetaCons "TNil" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TCons" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a])))) |
Instances
Data SigVar Source # | |
Defined in Inferno.Types.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SigVar -> c SigVar # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SigVar # toConstr :: SigVar -> Constr # dataTypeOf :: SigVar -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SigVar) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SigVar) # gmapT :: (forall b. Data b => b -> b) -> SigVar -> SigVar # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SigVar -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SigVar -> r # gmapQ :: (forall d. Data d => d -> u) -> SigVar -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SigVar -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SigVar -> m SigVar # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SigVar -> m SigVar # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SigVar -> m SigVar # | |
Show SigVar Source # | |
Eq SigVar Source # | |
The data type SourcePos
represents source positions. It contains the
name of the source file, a line number, and a column number. Source line
and column positions change intensively during parsing, so we need to
make them strict to avoid memory leaks.
SourcePos | |
|
Instances
FromJSON SourcePos Source # | |
ToJSON SourcePos Source # | |
Defined in Inferno.Types.Syntax | |
Data SourcePos | |
Defined in Text.Megaparsec.Pos gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourcePos -> c SourcePos # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourcePos # toConstr :: SourcePos -> Constr # dataTypeOf :: SourcePos -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourcePos) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourcePos) # gmapT :: (forall b. Data b => b -> b) -> SourcePos -> SourcePos # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourcePos -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourcePos -> r # gmapQ :: (forall d. Data d => d -> u) -> SourcePos -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SourcePos -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourcePos -> m SourcePos # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourcePos -> m SourcePos # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourcePos -> m SourcePos # | |
Generic SourcePos | |
Read SourcePos | |
Show SourcePos | |
NFData SourcePos | |
Defined in Text.Megaparsec.Pos | |
Eq SourcePos | |
Ord SourcePos | |
Defined in Text.Megaparsec.Pos | |
VCHashUpdate SourcePos Source # | |
type Rep SourcePos | |
Defined in Text.Megaparsec.Pos type Rep SourcePos = D1 ('MetaData "SourcePos" "Text.Megaparsec.Pos" "megaparsec-9.2.2-C7z8jWaM1K5L3stUFAJNLW" 'False) (C1 ('MetaCons "SourcePos" 'PrefixI 'True) (S1 ('MetaSel ('Just "sourceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: (S1 ('MetaSel ('Just "sourceLine") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Pos) :*: S1 ('MetaSel ('Just "sourceColumn") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Pos)))) |
Instances
Foldable Scoped Source # | |
Defined in Inferno.Types.Syntax fold :: Monoid m => Scoped m -> m # foldMap :: Monoid m => (a -> m) -> Scoped a -> m # foldMap' :: Monoid m => (a -> m) -> Scoped a -> m # foldr :: (a -> b -> b) -> b -> Scoped a -> b # foldr' :: (a -> b -> b) -> b -> Scoped a -> b # foldl :: (b -> a -> b) -> b -> Scoped a -> b # foldl' :: (b -> a -> b) -> b -> Scoped a -> b # foldr1 :: (a -> a -> a) -> Scoped a -> a # foldl1 :: (a -> a -> a) -> Scoped a -> a # elem :: Eq a => a -> Scoped a -> Bool # maximum :: Ord a => Scoped a -> a # minimum :: Ord a => Scoped a -> a # | |
Traversable Scoped Source # | |
Functor Scoped Source # | |
FromJSON a => FromJSON (Scoped a) Source # | |
ToJSON a => ToJSON (Scoped a) Source # | |
Defined in Inferno.Types.Syntax | |
Data a => Data (Scoped a) Source # | |
Defined in Inferno.Types.Syntax gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Scoped a -> c (Scoped a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Scoped a) # toConstr :: Scoped a -> Constr # dataTypeOf :: Scoped a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Scoped a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Scoped a)) # gmapT :: (forall b. Data b => b -> b) -> Scoped a -> Scoped a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Scoped a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Scoped a -> r # gmapQ :: (forall d. Data d => d -> u) -> Scoped a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Scoped a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Scoped a -> m (Scoped a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Scoped a -> m (Scoped a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Scoped a -> m (Scoped a) # | |
Generic (Scoped a) Source # | |
Show a => Show (Scoped a) Source # | |
Eq a => Eq (Scoped a) Source # | |
Ord a => Ord (Scoped a) Source # | |
Defined in Inferno.Types.Syntax | |
VCHashUpdate a => VCHashUpdate (Scoped a) Source # | |
type Rep (Scoped a) Source # | |
Defined in Inferno.Types.Syntax type Rep (Scoped a) = D1 ('MetaData "Scoped" "Inferno.Types.Syntax" "inferno-types-0.1.0.0-EKMmIlZ8z5b3mVEUhFR81D" 'False) (C1 ('MetaCons "LocalScope" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Scope" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) |
class Dependencies f hash where Source #
getDependencies :: Ord hash => f -> Set hash Source #
Instances
Dependencies (Expr hash pos) hash Source # | |
Defined in Inferno.Types.Syntax getDependencies :: Expr hash pos -> Set hash Source # | |
Dependencies (Pat hash pos) hash Source # | |
Defined in Inferno.Types.Syntax getDependencies :: Pat hash pos -> Set hash Source # |
arbitraryName :: Gen Text Source #
collectArrs :: InfernoType -> [InfernoType] Source #
extractArgsAndPrettyPrint :: Expr hash pos -> ([Maybe Ident], Text) Source #
Extract the arguments of a script and pretty print the script body. This hides the internal variable arguments.
tListToList :: TList a -> [a] Source #
tListFromList :: [a] -> TList a Source #
sigVarToIdent :: SigVar -> Ident Source #
sigVarToExpr :: Scoped ModuleName -> SigVar -> Expr () () Source #
patternToExpr :: Pat () () -> Expr () () Source #
fromScoped :: a -> Scoped a -> a Source #
hideInternalIdents :: Expr hash pos -> Expr hash pos Source #
Filter out any var$n?var$n variables and their letlambda bindings This is used when pretty printing for the front-end, as we don't want the users to see these auto-generated internal variables.
substInternalIdents :: Map Int (Either Int InfernoType) -> Expr hash pos -> Expr hash pos Source #
Substitute every variable occurrence of `?var$i` with `var$j` if `(i, Left j)` is in in the supplied map. otherwise replace `?var$i` with `@t` if (i, Right t) in m`