#!/usr/bin/env runghc {-# LANGUAGE UnicodeSyntax #-} import Network.HTTP.Lucu.MIMEType.Guess import System main ∷ IO () main = do [inFile, outFile] ← getArgs extMap ← parseExtMapFile inFile let src = serializeExtMap extMap "Network.HTTP.Lucu.MIMEType.DefaultExtensionMap" "defaultExtensionMap" doc = "-- |This module is automatically generated from data\\/mime.types.\n" ++ "-- 'defaultExtensionMap' contains every possible pairs of an extension\n" ++ "-- and a MIME Type.\n" ++ "\n" writeFile outFile $ doc ++ src