~/bend-docscommunity

books.bend relies on unsafe/foreign

raw source on the hub · import 0x9e60c0cda1f9561416e870237a834a3d/books.bend as Books

2 imports
import Base
import ./books_data.bend as D

Types

type Phase source · line 4 · raw

Data

type SpSt source · line 25 · raw

Data

Definitions

def is_space_char source · line 30 · raw

@+c:Char -> Bool

def char1 source · line 33 · raw

@+c:Char -> String

def strip_spaces source · line 61 · raw

@+s:String -> String

def resolve_alias source · line 64 · raw

@+raw:String -> Maybe<&2, String>

def chapter_count source · line 82 · raw

@+book:String -> Maybe<&2, U32>

def verse_count source · line 85 · raw

@+book:String -> @+ch:U32 -> Maybe<&2, U32>

def display_name source · line 108 · raw

@+code:String -> String

Unsafe

unsafe find_alias source · line 9 · raw

@ph:Phase -> @xs:List<&1, 0x9e60c0cda1f9561416e870237a834a3d/books_data.Alias> -> @+key:String -> @held:String -> Maybe<&2, String>

Finite table walk; Phase tag encodes the old mutual recursion.

unsafe strip_spaces_go source · line 36 · raw

@st:SpSt -> @rest:String -> @acc:String -> String

unsafe find_cap source · line 67 · raw

@ph:Phase -> @xs:List<&1, 0x9e60c0cda1f9561416e870237a834a3d/books_data.Cap> -> @+key:String -> @held:U32 -> Maybe<&2, U32>

unsafe find_name source · line 93 · raw

@ph:Phase -> @xs:List<&1, 0x9e60c0cda1f9561416e870237a834a3d/books_data.BookName> -> @+code:String -> @held:String -> String