Dataset Viewer
Auto-converted to Parquet Duplicate
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
insert : Ord a => a -> BTree a -> BTree a
function
samples
[]
samples/BTree.idr
insert
null
toList : BTree a -> List a
function
samples
[]
samples/BTree.idr
toList
null
toTree : Ord a => List a -> BTree a
function
samples
[]
samples/BTree.idr
toTree
null
BTree a = Leaf | Node (BTree a) a (BTree a) export insert : Ord a => a -> BTree a -> BTree a
data
samples
[]
samples/BTree.idr
BTree
null
RigCount : Type
function
compiler
[ "Algebra.ZeroOneOmega", "Algebra.Semiring", "Algebra.Preorder" ]
src/Algebra.idr
RigCount
null
showCount : RigCount -> String
function
compiler
[ "Algebra.ZeroOneOmega", "Algebra.Semiring", "Algebra.Preorder" ]
src/Algebra.idr
showCount
null
insert : Ord a => a -> BTree a -> BTree a
function
benchmark
[]
benchmark/benchmarks/treeInt/BTree.idr
insert
null
toList : BTree a -> List a
function
benchmark
[]
benchmark/benchmarks/treeInt/BTree.idr
toList
null
toTree : Ord a => List a -> BTree a
function
benchmark
[]
benchmark/benchmarks/treeInt/BTree.idr
toTree
null
BTree a = Leaf | Node (BTree a) a (BTree a) export insert : Ord a => a -> BTree a -> BTree a
data
benchmark
[]
benchmark/benchmarks/treeInt/BTree.idr
BTree
null
sleep : HasIO io => (sec : Int) -> io ()
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
sleep
Sleep for the specified number of seconds or, if signals are supported, until an un-ignored signal arrives. The exact wall-clock time slept might slightly differ depending on how busy the system is and the resolution of the system's clock. @ sec the number of seconds to sleep for
usleep : HasIO io => (usec : Int) -> So (usec >= 0) => io ()
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
usleep
Sleep for the specified number of microseconds or, if signals are supported, until an un-ignored signal arrives. The exact wall-clock time slept might slighly differ depending on how busy the system is and the resolution of the system's clock. @ usec the number of microseconds to sleep for
getArgs : HasIO io => io (List String)
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
getArgs
Retrieve the arguments to the program call, if there were any.
enableRawMode : HasIO io => io (Either FileError ())
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
enableRawMode
`enableRawMode` enables raw mode for stdin, allowing characters to be read one at a time, without buffering or echoing. If `enableRawMode` is used, the program should call `resetRawMode` before exiting. Consider using `withRawMode` instead to ensure the tty is reset. This is not supported on windows.
resetRawMode : HasIO io => io ()
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
resetRawMode
`resetRawMode` resets stdin raw mode to original state if `enableRawMode` had been previously called.
withRawMode : HasIO io => (onError : FileError -> io a) -> (onSuccess : () -> io a) -> io a
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
withRawMode
`withRawMode` performs a given operation after setting stdin to raw mode and ensure that stdin is reset to its original state afterwards. This is not supported on windows.
getEnv : HasIO io => (var : String) -> io (Maybe String)
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
getEnv
Retrieve the specified environment variable's value string, or `Nothing` if there is no such environment variable. @ var the name of the environment variable to look up
setEnv : HasIO io => (var : String) -> (val : String) -> (overwrite : Bool) -> io Bool
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
setEnv
Add the specified variable with the given value string to the environment, optionally overwriting any existing environment variable with the same name. Returns True whether the value is set, overwritten, or not overwritten because overwrite was False. Returns False if a system error occurred. You can `getErrno` to check the error. @ var the name of the environment variable to set @ val the value string to set the environment variable to @ overwrite whether to overwrite the existing value if an environment variable with the specified name already exists
unsetEnv : HasIO io => (var : String) -> io Bool
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
unsetEnv
Delete the specified environment variable. Returns `True` either if the value was deleted or if the value was not defined/didn't exist. Returns `False` if a system error occurred. You can `getErrno` to check the error.
system : HasIO io => String -> io Int
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
system
Execute a shell command, returning its termination status or -1 if an error occurred.
system : HasIO io => List String -> io Int system
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
system
null
time : HasIO io => io Integer
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
time
Return the number of seconds since epoch.
getPID : HasIO io => io Int
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
getPID
Get the ID of the currently running process.
exitWith : HasIO io => ExitCode -> io a
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
exitWith
Exit the program normally, with the specified status.
exitFailure : HasIO io => io a
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
exitFailure
Exit the program with status value 1, indicating failure. If you want to specify a custom status value, see `exitWith`.
exitSuccess : HasIO io => io a
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
exitSuccess
Exit the program after a successful run.
die : HasIO io => String -> io a
function
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
die
Print the error message and call exitFailure
ExitCode : Type where
data
base
[ "Data.So", "Data.String", "System.Escape", "System.File" ]
libs/base/System.idr
ExitCode
Programs can either terminate successfully, or end in a caught failure.
assert_total : (1 _ : a) -> a
function
prelude
[]
libs/prelude/Builtin.idr
assert_total
null
assert_smaller : (0 x : a) -> (1 y : b) -> b
function
prelude
[]
libs/prelude/Builtin.idr
assert_smaller
null
fst : {0 a, b : Type} -> (a, b) -> a
function
prelude
[]
libs/prelude/Builtin.idr
fst
Return the first element of a pair.
snd : {0 a, b : Type} -> (a, b) -> b
function
prelude
[]
libs/prelude/Builtin.idr
snd
Return the second element of a pair.
swap : (a, b) -> (b, a)
function
prelude
[]
libs/prelude/Builtin.idr
swap
Swap the elements in a pair
rewrite__impl : {0 x, y : a} -> (0 p : _) -> (0 rule : x
function
prelude
[]
libs/prelude/Builtin.idr
rewrite__impl
null
replace : forall x, y, p . (0 rule : x = y) -> (1 _ : p x) -> p y
function
prelude
[]
libs/prelude/Builtin.idr
replace
null
sym : (0 rule : x ~=~ y) -> y ~=~ x
function
prelude
[]
libs/prelude/Builtin.idr
sym
null
trans : forall a, b, c . (0 l : a = b) -> (0 r : b = c) -> a = c
function
prelude
[]
libs/prelude/Builtin.idr
trans
null
mkDPairInjectiveFst : MkDPair a pa === MkDPair b qb -> a === b
function
prelude
[]
libs/prelude/Builtin.idr
mkDPairInjectiveFst
Injectivity of MkDPair (first components)
mkDPairInjectiveSnd : MkDPair a pa === MkDPair a qa -> pa === qa
function
prelude
[]
libs/prelude/Builtin.idr
mkDPairInjectiveSnd
Injectivity of MkDPair (snd components)
defaultString : FromString String
function
prelude
[]
libs/prelude/Builtin.idr
defaultString
null
defaultChar : FromChar Char
function
prelude
[]
libs/prelude/Builtin.idr
defaultChar
null
defaultDouble : FromDouble Double
function
prelude
[]
libs/prelude/Builtin.idr
defaultDouble
null
Unit = ||| The trivial constructor for `()`. MkUnit ||| The non-dependent pair type, also known as conjunction. public export data Pair : Type -> Type -> Type where
data
prelude
[]
libs/prelude/Builtin.idr
Unit
The canonical single-element type, also known as the trivially true proposition.
LPair : Type -> Type -> Type where
data
prelude
[]
libs/prelude/Builtin.idr
LPair
A pair type where each component is linear
Res : (a : Type) -> (a -> Type) -> Type where
data
prelude
[]
libs/prelude/Builtin.idr
Res
null
Void : Type where
data
prelude
[]
libs/prelude/Builtin.idr
Void
The empty type, also known as the trivially false proposition. Use `void` or `absurd` to prove anything if you have a variable of type `Void` in scope.
Equal : forall a, b . a -> b -> Type where
data
prelude
[]
libs/prelude/Builtin.idr
Equal
null
DPair a (p : a -> Type)
record
prelude
[]
libs/prelude/Builtin.idr
DPair
null
PrimIO : Type -> Type
function
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
PrimIO
Idris's primitive IO, for building abstractions on top of.
prim__io_pure : a -> PrimIO a
function
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
prim__io_pure
null
io_pure : a -> IO a
function
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
io_pure
null
prim__io_bind : (1 act : PrimIO a) -> (1 k : a -> PrimIO b) -> PrimIO b
function
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
prim__io_bind
null
io_bind : (1 act : IO a) -> (1 k : a -> IO b) -> IO b
function
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
io_bind
null
prim__nullAnyPtr : AnyPtr -> Int %foreign "C:idris2_getNull, libidris2_support, idris_support.h"
function
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
prim__nullAnyPtr
null
prim__getNullAnyPtr : AnyPtr export
function
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
prim__getNullAnyPtr
null
prim__forgetPtr : Ptr t -> AnyPtr
function
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
prim__forgetPtr
null
unsafePerformIO : IO a -> a
function
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
unsafePerformIO
null
IORes : Type -> Type where
data
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
IORes
null
IO : Type -> Type where
data
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
IO
The internal representation of I/O computations.
Ptr : Type -> Type where [external]
data
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
Ptr
null
AnyPtr : Type where [external]
data
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
AnyPtr
null
GCPtr : Type -> Type where [external]
data
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
GCPtr
null
GCAnyPtr : Type where [external]
data
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
GCAnyPtr
null
ThreadID : Type where [external]
data
prelude
[ "Builtin" ]
libs/prelude/PrimIO.idr
ThreadID
null
Error : Type
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
Error
`Error` is a type synonym for `Type`, specify for exception handling.
Cont1Type : Usage -> Type -> Usage -> List Error -> Type -> Type
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
Cont1Type
null
bindApp1 : {u : _} -> (1 act : App1 {u} e a) -> (1 k : Cont1Type u a u' e b) -> App1 {u
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
bindApp1
null
bindL : App {l=NoThrow} e a -> (1 k : a -> App {l} e b) -> App {l} e b
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
bindL
null
seqL : App {l=NoThrow} e () -> (1 k : App {l} e b) -> App {l} e b
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
seqL
null
app : (1 p : App {l=NoThrow} e a) -> App1 {u=Any} e a
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
app
null
app1 : (1 p : App1 {u=Any} e a) -> App {l} e a
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
app1
null
pure : (x : a) -> App1 {u=Any} e a pure x
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
pure
null
pure1 : (1 x : a) -> App1 e a pure1 x
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
pure1
null
mapState : State tag t e -> State tag t (eff :: e)
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
mapState
null
get : (0 tag : _) -> State tag t e => App {l} e t
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
get
null
put : (0 tag : _) -> State tag t e => (val : t) -> App {l} e ()
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
put
null
modify : (0 tag : _) -> State tag t e => (p : t -> t) -> App {l} e ()
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
modify
null
new : t -> (p : State tag t e => App {l} e a) -> App {l} e a
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
new
null
Exception : Error -> List Error -> Type
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
Exception
An alias for `HasErr`.
throw : HasErr err es => err -> App es a
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
throw
null
catch : HasErr err es => App es a -> (err -> App es a) -> App es a
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
catch
null
handle : App (err :: e) a -> (onok : a -> App e b) -> (onerr : err -> App e b) -> App e b
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
handle
null
lift : App e a -> App (err :: e) a
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
lift
null
Init : List Error
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
Init
null
run : App {l} Init a -> IO a
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
run
The only way provided by `Control.App` to run an App. @ Init A concrete list of errors.
noThrow : App Init a -> App Init {l=NoThrow} a
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
noThrow
null
new1 : t -> (1 p : State tag t e => App1 {u} e a) -> App1 {u} e a
function
base
[ "Data.IORef" ]
libs/base/Control/App.idr
new1
null
HasErr : Error -> List Error -> Type where
data
base
[ "Data.IORef" ]
libs/base/Control/App.idr
HasErr
null
Path = MayThrow | NoThrow public export data Usage = One | Any public export 0 Has : List (a -> Type) -> a -> Type
data
base
[ "Data.IORef" ]
libs/base/Control/App.idr
Path
States whether the program's execution path is linear or might throw exceptions so that we can know whether it is safe to reference linear resources.
SafeBind : Path -> (l' : Path) -> Type where
data
base
[ "Data.IORef" ]
libs/base/Control/App.idr
SafeBind
null
App : {default MayThrow l : Path} ->
data
base
[ "Data.IORef" ]
libs/base/Control/App.idr
App
A type supports throwing and catching exceptions. See `interface Exception err e` for details. @ l An implicit Path states whether the program's execution path is linear or might throw exceptions. The default value is `MayThrow` which represents that the program might throw. @ es A list of exception types that can be thrown. Constrained interfaces can be defined by parameterising with a list of errors `es`.
App1 : {default One u : Usage} ->
data
base
[ "Data.IORef" ]
libs/base/Control/App.idr
App1
null
AppHasIO : Type where
data
base
[ "Data.IORef" ]
libs/base/Control/App.idr
AppHasIO
When type is present in app "errors" list, app is allowed to perform I/O.
State : (tag : a) -> Type -> List Error -> Type where
data
base
[ "Data.IORef" ]
libs/base/Control/App.idr
State
null
FileEx = GenericFileEx Int -- errno | FileReadError | FileWriteError | FileNotFound | PermissionDenied | FileExists export Show FileEx where show (GenericFileEx errno) = "File error : " ++ show errno
data
base
[ "Data.IORef" ]
libs/base/Control/App.idr
FileEx
null
IOError = GenericErr String | FileErr FileEx export Show IOError where show (GenericErr str) = "IO error : " ++ str
data
base
[ "Data.IORef" ]
libs/base/Control/App.idr
IOError
null
inj : (0 f : a -> b) -> {auto 0 _ : Injective f} -> {0 x, y : a} -> (0 _ : f x = f y) -> x = y
function
base
[]
libs/base/Control/Function.idr
inj
null
biinj : (0 f : _) -> (0 _ : Biinjective f) => (0 _ : f x v = f y w) -> (x = y, v = w)
function
base
[]
libs/base/Control/Function.idr
biinj
null
leftmost : (0 rel : _) -> StronglyConnex ty rel => ty -> ty -> ty
function
base
[ "Control.Relation" ]
libs/base/Control/Order.idr
leftmost
Gives the leftmost of a strongly connex relation among the given two elements, generalisation of `min`. That is, leftmost x y ~ x and leftmost x y ~ y, and `leftmost x y` is either `x` or `y`
rightmost : (0 rel : _) -> StronglyConnex ty rel => ty -> ty -> ty
function
base
[ "Control.Relation" ]
libs/base/Control/Order.idr
rightmost
Gives the rightmost of a strongly connex relation among the given two elements, generalisation of `max`. That is, x ~ rightmost x y and y ~ rightmost x y, and `rightmost x y` is either `x` or `y`
End of preview. Expand in Data Studio

Idris2

A structured dataset of type declarations and definitions from Idris 2, a dependently typed functional programming language.

Source

Statistics

Property Value
Total Entries 6,211
Functions 5,318
Data types 695
Records 198
Docstring Coverage 30.8%

Schema

Column Type Description
fact string Type signature or definition
type string "function", "data", or "record"
library string Idris library (base, contrib, etc.)
imports list[string] Module imports
filename string Source .idr file
symbolic_name string Declaration name
docstring string Documentation comment

About Idris 2

Idris 2 is a purely functional language with:

  • First-class dependent types
  • Quantitative type theory
  • Compilation to Scheme, JavaScript, RefC
  • Interactive theorem proving

Creator

Charles Norton (phanerozoic)

Downloads last month
14

Collection including phanerozoic/Idris2