doc[core]: remove old read/show examples

This commit is contained in:
vegowotenks 2025-08-15 13:07:56 +02:00
parent ca8d84fe5f
commit fa8d508e84
2 changed files with 0 additions and 31 deletions

View file

@ -29,21 +29,6 @@ import Test.QuickCheck.Gen (Gen)
import Test.QuickCheck.Modifiers (UnicodeString(getUnicodeString))
-- | The definition of a value or a function (which is also a value)
--
-- >>> import Data.Functor.Identity (Identity(Identity))
-- >>> import Data.Function (($))
-- >>> :set -XOverloadedStrings
-- >>> import Language.Scalie.Core.Expression qualified as Expression
-- >>> Definition (Identity Scalie.Domain.RawInt) (Identity "x") (Identity (Expression.RawInt 5))
-- Definition {signature = Identity RawInt, name = Identity "x", body = Identity (RawInt 5)}
--
-- >>> import Data.Maybe (Maybe(..))
-- >>> Definition Nothing (Just "x") (Just (Expression.RawInt 5))
-- Definition {signature = Nothing, name = Just "x", body = Just (RawInt 5)}
--
-- >>> import Text.Read (readMaybe)
-- >>> readMaybe "Definition {signature = Just RawInt, name = Nothing, body = Nothing}" :: Maybe (Definition Maybe)
-- Just (Definition {signature = Just RawInt, name = Nothing, body = Nothing})
type Definition :: (Type -> Type) -> Type
type role Definition nominal

View file

@ -16,22 +16,6 @@ import Language.Scalie.Core.Definition (Definition)
import safe Language.Scalie.Core.AlgebraicDatatype ( AlgebraicDatatype )
-- | A module groups multiple related variable definitions.
--
-- >>> import Data.Functor.Identity (Identity(..))
-- >>> import Data.Map.Implicit qualified as ImplicitMap
-- >>> Module (Identity ImplicitMap.empty)
-- Module {definitions = Identity ImplicitMapElems []}
--
-- >>> import Data.Maybe (Maybe(..))
-- >>> Module Nothing
-- Module {definitions = Nothing}
--
-- >>> import Text.Read (readMaybe)
-- >>> readMaybe "Module { definitions = Just (ImplicitMapElems []) }" :: Maybe (Module Maybe)
-- Just (Module {definitions = Just ImplicitMapElems []})
--
-- >>> readMaybe "Module { definitions = Just (ImplicitMapElems [Definition { signature = Nothing, name = Just \"x\", body = Nothing } ]) }" :: Maybe (Module Maybe)
-- Just (Module {definitions = Just ImplicitMapElems [Definition {signature = Nothing, name = Just "x", body = Nothing}]})
type Module :: (Type -> Type) -> Type
type role Module nominal