SWP-Ubau-SoSe2014-Haskell / SWPSoSe14

Rail compiler written in Haskell
MIT License
3 stars 1 forks source link

String cut (c): implementation differs from specification #159

Closed cpockrandt closed 10 years ago

cpockrandt commented 10 years ago

Consider the following rail program:

$ 'main' (--):
 \        
  \-[abc]-[4]-c-#

The output is abc (which makes sense). But the precondition for c 'Cut' (a b -- c d) is b <= size(a). Since we always print error messages when the precondition is not fulfilled, we should throw an error when b > size(a) as well.

Edit: the interpreter also crashes.

MaximilianC commented 10 years ago

https://github.com/SWP-Ubau-SoSe2014-Haskell/SWPSoSe14/issues/158