From 4660dba79a81cb5751c7851a1a1064dc0bc39ce7 Mon Sep 17 00:00:00 2001 From: Leif Warner Date: Fri, 12 Aug 2011 13:58:57 -0700 Subject: [PATCH] Added error messages for unimplemented parsers, for issue #9. --- Distribution/ArchLinux/PkgBuild.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Distribution/ArchLinux/PkgBuild.hs b/Distribution/ArchLinux/PkgBuild.hs index ae62888..3035581 100644 --- a/Distribution/ArchLinux/PkgBuild.hs +++ b/Distribution/ArchLinux/PkgBuild.hs @@ -175,7 +175,7 @@ newtype ArchDep = ArchDep Dependency instance Text ArchOptions where disp Strip = text "strip" - parse = undefined + parse = error "Text.parse not defined for ArchOptions" -- the PKGBUILD version spec is less expressive than cabal, we can -- only handle simple intervals like (0,v) or (v,+infty) @@ -210,7 +210,7 @@ instance Text ArchDep where | otherwise = trace ("WARNING: multiple version ranges specified for " ++ strName ++ ", using the extremal bounds instead.") (fst $ head l, snd $ last l) - parse = undefined + parse = error "Text.parse not defined for ArchDep" -- -- | Extract just the package name from ArchDep @@ -228,7 +228,7 @@ instance Text ArchArch where disp x = case x of Arch_X86 -> text "i686" Arch_X86_64 -> text "x86_64" - parse = error "Text.parrse not defined for ArchList" + parse = error "Text.parse not defined for ArchList" -- Lists with quotes newtype ArchList a = ArchList [a] @@ -514,7 +514,7 @@ escapeCharForBash c = case c of instance Text PkgBuild where disp p = rawpkg2doc p - parse = undefined + parse = error "Text.parse not defined for PkgBuild" -- -- Display a PKGBUILD with header @@ -528,7 +528,7 @@ instance Text AnnotatedPkgBuild where } = vcat [ if null header then empty else text header , text "_hkgname" <=> text hkg , disp pkg ] - parse = undefined + parse = error "Text.parse not defined for AnnotatedPkgBuild" -- -- Display a full PKGBUILD with Maintainer name.