diff options
author | Ben Sima <ben@bsima.me> | 2019-03-27 12:50:33 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2019-03-27 13:04:48 -0700 |
commit | 3f0471b314fa2792207b3116aa7491f5f353b31e (patch) | |
tree | 49f2a4b5767429c888291784d94fcd35057abeff /lore | |
parent | 7032c4125a8f3aaa96ca32f2181f68fa6409790c (diff) |
notes and stuff
Diffstat (limited to 'lore')
-rw-r--r-- | lore/Alpha.hs | 9 | ||||
-rw-r--r-- | lore/Language/Bs/Primitives.hs | 6 | ||||
-rw-r--r-- | lore/core.scm | 1 |
3 files changed, 12 insertions, 4 deletions
diff --git a/lore/Alpha.hs b/lore/Alpha.hs index b126241..67bfa35 100644 --- a/lore/Alpha.hs +++ b/lore/Alpha.hs @@ -1,12 +1,15 @@ {-# LANGUAGE NoImplicitPrelude #-} +-- | Commonly useful functions, a Prelude replacement. module Alpha ( + -- * Re-export Protolude + module X -- * General functions - (/@) + , (/@) -- * Debugging tools , say ) where -import Protolude +import Protolude as X import Data.String -- | Debugging printf @@ -15,4 +18,4 @@ say msg = putStrLn msg -- | Alias for map, fmap, <$> (/@) :: Functor f => (a -> b) -> f a -> f b -(/@) = Protolude.fmap +(/@) = fmap diff --git a/lore/Language/Bs/Primitives.hs b/lore/Language/Bs/Primitives.hs index a2de7bb..2c90164 100644 --- a/lore/Language/Bs/Primitives.hs +++ b/lore/Language/Bs/Primitives.hs @@ -1,4 +1,10 @@ {-# LANGUAGE OverloadedStrings #-} +-- | bs primitives +-- +-- I would like to reduce the number of primitives in the language to some +-- minimal number, like SKI combinator or Nock instructions. I'm not sure what +-- the minimal number is. The idea is to move primitives from here into core.scm +-- over time. module Language.Bs.Primitives where import Control.Exception hiding (handle) diff --git a/lore/core.scm b/lore/core.scm index 4cb8100..9760318 100644 --- a/lore/core.scm +++ b/lore/core.scm @@ -25,7 +25,6 @@ (foldl f (f acc (car lst)) (cdr lst)))) (define fold foldl) -(define reduce foldr) (define (unfold f init pred) (if (pred init) |