Copyright | (c) Alexander Hakki |
---|---|
License | BSD3 |
Maintainer | ahk@ahakki.xyz |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- class Roman r where
- data RomanSymbol
- type RomanNumeral = [RomanSymbol]
Documentation
A type class for all types that can represent roman numerals
fromRoman :: Integral b => r -> b Source #
The Class Roman implements a single Method, fromRoman, to convert to an Integral Type
Instances
Roman RomanNumeral Source # | fromRoman on a RomanNumeral also returns the expected result, if the Roman Number is not stricly "correct", such as XIIX -> 18. |
Defined in Data.Roman fromRoman :: Integral b => RomanNumeral -> b Source # | |
Roman RomanSymbol Source # | |
Defined in Data.Roman fromRoman :: Integral b => RomanSymbol -> b Source # |
data RomanSymbol Source #
RomanSymbols from I to M
Zero is represented as N for the latin word Nulla
Instances
type RomanNumeral = [RomanSymbol] Source #
Roman Numerals are represented as Lists of RomanSymbols