idris-1.0: Functional Programming Language with Dependent Types

Copyright | License : BSD3
Maintainer | The Idris Community.
Safe Haskell | None
Language | Haskell98

IRTS.Lang

Description

# Documentation

data Endianness #

Constructors

Native |
BE |
LE |

Instances

Eq Endianness # |
Methods (==) :: Endianness -> Endianness -> Bool # (/=) :: Endianness -> Endianness -> Bool #
Show Endianness # |
Methods showsPrec :: Int -> Endianness -> ShowS # show :: Endianness -> String # showList :: [Endianness] -> ShowS #

data LVar #

Constructors

Loc Int |
Glob Name |

Instances

Eq LVar # |
Methods (==) :: LVar -> LVar -> Bool # (/=) :: LVar -> LVar -> Bool #
Show LVar # |
Methods showsPrec :: Int -> LVar -> ShowS # show :: LVar -> String # showList :: [LVar] -> ShowS #

data LExp #

Constructors

LV LVar |
LApp Bool LExp [LExp] |
LLazyApp Name [LExp] |
LLazyExp LExp |
LForce LExp |
LLet Name LExp LExp |
LLam [Name] LExp |
LProj LExp Int |
LCon (Maybe LVar) Int Name [LExp] |
LCase CaseType LExp [LAlt] |
LConst Const |
LForeign FDesc FDesc [(FDesc, LExp)] |
LOp PrimFn [LExp] |
LNothing |
LError String |

Instances

Eq LExp # |
Methods (==) :: LExp -> LExp -> Bool # (/=) :: LExp -> LExp -> Bool #
Show LExp # |
Methods showsPrec :: Int -> LExp -> ShowS # show :: LExp -> String # showList :: [LExp] -> ShowS #

data FDesc #

Constructors

FCon Name |
FStr String |
FUnknown |
FIO FDesc |
FApp Name [FDesc] |

Instances

Eq FDesc # |
Methods (==) :: FDesc -> FDesc -> Bool # (/=) :: FDesc -> FDesc -> Bool #
Show FDesc # |
Methods showsPrec :: Int -> FDesc -> ShowS # show :: FDesc -> String # showList :: [FDesc] -> ShowS #

data Export #

Constructors

ExportData FDesc |
ExportFun Name FDesc FDesc [FDesc] |

Instances

Eq Export # |
Methods (==) :: Export -> Export -> Bool # (/=) :: Export -> Export -> Bool #
Show Export # |
Methods showsPrec :: Int -> Export -> ShowS # show :: Export -> String # showList :: [Export] -> ShowS #

data ExportIFace #

Constructors

Export Name String [Export] |

Instances

Eq ExportIFace # |
Methods (==) :: ExportIFace -> ExportIFace -> Bool # (/=) :: ExportIFace -> ExportIFace -> Bool #
Show ExportIFace # |
Methods showsPrec :: Int -> ExportIFace -> ShowS # show :: ExportIFace -> String # showList :: [ExportIFace] -> ShowS #

data PrimFn #

Constructors

LPlus ArithTy |
LMinus ArithTy |
LTimes ArithTy |
LUDiv IntTy |
LSDiv ArithTy |
LURem IntTy |
LSRem ArithTy |
LAnd IntTy |
LOr IntTy |
LXOr IntTy |
LCompl IntTy |
LSHL IntTy |
LLSHR IntTy |
LASHR IntTy |
LEq ArithTy |
LLt IntTy |
LLe IntTy |
LGt IntTy |
LGe IntTy |
LSLt ArithTy |
LSLe ArithTy |
LSGt ArithTy |
LSGe ArithTy |
LSExt IntTy IntTy |
LZExt IntTy IntTy |
LTrunc IntTy IntTy |
LStrConcat |
LStrLt |
LStrEq |
LStrLen |
LIntFloat IntTy |
LFloatInt IntTy |
LIntStr IntTy |
LStrInt IntTy |
LFloatStr |
LStrFloat |
LChInt IntTy |
LIntCh IntTy |
LBitCast ArithTy ArithTy |
LFExp |
LFLog |
LFSin |
LFCos |
LFTan |
LFASin |
LFACos |
LFATan |
LFSqrt |
LFFloor |
LFCeil |
LFNegate |
LStrHead |
LStrTail |
LStrCons |
LStrIndex |
LStrRev |
LStrSubstr |
LReadStr |
LWriteStr |
LSystemInfo |
LFork |
LPar |
LExternal Name |
LCrash |
LNoOp |

Instances

Eq PrimFn # |
Methods (==) :: PrimFn -> PrimFn -> Bool # (/=) :: PrimFn -> PrimFn -> Bool #
Show PrimFn # |
Methods showsPrec :: Int -> PrimFn -> ShowS # show :: PrimFn -> String # showList :: [PrimFn] -> ShowS #
Generic PrimFn # |
Associated Types type Rep PrimFn :: * -> * # Methods from :: PrimFn -> Rep PrimFn x # to :: Rep PrimFn x -> PrimFn #
type Rep PrimFn # |
type Rep PrimFn = D1 (MetaData "PrimFn" "IRTS.Lang" "idris-1.0-AhzFHyMpjVK9jY0cFJjTN5" False) ((:+:) ((:+:) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "LPlus" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ArithTy))) (C1 (MetaCons "LMinus" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ArithTy)))) ((:+:) (C1 (MetaCons "LTimes" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ArithTy))) (C1 (MetaCons "LUDiv" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy))))) ((:+:) ((:+:) (C1 (MetaCons "LSDiv" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ArithTy))) (C1 (MetaCons "LURem" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy)))) ((:+:) (C1 (MetaCons "LSRem" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ArithTy))) (C1 (MetaCons "LAnd" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy)))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "LOr" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy))) (C1 (MetaCons "LXOr" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy)))) ((:+:) (C1 (MetaCons "LCompl" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy))) (C1 (MetaCons "LSHL" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy))))) ((:+:) ((:+:) (C1 (MetaCons "LLSHR" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy))) (C1 (MetaCons "LASHR" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy)))) ((:+:) (C1 (MetaCons "LEq" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ArithTy))) (C1 (MetaCons "LLt" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy))))))) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "LLe" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy))) (C1 (MetaCons "LGt" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy)))) ((:+:) (C1 (MetaCons "LGe" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy))) (C1 (MetaCons "LSLt" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ArithTy))))) ((:+:) ((:+:) (C1 (MetaCons "LSLe" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ArithTy))) (C1 (MetaCons "LSGt" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ArithTy)))) ((:+:) (C1 (MetaCons "LSGe" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ArithTy))) (C1 (MetaCons "LSExt" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy))))))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "LZExt" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy)))) (C1 (MetaCons "LTrunc" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy))))) ((:+:) (C1 (MetaCons "LStrConcat" PrefixI False) U1) (C1 (MetaCons "LStrLt" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "LStrEq" PrefixI False) U1) (C1 (MetaCons "LStrLen" PrefixI False) U1)) ((:+:) (C1 (MetaCons "LIntFloat" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy))) (C1 (MetaCons "LFloatInt" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy)))))))) ((:+:) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "LIntStr" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy))) (C1 (MetaCons "LStrInt" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy)))) ((:+:) (C1 (MetaCons "LFloatStr" PrefixI False) U1) (C1 (MetaCons "LStrFloat" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "LChInt" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy))) (C1 (MetaCons "LIntCh" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 IntTy)))) ((:+:) (C1 (MetaCons "LBitCast" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ArithTy)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ArithTy)))) (C1 (MetaCons "LFExp" PrefixI False) U1)))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "LFLog" PrefixI False) U1) (C1 (MetaCons "LFSin" PrefixI False) U1)) ((:+:) (C1 (MetaCons "LFCos" PrefixI False) U1) (C1 (MetaCons "LFTan" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "LFASin" PrefixI False) U1) (C1 (MetaCons "LFACos" PrefixI False) U1)) ((:+:) (C1 (MetaCons "LFATan" PrefixI False) U1) (C1 (MetaCons "LFSqrt" PrefixI False) U1))))) ((:+:) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "LFFloor" PrefixI False) U1) (C1 (MetaCons "LFCeil" PrefixI False) U1)) ((:+:) (C1 (MetaCons "LFNegate" PrefixI False) U1) (C1 (MetaCons "LStrHead" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "LStrTail" PrefixI False) U1) (C1 (MetaCons "LStrCons" PrefixI False) U1)) ((:+:) (C1 (MetaCons "LStrIndex" PrefixI False) U1) (C1 (MetaCons "LStrRev" PrefixI False) U1)))) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "LStrSubstr" PrefixI False) U1) (C1 (MetaCons "LReadStr" PrefixI False) U1)) ((:+:) (C1 (MetaCons "LWriteStr" PrefixI False) U1) (C1 (MetaCons "LSystemInfo" PrefixI False) U1))) ((:+:) ((:+:) (C1 (MetaCons "LFork" PrefixI False) U1) (C1 (MetaCons "LPar" PrefixI False) U1)) ((:+:) (C1 (MetaCons "LExternal" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Name))) ((:+:) (C1 (MetaCons "LCrash" PrefixI False) U1) (C1 (MetaCons "LNoOp" PrefixI False) U1))))))))

data FCallType #

Constructors

FStatic |
FObject |
FConstructor |

Instances

Eq FCallType # |
Methods (==) :: FCallType -> FCallType -> Bool # (/=) :: FCallType -> FCallType -> Bool #
Show FCallType # |
Methods showsPrec :: Int -> FCallType -> ShowS # show :: FCallType -> String # showList :: [FCallType] -> ShowS #

data FType #

Constructors

FArith ArithTy |
FFunction |
FFunctionIO |
FString |
FUnit |
FPtr |
FManagedPtr |
FCData |
FAny |

Instances

Eq FType # |
Methods (==) :: FType -> FType -> Bool # (/=) :: FType -> FType -> Bool #
Show FType # |
Methods showsPrec :: Int -> FType -> ShowS # show :: FType -> String # showList :: [FType] -> ShowS #

data LAlt' e #

Constructors

LConCase Int Name [Name] e |
LConstCase Const e |
LDefaultCase e |

Instances

Functor LAlt' # |
Methods fmap :: (a -> b) -> LAlt' a -> LAlt' b # (<$) :: a -> LAlt' b -> LAlt' a #
Eq e => Eq (LAlt' e) # |
Methods (==) :: LAlt' e -> LAlt' e -> Bool # (/=) :: LAlt' e -> LAlt' e -> Bool #
Show e => Show (LAlt' e) # |
Methods showsPrec :: Int -> LAlt' e -> ShowS # show :: LAlt' e -> String # showList :: [LAlt' e] -> ShowS #

type LAlt = LAlt' LExp #

data LDecl #

Constructors

LFun [LOpt] Name [Name] LExp |
LConstructor Name Int Int |

Instances

Eq LDecl # |
Methods (==) :: LDecl -> LDecl -> Bool # (/=) :: LDecl -> LDecl -> Bool #
Show LDecl # |
Methods showsPrec :: Int -> LDecl -> ShowS # show :: LDecl -> String # showList :: [LDecl] -> ShowS #

type LDefs = Ctxt LDecl #

data LOpt #

Constructors

Inline |
NoInline |

Instances

Eq LOpt # |
Methods (==) :: LOpt -> LOpt -> Bool # (/=) :: LOpt -> LOpt -> Bool #
Show LOpt # |
Methods showsPrec :: Int -> LOpt -> ShowS # show :: LOpt -> String # showList :: [LOpt] -> ShowS #

addTags :: Int -> [(Name, LDecl)] -> (Int, [(Name, LDecl)]) #

data LiftState #

Constructors

LS Name Int [(Name, LDecl)] |

lname :: Name -> Int -> Name #

liftAll :: [(Name, LDecl)] -> [(Name, LDecl)] #

lambdaLift :: Name -> LDecl -> [(Name, LDecl)] #

getNextName :: State LiftState Name #

addFn :: Name -> LDecl -> State LiftState () #

lift :: [Name] -> LExp -> State LiftState LExp #

allocUnique :: LDefs -> (Name, LDecl) -> (Name, LDecl) #

usedArg :: (Eq t, Foldable t1) => t1 t -> t -> [t] #

usedIn :: [Name] -> LExp -> [Name] #

lsubst :: Name -> LExp -> LExp -> LExp #