mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 02:31:50 +03:00
17 lines
435 B
Idris
17 lines
435 B
Idris
module System.File.Support
|
|
|
|
%default total
|
|
|
|
||| Shorthand for a function in the C support libary
|
|
||| (libidris2_support, idris_file.h)
|
|
|||
|
|
||| @ fn the function name to refer to in the C support library
|
|
public export
|
|
support : String -> String
|
|
support fn = "C:" ++ fn ++ ", libidris2_support, idris_file.h"
|
|
|
|
||| Wrap x in the `Right` part of an `io . Either`.
|
|
export
|
|
ok : HasIO io => (x : a) -> io (Either err a)
|
|
ok x = pure (Right x)
|