Jump to content

Update a configuration file: Difference between revisions

m
→‎{{header|Haskell}}: Restructured solution description
m (→‎{{header|Haskell}}: Restructured solution description)
Line 1,706:
=={{header|Haskell}}==
 
Necessary imports
Definition of datatypes:
 
<lang Haskell>import Data.Char (toUpper)
import qualified System.IO.Strict as S</lang>
import Data.List
 
import qualified System.IO.Strict as S
Definition of datatypes:
 
<lang Haskell>data INI = INI { entries :: [Entry] } deriving Show
 
data Entry = Comment String
Line 1,724 ⟶ 1,725:
Field f v -> f ++ " " ++ v
Flag f True -> f
Flag f falseFalse -> "; " ++ f
EmptyLine -> ""
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.