doc[core]: remove old read/show examples
This commit is contained in:
parent
ca8d84fe5f
commit
fa8d508e84
2 changed files with 0 additions and 31 deletions
|
@ -29,21 +29,6 @@ import Test.QuickCheck.Gen (Gen)
|
||||||
import Test.QuickCheck.Modifiers (UnicodeString(getUnicodeString))
|
import Test.QuickCheck.Modifiers (UnicodeString(getUnicodeString))
|
||||||
|
|
||||||
-- | The definition of a value or a function (which is also a value)
|
-- | 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 Definition :: (Type -> Type) -> Type
|
||||||
type role Definition nominal
|
type role Definition nominal
|
||||||
|
|
|
@ -16,22 +16,6 @@ import Language.Scalie.Core.Definition (Definition)
|
||||||
import safe Language.Scalie.Core.AlgebraicDatatype ( AlgebraicDatatype )
|
import safe Language.Scalie.Core.AlgebraicDatatype ( AlgebraicDatatype )
|
||||||
|
|
||||||
-- | A module groups multiple related variable definitions.
|
-- | 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 Module :: (Type -> Type) -> Type
|
||||||
type role Module nominal
|
type role Module nominal
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue