mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-29 03:24:02 +03:00
bd093e9cba
As in Idris 1 - if an interface declares a method as total or covering, then all implementations have to satisfy that. Temporarily turn off %default directive again, at least until totality checking works as it should (this is probably better than removing it from various places because I'll forget to put them back)
15 lines
193 B
Idris
15 lines
193 B
Idris
import Data.List
|
|
|
|
-- %default total
|
|
|
|
interface Foo a where
|
|
covering
|
|
foo : a -> ()
|
|
|
|
Foo (Maybe String) where
|
|
foo Nothing = ()
|
|
foo (Just x) = ()
|
|
|
|
Foo (Maybe Int) where
|
|
foo Nothing = ()
|