From 3f0471b314fa2792207b3116aa7491f5f353b31e Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 27 Mar 2019 12:50:33 -0700 Subject: notes and stuff --- lore/Alpha.hs | 9 ++++++--- lore/Language/Bs/Primitives.hs | 6 ++++++ lore/core.scm | 1 - 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'lore') 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) -- cgit v1.2.3