[Haskell-beginners] Nullable attribute of a language grammar howto

Jason Dusek jason.dusek at gmail.com
Mon Sep 1 13:56:00 EDT 2008


  The bit about a "rigid type variable" is usually a sign that
  one has been overly zealous in one's type annotations.
  Removing just two annotations allows the code to compile.

--
_jsn


 |...overly zealous...|
  http://www.haskell.org/pipermail/haskell-cafe/2008-June/thread.html#44617


 |...just two...|

--- /Users/jsn/Old.hs  	2008-09-01 10:50:22.000000000 -0700
+++ /Users/jsn/New.hs	2008-09-01 10:51:42.000000000 -0700
@@ -58,8 +58,8 @@
 -}

 expr2null NullExpr = OneNull
-expr2null (InpExpr inp_valu) = ZeroNull::(GramNull inp_type var_type)
-expr2null (VarExpr var_valu) = (VarNull var_valu)::(GramNull inp_type var_type)
+expr2null (InpExpr inp_valu) = ZeroNul
+expr2null (VarExpr var_valu) = VarNull var_valu

 main = do
   print Ident


More information about the Beginners mailing list