« Previous | Next » 

Revision f6b9c6e5

IDf6b9c6e5e261b73e0dc98a51c378d634a72310a2
Parent 2fd5a116
Child ef13148c

Added by Iustin Pop over 8 years ago

Fix a bad data type in Hcheck.hs

While trying to understand why some code was not being tested, I
realised that we have a bad data type in Hcheck.hs.

We have "data Level = GroupLvl | ClusterLvl", but then we need to pass
the group name/index as well, so we have functions that look like the
following:

f :: Level > Maybe String -> …
f GroupLvl (Just gname) = …
f GroupLvl Nothing = … -
never used
f ClusterLvl _ = … -- wrong, since a (Just x) could be passed

It's clear that we just need to move the group name in the "GroupLvl"
constructor, and simplify the call chain.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences