openFile :: FilePath -> IOMode -> IO Yarn
openFile fp mode = Yarn <$> IO.openFile fp modeIO
  where
    modeIO = case mode of
        ReadMode -> IO.ReadMode
        ReadWriteMode -> IO.ReadWriteMode
openFile :: FilePath -> IOMode -> IO Yarn
openFile fp mode = Yarn <$> IO.openFile fp modeIO
  where
    modeIO = case mode of
        ReadMode -> IO.ReadMode
        ReadWriteMode -> IO.ReadWriteMode
openFile fp mode = Yarn <$> IO.openFile fp modeIO
  where
    modeIO = case mode of
        ReadMode -> IO.ReadMode
        ReadWriteMode -> IO.ReadWriteMode