Commit d31181b9 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #14033

parent f959624f
{-# LANGUAGE TypeFamilies #-}
module T14033 where
newtype Zero = Zero
newtype Succ a = Succ a
type family Add n m :: * where
Add Zero m = m
Add (Succ n) m = Succ (Add n m)
T14033.hs:5:16: error:
• The constructor of a newtype must have exactly one field
but ‘Zero’ has none
• In the definition of data constructor ‘Zero’
In the newtype declaration for ‘Zero’
......@@ -135,3 +135,4 @@ test('T7102a', normal, ghci_script, ['T7102a.script'])
test('T13271', normal, compile_fail, [''])
test('T13674', normal, compile_fail, [''])
test('T13784', normal, compile_fail, [''])
test('T14033', normal, compile_fail, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment