fact
stringlengths
1
4.3k
type
stringclasses
3 values
library
stringclasses
11 values
imports
listlengths
0
62
filename
stringclasses
673 values
symbolic_name
stringlengths
1
34
docstring
stringlengths
6
1.33k
leftmostRelL : (0 rel : _) -> Reflexive ty rel => StronglyConnex ty rel => (x, y : ty) -> leftmost rel x y `rel` x
function
base
[ "Control.Relation" ]
libs/base/Control/Order.idr
leftmostRelL
null
leftmostRelR : (0 rel : _) -> Reflexive ty rel => StronglyConnex ty rel => (x, y : ty) -> leftmost rel x y `rel` y
function
base
[ "Control.Relation" ]
libs/base/Control/Order.idr
leftmostRelR
null
leftmostPreserves : (0 rel : _) -> StronglyConnex ty rel => (x, y : ty) -> Either (leftmost rel x y = x) (leftmost rel x y = y)
function
base
[ "Control.Relation" ]
libs/base/Control/Order.idr
leftmostPreserves
null
leftmostIsRightmostLeft : (0 rel : _) -> StronglyConnex ty rel => (x, y : ty) -> (z : ty) -> (z `rel` x) -> (z `rel` y) -> (z `rel` leftmost rel x y)
function
base
[ "Control.Relation" ]
libs/base/Control/Order.idr
leftmostIsRightmostLeft
null
rightmostRelL : (0 rel : _) -> Reflexive ty rel => StronglyConnex ty rel => (x, y : ty) -> x `rel` rightmost rel x y
function
base
[ "Control.Relation" ]
libs/base/Control/Order.idr
rightmostRelL
null
rightmostRelR : (0 rel : _) -> Reflexive ty rel => StronglyConnex ty rel => (x, y : ty) -> y `rel` rightmost rel x y
function
base
[ "Control.Relation" ]
libs/base/Control/Order.idr
rightmostRelR
null
rightmostPreserves : (0 rel : _) -> StronglyConnex ty rel => (x, y : ty) -> Either (rightmost rel x y = x) (rightmost rel x y = y)
function
base
[ "Control.Relation" ]
libs/base/Control/Order.idr
rightmostPreserves
null
rightmostIsLeftmostRight : (0 rel : _) -> StronglyConnex ty rel => (x, y : ty) -> (z : ty) -> (x `rel` z) -> (y `rel` z) -> (leftmost rel x y `rel` z)
function
base
[ "Control.Relation" ]
libs/base/Control/Order.idr
rightmostIsLeftmostRight
null
Rel : Type -> Type
function
base
[]
libs/base/Control/Relation.idr
Rel
A relation on ty is a type indexed by two ty values
accRec : {0 rel : (arg1 : a) -> (arg2 : a) -> Type} -> (step : (x : a) -> ((y : a) -> rel y x -> b) -> b) -> (z : a) -> (0 acc : Accessible rel z) -> b
function
base
[ "Control.Relation", "Data.Nat" ]
libs/base/Control/WellFounded.idr
accRec
Simply-typed recursion based on accessibility. The recursive step for an element has access to all elements smaller than it. The recursion will therefore halt when it reaches a minimum element. This may sometimes improve type-inference, compared to `accInd`.
accInd : {0 rel : a -> a -> Type} -> {0 P : a -> Type} -> (step : (x : a) -> ((y : a) -> rel y x -> P y) -> P x) -> (z : a) -> (0 acc : Accessible rel z) -> P z
function
base
[ "Control.Relation", "Data.Nat" ]
libs/base/Control/WellFounded.idr
accInd
Dependently-typed induction based on accessibility. The recursive step for an element has access to all elements smaller than it. The recursion will therefore halt when it reaches a minimum element.
accIndProp : {0 P : a -> Type} -> (step : (x : a) -> ((y : a) -> rel y x -> P y) -> P x) -> {0 RP : (x : a) -> P x -> Type} -> (ih : (x : a) -> (f : (y : a) -> rel y x -> P y) -> ((y : a) -> (isRel : rel y x) -> RP y (f y isRel)) -> RP x (step x f)) -> (z : a) -> (0 acc : Accessible rel z) -> RP z (accInd step z acc)
function
base
[ "Control.Relation", "Data.Nat" ]
libs/base/Control/WellFounded.idr
accIndProp
Depedently-typed induction for creating extrinsic proofs on results of `accInd`.
wfRec : (0 _ : WellFounded a rel) => (step : (x : a) -> ((y : a) -> rel y x -> b) -> b) -> a -> b
function
base
[ "Control.Relation", "Data.Nat" ]
libs/base/Control/WellFounded.idr
wfRec
Simply-typed recursion based on well-founded-ness. This is `accRec` applied to accessibility derived from a `WellFounded` instance.
wfInd : (0 _ : WellFounded a rel) => {0 P : a -> Type} -> (step : (x : a) -> ((y : a) -> rel y x -> P y) -> P x) -> (myz : a) -> P myz
function
base
[ "Control.Relation", "Data.Nat" ]
libs/base/Control/WellFounded.idr
wfInd
Depedently-typed induction based on well-founded-ness. This is `accInd` applied to accessibility derived from a `WellFounded` instance.
wfIndProp : (0 _ : WellFounded a rel) => {0 P : a -> Type} -> (step : (x : a) -> ((y : a) -> rel y x -> P y) -> P x) -> {0 RP : (x : a) -> P x -> Type} -> (ih : (x : a) -> (f : (y : a) -> rel y x -> P y) -> ((y : a) -> (isRel : rel y x) -> RP y (f y isRel)) -> RP x (step x f)) -> (myz : a) -> RP myz (wfInd step myz)
function
base
[ "Control.Relation", "Data.Nat" ]
libs/base/Control/WellFounded.idr
wfIndProp
Depedently-typed induction for creating extrinsic proofs on results of `wfInd`.
Smaller : Sized a => a -> a -> Type
function
base
[ "Control.Relation", "Data.Nat" ]
libs/base/Control/WellFounded.idr
Smaller
A relation based on the size of the values.
SizeAccessible : Sized a => a -> Type
function
base
[ "Control.Relation", "Data.Nat" ]
libs/base/Control/WellFounded.idr
SizeAccessible
Values that are accessible based on their size.
sizeAccessible : Sized a => (x : a) -> SizeAccessible x
function
base
[ "Control.Relation", "Data.Nat" ]
libs/base/Control/WellFounded.idr
sizeAccessible
Any value of a sized type is accessible, since naturals are well-founded.
sizeInd : Sized a => {0 P : a -> Type} -> (step : (x : a) -> ((y : a) -> Smaller y x -> P y) -> P x) -> (z : a) -> P z
function
base
[ "Control.Relation", "Data.Nat" ]
libs/base/Control/WellFounded.idr
sizeInd
Depedently-typed induction based on the size of values. This is `accInd` applied to accessibility derived from size.
sizeRec : Sized a => (step : (x : a) -> ((y : a) -> Smaller y x -> b) -> b) -> (z : a) -> b
function
base
[ "Control.Relation", "Data.Nat" ]
libs/base/Control/WellFounded.idr
sizeRec
Simply-typed recursion based on the size of values. This is `recInd` applied to accessibility derived from size.
Accessible : (rel : a -> a -> Type) -> (x : a) -> Type where
data
base
[ "Control.Relation", "Data.Nat" ]
libs/base/Control/WellFounded.idr
Accessible
A value is accessible if everything smaller than it is also accessible.
bifoldlM : Monad m => Bifoldable p => (f: a -> b -> m a) -> (g: a -> c -> m a) -> (init: a) -> (input: p b c) -> m a
function
base
[]
libs/base/Data/Bifoldable.idr
bifoldlM
Left associative monadic bifold over a structure.
biconcat : Monoid m => Bifoldable p => p m m -> m
function
base
[]
libs/base/Data/Bifoldable.idr
biconcat
Combines the elements of a structure using a monoid.
biconcatMap : Monoid m => Bifoldable p => (a -> m) -> (b -> m) -> p a b -> m
function
base
[]
libs/base/Data/Bifoldable.idr
biconcatMap
Combines the elements of a structure, given ways of mapping them to a common monoid.
biand : Bifoldable p => p (Lazy Bool) (Lazy Bool) -> Bool
function
base
[]
libs/base/Data/Bifoldable.idr
biand
The conjunction of all elements of a structure containing lazy boolean values. `biand` short-circuits from left to right, evaluating until either an element is `False` or no elements remain.
bior : Bifoldable p => p (Lazy Bool) (Lazy Bool) -> Bool
function
base
[]
libs/base/Data/Bifoldable.idr
bior
The disjunction of all elements of a structure containing lazy boolean values. `bior` short-circuits from left to right, evaluating either until an element is `True` or no elements remain.
biany : Bifoldable p => (a -> Bool) -> (b -> Bool) -> p a b -> Bool
function
base
[]
libs/base/Data/Bifoldable.idr
biany
The disjunction of the collective results of applying a predicate to all elements of a structure. `biany` short-circuits from left to right.
biall : Bifoldable p => (a -> Bool) -> (b -> Bool) -> p a b -> Bool
function
base
[]
libs/base/Data/Bifoldable.idr
biall
The disjunction of the collective results of applying a predicate to all elements of a structure. `biall` short-circuits from left to right.
bisum : Num a => Bifoldable p => p a a -> a
function
base
[]
libs/base/Data/Bifoldable.idr
bisum
Add together all the elements of a structure.
bisum' : Num a => Bifoldable p => p a a -> a
function
base
[]
libs/base/Data/Bifoldable.idr
bisum'
Add together all the elements of a structure. Same as `bisum` but tail recursive.
biproduct : Num a => Bifoldable p => p a a -> a
function
base
[]
libs/base/Data/Bifoldable.idr
biproduct
Multiply together all elements of a structure.
biproduct' : Num a => Bifoldable p => p a a -> a
function
base
[]
libs/base/Data/Bifoldable.idr
biproduct'
Multiply together all elements of a structure. Same as `product` but tail recursive.
bitraverse_ : (Bifoldable p, Applicative f)
function
base
[]
libs/base/Data/Bifoldable.idr
bitraverse_
Map each element of a structure to a computation, evaluate those computations and discard the results.
bisequence_ : Applicative f => Bifoldable p => p (f a) (f b) -> f ()
function
base
[]
libs/base/Data/Bifoldable.idr
bisequence_
Evaluate each computation in a structure and discard the results.
bifor_ : (Bifoldable p, Applicative f)
function
base
[]
libs/base/Data/Bifoldable.idr
bifor_
Like `bitraverse_` but with the arguments flipped.
bichoice : Alternative f => Bifoldable p => p (Lazy (f a)) (Lazy (f a)) -> f a
function
base
[]
libs/base/Data/Bifoldable.idr
bichoice
Bifold using Alternative. If you have a left-biased alternative operator `<|>`, then `choice` performs left-biased choice from a list of alternatives, which means that it evaluates to the left-most non-`empty` alternative.
bichoiceMap : (Bifoldable p, Alternative f)
function
base
[]
libs/base/Data/Bifoldable.idr
bichoiceMap
A fused version of `bichoice` and `bimap`.
asBitVector : FiniteBits a => a -> Vect (bitSize {a}) Bool
function
base
[ "Data.Fin", "Data.Vect" ]
libs/base/Data/Bits.idr
asBitVector
null
asString : FiniteBits a => a -> String
function
base
[ "Data.Fin", "Data.Vect" ]
libs/base/Data/Bits.idr
asString
null
notInvolutive : (x : Bool) -> not (not x) = x
function
base
[]
libs/base/Data/Bool.idr
notInvolutive
null
andSameNeutral : (x : Bool) -> x && x = x
function
base
[]
libs/base/Data/Bool.idr
andSameNeutral
null
andFalseFalse : (x : Bool) -> x && False = False
function
base
[]
libs/base/Data/Bool.idr
andFalseFalse
null
andTrueNeutral : (x : Bool) -> x && True = x
function
base
[]
libs/base/Data/Bool.idr
andTrueNeutral
null
andAssociative : (x, y, z : Bool) -> x && (y && z) = (x && y) && z
function
base
[]
libs/base/Data/Bool.idr
andAssociative
null
andCommutative : (x, y : Bool) -> x && y = y && x
function
base
[]
libs/base/Data/Bool.idr
andCommutative
null
andNotFalse : (x : Bool) -> x && not x = False
function
base
[]
libs/base/Data/Bool.idr
andNotFalse
null
orSameNeutral : (x : Bool) -> x || x = x
function
base
[]
libs/base/Data/Bool.idr
orSameNeutral
null
orFalseNeutral : (x : Bool) -> x || False = x
function
base
[]
libs/base/Data/Bool.idr
orFalseNeutral
null
orTrueTrue : (x : Bool) -> x || True = True
function
base
[]
libs/base/Data/Bool.idr
orTrueTrue
null
orAssociative : (x, y, z : Bool) -> x || (y || z) = (x || y) || z
function
base
[]
libs/base/Data/Bool.idr
orAssociative
null
orCommutative : (x, y : Bool) -> x || y = y || x
function
base
[]
libs/base/Data/Bool.idr
orCommutative
null
orNotTrue : (x : Bool) -> x || not x = True
function
base
[]
libs/base/Data/Bool.idr
orNotTrue
null
orBothFalse : {0 x, y : Bool} -> (0 prf : x || y = False) -> (x = False, y = False)
function
base
[]
libs/base/Data/Bool.idr
orBothFalse
null
orSameAndRightNeutral : (x, y : Bool) -> x || (x && y) = x
function
base
[]
libs/base/Data/Bool.idr
orSameAndRightNeutral
null
andDistribOrR : (x, y, z : Bool) -> x && (y || z) = (x && y) || (x && z)
function
base
[]
libs/base/Data/Bool.idr
andDistribOrR
null
orDistribAndR : (x, y, z : Bool) -> x || (y && z) = (x || y) && (x || z)
function
base
[]
libs/base/Data/Bool.idr
orDistribAndR
null
notAndIsOr : (x, y : Bool) -> not (x && y) = not x || not y
function
base
[]
libs/base/Data/Bool.idr
notAndIsOr
null
notOrIsAnd : (x, y : Bool) -> not (x || y) = not x && not y
function
base
[]
libs/base/Data/Bool.idr
notOrIsAnd
null
notTrueIsFalse : {1 x : Bool} -> Not (x = True) -> x = False
function
base
[]
libs/base/Data/Bool.idr
notTrueIsFalse
null
notFalseIsTrue : {1 x : Bool} -> Not (x = False) -> x = True
function
base
[]
libs/base/Data/Bool.idr
notFalseIsTrue
null
invertContraBool : (a, b : Bool) -> Not (a = b) -> (not a = b)
function
base
[]
libs/base/Data/Bool.idr
invertContraBool
null
newBuffer : HasIO io => Int -> io (Maybe Buffer)
function
base
[ "Data.List" ]
libs/base/Data/Buffer.idr
newBuffer
null
setBool : HasIO io => Buffer -> (offset : Int) -> (val : Bool) -> io ()
function
base
[ "Data.List" ]
libs/base/Data/Buffer.idr
setBool
null
getBool : HasIO io => Buffer -> (offset : Int) -> io Bool
function
base
[ "Data.List" ]
libs/base/Data/Buffer.idr
getBool
null
setNat : HasIO io => Buffer -> (offset : Int) -> (val : Nat) -> io Int
function
base
[ "Data.List" ]
libs/base/Data/Buffer.idr
setNat
setNat returns the end offset
getNat : HasIO io => Buffer -> (offset : Int) -> io (Int, Nat)
function
base
[ "Data.List" ]
libs/base/Data/Buffer.idr
getNat
getNat returns the end offset
setInteger : HasIO io => Buffer -> (offset : Int) -> (val : Integer) -> io Int
function
base
[ "Data.List" ]
libs/base/Data/Buffer.idr
setInteger
setInteger returns the end offset
getInteger : HasIO io => Buffer -> (offset : Int) -> io (Int, Integer)
function
base
[ "Data.List" ]
libs/base/Data/Buffer.idr
getInteger
getInteger returns the end offset
copyData : HasIO io => Buffer -> (srcOffset, len : Int) -> (dst : Buffer) -> (dstOffset : Int) -> io ()
function
base
[ "Data.List" ]
libs/base/Data/Buffer.idr
copyData
null
resizeBuffer : HasIO io => Buffer -> Int -> io (Maybe Buffer)
function
base
[ "Data.List" ]
libs/base/Data/Buffer.idr
resizeBuffer
null
concatBuffers : HasIO io => List Buffer -> io (Maybe Buffer)
function
base
[ "Data.List" ]
libs/base/Data/Buffer.idr
concatBuffers
Create a buffer containing the concatenated content from a list of buffers.
splitBuffer : HasIO io => Buffer -> Int -> io (Maybe (Buffer, Buffer))
function
base
[ "Data.List" ]
libs/base/Data/Buffer.idr
splitBuffer
Split a buffer into two at a position.
Buffer : Type where [external]
data
base
[ "Data.List" ]
libs/base/Data/Buffer.idr
Buffer
null
fromList : List a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
fromList
Convert a list to a `Colist`.
fromStream : Stream a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
fromStream
Convert a stream to a `Colist`.
singleton : a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
singleton
Create a `Colist` of only a single element.
repeat : a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
repeat
An infinite `Colist` of repetitions of the same element.
replicate : Nat -> a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
replicate
Create a `Colist` of `n` replications of the given element.
cycle : List a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
cycle
Produce a `Colist` by repeating a sequence.
iterate : (a -> a) -> a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
iterate
Generate an infinite `Colist` by repeatedly applying a function.
iterateMaybe : (f : a -> Maybe a) -> Maybe a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
iterateMaybe
Generate a `Colist` by repeatedly applying a function. This stops once the function returns `Nothing`.
unfold : (f : s -> Maybe (s,a)) -> s -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
unfold
Generate an `Colist` by repeatedly applying a function to a seed value. This stops once the function returns `Nothing`.
isNil : Colist a -> Bool
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
isNil
True, if this is the empty `Colist`.
isCons : Colist a -> Bool
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
isCons
True, if the given `Colist` is non-empty.
append : Colist a -> Colist a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
append
Concatenate two `Colist`s.
lappend : List a -> Colist a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
lappend
Append a `Colist` to a `List`.
appendl : Colist a -> List a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
appendl
Append a `List` to a `Colist`.
uncons : Colist a -> Maybe (a, Colist a)
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
uncons
Try to extract the head and tail of a `Colist`.
head : Colist a -> Maybe a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
head
Try to extract the first element from a `Colist`.
tail : Colist a -> Maybe (Colist a)
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
tail
Try to drop the first element from a `Colist`. This returns `Nothing` if the given `Colist` is empty.
take : (n : Nat) -> Colist a -> List a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
take
Take up to `n` elements from a `Colist`.
takeUntil : (p : a -> Bool) -> Colist a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
takeUntil
Take elements from a `Colist` up to and including the first element, for which `p` returns `True`.
takeBefore : (a -> Bool) -> Colist a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
takeBefore
Take elements from a `Colist` up to (but not including) the first element, for which `p` returns `True`.
takeWhile : (a -> Bool) -> Colist a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
takeWhile
Take elements from a `Colist` while the given predicate returns `True`.
takeWhileJust : Colist (Maybe a) -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
takeWhileJust
Extract all values wrapped in `Just` from the beginning of a `Colist`. This stops, once the first `Nothing` is encountered.
drop : (n : Nat) -> Colist a -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
drop
Drop up to `n` elements from the beginning of the `Colist`.
index : (n : Nat) -> Colist a -> Maybe a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
index
Try to extract the `n`-th element from a `Colist`.
scanl : (f : a -> b -> a) -> (acc : a) -> (xs : Colist b) -> Colist a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
scanl
Produce a `Colist` of left folds of prefixes of the given `Colist`. @ f the combining function @ acc the initial value @ xs the `Colist` to process
inBounds : (k : Nat) -> (xs : Colist a) -> Dec (InBounds k xs)
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
inBounds
Decide whether `k` is a valid index into Colist `xs`
index' : (k : Nat) -> (xs : Colist a) -> {auto 0 ok : InBounds k xs} -> a
function
base
[ "Data.List", "Data.List1", "Data.Zippable" ]
libs/base/Data/Colist.idr
index'
Find a particular element of a Colist using InBounds @ ok a proof that the index is within bounds