-
Notifications
You must be signed in to change notification settings - Fork 0
/
Example.hs
32 lines (23 loc) · 848 Bytes
/
Example.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import ModularPrelude
import qualified ModularPrelude.From as From
import qualified ModularPrelude.Module.Text as Module
import qualified ModularPrelude.Module.List as Module
import qualified ModularPrelude.Module.Classy as Module
import qualified Prelude
import Data.Char (isSpace)
-- a really dumb example.
-- TODO: make more interesting examples
-- that leverage more of this entire ecosystem
main = do
putStrLn $ dropWhile isSpace $ " Hello, world"
putStrLn $ show $ ldropWhile odd [1, 2, 3]
where
Module.Text{pack, dropWhile} = def
Module.List{dropWhile=ldropWhile} = def
-- Module.Classy{show} = def
show = pack . Prelude.show