ihaskell-basic 0.2.0.0 → 0.3.0.0
raw patch · 2 files changed
+12/−9 lines, 2 filesdep −classy-preludedep ~base
Dependencies removed: classy-prelude
Dependency ranges changed: base
Files
- IHaskell/Display/Basic.hs +10/−6
- ihaskell-basic.cabal +2/−3
IHaskell/Display/Basic.hs view
@@ -1,15 +1,19 @@ {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}+ module IHaskell.Display.Basic () where -import IHaskell.Display+import IHaskell.Display -import Text.Printf+import Text.Printf instance Show a => IHaskellDisplay (Maybe a) where display just = return $ Display [stringDisplay, htmlDisplay]- where + where stringDisplay = plain (show just) htmlDisplay = html str- str = case just of- Nothing -> "<span style='color: red; font-weight: bold;'>Nothing</span>"- Just x -> printf "<span style='color: green; font-weight: bold;'>Just</span><span style='font-family: monospace;'>%s</span>" (show x)+ str =+ case just of+ Nothing -> "<span style='color: red; font-weight: bold;'>Nothing</span>"+ Just x -> printf+ "<span style='color: green; font-weight: bold;'>Just</span><span style='font-family: monospace;'>%s</span>"+ (show x)
ihaskell-basic.cabal view
@@ -10,7 +10,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.2.0.0+version: 0.3.0.0 -- A short (one-line) description of the package. synopsis: IHaskell display instances for basic types@@ -61,8 +61,7 @@ OverloadedStrings -- Other library packages from which modules are imported.- build-depends: base ==4.6.* || ==4.7.*,- classy-prelude >=0.6,+ build-depends: base >=4.6 && <4.9, ihaskell >= 0.5 -- Directories containing source files.