ContentsIndex
Etc.DUT
Synopsis
type Address = String
type Cell a = (Address, a)
data Sheet a = Sheet [Cell a]
data Value
= Num Float
| Num1 Float
| Str String
| Err String
data Content
= Val Value
| Ref Address
| Un Op Content
| Bin Op Content Content
| Agg Op [Content]
type Op = String
type SpreadSheet = Sheet Content
type ValueSheet = Sheet Value
lift :: ValueSheet -> SpreadSheet
n :: Float -> Content
s :: String -> Content
e :: String -> Content
r :: String -> Content
c :: Char -> Int -> Content -> Cell Content
row :: Int -> [Content] -> [Cell Content]
eval :: SpreadSheet -> ValueSheet
evalC :: [Cell Content] -> Content -> Value
evalAggNum :: String -> [Value] -> Maybe Float
expectNums :: [Value] -> Maybe [Float]
data Type
= NumT
| StrT
| TypeError
data Unit
= Base String
| Dependent Unit Unit
| And [Unit]
| Or [Unit]
| One
simpfy :: UnitSheet -> Headers -> SpreadSheet -> UnitSheet
equit :: Unit -> Headers -> [Cell Content] -> Unit
getAllU :: Unit -> Headers -> [Cell Content] -> Unit
lookupAddr :: String -> [Cell Content] -> Address
type TypeA = [(Address, Type)]
type Headers = [(Address, [Address])]
lookupStr :: Address -> [Cell Content] -> Maybe String
type UnitSheet = Sheet Unit
inferU :: Headers -> SpreadSheet -> UnitSheet
inferUC :: [Cell Content] -> Headers -> Cell Content -> Unit
inferUV :: [Cell Content] -> Headers -> Content -> Unit
getUnit :: [Cell Content] -> Headers -> Address -> Unit
traceUnits :: [Cell Content] -> Headers -> [(Address, Unit)] -> Unit
traceUnit :: [Cell Content] -> Headers -> (Address, Unit) -> Unit
harvest :: SpreadSheet
result :: ValueSheet
units :: UnitSheet
unitsR :: UnitSheet
Documentation
type Address = String
type Cell a = (Address, a)
data Sheet a
Constructors
Sheet [Cell a]
show/hide Instances
Functor Sheet
Show a => Show (Sheet a)
data Value
Constructors
Num Float
Num1 Float
Str String
Err String
show/hide Instances
Eq Value
Show Value
data Content
Constructors
Val Value
Ref Address
Un Op Content
Bin Op Content Content
Agg Op [Content]
show/hide Instances
type Op = String
type SpreadSheet = Sheet Content
type ValueSheet = Sheet Value
lift :: ValueSheet -> SpreadSheet
n :: Float -> Content
s :: String -> Content
e :: String -> Content
r :: String -> Content
c :: Char -> Int -> Content -> Cell Content
row :: Int -> [Content] -> [Cell Content]
eval :: SpreadSheet -> ValueSheet
evalC :: [Cell Content] -> Content -> Value
evalAggNum :: String -> [Value] -> Maybe Float
expectNums :: [Value] -> Maybe [Float]
data Type
Constructors
NumT
StrT
TypeError
show/hide Instances
Eq Type
Show Type
data Unit
Constructors
Base String
Dependent Unit Unit
And [Unit]
Or [Unit]
One
show/hide Instances
Eq Unit
Show Unit
simpfy :: UnitSheet -> Headers -> SpreadSheet -> UnitSheet
  • ********************************************************************** This doesn't work
equit :: Unit -> Headers -> [Cell Content] -> Unit
getAllU :: Unit -> Headers -> [Cell Content] -> Unit
lookupAddr :: String -> [Cell Content] -> Address
type TypeA = [(Address, Type)]
type Headers = [(Address, [Address])]
lookupStr :: Address -> [Cell Content] -> Maybe String
type UnitSheet = Sheet Unit
inferU :: Headers -> SpreadSheet -> UnitSheet
inferUC :: [Cell Content] -> Headers -> Cell Content -> Unit
inferUV :: [Cell Content] -> Headers -> Content -> Unit
getUnit :: [Cell Content] -> Headers -> Address -> Unit
traceUnits :: [Cell Content] -> Headers -> [(Address, Unit)] -> Unit
traceUnit :: [Cell Content] -> Headers -> (Address, Unit) -> Unit
harvest :: SpreadSheet
result :: ValueSheet
units :: UnitSheet
unitsR :: UnitSheet
Produced by Haddock version 0.8