0 | module FASTA.Show
 1 |
 2 | import FASTA.Parser
 3 |
 4 | %default total
 5 |
 6 | --------------------------------------------------------------------------------
 7 | --          Show
 8 | --------------------------------------------------------------------------------
 9 |
10 | export
11 | showFASTAValue : FASTAValue -> String
12 | showFASTAValue (NL v)          = toString v
13 | showFASTAValue HeaderStart     = ">"
14 | showFASTAValue (HeaderValue v) = v
15 | showFASTAValue (Adenine _)     = "A"
16 | showFASTAValue (Thymine _)     = "T"
17 | showFASTAValue (Guanine _)     = "G"
18 | showFASTAValue (Cytosine _)    = "C"
19 |
20 | export
21 | showFASTALine : FASTALine -> String
22 | showFASTALine (MkFASTALine _ values) = concat $ map showFASTAValue values
23 |
24 | export
25 | showFASTA : FASTA -> String
26 | showFASTA fastalines = concat $ map showFASTALine fastalines
27 |