never executed always true always false
    1 {-# LANGUAGE DataKinds #-}
    2 module ElmFormat.Render.Text where
    3 
    4 import Data.Coapplicative
    5 import Elm.Utils ((|>))
    6 import ElmVersion (ElmVersion)
    7 import AST.Structure
    8 import AST.V0_16
    9 
   10 import AST.Module (Module)
   11 import qualified Box
   12 import qualified Data.Text as Text
   13 import qualified ElmFormat.Render.Box as Render
   14 
   15 
   16 render :: Coapplicative annf => ElmVersion -> Module [UppercaseIdentifier] (ASTNS annf [UppercaseIdentifier] 'TopLevelNK) -> Text.Text
   17 render elmVersion modu =
   18     renderBox $ Render.formatModule elmVersion True 2 modu
   19 
   20 
   21 renderBox :: Box.Box -> Text.Text
   22 renderBox box =
   23     box
   24         |> Box.render
   25 
   26 
   27 -- TODO: remove this and convert the Integration test to a test fixture
   28 renderLiteral :: ElmVersion -> LiteralValue -> Text.Text
   29 renderLiteral elmVersion literal =
   30     renderBox $ Render.formatLiteral elmVersion literal