packages feed

axel (empty) → 0.0.1

raw patch · 103 files changed

+4309/−0 lines, 103 filesdep +axeldep +basedep +directorysetup-changedbinary-added

Dependencies added: axel, base, directory, filepath, hspec, lens, lens-aeson, monad-control, mtl, parsec, process, regex-pcre, split, strict, text, typed-process, vector, yaml

Files

+ LICENSE view
@@ -0,0 +1,30 @@+Copyright Joshua Grosso (c) 2018++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.++    * Neither the name of Author name here nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ README.org view
@@ -0,0 +1,11 @@+#+OPTIONS: num:nil toc:nil+* Axel+  Haskell + Lisp + JVM/Node/... = Profit!+  +  See [[https://axellang.github.io]].+** Code Style+   Use ~hindent~ to format code and ~hlint~ to catch errors.+** Running+   Run ~scripts/build.sh~ to build the project, and ~stack exec axel-exe~ to run ~app/Main.hs~. The executable takes one argument, the path of the Haskell program to transpile and execute.+** Examples+   See the ~examples~ folder for example Axel programs.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ app/Main.hs view
@@ -0,0 +1,13 @@+module Main where++import Axel.Project (buildProject, runProject)++import System.Directory (setCurrentDirectory)+import System.Environment (getArgs)++main :: IO ()+main = do+  [projectPath] <- getArgs+  setCurrentDirectory projectPath+  buildProject+  runProject
+ axel.cabal view
@@ -0,0 +1,176 @@+-- This file has been generated from package.yaml by hpack version 0.28.2.+--+-- see: https://github.com/sol/hpack+--+-- hash: 7f44de8cc5632ef35246376f0a146734b0d2c07aa8831e094dd79c869ca62cbc++name:           axel+version:        0.0.1+synopsis:       The Axel programming language.+description:    Haskell's semantics, plus Lisp's macros. Meet Axel – a purely functional, extensible, and powerful programming language.+category:       Language, Lisp, Macros, Transpiler+homepage:       https://github.com/axellang/axel#readme+bug-reports:    https://github.com/axellang/axel/issues+author:         Joshua Grosso+maintainer:     jgrosso256@gmail.com+copyright:      2017 Joshua Grosso+license:        BSD3+license-file:   LICENSE+build-type:     Simple+cabal-version:  >= 1.10+extra-source-files:+    examples/axelTemp/Axel.hs+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/autogen/Paths_do.dump-hi+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/autogen/cabal_macros.h+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/autogen/Paths_do.hs+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/autogen/cabal_macros.h+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/autogen/Paths_do.hs+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/do-exe+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/do-exe-tmp/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/autogen/Paths_do.dump-hi+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/do-exe-tmp/app/Main.dump-hi+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/do-exe-tmp/Main.hi+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/do-exe-tmp/Main.o+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/do-exe-tmp/Paths_do.hi+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/do-exe-tmp/Paths_do.o+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Lib.dyn_hi+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Lib.dyn_o+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Lib.hi+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Lib.o+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/libHSdo-0.1.0.0-84i3CClUbe35xQ9SiCfZTm-ghc8.4.3.dylib+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/libHSdo-0.1.0.0-84i3CClUbe35xQ9SiCfZTm.a+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Paths_do.dyn_hi+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Paths_do.dyn_o+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Paths_do.hi+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Paths_do.o+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/src/Lib.dump-hi+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/package.conf.inplace/package.cache+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/package.conf.inplace/package.cache.lock+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/setup-config+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/exe-do-exe+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-do-test+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-cabal-mod+    examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-config-cache+    examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/bin/do-exe+    examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/doc/do-0.1.0.0/LICENSE+    examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/flag-cache/do-0.1.0.0+    examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/flag-cache/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm+    examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm/Lib.dyn_hi+    examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm/Lib.hi+    examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm/libHSdo-0.1.0.0-84i3CClUbe35xQ9SiCfZTm.a+    examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm/Paths_do.dyn_hi+    examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm/Paths_do.hi+    examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/libHSdo-0.1.0.0-84i3CClUbe35xQ9SiCfZTm-ghc8.4.3.dylib+    examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/pkgdb/package.cache+    examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/pkgdb/package.cache.lock+    examples/do/.stack-work/intero/interokbXBrc-TEMP.hs+    examples/do/.stack-work/intero/interoMkMX0r-TEMP.hs+    examples/do/app/Main.axel+    examples/do/app/Main.hs+    examples/do/cabal.project.local+    examples/do/dist-newstyle/cache/compiler+    examples/do/dist-newstyle/cache/config+    examples/do/dist-newstyle/cache/elaborated-plan+    examples/do/dist-newstyle/cache/improved-plan+    examples/do/dist-newstyle/cache/plan.json+    examples/do/dist-newstyle/cache/solver-plan+    examples/do/dist-newstyle/cache/source-hashes+    examples/do/do.cabal+    examples/do/package.yaml+    examples/do/Setup.axel+    examples/do/Setup.hs+    examples/do/stack.yaml+    examples/example.axel+    README.org+    scripts/build.sh+    scripts/clean.sh+    scripts/ghcid.sh+    scripts/lint.sh+data-files:+    resources/autogenerated/macros/AST.hs+    resources/macros/MacroDefinitionAndEnvironmentHeader.hs+    resources/macros/Scaffold.hs+    resources/new-project-template/app/Main.axel+    resources/new-project-template/app/Main.hs+    resources/new-project-template/Setup.axel+    resources/new-project-template/Setup.hs+    resources/new-project-template/src/Lib.axel+    resources/new-project-template/src/Lib.hs+    resources/new-project-template/test/Spec.axel+    resources/new-project-template/test/Spec.hs++source-repository head+  type: git+  location: https://github.com/axellang/axel++library+  exposed-modules:+      Axel.Project+  other-modules:+      Axel.AST+      Axel.Denormalize+      Axel.Entry+      Axel.Error+      Axel.Eval+      Axel.GHC+      Axel.Macros+      Axel.Normalize+      Axel.Parse+      Axel.Parse.AST+      Axel.Quote+      Axel.Utils.Debug+      Axel.Utils.Directory+      Axel.Utils.Display+      Axel.Utils.Function+      Axel.Utils.List+      Axel.Utils.Recursion+      Axel.Utils.Resources+      Axel.Utils.String+      Paths_axel+  hs-source-dirs:+      src+  ghc-options: -Wall -Wmissing-import-lists -Wincomplete-record-updates -Wincomplete-uni-patterns+  build-depends:+      base >=4.11.1 && <4.12+    , directory >=1.3 && <1.4+    , filepath >=1.4.1 && <1.5+    , lens >=4.16.1 && <4.17+    , lens-aeson >=1.0.2 && <1.1+    , monad-control >=1.0.2 && <1.1+    , mtl >=2.2.1 && <2.3+    , parsec >=3.1.11 && <3.2+    , process >=1.6.1 && <1.7+    , regex-pcre >=0.94.4 && <0.95+    , split >=0.2.3 && <0.3+    , strict >=0.3.2 && <0.4+    , text >=1.2.2 && <1.3+    , typed-process >=0.2.2 && <0.3+    , vector >=0.12.0 && <0.13+    , yaml >=0.8.31 && <0.9+  default-language: Haskell2010++executable axel-exe+  main-is: Main.hs+  other-modules:+      Paths_axel+  hs-source-dirs:+      app+  ghc-options: -Wall -Wmissing-import-lists -Wincomplete-record-updates -Wincomplete-uni-patterns -threaded -rtsopts -with-rtsopts=-N+  build-depends:+      axel+    , base >=4.11.1 && <4.12+    , directory >=1.3 && <1.4+  default-language: Haskell2010++test-suite axel-test+  type: exitcode-stdio-1.0+  main-is: Axel/Spec.hs+  other-modules:+      Paths_axel+  hs-source-dirs:+      test+  ghc-options: -Wall -Wmissing-import-lists -Wincomplete-record-updates -Wincomplete-uni-patterns -threaded -rtsopts -with-rtsopts=-N+  build-depends:+      base >=4.11.1 && <4.12+    , hspec+  default-language: Haskell2010
+ examples/axelTemp/Axel.hs view
@@ -0,0 +1,46 @@+-- NOTE Because this file will be used as the header of auto-generated macro programs,+--      it can't have any project-specific dependencies (such as `Fix`).+module Axel.Parse.AST where++import           Data.IORef                     ( IORef+                                                , modifyIORef+                                                , newIORef+                                                , readIORef+                                                )++import           System.IO.Unsafe               ( unsafePerformIO )++-- TODO `Expression` should probably be `Traversable`, use recursion schemes, etc.+--      I should provide `toFix` and `fromFix` functions for macros to take advantage of.+--      (Maybe all macros have the argument automatically `fromFix`-ed to make consumption simpler?)+data Expression+  = LiteralChar Char+  | LiteralInt Int+  | LiteralString String+  | SExpression [Expression]+  | Symbol String+  deriving (Eq, Show)++-- ******************************+-- Internal utilities+-- ******************************+toAxel :: Expression -> String+toAxel (LiteralChar   x ) = ['\\', x]+toAxel (LiteralInt    x ) = show x+toAxel (LiteralString xs) = "\"" ++ xs ++ "\""+toAxel (SExpression   xs) = "(" ++ unwords (map toAxel xs) ++ ")"+toAxel (Symbol        x ) = x++-- ******************************+-- Macro definition utilities+-- ******************************+{-# NOINLINE gensymCounter #-}+gensymCounter :: IORef Int+gensymCounter = unsafePerformIO $ newIORef 0++gensym :: IO Expression+gensym = do+  suffix <- readIORef gensymCounter+  let identifier = "aXEL_AUTOGENERATED_IDENTIFIER_" ++ show suffix+  modifyIORef gensymCounter succ+  pure $ Symbol identifier
+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/autogen/Paths_do.dump-hi view
@@ -0,0 +1,684 @@++==================== FINAL INTERFACE ====================+2018-07-15 17:45:27.089979 UTC++interface do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm:Paths_do 8043+  interface hash: 8a6b24877e2c041a640c2573b20eec9b+  ABI hash: 9413e47b4afdbd6a026fa37152a96d34+  export-list hash: 99278b2b15a644460a543f8a69bec85e+  orphan hash: 693e9af84d3dfcc71e640e005bdc5e2e+  flag hash: 6710ad4f987f1a431885424795f1635c+  opt_hash: 14e536840aca4e889cad654e6f9b79c1+  hpc_hash: 93b885adfe0da089cdf634904fd59f71+  sig of: Nothing+  used TH splices: False+  where+exports:+  Paths_do.getBinDir+  Paths_do.getDataDir+  Paths_do.getDataFileName+  Paths_do.getDynLibDir+  Paths_do.getLibDir+  Paths_do.getLibexecDir+  Paths_do.getSysconfDir+  Paths_do.version+module dependencies:+package dependencies: base-4.11.1.0* ghc-prim-0.5.2.0+                      integer-gmp-1.0.2.0+orphans: base-4.11.1.0:GHC.Float base-4.11.1.0:GHC.Base+family instance modules: base-4.11.1.0:Control.Applicative+                         base-4.11.1.0:Data.Functor.Const+                         base-4.11.1.0:Data.Functor.Identity base-4.11.1.0:Data.Monoid+                         base-4.11.1.0:Data.Semigroup.Internal base-4.11.1.0:Data.Version+                         base-4.11.1.0:GHC.Generics base-4.11.1.0:GHC.IO.Exception+import  -/  base-4.11.1.0:Control.Exception 3d8e6cda20877f889f07bc7c0f5cac36+import  -/  base-4.11.1.0:Data.Version 26b96b3dd83a23703e0b8110475fc04a+import  -/  base-4.11.1.0:GHC.Base 604111500e81281298777e721c75643b+import  -/  base-4.11.1.0:GHC.IO 1d5542cc02075c5e948018bfacea89c1+import  -/  base-4.11.1.0:GHC.IO.Exception acc060dca2e46d8b8275d06ee7d5d60d+import  -/  base-4.11.1.0:Prelude 0750c25585e2b797cd78291d423d39dd+import  -/  base-4.11.1.0:System.Environment 052ec29b676ed8efc1decd97140a27e3+import  -/  ghc-prim-0.5.2.0:GHC.Types d9b3023de7feae4a5308d643da5543f7+addDependentFile "/Users/joshuagrosso/.stack/programs/x86_64-osx/ghc-8.4.3/lib/ghc-8.4.3/include/ghcversion.h" 61cc4580d32de09862d412848a79cd26+addDependentFile ".stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/autogen/cabal_macros.h" 8ebbcb9eedf29cad69fe2495f497a96b+c57e046abc78a35598639972a4a566fa+  $trModule :: GHC.Types.Module+  {- HasNoCafRefs, Strictness: m,+     Unfolding: (GHC.Types.Module+                   Paths_do.$trModule3+                   Paths_do.$trModule1) -}+78741a504e79c6ffd2606927a0022a9b+  $trModule1 :: GHC.Types.TrName+  {- HasNoCafRefs, Strictness: m1,+     Unfolding: (GHC.Types.TrNameS Paths_do.$trModule2) -}+358dcde9b37ca6e584151e01fa023f8a+  $trModule2 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("Paths_do"#) -}+ca5614d747e5b2c278622a48e15595ca+  $trModule3 :: GHC.Types.TrName+  {- HasNoCafRefs, Strictness: m1,+     Unfolding: (GHC.Types.TrNameS Paths_do.$trModule4) -}+4a29c906dc052300cc7d7d601a09763b+  $trModule4 :: GHC.Prim.Addr#+  {- HasNoCafRefs,+     Unfolding: ("do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm"#) -}+2b55da120651eab924a911272f6c36ba+  getBinDir :: GHC.Types.IO GHC.IO.FilePath+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: InlineRule (0, True, True)+                Paths_do.getBinDir1+                  `cast`+                (Sym (GHC.Types.N:IO[0] <GHC.Base.String>_R)) -}+f8bf547a003736bd3d54b1549673c219+  getBinDir1 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (eta :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 GHC.Prim.catch#+                   @ GHC.Base.String+                   @ GHC.Exception.SomeException+                   Paths_do.getBinDir5+                   Paths_do.getBinDir2+                   eta) -}+c66b050dfecf15f33552565c74595b9e+  getBinDir2 ::+    GHC.Exception.SomeException+    -> GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 2, Strictness: <S,1*U><S,U>,+     Unfolding: (\ (e1 :: GHC.Exception.SomeException)[OneShot]+                   (eta :: GHC.Prim.State# GHC.Prim.RealWorld)[OneShot] ->+                 case e1 of wild { GHC.Exception.SomeException e2 $dException1 e3 ->+                 case Data.Typeable.Internal.typeRepFingerprint+                        @ *+                        @ e2+                        (GHC.Exception.$p1Exception @ e2 $dException1)+                          `cast`+                        (Data.Typeable.Internal.N:Typeable[0] <*>_N <e2>_N) of wild1 { GHC.Fingerprint.Type.Fingerprint dt dt1 ->+                 case GHC.IO.Exception.$fExceptionIOException4 of wild2 { GHC.Fingerprint.Type.Fingerprint dt2 dt3 ->+                 case GHC.Prim.eqWord# dt dt2 of lwild {+                   DEFAULT+                   -> GHC.Prim.raiseIO#+                        @ GHC.Exception.SomeException+                        @ GHC.Base.String+                        wild+                        eta+                   1#+                   -> case GHC.Prim.eqWord# dt1 dt3 of lwild1 {+                        DEFAULT+                        -> GHC.Prim.raiseIO#+                             @ GHC.Exception.SomeException+                             @ GHC.Base.String+                             wild+                             eta+                        1# -> (# eta, Paths_do.getBinDir3 #) } } } } }) -}+da635f66603f599eeaa0a0c5dd8c093b+  getBinDir3 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString# Paths_do.getBinDir4) -}+d01c988397933d0073088f0623875190+  getBinDir4 :: GHC.Prim.Addr#+  {- HasNoCafRefs,+     Unfolding: ("/Users/joshuagrosso/Desktop/axelExamples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/bin"#) -}+9e6ffe18e6c3e42aea0e11f510fa8825+  getBinDir5 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case (GHC.Magic.noinline+                         @ (GHC.Types.IO GHC.IO.Encoding.Types.TextEncoding)+                         GHC.IO.Encoding.getForeignEncoding)+                        `cast`+                      (GHC.Types.N:IO[0] <GHC.IO.Encoding.Types.TextEncoding>_R)+                        s of ds1 { (#,#) ipv ipv1 ->+                 case GHC.Foreign.charIsRepresentable3+                        @ (GHC.Base.Maybe GHC.Base.String)+                        ipv1+                        Paths_do.getBinDir6+                        System.Environment.getEnv3+                          `cast`+                        (<Foreign.C.String.CString>_R+                         ->_R Sym (GHC.Types.N:IO[0] <GHC.Base.Maybe GHC.Base.String>_R))+                        ipv of ds2 { (#,#) ipv2 ipv3 ->+                 case ipv3 of wild {+                   GHC.Base.Nothing+                   -> System.Environment.getEnv2 ipv2 Paths_do.getBinDir6+                   GHC.Base.Just x -> (# ipv2, x #) } } }) -}+b11d2d999362bf0d007a9ad70321dce4+  getBinDir6 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString# Paths_do.getBinDir7) -}+efc646dfd0116609c79fa25d88733c1e+  getBinDir7 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("do_bindir"#) -}+f44360444d4c09b9dbc85971ea69d816+  getDataDir :: GHC.Types.IO GHC.IO.FilePath+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: InlineRule (0, True, True)+                Paths_do.getDataDir1+                  `cast`+                (Sym (GHC.Types.N:IO[0] <GHC.Base.String>_R)) -}+4aba064f1b3184ae27aca0d9bf3fb7c7+  getDataDir1 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (eta :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 GHC.Prim.catch#+                   @ GHC.Base.String+                   @ GHC.Exception.SomeException+                   Paths_do.getDataDir5+                   Paths_do.getDataDir2+                   eta) -}+0a4ed7bfc3cdda6bb73707b6b8d390ad+  getDataDir2 ::+    GHC.Exception.SomeException+    -> GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 2, Strictness: <S,1*U><S,U>,+     Unfolding: (\ (e1 :: GHC.Exception.SomeException)[OneShot]+                   (eta :: GHC.Prim.State# GHC.Prim.RealWorld)[OneShot] ->+                 case e1 of wild { GHC.Exception.SomeException e2 $dException1 e3 ->+                 case Data.Typeable.Internal.typeRepFingerprint+                        @ *+                        @ e2+                        (GHC.Exception.$p1Exception @ e2 $dException1)+                          `cast`+                        (Data.Typeable.Internal.N:Typeable[0] <*>_N <e2>_N) of wild1 { GHC.Fingerprint.Type.Fingerprint dt dt1 ->+                 case GHC.IO.Exception.$fExceptionIOException4 of wild2 { GHC.Fingerprint.Type.Fingerprint dt2 dt3 ->+                 case GHC.Prim.eqWord# dt dt2 of lwild {+                   DEFAULT+                   -> GHC.Prim.raiseIO#+                        @ GHC.Exception.SomeException+                        @ GHC.Base.String+                        wild+                        eta+                   1#+                   -> case GHC.Prim.eqWord# dt1 dt3 of lwild1 {+                        DEFAULT+                        -> GHC.Prim.raiseIO#+                             @ GHC.Exception.SomeException+                             @ GHC.Base.String+                             wild+                             eta+                        1# -> (# eta, Paths_do.getDataDir3 #) } } } } }) -}+b39b5a1ddbc50354182ccdbb91edd93a+  getDataDir3 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString# Paths_do.getDataDir4) -}+a1dc14cda18e775c6823be166b771239+  getDataDir4 :: GHC.Prim.Addr#+  {- HasNoCafRefs,+     Unfolding: ("/Users/joshuagrosso/Desktop/axelExamples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/share/x86_64-osx-ghc-8.4.3/do-0.1.0.0"#) -}+d37e6888a9a46d30b04eb40597c89aa4+  getDataDir5 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case (GHC.Magic.noinline+                         @ (GHC.Types.IO GHC.IO.Encoding.Types.TextEncoding)+                         GHC.IO.Encoding.getForeignEncoding)+                        `cast`+                      (GHC.Types.N:IO[0] <GHC.IO.Encoding.Types.TextEncoding>_R)+                        s of ds1 { (#,#) ipv ipv1 ->+                 case GHC.Foreign.charIsRepresentable3+                        @ (GHC.Base.Maybe GHC.Base.String)+                        ipv1+                        Paths_do.getDataDir6+                        System.Environment.getEnv3+                          `cast`+                        (<Foreign.C.String.CString>_R+                         ->_R Sym (GHC.Types.N:IO[0] <GHC.Base.Maybe GHC.Base.String>_R))+                        ipv of ds2 { (#,#) ipv2 ipv3 ->+                 case ipv3 of wild {+                   GHC.Base.Nothing+                   -> System.Environment.getEnv2 ipv2 Paths_do.getDataDir6+                   GHC.Base.Just x -> (# ipv2, x #) } } }) -}+681ed7d18ed12190b904bab2f49646b0+  getDataDir6 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString# Paths_do.getDataDir7) -}+90b0c67e31ea60dca19bfc43eabd73a9+  getDataDir7 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("do_datadir"#) -}+b759d1516f9295c32ecde66a9dbc263f+  getDataFileName :: GHC.IO.FilePath -> GHC.Types.IO GHC.IO.FilePath+  {- Arity: 2, Strictness: <L,U><S,U>,+     Unfolding: InlineRule (0, True, True)+                Paths_do.getDataFileName1+                  `cast`+                (<GHC.IO.FilePath>_R+                 ->_R Sym (GHC.Types.N:IO[0] <GHC.IO.FilePath>_R)) -}+c744ae5525d982e6baa8aa8f104a28db+  getDataFileName1 ::+    GHC.IO.FilePath+    -> GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.IO.FilePath #)+  {- Arity: 2, Strictness: <L,U><S,U>,+     Unfolding: (\ (name :: GHC.IO.FilePath)+                   (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case GHC.Prim.catch#+                        @ GHC.Base.String+                        @ GHC.Exception.SomeException+                        Paths_do.getDataDir5+                        Paths_do.getDataDir2+                        s of ds1 { (#,#) ipv ipv1 ->+                 (# ipv,+                    GHC.Base.+++                      @ GHC.Types.Char+                      ipv1+                      (GHC.CString.unpackAppendCString#+                         Paths_do.getDataFileName2+                         name) #) }) -}+6cff7f811444f6c73ea2e18b9096808d+  getDataFileName2 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("/"#) -}+ce3cf45c94ab37e6c334116a2ec17ff8+  getDynLibDir :: GHC.Types.IO GHC.IO.FilePath+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: InlineRule (0, True, True)+                Paths_do.getDynLibDir1+                  `cast`+                (Sym (GHC.Types.N:IO[0] <GHC.Base.String>_R)) -}+e708a55f08c651ff3fdac9bc09ae1413+  getDynLibDir1 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (eta :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 GHC.Prim.catch#+                   @ GHC.Base.String+                   @ GHC.Exception.SomeException+                   Paths_do.getDynLibDir5+                   Paths_do.getDynLibDir2+                   eta) -}+d147efc4972c46c13195eb04ad24daa1+  getDynLibDir2 ::+    GHC.Exception.SomeException+    -> GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 2, Strictness: <S,1*U><S,U>,+     Unfolding: (\ (e1 :: GHC.Exception.SomeException)[OneShot]+                   (eta :: GHC.Prim.State# GHC.Prim.RealWorld)[OneShot] ->+                 case e1 of wild { GHC.Exception.SomeException e2 $dException1 e3 ->+                 case Data.Typeable.Internal.typeRepFingerprint+                        @ *+                        @ e2+                        (GHC.Exception.$p1Exception @ e2 $dException1)+                          `cast`+                        (Data.Typeable.Internal.N:Typeable[0] <*>_N <e2>_N) of wild1 { GHC.Fingerprint.Type.Fingerprint dt dt1 ->+                 case GHC.IO.Exception.$fExceptionIOException4 of wild2 { GHC.Fingerprint.Type.Fingerprint dt2 dt3 ->+                 case GHC.Prim.eqWord# dt dt2 of lwild {+                   DEFAULT+                   -> GHC.Prim.raiseIO#+                        @ GHC.Exception.SomeException+                        @ GHC.Base.String+                        wild+                        eta+                   1#+                   -> case GHC.Prim.eqWord# dt1 dt3 of lwild1 {+                        DEFAULT+                        -> GHC.Prim.raiseIO#+                             @ GHC.Exception.SomeException+                             @ GHC.Base.String+                             wild+                             eta+                        1# -> (# eta, Paths_do.getDynLibDir3 #) } } } } }) -}+80e8ae10160f76ad3bd8f6c26b4ed1d5+  getDynLibDir3 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString#+                   Paths_do.getDynLibDir4) -}+2228e787f921a77167ab7fdee4facc37+  getDynLibDir4 :: GHC.Prim.Addr#+  {- HasNoCafRefs,+     Unfolding: ("/Users/joshuagrosso/Desktop/axelExamples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3"#) -}+e651f3b4dc1c1f892da12698b11e6c6c+  getDynLibDir5 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case (GHC.Magic.noinline+                         @ (GHC.Types.IO GHC.IO.Encoding.Types.TextEncoding)+                         GHC.IO.Encoding.getForeignEncoding)+                        `cast`+                      (GHC.Types.N:IO[0] <GHC.IO.Encoding.Types.TextEncoding>_R)+                        s of ds1 { (#,#) ipv ipv1 ->+                 case GHC.Foreign.charIsRepresentable3+                        @ (GHC.Base.Maybe GHC.Base.String)+                        ipv1+                        Paths_do.getDynLibDir6+                        System.Environment.getEnv3+                          `cast`+                        (<Foreign.C.String.CString>_R+                         ->_R Sym (GHC.Types.N:IO[0] <GHC.Base.Maybe GHC.Base.String>_R))+                        ipv of ds2 { (#,#) ipv2 ipv3 ->+                 case ipv3 of wild {+                   GHC.Base.Nothing+                   -> System.Environment.getEnv2 ipv2 Paths_do.getDynLibDir6+                   GHC.Base.Just x -> (# ipv2, x #) } } }) -}+a4f3f8c96b62e69de4301633e642b938+  getDynLibDir6 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString#+                   Paths_do.getDynLibDir7) -}+1fbed99c85f1cec1d745f25e0105dcfb+  getDynLibDir7 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("do_dynlibdir"#) -}+28434084ccb4e8e966ab4c9ace20c216+  getLibDir :: GHC.Types.IO GHC.IO.FilePath+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: InlineRule (0, True, True)+                Paths_do.getLibDir1+                  `cast`+                (Sym (GHC.Types.N:IO[0] <GHC.Base.String>_R)) -}+9b09f2c0978a97b53d583b3a0e589c9a+  getLibDir1 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (eta :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 GHC.Prim.catch#+                   @ GHC.Base.String+                   @ GHC.Exception.SomeException+                   Paths_do.getLibDir5+                   Paths_do.getLibDir2+                   eta) -}+04f2d7c704c02c7a429e4891657c234d+  getLibDir2 ::+    GHC.Exception.SomeException+    -> GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 2, Strictness: <S,1*U><S,U>,+     Unfolding: (\ (e1 :: GHC.Exception.SomeException)[OneShot]+                   (eta :: GHC.Prim.State# GHC.Prim.RealWorld)[OneShot] ->+                 case e1 of wild { GHC.Exception.SomeException e2 $dException1 e3 ->+                 case Data.Typeable.Internal.typeRepFingerprint+                        @ *+                        @ e2+                        (GHC.Exception.$p1Exception @ e2 $dException1)+                          `cast`+                        (Data.Typeable.Internal.N:Typeable[0] <*>_N <e2>_N) of wild1 { GHC.Fingerprint.Type.Fingerprint dt dt1 ->+                 case GHC.IO.Exception.$fExceptionIOException4 of wild2 { GHC.Fingerprint.Type.Fingerprint dt2 dt3 ->+                 case GHC.Prim.eqWord# dt dt2 of lwild {+                   DEFAULT+                   -> GHC.Prim.raiseIO#+                        @ GHC.Exception.SomeException+                        @ GHC.Base.String+                        wild+                        eta+                   1#+                   -> case GHC.Prim.eqWord# dt1 dt3 of lwild1 {+                        DEFAULT+                        -> GHC.Prim.raiseIO#+                             @ GHC.Exception.SomeException+                             @ GHC.Base.String+                             wild+                             eta+                        1# -> (# eta, Paths_do.getLibDir3 #) } } } } }) -}+9064fff0734fe05644cd18636dbcc746+  getLibDir3 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString# Paths_do.getLibDir4) -}+e51b14ab968d6c13811d2cfb5db8f2a7+  getLibDir4 :: GHC.Prim.Addr#+  {- HasNoCafRefs,+     Unfolding: ("/Users/joshuagrosso/Desktop/axelExamples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm"#) -}+a9f275400111f967bf5803138019f1a1+  getLibDir5 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case (GHC.Magic.noinline+                         @ (GHC.Types.IO GHC.IO.Encoding.Types.TextEncoding)+                         GHC.IO.Encoding.getForeignEncoding)+                        `cast`+                      (GHC.Types.N:IO[0] <GHC.IO.Encoding.Types.TextEncoding>_R)+                        s of ds1 { (#,#) ipv ipv1 ->+                 case GHC.Foreign.charIsRepresentable3+                        @ (GHC.Base.Maybe GHC.Base.String)+                        ipv1+                        Paths_do.getLibDir6+                        System.Environment.getEnv3+                          `cast`+                        (<Foreign.C.String.CString>_R+                         ->_R Sym (GHC.Types.N:IO[0] <GHC.Base.Maybe GHC.Base.String>_R))+                        ipv of ds2 { (#,#) ipv2 ipv3 ->+                 case ipv3 of wild {+                   GHC.Base.Nothing+                   -> System.Environment.getEnv2 ipv2 Paths_do.getLibDir6+                   GHC.Base.Just x -> (# ipv2, x #) } } }) -}+a4145c3139e109d07405334216056934+  getLibDir6 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString# Paths_do.getLibDir7) -}+b21d6f7183b4b036ec536551653bee25+  getLibDir7 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("do_libdir"#) -}+b8f97f95c094d3a9fc9a09cfe5abc0b3+  getLibexecDir :: GHC.Types.IO GHC.IO.FilePath+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: InlineRule (0, True, True)+                Paths_do.getLibexecDir1+                  `cast`+                (Sym (GHC.Types.N:IO[0] <GHC.Base.String>_R)) -}+e3cd2fc0bf42994c8936dddf0aa85849+  getLibexecDir1 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (eta :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 GHC.Prim.catch#+                   @ GHC.Base.String+                   @ GHC.Exception.SomeException+                   Paths_do.getLibexecDir5+                   Paths_do.getLibexecDir2+                   eta) -}+e9da585d5d1323d98dcc8874678f3020+  getLibexecDir2 ::+    GHC.Exception.SomeException+    -> GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 2, Strictness: <S,1*U><S,U>,+     Unfolding: (\ (e1 :: GHC.Exception.SomeException)[OneShot]+                   (eta :: GHC.Prim.State# GHC.Prim.RealWorld)[OneShot] ->+                 case e1 of wild { GHC.Exception.SomeException e2 $dException1 e3 ->+                 case Data.Typeable.Internal.typeRepFingerprint+                        @ *+                        @ e2+                        (GHC.Exception.$p1Exception @ e2 $dException1)+                          `cast`+                        (Data.Typeable.Internal.N:Typeable[0] <*>_N <e2>_N) of wild1 { GHC.Fingerprint.Type.Fingerprint dt dt1 ->+                 case GHC.IO.Exception.$fExceptionIOException4 of wild2 { GHC.Fingerprint.Type.Fingerprint dt2 dt3 ->+                 case GHC.Prim.eqWord# dt dt2 of lwild {+                   DEFAULT+                   -> GHC.Prim.raiseIO#+                        @ GHC.Exception.SomeException+                        @ GHC.Base.String+                        wild+                        eta+                   1#+                   -> case GHC.Prim.eqWord# dt1 dt3 of lwild1 {+                        DEFAULT+                        -> GHC.Prim.raiseIO#+                             @ GHC.Exception.SomeException+                             @ GHC.Base.String+                             wild+                             eta+                        1# -> (# eta, Paths_do.getLibexecDir3 #) } } } } }) -}+1708019c0ea778bcf24e1c76798b1ae6+  getLibexecDir3 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString#+                   Paths_do.getLibexecDir4) -}+5c72aff51fc450743d476a936d238b8d+  getLibexecDir4 :: GHC.Prim.Addr#+  {- HasNoCafRefs,+     Unfolding: ("/Users/joshuagrosso/Desktop/axelExamples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/libexec/x86_64-osx-ghc-8.4.3/do-0.1.0.0"#) -}+3a019d0b9134af64ce7736ff1ac42a6c+  getLibexecDir5 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case (GHC.Magic.noinline+                         @ (GHC.Types.IO GHC.IO.Encoding.Types.TextEncoding)+                         GHC.IO.Encoding.getForeignEncoding)+                        `cast`+                      (GHC.Types.N:IO[0] <GHC.IO.Encoding.Types.TextEncoding>_R)+                        s of ds1 { (#,#) ipv ipv1 ->+                 case GHC.Foreign.charIsRepresentable3+                        @ (GHC.Base.Maybe GHC.Base.String)+                        ipv1+                        Paths_do.getLibexecDir6+                        System.Environment.getEnv3+                          `cast`+                        (<Foreign.C.String.CString>_R+                         ->_R Sym (GHC.Types.N:IO[0] <GHC.Base.Maybe GHC.Base.String>_R))+                        ipv of ds2 { (#,#) ipv2 ipv3 ->+                 case ipv3 of wild {+                   GHC.Base.Nothing+                   -> System.Environment.getEnv2 ipv2 Paths_do.getLibexecDir6+                   GHC.Base.Just x -> (# ipv2, x #) } } }) -}+8375700bb9e6da4c2150433fac2f4015+  getLibexecDir6 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString#+                   Paths_do.getLibexecDir7) -}+19ffa960493ddaa74c59a52d666d86ed+  getLibexecDir7 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("do_libexecdir"#) -}+6ef30fa29e9ce93dd78d7fafc1298db7+  getSysconfDir :: GHC.Types.IO GHC.IO.FilePath+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: InlineRule (0, True, True)+                Paths_do.getSysconfDir1+                  `cast`+                (Sym (GHC.Types.N:IO[0] <GHC.Base.String>_R)) -}+3b0dcdfb41055b7b0fab2159ac49af0a+  getSysconfDir1 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (eta :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 GHC.Prim.catch#+                   @ GHC.Base.String+                   @ GHC.Exception.SomeException+                   Paths_do.getSysconfDir5+                   Paths_do.getSysconfDir2+                   eta) -}+f68f9aca9464dd7c1cdcc89cc71fb5c0+  getSysconfDir2 ::+    GHC.Exception.SomeException+    -> GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 2, Strictness: <S,1*U><S,U>,+     Unfolding: (\ (e1 :: GHC.Exception.SomeException)[OneShot]+                   (eta :: GHC.Prim.State# GHC.Prim.RealWorld)[OneShot] ->+                 case e1 of wild { GHC.Exception.SomeException e2 $dException1 e3 ->+                 case Data.Typeable.Internal.typeRepFingerprint+                        @ *+                        @ e2+                        (GHC.Exception.$p1Exception @ e2 $dException1)+                          `cast`+                        (Data.Typeable.Internal.N:Typeable[0] <*>_N <e2>_N) of wild1 { GHC.Fingerprint.Type.Fingerprint dt dt1 ->+                 case GHC.IO.Exception.$fExceptionIOException4 of wild2 { GHC.Fingerprint.Type.Fingerprint dt2 dt3 ->+                 case GHC.Prim.eqWord# dt dt2 of lwild {+                   DEFAULT+                   -> GHC.Prim.raiseIO#+                        @ GHC.Exception.SomeException+                        @ GHC.Base.String+                        wild+                        eta+                   1#+                   -> case GHC.Prim.eqWord# dt1 dt3 of lwild1 {+                        DEFAULT+                        -> GHC.Prim.raiseIO#+                             @ GHC.Exception.SomeException+                             @ GHC.Base.String+                             wild+                             eta+                        1# -> (# eta, Paths_do.getSysconfDir3 #) } } } } }) -}+2f8149111097bf5d88c524ee5a89062f+  getSysconfDir3 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString#+                   Paths_do.getSysconfDir4) -}+cb47ab3601c2dc72dd7998b5ac7cd2b7+  getSysconfDir4 :: GHC.Prim.Addr#+  {- HasNoCafRefs,+     Unfolding: ("/Users/joshuagrosso/Desktop/axelExamples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/etc"#) -}+86e31d9f2ada7c7cf34ae3cd3fbb61c7+  getSysconfDir5 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case (GHC.Magic.noinline+                         @ (GHC.Types.IO GHC.IO.Encoding.Types.TextEncoding)+                         GHC.IO.Encoding.getForeignEncoding)+                        `cast`+                      (GHC.Types.N:IO[0] <GHC.IO.Encoding.Types.TextEncoding>_R)+                        s of ds1 { (#,#) ipv ipv1 ->+                 case GHC.Foreign.charIsRepresentable3+                        @ (GHC.Base.Maybe GHC.Base.String)+                        ipv1+                        Paths_do.getSysconfDir6+                        System.Environment.getEnv3+                          `cast`+                        (<Foreign.C.String.CString>_R+                         ->_R Sym (GHC.Types.N:IO[0] <GHC.Base.Maybe GHC.Base.String>_R))+                        ipv of ds2 { (#,#) ipv2 ipv3 ->+                 case ipv3 of wild {+                   GHC.Base.Nothing+                   -> System.Environment.getEnv2 ipv2 Paths_do.getSysconfDir6+                   GHC.Base.Just x -> (# ipv2, x #) } } }) -}+b41d294268e338acd6d3b5fec5e23c65+  getSysconfDir6 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString#+                   Paths_do.getSysconfDir7) -}+971e5f0365dbd47354c716923122a482+  getSysconfDir7 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("do_sysconfdir"#) -}+bfd908180f8843d68ec791bf1af28a9c+  version :: Data.Version.Version+  {- HasNoCafRefs, Strictness: m,+     Unfolding: (Data.Version.Version+                   Paths_do.version1+                   (GHC.Types.[] @ GHC.Base.String)) -}+41f84f3995814c2dcfbb21b2dc4f9142+  version1 :: [GHC.Types.Int]+  {- HasNoCafRefs, Strictness: m2,+     Unfolding: (GHC.Types.:+                   @ GHC.Types.Int+                   Paths_do.version5+                   Paths_do.version2) -}+9a64271f6f9b87a1d68a8597a1df7ae8+  version2 :: [GHC.Types.Int]+  {- HasNoCafRefs, Strictness: m2,+     Unfolding: (GHC.Types.:+                   @ GHC.Types.Int+                   Paths_do.version6+                   Paths_do.version3) -}+72f5f38754f6f82244f78cbb0b598cfe+  version3 :: [GHC.Types.Int]+  {- HasNoCafRefs, Strictness: m2,+     Unfolding: (GHC.Types.:+                   @ GHC.Types.Int+                   Paths_do.version5+                   Paths_do.version4) -}+e8bf2ecae3c114c9a039c9049d107645+  version4 :: [GHC.Types.Int]+  {- HasNoCafRefs, Strictness: m2,+     Unfolding: (GHC.Types.:+                   @ GHC.Types.Int+                   Paths_do.version5+                   (GHC.Types.[] @ GHC.Types.Int)) -}+433c398dcf08c24afa7a8803ec541633+  version5 :: GHC.Types.Int+  {- HasNoCafRefs, Strictness: m, Unfolding: (GHC.Types.I# 0#) -}+0bf085bcd8bbf186c82fd721407cc8a8+  version6 :: GHC.Types.Int+  {- HasNoCafRefs, Strictness: m, Unfolding: (GHC.Types.I# 1#) -}+vectorised variables:+vectorised tycons:+vectorised reused tycons:+parallel variables:+parallel tycons:+trusted: safe+require own pkg trusted: False+
+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Lib.dyn_hi view

binary file changed (absent → 1964 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Lib.dyn_o view

binary file changed (absent → 2924 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Lib.hi view

binary file changed (absent → 1952 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Lib.o view

binary file changed (absent → 2916 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Paths_do.dyn_hi view

binary file changed (absent → 16002 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Paths_do.dyn_o view

binary file changed (absent → 29020 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Paths_do.hi view

binary file changed (absent → 15990 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Paths_do.o view

binary file changed (absent → 28924 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/autogen/Paths_do.hs view
@@ -0,0 +1,50 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE NoRebindableSyntax #-}+{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}+module Paths_do (+    version,+    getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,+    getDataFileName, getSysconfDir+  ) where++import qualified Control.Exception as Exception+import Data.Version (Version(..))+import System.Environment (getEnv)+import Prelude++#if defined(VERSION_base)++#if MIN_VERSION_base(4,0,0)+catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a+#else+catchIO :: IO a -> (Exception.Exception -> IO a) -> IO a+#endif++#else+catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a+#endif+catchIO = Exception.catch++version :: Version+version = Version [0,1,0,0] []+bindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath++bindir     = "/Users/joshuagrosso/Desktop/axelExamples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/bin"+libdir     = "/Users/joshuagrosso/Desktop/axelExamples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm"+dynlibdir  = "/Users/joshuagrosso/Desktop/axelExamples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3"+datadir    = "/Users/joshuagrosso/Desktop/axelExamples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/share/x86_64-osx-ghc-8.4.3/do-0.1.0.0"+libexecdir = "/Users/joshuagrosso/Desktop/axelExamples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/libexec/x86_64-osx-ghc-8.4.3/do-0.1.0.0"+sysconfdir = "/Users/joshuagrosso/Desktop/axelExamples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/etc"++getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath+getBinDir = catchIO (getEnv "do_bindir") (\_ -> return bindir)+getLibDir = catchIO (getEnv "do_libdir") (\_ -> return libdir)+getDynLibDir = catchIO (getEnv "do_dynlibdir") (\_ -> return dynlibdir)+getDataDir = catchIO (getEnv "do_datadir") (\_ -> return datadir)+getLibexecDir = catchIO (getEnv "do_libexecdir") (\_ -> return libexecdir)+getSysconfDir = catchIO (getEnv "do_sysconfdir") (\_ -> return sysconfdir)++getDataFileName :: FilePath -> IO FilePath+getDataFileName name = do+  dir <- getDataDir+  return (dir ++ "/" ++ name)
+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/autogen/cabal_macros.h view
@@ -0,0 +1,143 @@+/* DO NOT EDIT: This file is automatically generated by Cabal */++/* package do-0.1.0.0 */+#ifndef VERSION_do+#define VERSION_do "0.1.0.0"+#endif /* VERSION_do */+#ifndef MIN_VERSION_do+#define MIN_VERSION_do(major1,major2,minor) (\+  (major1) <  0 || \+  (major1) == 0 && (major2) <  1 || \+  (major1) == 0 && (major2) == 1 && (minor) <= 0)+#endif /* MIN_VERSION_do */++/* package base-4.11.1.0 */+#ifndef VERSION_base+#define VERSION_base "4.11.1.0"+#endif /* VERSION_base */+#ifndef MIN_VERSION_base+#define MIN_VERSION_base(major1,major2,minor) (\+  (major1) <  4 || \+  (major1) == 4 && (major2) <  11 || \+  (major1) == 4 && (major2) == 11 && (minor) <= 1)+#endif /* MIN_VERSION_base */++/* tool cpphs-1.20.8 */+#ifndef TOOL_VERSION_cpphs+#define TOOL_VERSION_cpphs "1.20.8"+#endif /* TOOL_VERSION_cpphs */+#ifndef MIN_TOOL_VERSION_cpphs+#define MIN_TOOL_VERSION_cpphs(major1,major2,minor) (\+  (major1) <  1 || \+  (major1) == 1 && (major2) <  20 || \+  (major1) == 1 && (major2) == 20 && (minor) <= 8)+#endif /* MIN_TOOL_VERSION_cpphs */++/* tool gcc-4.2.1 */+#ifndef TOOL_VERSION_gcc+#define TOOL_VERSION_gcc "4.2.1"+#endif /* TOOL_VERSION_gcc */+#ifndef MIN_TOOL_VERSION_gcc+#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\+  (major1) <  4 || \+  (major1) == 4 && (major2) <  2 || \+  (major1) == 4 && (major2) == 2 && (minor) <= 1)+#endif /* MIN_TOOL_VERSION_gcc */++/* tool ghc-8.4.3 */+#ifndef TOOL_VERSION_ghc+#define TOOL_VERSION_ghc "8.4.3"+#endif /* TOOL_VERSION_ghc */+#ifndef MIN_TOOL_VERSION_ghc+#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\+  (major1) <  8 || \+  (major1) == 8 && (major2) <  4 || \+  (major1) == 8 && (major2) == 4 && (minor) <= 3)+#endif /* MIN_TOOL_VERSION_ghc */++/* tool ghc-pkg-8.4.3 */+#ifndef TOOL_VERSION_ghc_pkg+#define TOOL_VERSION_ghc_pkg "8.4.3"+#endif /* TOOL_VERSION_ghc_pkg */+#ifndef MIN_TOOL_VERSION_ghc_pkg+#define MIN_TOOL_VERSION_ghc_pkg(major1,major2,minor) (\+  (major1) <  8 || \+  (major1) == 8 && (major2) <  4 || \+  (major1) == 8 && (major2) == 4 && (minor) <= 3)+#endif /* MIN_TOOL_VERSION_ghc_pkg */++/* tool haddock-2.20.0 */+#ifndef TOOL_VERSION_haddock+#define TOOL_VERSION_haddock "2.20.0"+#endif /* TOOL_VERSION_haddock */+#ifndef MIN_TOOL_VERSION_haddock+#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\+  (major1) <  2 || \+  (major1) == 2 && (major2) <  20 || \+  (major1) == 2 && (major2) == 20 && (minor) <= 0)+#endif /* MIN_TOOL_VERSION_haddock */++/* tool happy-1.19.9 */+#ifndef TOOL_VERSION_happy+#define TOOL_VERSION_happy "1.19.9"+#endif /* TOOL_VERSION_happy */+#ifndef MIN_TOOL_VERSION_happy+#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\+  (major1) <  1 || \+  (major1) == 1 && (major2) <  19 || \+  (major1) == 1 && (major2) == 19 && (minor) <= 9)+#endif /* MIN_TOOL_VERSION_happy */++/* tool hpc-0.67 */+#ifndef TOOL_VERSION_hpc+#define TOOL_VERSION_hpc "0.67"+#endif /* TOOL_VERSION_hpc */+#ifndef MIN_TOOL_VERSION_hpc+#define MIN_TOOL_VERSION_hpc(major1,major2,minor) (\+  (major1) <  0 || \+  (major1) == 0 && (major2) <  67 || \+  (major1) == 0 && (major2) == 67 && (minor) <= 0)+#endif /* MIN_TOOL_VERSION_hpc */++/* tool hsc2hs-0.68.3 */+#ifndef TOOL_VERSION_hsc2hs+#define TOOL_VERSION_hsc2hs "0.68.3"+#endif /* TOOL_VERSION_hsc2hs */+#ifndef MIN_TOOL_VERSION_hsc2hs+#define MIN_TOOL_VERSION_hsc2hs(major1,major2,minor) (\+  (major1) <  0 || \+  (major1) == 0 && (major2) <  68 || \+  (major1) == 0 && (major2) == 68 && (minor) <= 3)+#endif /* MIN_TOOL_VERSION_hsc2hs */++/* tool pkg-config-0.29.2 */+#ifndef TOOL_VERSION_pkg_config+#define TOOL_VERSION_pkg_config "0.29.2"+#endif /* TOOL_VERSION_pkg_config */+#ifndef MIN_TOOL_VERSION_pkg_config+#define MIN_TOOL_VERSION_pkg_config(major1,major2,minor) (\+  (major1) <  0 || \+  (major1) == 0 && (major2) <  29 || \+  (major1) == 0 && (major2) == 29 && (minor) <= 2)+#endif /* MIN_TOOL_VERSION_pkg_config */++/* tool runghc-8.4.3 */+#ifndef TOOL_VERSION_runghc+#define TOOL_VERSION_runghc "8.4.3"+#endif /* TOOL_VERSION_runghc */+#ifndef MIN_TOOL_VERSION_runghc+#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\+  (major1) <  8 || \+  (major1) == 8 && (major2) <  4 || \+  (major1) == 8 && (major2) == 4 && (minor) <= 3)+#endif /* MIN_TOOL_VERSION_runghc */++#ifndef CURRENT_PACKAGE_KEY+#define CURRENT_PACKAGE_KEY "do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm"+#endif /* CURRENT_PACKAGE_KEY */+#ifndef CURRENT_COMPONENT_ID+#define CURRENT_COMPONENT_ID "do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm"+#endif /* CURRENT_COMPONENT_ID */+#ifndef CURRENT_PACKAGE_VERSION+#define CURRENT_PACKAGE_VERSION "0.1.0.0"+#endif /* CURRENT_PACKAGE_VERSION */
+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/autogen/Paths_do.hs view
@@ -0,0 +1,50 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE NoRebindableSyntax #-}+{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}+module Paths_do (+    version,+    getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,+    getDataFileName, getSysconfDir+  ) where++import qualified Control.Exception as Exception+import Data.Version (Version(..))+import System.Environment (getEnv)+import Prelude++#if defined(VERSION_base)++#if MIN_VERSION_base(4,0,0)+catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a+#else+catchIO :: IO a -> (Exception.Exception -> IO a) -> IO a+#endif++#else+catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a+#endif+catchIO = Exception.catch++version :: Version+version = Version [0,1,0,0] []+bindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath++bindir     = "/Users/joshuagrosso/Repositories/axel/examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/bin"+libdir     = "/Users/joshuagrosso/Repositories/axel/examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm-do-exe"+dynlibdir  = "/Users/joshuagrosso/Repositories/axel/examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3"+datadir    = "/Users/joshuagrosso/Repositories/axel/examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/share/x86_64-osx-ghc-8.4.3/do-0.1.0.0"+libexecdir = "/Users/joshuagrosso/Repositories/axel/examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/libexec/x86_64-osx-ghc-8.4.3/do-0.1.0.0"+sysconfdir = "/Users/joshuagrosso/Repositories/axel/examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/etc"++getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath+getBinDir = catchIO (getEnv "do_bindir") (\_ -> return bindir)+getLibDir = catchIO (getEnv "do_libdir") (\_ -> return libdir)+getDynLibDir = catchIO (getEnv "do_dynlibdir") (\_ -> return dynlibdir)+getDataDir = catchIO (getEnv "do_datadir") (\_ -> return datadir)+getLibexecDir = catchIO (getEnv "do_libexecdir") (\_ -> return libexecdir)+getSysconfDir = catchIO (getEnv "do_sysconfdir") (\_ -> return sysconfdir)++getDataFileName :: FilePath -> IO FilePath+getDataFileName name = do+  dir <- getDataDir+  return (dir ++ "/" ++ name)
+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/autogen/cabal_macros.h view
@@ -0,0 +1,140 @@+/* DO NOT EDIT: This file is automatically generated by Cabal */++/* package do-0.1.0.0 */+#ifndef VERSION_do+#define VERSION_do "0.1.0.0"+#endif /* VERSION_do */+#ifndef MIN_VERSION_do+#define MIN_VERSION_do(major1,major2,minor) (\+  (major1) <  0 || \+  (major1) == 0 && (major2) <  1 || \+  (major1) == 0 && (major2) == 1 && (minor) <= 0)+#endif /* MIN_VERSION_do */++/* package base-4.11.1.0 */+#ifndef VERSION_base+#define VERSION_base "4.11.1.0"+#endif /* VERSION_base */+#ifndef MIN_VERSION_base+#define MIN_VERSION_base(major1,major2,minor) (\+  (major1) <  4 || \+  (major1) == 4 && (major2) <  11 || \+  (major1) == 4 && (major2) == 11 && (minor) <= 1)+#endif /* MIN_VERSION_base */++/* tool cpphs-1.20.8 */+#ifndef TOOL_VERSION_cpphs+#define TOOL_VERSION_cpphs "1.20.8"+#endif /* TOOL_VERSION_cpphs */+#ifndef MIN_TOOL_VERSION_cpphs+#define MIN_TOOL_VERSION_cpphs(major1,major2,minor) (\+  (major1) <  1 || \+  (major1) == 1 && (major2) <  20 || \+  (major1) == 1 && (major2) == 20 && (minor) <= 8)+#endif /* MIN_TOOL_VERSION_cpphs */++/* tool gcc-4.2.1 */+#ifndef TOOL_VERSION_gcc+#define TOOL_VERSION_gcc "4.2.1"+#endif /* TOOL_VERSION_gcc */+#ifndef MIN_TOOL_VERSION_gcc+#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\+  (major1) <  4 || \+  (major1) == 4 && (major2) <  2 || \+  (major1) == 4 && (major2) == 2 && (minor) <= 1)+#endif /* MIN_TOOL_VERSION_gcc */++/* tool ghc-8.4.3 */+#ifndef TOOL_VERSION_ghc+#define TOOL_VERSION_ghc "8.4.3"+#endif /* TOOL_VERSION_ghc */+#ifndef MIN_TOOL_VERSION_ghc+#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\+  (major1) <  8 || \+  (major1) == 8 && (major2) <  4 || \+  (major1) == 8 && (major2) == 4 && (minor) <= 3)+#endif /* MIN_TOOL_VERSION_ghc */++/* tool ghc-pkg-8.4.3 */+#ifndef TOOL_VERSION_ghc_pkg+#define TOOL_VERSION_ghc_pkg "8.4.3"+#endif /* TOOL_VERSION_ghc_pkg */+#ifndef MIN_TOOL_VERSION_ghc_pkg+#define MIN_TOOL_VERSION_ghc_pkg(major1,major2,minor) (\+  (major1) <  8 || \+  (major1) == 8 && (major2) <  4 || \+  (major1) == 8 && (major2) == 4 && (minor) <= 3)+#endif /* MIN_TOOL_VERSION_ghc_pkg */++/* tool haddock-2.20.0 */+#ifndef TOOL_VERSION_haddock+#define TOOL_VERSION_haddock "2.20.0"+#endif /* TOOL_VERSION_haddock */+#ifndef MIN_TOOL_VERSION_haddock+#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\+  (major1) <  2 || \+  (major1) == 2 && (major2) <  20 || \+  (major1) == 2 && (major2) == 20 && (minor) <= 0)+#endif /* MIN_TOOL_VERSION_haddock */++/* tool happy-1.19.9 */+#ifndef TOOL_VERSION_happy+#define TOOL_VERSION_happy "1.19.9"+#endif /* TOOL_VERSION_happy */+#ifndef MIN_TOOL_VERSION_happy+#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\+  (major1) <  1 || \+  (major1) == 1 && (major2) <  19 || \+  (major1) == 1 && (major2) == 19 && (minor) <= 9)+#endif /* MIN_TOOL_VERSION_happy */++/* tool hpc-0.67 */+#ifndef TOOL_VERSION_hpc+#define TOOL_VERSION_hpc "0.67"+#endif /* TOOL_VERSION_hpc */+#ifndef MIN_TOOL_VERSION_hpc+#define MIN_TOOL_VERSION_hpc(major1,major2,minor) (\+  (major1) <  0 || \+  (major1) == 0 && (major2) <  67 || \+  (major1) == 0 && (major2) == 67 && (minor) <= 0)+#endif /* MIN_TOOL_VERSION_hpc */++/* tool hsc2hs-0.68.3 */+#ifndef TOOL_VERSION_hsc2hs+#define TOOL_VERSION_hsc2hs "0.68.3"+#endif /* TOOL_VERSION_hsc2hs */+#ifndef MIN_TOOL_VERSION_hsc2hs+#define MIN_TOOL_VERSION_hsc2hs(major1,major2,minor) (\+  (major1) <  0 || \+  (major1) == 0 && (major2) <  68 || \+  (major1) == 0 && (major2) == 68 && (minor) <= 3)+#endif /* MIN_TOOL_VERSION_hsc2hs */++/* tool pkg-config-0.29.2 */+#ifndef TOOL_VERSION_pkg_config+#define TOOL_VERSION_pkg_config "0.29.2"+#endif /* TOOL_VERSION_pkg_config */+#ifndef MIN_TOOL_VERSION_pkg_config+#define MIN_TOOL_VERSION_pkg_config(major1,major2,minor) (\+  (major1) <  0 || \+  (major1) == 0 && (major2) <  29 || \+  (major1) == 0 && (major2) == 29 && (minor) <= 2)+#endif /* MIN_TOOL_VERSION_pkg_config */++/* tool runghc-8.4.3 */+#ifndef TOOL_VERSION_runghc+#define TOOL_VERSION_runghc "8.4.3"+#endif /* TOOL_VERSION_runghc */+#ifndef MIN_TOOL_VERSION_runghc+#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\+  (major1) <  8 || \+  (major1) == 8 && (major2) <  4 || \+  (major1) == 8 && (major2) == 4 && (minor) <= 3)+#endif /* MIN_TOOL_VERSION_runghc */++#ifndef CURRENT_COMPONENT_ID+#define CURRENT_COMPONENT_ID "do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm-do-exe"+#endif /* CURRENT_COMPONENT_ID */+#ifndef CURRENT_PACKAGE_VERSION+#define CURRENT_PACKAGE_VERSION "0.1.0.0"+#endif /* CURRENT_PACKAGE_VERSION */
+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/do-exe view

binary file changed (absent → 1455140 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/do-exe-tmp/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/autogen/Paths_do.dump-hi view
@@ -0,0 +1,683 @@++==================== FINAL INTERFACE ====================+2018-07-21 20:15:37.503764 UTC++interface main:Paths_do 8043+  interface hash: a886ff56bec2e4b12e1123a266faddfc+  ABI hash: 95efa516fb84f4e58d2bb26e366de57b+  export-list hash: 9f55ecce0fa3dc51afd0d748bb3f3c8e+  orphan hash: 693e9af84d3dfcc71e640e005bdc5e2e+  flag hash: a2b2624acc260212a08b0086ae9fbec4+  opt_hash: 14e536840aca4e889cad654e6f9b79c1+  hpc_hash: 93b885adfe0da089cdf634904fd59f71+  sig of: Nothing+  used TH splices: False+  where+exports:+  Paths_do.getBinDir+  Paths_do.getDataDir+  Paths_do.getDataFileName+  Paths_do.getDynLibDir+  Paths_do.getLibDir+  Paths_do.getLibexecDir+  Paths_do.getSysconfDir+  Paths_do.version+module dependencies:+package dependencies: base-4.11.1.0* ghc-prim-0.5.2.0+                      integer-gmp-1.0.2.0+orphans: base-4.11.1.0:GHC.Float base-4.11.1.0:GHC.Base+family instance modules: base-4.11.1.0:Control.Applicative+                         base-4.11.1.0:Data.Functor.Const+                         base-4.11.1.0:Data.Functor.Identity base-4.11.1.0:Data.Monoid+                         base-4.11.1.0:Data.Semigroup.Internal base-4.11.1.0:Data.Version+                         base-4.11.1.0:GHC.Generics base-4.11.1.0:GHC.IO.Exception+import  -/  base-4.11.1.0:Control.Exception 3d8e6cda20877f889f07bc7c0f5cac36+import  -/  base-4.11.1.0:Data.Version 26b96b3dd83a23703e0b8110475fc04a+import  -/  base-4.11.1.0:GHC.Base 604111500e81281298777e721c75643b+import  -/  base-4.11.1.0:GHC.IO 1d5542cc02075c5e948018bfacea89c1+import  -/  base-4.11.1.0:GHC.IO.Exception acc060dca2e46d8b8275d06ee7d5d60d+import  -/  base-4.11.1.0:Prelude 0750c25585e2b797cd78291d423d39dd+import  -/  base-4.11.1.0:System.Environment 052ec29b676ed8efc1decd97140a27e3+import  -/  ghc-prim-0.5.2.0:GHC.Types d9b3023de7feae4a5308d643da5543f7+addDependentFile "/Users/joshuagrosso/.stack/programs/x86_64-osx/ghc-8.4.3/lib/ghc-8.4.3/include/ghcversion.h" 61cc4580d32de09862d412848a79cd26+addDependentFile ".stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/autogen/cabal_macros.h" 7db16f881bfe8d311cbfa36a66a015d4+0b1fec1f1f0d996f698d788efa895b7d+  $trModule :: GHC.Types.Module+  {- HasNoCafRefs, Strictness: m,+     Unfolding: (GHC.Types.Module+                   Paths_do.$trModule3+                   Paths_do.$trModule1) -}+83fa3e87d0fd713542670b8df51fcb44+  $trModule1 :: GHC.Types.TrName+  {- HasNoCafRefs, Strictness: m1,+     Unfolding: (GHC.Types.TrNameS Paths_do.$trModule2) -}+bee664998906fc944a58d55ac6889ec9+  $trModule2 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("Paths_do"#) -}+20d8916e53600657c2e4d98a7d8ed810+  $trModule3 :: GHC.Types.TrName+  {- HasNoCafRefs, Strictness: m1,+     Unfolding: (GHC.Types.TrNameS Paths_do.$trModule4) -}+6774634052e0e5c6ce92ae2176ada8da+  $trModule4 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("main"#) -}+0ccd6783d419708f754a4b0d186b375e+  getBinDir :: GHC.Types.IO GHC.IO.FilePath+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: InlineRule (0, True, True)+                Paths_do.getBinDir1+                  `cast`+                (Sym (GHC.Types.N:IO[0] <GHC.Base.String>_R)) -}+b0be28d7c8bc6f09601f56066dcbd602+  getBinDir1 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (eta :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 GHC.Prim.catch#+                   @ GHC.Base.String+                   @ GHC.Exception.SomeException+                   Paths_do.getBinDir5+                   Paths_do.getBinDir2+                   eta) -}+8efe4cd08bddf1334099040a43125fb5+  getBinDir2 ::+    GHC.Exception.SomeException+    -> GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 2, Strictness: <S,1*U><S,U>,+     Unfolding: (\ (e1 :: GHC.Exception.SomeException)[OneShot]+                   (eta :: GHC.Prim.State# GHC.Prim.RealWorld)[OneShot] ->+                 case e1 of wild { GHC.Exception.SomeException e2 $dException1 e3 ->+                 case Data.Typeable.Internal.typeRepFingerprint+                        @ *+                        @ e2+                        (GHC.Exception.$p1Exception @ e2 $dException1)+                          `cast`+                        (Data.Typeable.Internal.N:Typeable[0] <*>_N <e2>_N) of wild1 { GHC.Fingerprint.Type.Fingerprint dt dt1 ->+                 case GHC.IO.Exception.$fExceptionIOException4 of wild2 { GHC.Fingerprint.Type.Fingerprint dt2 dt3 ->+                 case GHC.Prim.eqWord# dt dt2 of lwild {+                   DEFAULT+                   -> GHC.Prim.raiseIO#+                        @ GHC.Exception.SomeException+                        @ GHC.Base.String+                        wild+                        eta+                   1#+                   -> case GHC.Prim.eqWord# dt1 dt3 of lwild1 {+                        DEFAULT+                        -> GHC.Prim.raiseIO#+                             @ GHC.Exception.SomeException+                             @ GHC.Base.String+                             wild+                             eta+                        1# -> (# eta, Paths_do.getBinDir3 #) } } } } }) -}+790a62421a721b9c13a5a50bff3b0a9c+  getBinDir3 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString# Paths_do.getBinDir4) -}+ecfcbe459863ffd5657a8a3a87b7f460+  getBinDir4 :: GHC.Prim.Addr#+  {- HasNoCafRefs,+     Unfolding: ("/Users/joshuagrosso/Repositories/axel/examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/bin"#) -}+aebfb8acae485a01469038d766b203b9+  getBinDir5 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case (GHC.Magic.noinline+                         @ (GHC.Types.IO GHC.IO.Encoding.Types.TextEncoding)+                         GHC.IO.Encoding.getForeignEncoding)+                        `cast`+                      (GHC.Types.N:IO[0] <GHC.IO.Encoding.Types.TextEncoding>_R)+                        s of ds1 { (#,#) ipv ipv1 ->+                 case GHC.Foreign.charIsRepresentable3+                        @ (GHC.Base.Maybe GHC.Base.String)+                        ipv1+                        Paths_do.getBinDir6+                        System.Environment.getEnv3+                          `cast`+                        (<Foreign.C.String.CString>_R+                         ->_R Sym (GHC.Types.N:IO[0] <GHC.Base.Maybe GHC.Base.String>_R))+                        ipv of ds2 { (#,#) ipv2 ipv3 ->+                 case ipv3 of wild {+                   GHC.Base.Nothing+                   -> System.Environment.getEnv2 ipv2 Paths_do.getBinDir6+                   GHC.Base.Just x -> (# ipv2, x #) } } }) -}+100b3841e3db4226308258e6aa076373+  getBinDir6 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString# Paths_do.getBinDir7) -}+a8334d1fa12fe99be25f877c9839d5ae+  getBinDir7 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("do_bindir"#) -}+96409e56b3a205325fde7f5ee69ed741+  getDataDir :: GHC.Types.IO GHC.IO.FilePath+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: InlineRule (0, True, True)+                Paths_do.getDataDir1+                  `cast`+                (Sym (GHC.Types.N:IO[0] <GHC.Base.String>_R)) -}+deb8cf5faa4f989a4b333ef1a3c520f2+  getDataDir1 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (eta :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 GHC.Prim.catch#+                   @ GHC.Base.String+                   @ GHC.Exception.SomeException+                   Paths_do.getDataDir5+                   Paths_do.getDataDir2+                   eta) -}+98d8986ee1f4915cd924fdebd84ef90a+  getDataDir2 ::+    GHC.Exception.SomeException+    -> GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 2, Strictness: <S,1*U><S,U>,+     Unfolding: (\ (e1 :: GHC.Exception.SomeException)[OneShot]+                   (eta :: GHC.Prim.State# GHC.Prim.RealWorld)[OneShot] ->+                 case e1 of wild { GHC.Exception.SomeException e2 $dException1 e3 ->+                 case Data.Typeable.Internal.typeRepFingerprint+                        @ *+                        @ e2+                        (GHC.Exception.$p1Exception @ e2 $dException1)+                          `cast`+                        (Data.Typeable.Internal.N:Typeable[0] <*>_N <e2>_N) of wild1 { GHC.Fingerprint.Type.Fingerprint dt dt1 ->+                 case GHC.IO.Exception.$fExceptionIOException4 of wild2 { GHC.Fingerprint.Type.Fingerprint dt2 dt3 ->+                 case GHC.Prim.eqWord# dt dt2 of lwild {+                   DEFAULT+                   -> GHC.Prim.raiseIO#+                        @ GHC.Exception.SomeException+                        @ GHC.Base.String+                        wild+                        eta+                   1#+                   -> case GHC.Prim.eqWord# dt1 dt3 of lwild1 {+                        DEFAULT+                        -> GHC.Prim.raiseIO#+                             @ GHC.Exception.SomeException+                             @ GHC.Base.String+                             wild+                             eta+                        1# -> (# eta, Paths_do.getDataDir3 #) } } } } }) -}+8c2dc665e9074ad6beca0dbe4abc761d+  getDataDir3 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString# Paths_do.getDataDir4) -}+9259122ea3a8d59ef8464d2a8c3a3825+  getDataDir4 :: GHC.Prim.Addr#+  {- HasNoCafRefs,+     Unfolding: ("/Users/joshuagrosso/Repositories/axel/examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/share/x86_64-osx-ghc-8.4.3/do-0.1.0.0"#) -}+fb694e9223f5a8f8365ddd92be9b40d8+  getDataDir5 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case (GHC.Magic.noinline+                         @ (GHC.Types.IO GHC.IO.Encoding.Types.TextEncoding)+                         GHC.IO.Encoding.getForeignEncoding)+                        `cast`+                      (GHC.Types.N:IO[0] <GHC.IO.Encoding.Types.TextEncoding>_R)+                        s of ds1 { (#,#) ipv ipv1 ->+                 case GHC.Foreign.charIsRepresentable3+                        @ (GHC.Base.Maybe GHC.Base.String)+                        ipv1+                        Paths_do.getDataDir6+                        System.Environment.getEnv3+                          `cast`+                        (<Foreign.C.String.CString>_R+                         ->_R Sym (GHC.Types.N:IO[0] <GHC.Base.Maybe GHC.Base.String>_R))+                        ipv of ds2 { (#,#) ipv2 ipv3 ->+                 case ipv3 of wild {+                   GHC.Base.Nothing+                   -> System.Environment.getEnv2 ipv2 Paths_do.getDataDir6+                   GHC.Base.Just x -> (# ipv2, x #) } } }) -}+38d6516ecc04c4d4217a1c2541ab8414+  getDataDir6 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString# Paths_do.getDataDir7) -}+b35ea92e810f50fdd080319d08b85d29+  getDataDir7 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("do_datadir"#) -}+c7d45bad78752536da27c6f44223a0af+  getDataFileName :: GHC.IO.FilePath -> GHC.Types.IO GHC.IO.FilePath+  {- Arity: 2, Strictness: <L,U><S,U>,+     Unfolding: InlineRule (0, True, True)+                Paths_do.getDataFileName1+                  `cast`+                (<GHC.IO.FilePath>_R+                 ->_R Sym (GHC.Types.N:IO[0] <GHC.IO.FilePath>_R)) -}+38f467ac188e4d10bd8b3d2b71727051+  getDataFileName1 ::+    GHC.IO.FilePath+    -> GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.IO.FilePath #)+  {- Arity: 2, Strictness: <L,U><S,U>,+     Unfolding: (\ (name :: GHC.IO.FilePath)+                   (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case GHC.Prim.catch#+                        @ GHC.Base.String+                        @ GHC.Exception.SomeException+                        Paths_do.getDataDir5+                        Paths_do.getDataDir2+                        s of ds1 { (#,#) ipv ipv1 ->+                 (# ipv,+                    GHC.Base.+++                      @ GHC.Types.Char+                      ipv1+                      (GHC.CString.unpackAppendCString#+                         Paths_do.getDataFileName2+                         name) #) }) -}+333c86fef7f261f72d508f889cf0b087+  getDataFileName2 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("/"#) -}+50712cec1e0c169c1b3bb42652cef1ce+  getDynLibDir :: GHC.Types.IO GHC.IO.FilePath+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: InlineRule (0, True, True)+                Paths_do.getDynLibDir1+                  `cast`+                (Sym (GHC.Types.N:IO[0] <GHC.Base.String>_R)) -}+64fb6babf8e46cba2be3747767d58c19+  getDynLibDir1 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (eta :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 GHC.Prim.catch#+                   @ GHC.Base.String+                   @ GHC.Exception.SomeException+                   Paths_do.getDynLibDir5+                   Paths_do.getDynLibDir2+                   eta) -}+244004d07465c250c9c6a59e91a01acd+  getDynLibDir2 ::+    GHC.Exception.SomeException+    -> GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 2, Strictness: <S,1*U><S,U>,+     Unfolding: (\ (e1 :: GHC.Exception.SomeException)[OneShot]+                   (eta :: GHC.Prim.State# GHC.Prim.RealWorld)[OneShot] ->+                 case e1 of wild { GHC.Exception.SomeException e2 $dException1 e3 ->+                 case Data.Typeable.Internal.typeRepFingerprint+                        @ *+                        @ e2+                        (GHC.Exception.$p1Exception @ e2 $dException1)+                          `cast`+                        (Data.Typeable.Internal.N:Typeable[0] <*>_N <e2>_N) of wild1 { GHC.Fingerprint.Type.Fingerprint dt dt1 ->+                 case GHC.IO.Exception.$fExceptionIOException4 of wild2 { GHC.Fingerprint.Type.Fingerprint dt2 dt3 ->+                 case GHC.Prim.eqWord# dt dt2 of lwild {+                   DEFAULT+                   -> GHC.Prim.raiseIO#+                        @ GHC.Exception.SomeException+                        @ GHC.Base.String+                        wild+                        eta+                   1#+                   -> case GHC.Prim.eqWord# dt1 dt3 of lwild1 {+                        DEFAULT+                        -> GHC.Prim.raiseIO#+                             @ GHC.Exception.SomeException+                             @ GHC.Base.String+                             wild+                             eta+                        1# -> (# eta, Paths_do.getDynLibDir3 #) } } } } }) -}+f4871c9418c1f06ca542f8c7f834b7fe+  getDynLibDir3 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString#+                   Paths_do.getDynLibDir4) -}+77b0feb1a9fee09b2dfb24e6ce8a9bf7+  getDynLibDir4 :: GHC.Prim.Addr#+  {- HasNoCafRefs,+     Unfolding: ("/Users/joshuagrosso/Repositories/axel/examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3"#) -}+d426972ee74ec409148d97c1dc46a5cb+  getDynLibDir5 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case (GHC.Magic.noinline+                         @ (GHC.Types.IO GHC.IO.Encoding.Types.TextEncoding)+                         GHC.IO.Encoding.getForeignEncoding)+                        `cast`+                      (GHC.Types.N:IO[0] <GHC.IO.Encoding.Types.TextEncoding>_R)+                        s of ds1 { (#,#) ipv ipv1 ->+                 case GHC.Foreign.charIsRepresentable3+                        @ (GHC.Base.Maybe GHC.Base.String)+                        ipv1+                        Paths_do.getDynLibDir6+                        System.Environment.getEnv3+                          `cast`+                        (<Foreign.C.String.CString>_R+                         ->_R Sym (GHC.Types.N:IO[0] <GHC.Base.Maybe GHC.Base.String>_R))+                        ipv of ds2 { (#,#) ipv2 ipv3 ->+                 case ipv3 of wild {+                   GHC.Base.Nothing+                   -> System.Environment.getEnv2 ipv2 Paths_do.getDynLibDir6+                   GHC.Base.Just x -> (# ipv2, x #) } } }) -}+294f3d69668249e880f112823d1f9798+  getDynLibDir6 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString#+                   Paths_do.getDynLibDir7) -}+94c1fc524530016c34483813b4a0a88e+  getDynLibDir7 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("do_dynlibdir"#) -}+56e227b0703d6e964b70fe21a48f18fe+  getLibDir :: GHC.Types.IO GHC.IO.FilePath+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: InlineRule (0, True, True)+                Paths_do.getLibDir1+                  `cast`+                (Sym (GHC.Types.N:IO[0] <GHC.Base.String>_R)) -}+3688560ff9da020ffcbc134b89b63de9+  getLibDir1 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (eta :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 GHC.Prim.catch#+                   @ GHC.Base.String+                   @ GHC.Exception.SomeException+                   Paths_do.getLibDir5+                   Paths_do.getLibDir2+                   eta) -}+83ca20ff87f1383a6f260bfbe4c4a274+  getLibDir2 ::+    GHC.Exception.SomeException+    -> GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 2, Strictness: <S,1*U><S,U>,+     Unfolding: (\ (e1 :: GHC.Exception.SomeException)[OneShot]+                   (eta :: GHC.Prim.State# GHC.Prim.RealWorld)[OneShot] ->+                 case e1 of wild { GHC.Exception.SomeException e2 $dException1 e3 ->+                 case Data.Typeable.Internal.typeRepFingerprint+                        @ *+                        @ e2+                        (GHC.Exception.$p1Exception @ e2 $dException1)+                          `cast`+                        (Data.Typeable.Internal.N:Typeable[0] <*>_N <e2>_N) of wild1 { GHC.Fingerprint.Type.Fingerprint dt dt1 ->+                 case GHC.IO.Exception.$fExceptionIOException4 of wild2 { GHC.Fingerprint.Type.Fingerprint dt2 dt3 ->+                 case GHC.Prim.eqWord# dt dt2 of lwild {+                   DEFAULT+                   -> GHC.Prim.raiseIO#+                        @ GHC.Exception.SomeException+                        @ GHC.Base.String+                        wild+                        eta+                   1#+                   -> case GHC.Prim.eqWord# dt1 dt3 of lwild1 {+                        DEFAULT+                        -> GHC.Prim.raiseIO#+                             @ GHC.Exception.SomeException+                             @ GHC.Base.String+                             wild+                             eta+                        1# -> (# eta, Paths_do.getLibDir3 #) } } } } }) -}+71e6c68efdec7d123b6bd0f6f9dd5aaa+  getLibDir3 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString# Paths_do.getLibDir4) -}+1a9574ee18f25bdb7ddab58e0b5e41bd+  getLibDir4 :: GHC.Prim.Addr#+  {- HasNoCafRefs,+     Unfolding: ("/Users/joshuagrosso/Repositories/axel/examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm-do-exe"#) -}+7c58210aea5748cb3233e07451aefe3a+  getLibDir5 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case (GHC.Magic.noinline+                         @ (GHC.Types.IO GHC.IO.Encoding.Types.TextEncoding)+                         GHC.IO.Encoding.getForeignEncoding)+                        `cast`+                      (GHC.Types.N:IO[0] <GHC.IO.Encoding.Types.TextEncoding>_R)+                        s of ds1 { (#,#) ipv ipv1 ->+                 case GHC.Foreign.charIsRepresentable3+                        @ (GHC.Base.Maybe GHC.Base.String)+                        ipv1+                        Paths_do.getLibDir6+                        System.Environment.getEnv3+                          `cast`+                        (<Foreign.C.String.CString>_R+                         ->_R Sym (GHC.Types.N:IO[0] <GHC.Base.Maybe GHC.Base.String>_R))+                        ipv of ds2 { (#,#) ipv2 ipv3 ->+                 case ipv3 of wild {+                   GHC.Base.Nothing+                   -> System.Environment.getEnv2 ipv2 Paths_do.getLibDir6+                   GHC.Base.Just x -> (# ipv2, x #) } } }) -}+045b46c0827ed84fc853e269b4cb053e+  getLibDir6 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString# Paths_do.getLibDir7) -}+4e6a7aedef0fd2cc322b2d31083cf668+  getLibDir7 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("do_libdir"#) -}+8f622bc51e00287021f094e2a12a29b9+  getLibexecDir :: GHC.Types.IO GHC.IO.FilePath+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: InlineRule (0, True, True)+                Paths_do.getLibexecDir1+                  `cast`+                (Sym (GHC.Types.N:IO[0] <GHC.Base.String>_R)) -}+e56f64522fde77118c0854da6879fa21+  getLibexecDir1 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (eta :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 GHC.Prim.catch#+                   @ GHC.Base.String+                   @ GHC.Exception.SomeException+                   Paths_do.getLibexecDir5+                   Paths_do.getLibexecDir2+                   eta) -}+6c1702a74ae941b02bca0e287fa49245+  getLibexecDir2 ::+    GHC.Exception.SomeException+    -> GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 2, Strictness: <S,1*U><S,U>,+     Unfolding: (\ (e1 :: GHC.Exception.SomeException)[OneShot]+                   (eta :: GHC.Prim.State# GHC.Prim.RealWorld)[OneShot] ->+                 case e1 of wild { GHC.Exception.SomeException e2 $dException1 e3 ->+                 case Data.Typeable.Internal.typeRepFingerprint+                        @ *+                        @ e2+                        (GHC.Exception.$p1Exception @ e2 $dException1)+                          `cast`+                        (Data.Typeable.Internal.N:Typeable[0] <*>_N <e2>_N) of wild1 { GHC.Fingerprint.Type.Fingerprint dt dt1 ->+                 case GHC.IO.Exception.$fExceptionIOException4 of wild2 { GHC.Fingerprint.Type.Fingerprint dt2 dt3 ->+                 case GHC.Prim.eqWord# dt dt2 of lwild {+                   DEFAULT+                   -> GHC.Prim.raiseIO#+                        @ GHC.Exception.SomeException+                        @ GHC.Base.String+                        wild+                        eta+                   1#+                   -> case GHC.Prim.eqWord# dt1 dt3 of lwild1 {+                        DEFAULT+                        -> GHC.Prim.raiseIO#+                             @ GHC.Exception.SomeException+                             @ GHC.Base.String+                             wild+                             eta+                        1# -> (# eta, Paths_do.getLibexecDir3 #) } } } } }) -}+8496a1c7094088d4c920b5720e77e1bd+  getLibexecDir3 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString#+                   Paths_do.getLibexecDir4) -}+9c02d7b0ccc699bace6e3fa649720d7b+  getLibexecDir4 :: GHC.Prim.Addr#+  {- HasNoCafRefs,+     Unfolding: ("/Users/joshuagrosso/Repositories/axel/examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/libexec/x86_64-osx-ghc-8.4.3/do-0.1.0.0"#) -}+25a0ed550f2aae2e88c89b5973f437de+  getLibexecDir5 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case (GHC.Magic.noinline+                         @ (GHC.Types.IO GHC.IO.Encoding.Types.TextEncoding)+                         GHC.IO.Encoding.getForeignEncoding)+                        `cast`+                      (GHC.Types.N:IO[0] <GHC.IO.Encoding.Types.TextEncoding>_R)+                        s of ds1 { (#,#) ipv ipv1 ->+                 case GHC.Foreign.charIsRepresentable3+                        @ (GHC.Base.Maybe GHC.Base.String)+                        ipv1+                        Paths_do.getLibexecDir6+                        System.Environment.getEnv3+                          `cast`+                        (<Foreign.C.String.CString>_R+                         ->_R Sym (GHC.Types.N:IO[0] <GHC.Base.Maybe GHC.Base.String>_R))+                        ipv of ds2 { (#,#) ipv2 ipv3 ->+                 case ipv3 of wild {+                   GHC.Base.Nothing+                   -> System.Environment.getEnv2 ipv2 Paths_do.getLibexecDir6+                   GHC.Base.Just x -> (# ipv2, x #) } } }) -}+4d7217315a7633d318d360409d63ecb3+  getLibexecDir6 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString#+                   Paths_do.getLibexecDir7) -}+65433b38d26e9f45271c100803df8078+  getLibexecDir7 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("do_libexecdir"#) -}+0884130020d0960d3c7cb598dda6e7e8+  getSysconfDir :: GHC.Types.IO GHC.IO.FilePath+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: InlineRule (0, True, True)+                Paths_do.getSysconfDir1+                  `cast`+                (Sym (GHC.Types.N:IO[0] <GHC.Base.String>_R)) -}+3e6a59bb3d044bf3b79d09d11e9f8ff9+  getSysconfDir1 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (eta :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 GHC.Prim.catch#+                   @ GHC.Base.String+                   @ GHC.Exception.SomeException+                   Paths_do.getSysconfDir5+                   Paths_do.getSysconfDir2+                   eta) -}+887ee078c30c7c959b6d9aa229a5a8d6+  getSysconfDir2 ::+    GHC.Exception.SomeException+    -> GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 2, Strictness: <S,1*U><S,U>,+     Unfolding: (\ (e1 :: GHC.Exception.SomeException)[OneShot]+                   (eta :: GHC.Prim.State# GHC.Prim.RealWorld)[OneShot] ->+                 case e1 of wild { GHC.Exception.SomeException e2 $dException1 e3 ->+                 case Data.Typeable.Internal.typeRepFingerprint+                        @ *+                        @ e2+                        (GHC.Exception.$p1Exception @ e2 $dException1)+                          `cast`+                        (Data.Typeable.Internal.N:Typeable[0] <*>_N <e2>_N) of wild1 { GHC.Fingerprint.Type.Fingerprint dt dt1 ->+                 case GHC.IO.Exception.$fExceptionIOException4 of wild2 { GHC.Fingerprint.Type.Fingerprint dt2 dt3 ->+                 case GHC.Prim.eqWord# dt dt2 of lwild {+                   DEFAULT+                   -> GHC.Prim.raiseIO#+                        @ GHC.Exception.SomeException+                        @ GHC.Base.String+                        wild+                        eta+                   1#+                   -> case GHC.Prim.eqWord# dt1 dt3 of lwild1 {+                        DEFAULT+                        -> GHC.Prim.raiseIO#+                             @ GHC.Exception.SomeException+                             @ GHC.Base.String+                             wild+                             eta+                        1# -> (# eta, Paths_do.getSysconfDir3 #) } } } } }) -}+a306cd5c8b7a5cbe26c38746173970d9+  getSysconfDir3 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString#+                   Paths_do.getSysconfDir4) -}+48fb04364039ae6a84a62f16fc3f39b1+  getSysconfDir4 :: GHC.Prim.Addr#+  {- HasNoCafRefs,+     Unfolding: ("/Users/joshuagrosso/Repositories/axel/examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/etc"#) -}+541b95ba12094aa71f3450c5bdccb48b+  getSysconfDir5 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Base.String #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case (GHC.Magic.noinline+                         @ (GHC.Types.IO GHC.IO.Encoding.Types.TextEncoding)+                         GHC.IO.Encoding.getForeignEncoding)+                        `cast`+                      (GHC.Types.N:IO[0] <GHC.IO.Encoding.Types.TextEncoding>_R)+                        s of ds1 { (#,#) ipv ipv1 ->+                 case GHC.Foreign.charIsRepresentable3+                        @ (GHC.Base.Maybe GHC.Base.String)+                        ipv1+                        Paths_do.getSysconfDir6+                        System.Environment.getEnv3+                          `cast`+                        (<Foreign.C.String.CString>_R+                         ->_R Sym (GHC.Types.N:IO[0] <GHC.Base.Maybe GHC.Base.String>_R))+                        ipv of ds2 { (#,#) ipv2 ipv3 ->+                 case ipv3 of wild {+                   GHC.Base.Nothing+                   -> System.Environment.getEnv2 ipv2 Paths_do.getSysconfDir6+                   GHC.Base.Just x -> (# ipv2, x #) } } }) -}+7479f9750e72c44bc260c0894c79399e+  getSysconfDir6 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString#+                   Paths_do.getSysconfDir7) -}+9c4ef60a8cfe5de870f93bdd7986c340+  getSysconfDir7 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("do_sysconfdir"#) -}+ac8fcbd81bf23f86213e718e00f7040a+  version :: Data.Version.Version+  {- HasNoCafRefs, Strictness: m,+     Unfolding: (Data.Version.Version+                   Paths_do.version1+                   (GHC.Types.[] @ GHC.Base.String)) -}+bb7fe66f98880af9869152b2b9803d60+  version1 :: [GHC.Types.Int]+  {- HasNoCafRefs, Strictness: m2,+     Unfolding: (GHC.Types.:+                   @ GHC.Types.Int+                   Paths_do.version5+                   Paths_do.version2) -}+be3cbaf1e28489e40c834f2ff7139820+  version2 :: [GHC.Types.Int]+  {- HasNoCafRefs, Strictness: m2,+     Unfolding: (GHC.Types.:+                   @ GHC.Types.Int+                   Paths_do.version6+                   Paths_do.version3) -}+7d8bf9f26da2ccadcae8ea4e912b3a83+  version3 :: [GHC.Types.Int]+  {- HasNoCafRefs, Strictness: m2,+     Unfolding: (GHC.Types.:+                   @ GHC.Types.Int+                   Paths_do.version5+                   Paths_do.version4) -}+bf07632b985976ed33490b63d264125a+  version4 :: [GHC.Types.Int]+  {- HasNoCafRefs, Strictness: m2,+     Unfolding: (GHC.Types.:+                   @ GHC.Types.Int+                   Paths_do.version5+                   (GHC.Types.[] @ GHC.Types.Int)) -}+423a1d5d87bc85921d0a68dc0927c578+  version5 :: GHC.Types.Int+  {- HasNoCafRefs, Strictness: m, Unfolding: (GHC.Types.I# 0#) -}+c66b954b790419114b1834b054248db7+  version6 :: GHC.Types.Int+  {- HasNoCafRefs, Strictness: m, Unfolding: (GHC.Types.I# 1#) -}+vectorised variables:+vectorised tycons:+vectorised reused tycons:+parallel variables:+parallel tycons:+trusted: safe+require own pkg trusted: False+
+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/do-exe-tmp/Main.hi view

binary file changed (absent → 2465 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/do-exe-tmp/Main.o view

binary file changed (absent → 3164 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/do-exe-tmp/Paths_do.hi view

binary file changed (absent → 16003 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/do-exe-tmp/Paths_do.o view

binary file changed (absent → 23380 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/do-exe/do-exe-tmp/app/Main.dump-hi view
@@ -0,0 +1,90 @@++==================== FINAL INTERFACE ====================+2018-07-21 20:15:37.346251 UTC++interface main:Main 8043+  interface hash: f4aad249a572aaccc0d5b792c5365a09+  ABI hash: b48a2cd7ccebb4d45a72b25b7907fc5d+  export-list hash: c1f98a35e15b213b50e77cd700ab146f+  orphan hash: 693e9af84d3dfcc71e640e005bdc5e2e+  flag hash: 385167d368051acb2ee8457dfc7d7d4d+  opt_hash: 14e536840aca4e889cad654e6f9b79c1+  hpc_hash: 93b885adfe0da089cdf634904fd59f71+  sig of: Nothing+  used TH splices: False+  where+exports:+  Main.main+module dependencies:+package dependencies: base-4.11.1.0* ghc-prim-0.5.2.0+                      integer-gmp-1.0.2.0+orphans: base-4.11.1.0:GHC.Float base-4.11.1.0:GHC.Base+family instance modules: base-4.11.1.0:Control.Applicative+                         base-4.11.1.0:Data.Functor.Const+                         base-4.11.1.0:Data.Functor.Identity base-4.11.1.0:Data.Monoid+                         base-4.11.1.0:Data.Semigroup.Internal base-4.11.1.0:GHC.Generics+                         base-4.11.1.0:GHC.IO.Exception+import  -/  base-4.11.1.0:GHC.Base 604111500e81281298777e721c75643b+import  -/  base-4.11.1.0:Prelude 0750c25585e2b797cd78291d423d39dd+import  -/  base-4.11.1.0:System.IO ce09fff7d191d14067bddc2efd9b53a4+import  -/  ghc-prim-0.5.2.0:GHC.Types d9b3023de7feae4a5308d643da5543f7+be86c9d078d3acbf19ba91fe74a24273+  $trModule :: GHC.Types.Module+  {- HasNoCafRefs, Strictness: m,+     Unfolding: (GHC.Types.Module Main.$trModule3 Main.$trModule1) -}+b09d86f2c49dd5176b544d8d13ddb6c5+  $trModule1 :: GHC.Types.TrName+  {- HasNoCafRefs, Strictness: m1,+     Unfolding: (GHC.Types.TrNameS Main.$trModule2) -}+e5875966b74dad2d29772660b8a75e33+  $trModule2 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("Main"#) -}+23b03bd7d075a00f5ad1ee10e6add7b8+  $trModule3 :: GHC.Types.TrName+  {- HasNoCafRefs, Strictness: m1,+     Unfolding: (GHC.Types.TrNameS Main.$trModule4) -}+d026be77cb9ced20e35a61514e0458aa+  $trModule4 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("main"#) -}+5ef53ceef132a1ea0eb4ea5bc4d6af6d+  main :: GHC.Types.IO ()+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: InlineRule (0, True, True)+                Main.main1 `cast` (Sym (GHC.Types.N:IO[0] <()>_R)) -}+b146918497a1499ea4e5bfec397b02b1+  main1 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)+  {- Arity: 1, Strictness: <S,U>,+     Unfolding: (\ (s :: GHC.Prim.State# GHC.Prim.RealWorld) ->+                 case GHC.IO.Handle.Internals.wantReadableHandle_1+                        @ GHC.Base.String+                        GHC.IO.Handle.Text.hGetLine4+                        GHC.IO.Handle.FD.stdin+                        GHC.IO.Handle.Text.hGetLine2+                          `cast`+                        (<GHC.IO.Handle.Types.Handle__>_R+                         ->_R Sym (GHC.Types.N:IO[0] <GHC.Base.String>_R))+                        s of ds1 { (#,#) ipv ipv1 ->+                 case GHC.IO.Handle.Text.hPutStr2+                        GHC.IO.Handle.FD.stdout+                        ipv1+                        GHC.Types.True+                        ipv of ds2 { (#,#) ipv2 ipv3 ->+                 (# ipv2, GHC.Tuple.() #) } }) -}+42aeb51cb86bb6d725ead93931e7aeea+  main2 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)+  {- Arity: 1,+     Unfolding: (GHC.TopHandler.runMainIO1+                   @ ()+                   Main.main1 `cast` (Sym (GHC.Types.N:IO[0] <()>_R))) -}+vectorised variables:+vectorised tycons:+vectorised reused tycons:+parallel variables:+parallel tycons:+trusted: safe+require own pkg trusted: False+
+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/libHSdo-0.1.0.0-84i3CClUbe35xQ9SiCfZTm-ghc8.4.3.dylib view

binary file changed (absent → 37012 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/libHSdo-0.1.0.0-84i3CClUbe35xQ9SiCfZTm.a view

binary file changed (absent → 40848 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/src/Lib.dump-hi view
@@ -0,0 +1,76 @@++==================== FINAL INTERFACE ====================+2018-07-15 17:45:26.929525 UTC++interface do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm:Lib 8043+  interface hash: e86e00edd7e210d4d1984cef12c64269+  ABI hash: 19def5947ddea6309ef88f5ebcd54885+  export-list hash: 0aad55ddd31944cc3fac8963098c0752+  orphan hash: 693e9af84d3dfcc71e640e005bdc5e2e+  flag hash: 8f52f5e5828eb5661f405d8d9ca450ec+  opt_hash: 14e536840aca4e889cad654e6f9b79c1+  hpc_hash: 93b885adfe0da089cdf634904fd59f71+  sig of: Nothing+  used TH splices: False+  where+exports:+  Lib.someFunc+module dependencies:+package dependencies: base-4.11.1.0* ghc-prim-0.5.2.0+                      integer-gmp-1.0.2.0+orphans: base-4.11.1.0:GHC.Float base-4.11.1.0:GHC.Base+family instance modules: base-4.11.1.0:Control.Applicative+                         base-4.11.1.0:Data.Functor.Const+                         base-4.11.1.0:Data.Functor.Identity base-4.11.1.0:Data.Monoid+                         base-4.11.1.0:Data.Semigroup.Internal base-4.11.1.0:GHC.Generics+                         base-4.11.1.0:GHC.IO.Exception+import  -/  base-4.11.1.0:Prelude 0750c25585e2b797cd78291d423d39dd+import  -/  base-4.11.1.0:System.IO ce09fff7d191d14067bddc2efd9b53a4+import  -/  ghc-prim-0.5.2.0:GHC.Types d9b3023de7feae4a5308d643da5543f7+bafc32b455ed820fcb5800bac54b262e+  $trModule :: GHC.Types.Module+  {- HasNoCafRefs, Strictness: m,+     Unfolding: (GHC.Types.Module Lib.$trModule3 Lib.$trModule1) -}+c5a5e21a1a397515fb8814633f9f2c97+  $trModule1 :: GHC.Types.TrName+  {- HasNoCafRefs, Strictness: m1,+     Unfolding: (GHC.Types.TrNameS Lib.$trModule2) -}+cc007fb6c82dc90be378d452c40ed3b5+  $trModule2 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("Lib"#) -}+a8965623f61e27e51532a36628725a64+  $trModule3 :: GHC.Types.TrName+  {- HasNoCafRefs, Strictness: m1,+     Unfolding: (GHC.Types.TrNameS Lib.$trModule4) -}+e3004c67dbfc9bb27067f19c2b19c22e+  $trModule4 :: GHC.Prim.Addr#+  {- HasNoCafRefs,+     Unfolding: ("do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm"#) -}+44149981aa85065e44d6400119436a01+  someFunc :: GHC.Types.IO ()+  {- Arity: 1,+     Unfolding: InlineRule (0, True, True)+                Lib.someFunc1 `cast` (Sym (GHC.Types.N:IO[0] <()>_R)) -}+eb73bf67f1f70b4261fd40dccd1172e7+  someFunc1 ::+    GHC.Prim.State# GHC.Prim.RealWorld+    -> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)+  {- Arity: 1,+     Unfolding: (GHC.IO.Handle.Text.hPutStr2+                   GHC.IO.Handle.FD.stdout+                   Lib.someFunc2+                   GHC.Types.True) -}+c8d5c40280fa2acb25fd003109b6fb03+  someFunc2 :: [GHC.Types.Char]+  {- Unfolding: (GHC.CString.unpackCString# Lib.someFunc3) -}+3d385387148d1e9a032ff6ee00ad76c5+  someFunc3 :: GHC.Prim.Addr#+  {- HasNoCafRefs, Unfolding: ("someFunc"#) -}+vectorised variables:+vectorised tycons:+vectorised reused tycons:+parallel variables:+parallel tycons:+trusted: safe+require own pkg trusted: False+
+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/package.conf.inplace/package.cache view

binary file changed (absent → 40 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/package.conf.inplace/package.cache.lock view
+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/setup-config view

binary file changed (absent → 79545 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/exe-do-exe view

binary file changed (absent → 1005 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/lib view

binary file changed (absent → 1531 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-build-caches/test-do-test view

binary file changed (absent → 1539 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-cabal-mod view

binary file changed (absent → 50 bytes)

+ examples/do/.stack-work/dist/x86_64-osx/Cabal-2.2.0.1/stack-config-cache view

binary file changed (absent → 5319 bytes)

+ examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/bin/do-exe view

binary file changed (absent → 1142740 bytes)

+ examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/doc/do-0.1.0.0/LICENSE view
@@ -0,0 +1,30 @@+Copyright Author name here (c) 2018++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.++    * Neither the name of Author name here nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/flag-cache/do-0.1.0.0 view

binary file changed (absent → 5319 bytes)

+ examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/flag-cache/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm view

binary file changed (absent → 5079 bytes)

+ examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm/Lib.dyn_hi view

binary file changed (absent → 1964 bytes)

+ examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm/Lib.hi view

binary file changed (absent → 1952 bytes)

+ examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm/Paths_do.dyn_hi view

binary file changed (absent → 16002 bytes)

+ examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm/Paths_do.hi view

binary file changed (absent → 15990 bytes)

+ examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/do-0.1.0.0-84i3CClUbe35xQ9SiCfZTm/libHSdo-0.1.0.0-84i3CClUbe35xQ9SiCfZTm.a view

binary file changed (absent → 40848 bytes)

+ examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/lib/x86_64-osx-ghc-8.4.3/libHSdo-0.1.0.0-84i3CClUbe35xQ9SiCfZTm-ghc8.4.3.dylib view

binary file changed (absent → 37012 bytes)

+ examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/pkgdb/package.cache view

binary file changed (absent → 40 bytes)

+ examples/do/.stack-work/install/x86_64-osx/lts-12.0/8.4.3/pkgdb/package.cache.lock view
+ examples/do/.stack-work/intero/interoMkMX0r-TEMP.hs view
@@ -0,0 +1,4 @@+do' :: ((->) ([] AST.Expression) AST.Expression)+do'  = (\aXEL_AUTOGENERATED_IDENTIFIER_0 -> (case aXEL_AUTOGENERATED_IDENTIFIER_0 of {((:) var ((:) (AST.Symbol "<-") ((:) val rest))) -> (AST.SExpression (concat [[(AST.Symbol ">>=")],[val],[(AST.SExpression (concat [[(AST.Symbol "fn")],[(AST.SExpression (concat [[var]]))],[(do' rest)]]))]]));((:) val rest) -> (case rest of {[] -> val;_ -> (AST.SExpression (concat [[(AST.Symbol ">>")],[val],[(do' rest)]]))})}))+main :: (IO ())+main  = ((>>=) getLine (\line -> ((>>) (putStrLn line) (pure ()))))
+ examples/do/.stack-work/intero/interokbXBrc-TEMP.hs view
@@ -0,0 +1,5 @@+module Main where+do' :: ((->) ([] AST.Expression) AST.Expression)+do'  = (fnCase (((:) var ((:) (AST.Symbol "<-") ((:) val rest))) (AST.SExpression (concat [[(AST.Symbol ">>=")],[val],[(AST.SExpression (concat [[(AST.Symbol "fn")],[(AST.SExpression (concat [[var]]))],[(do' rest)]]))]]))) (((:) val rest) (case rest of {[] -> val;_ -> (AST.SExpression (concat [[(AST.Symbol ">>")],[val],[(do' rest)]]))})))+main :: (IO ())+main  = (do line (<-) getLine (putStrLn line) (pure ()))
+ examples/do/Setup.axel view
@@ -0,0 +1,4 @@+(import Distribution.Simple (defaultMain))++(= main (IO Unit)+  (() defaultMain))
+ examples/do/Setup.hs view
@@ -0,0 +1,3 @@+import Distribution.Simple(defaultMain)+main :: (IO ())+main  = defaultMain
+ examples/do/app/Main.axel view
@@ -0,0 +1,44 @@+(module Main)++(importq Axel.Parse.AST AST all)++(defmacro quasiquote+  (([(AST.SExpression xs)])+   (let ((quasiquoteElem (fn (x) (case x+                                   ((AST.SExpression ['unquote x])+                                    (AST.SExpression ['list x]))+                                   ((AST.SExpression ['unquoteSplicing x])+                                    x)+                                   (atom+                                    (AST.SExpression+                                     ['list+                                      (AST.SExpression ['quasiquote atom])]))))))+     (pure [(AST.SExpression ['AST.SExpression (AST.SExpression ['concat (AST.SExpression (: 'list (map quasiquoteElem xs)))])])])))+  (([atom]) (pure [(AST.SExpression ['quote atom])])))++(defmacro fnCase+  ((cases) (<$> (fn (varId)+                  [`(fn (~varId)+                      (case ~varId ~@cases))])+                AST.gensym)))++(= do' (-> ([] AST.Expression) AST.Expression)+   (() (fnCase+        ((: var (: '<- (: val rest)))+         `(>>= ~val (fn (~var) ~(do' rest))))+        ((: val rest)+         (case rest+           ([]+            val)+           (_+            `(>> ~val ~(do' rest))))))))++(defmacro do+  ((input)+   (pure [(do' input)])))++(= main (IO Unit)+   (() (do+         line <- getLine+         (putStrLn line)+         (pure unit))))
+ examples/do/app/Main.hs view
@@ -0,0 +1,5 @@+import Axel.Parse.AST as AST+do' :: ((->) ([] AST.Expression) AST.Expression)+do'  = (\aXEL_AUTOGENERATED_IDENTIFIER_0 -> (case aXEL_AUTOGENERATED_IDENTIFIER_0 of {((:) var ((:) (AST.Symbol "<-") ((:) val rest))) -> (AST.SExpression (concat [[(AST.Symbol ">>=")],[val],[(AST.SExpression (concat [[(AST.Symbol "fn")],[(AST.SExpression (concat [[var]]))],[(do' rest)]]))]]));((:) val rest) -> (case rest of {[] -> val;_ -> (AST.SExpression (concat [[(AST.Symbol ">>")],[val],[(do' rest)]]))})}))+main :: (IO ())+main  = ((>>=) getLine (\line -> ((>>) (putStrLn line) (pure ()))))
+ examples/do/cabal.project.local view
@@ -0,0 +1,23 @@+solver: modular+doc-index-file: $datadir/doc/$arch-$os-$compiler/index.html+max-backjumps: 2000+reorder-goals: False+count-conflicts: True+strong-flags: False+allow-boot-library-installs: False+remote-build-reporting: none+report-planning-failure: False+per-component: True+one-shot: False+keep-going: False+offline: False+documentation: False+haddock-keep-temp-files: False+haddock-hoogle: False+haddock-html: False+haddock-executables: False+haddock-tests: False+haddock-benchmarks: False+haddock-foreign-libraries: False+haddock-internal: False+haddock-hyperlink-source: False
+ examples/do/dist-newstyle/cache/compiler view

binary file changed (absent → 15014 bytes)

+ examples/do/dist-newstyle/cache/config view

binary file changed (absent → 2940 bytes)

+ examples/do/dist-newstyle/cache/elaborated-plan view

binary file changed (absent → 39480 bytes)

+ examples/do/dist-newstyle/cache/improved-plan view

binary file changed (absent → 61588 bytes)

+ examples/do/dist-newstyle/cache/plan.json view
@@ -0,0 +1,1 @@+{"cabal-version":"2.0.0.1","cabal-lib-version":"2.0.1.1","compiler-id":"ghc-8.4.3","os":"osx","arch":"x86_64","install-plan":[{"type":"pre-existing","id":"base-4.11.1.0","pkg-name":"base","pkg-version":"4.11.1.0","depends":["rts","ghc-prim-0.5.2.0","integer-gmp-1.0.2.0"]},{"type":"configured","id":"do-0.1.0.0-inplace-do-exe","pkg-name":"do","pkg-version":"0.1.0.0","flags":{},"style":"local","dist-dir":"/Users/joshuagrosso/Repositories/axel/examples/do/dist-newstyle/build/x86_64-osx/ghc-8.4.3/do-0.1.0.0/c/do-exe","depends":["base-4.11.1.0"],"exe-depends":[],"component-name":"exe:do-exe","bin-file":"/Users/joshuagrosso/Repositories/axel/examples/do/dist-newstyle/build/x86_64-osx/ghc-8.4.3/do-0.1.0.0/c/do-exe/build/do-exe/do-exe"},{"type":"pre-existing","id":"ghc-prim-0.5.2.0","pkg-name":"ghc-prim","pkg-version":"0.5.2.0","depends":["rts"]},{"type":"pre-existing","id":"integer-gmp-1.0.2.0","pkg-name":"integer-gmp","pkg-version":"1.0.2.0","depends":["ghc-prim-0.5.2.0"]},{"type":"pre-existing","id":"rts","pkg-name":"rts","pkg-version":"1.0","depends":[]}]}
+ examples/do/dist-newstyle/cache/solver-plan view

binary file changed (absent → 36977 bytes)

+ examples/do/dist-newstyle/cache/source-hashes view

binary file changed (absent → 119 bytes)

+ examples/do/do.cabal view
@@ -0,0 +1,36 @@+-- This file has been generated from package.yaml by hpack version 0.28.2.+--+-- see: https://github.com/sol/hpack+--+-- hash: f7f02d7dc09b60ab3bdd028fc7f8a2a6cf1e0c5002b70577149923eb547abf44++name:           do+version:        0.1.0.0+description:    Please see the README on GitHub at <https://github.com/githubuser/do#readme>+homepage:       https://github.com/githubuser/do#readme+bug-reports:    https://github.com/githubuser/do/issues+author:         Author name here+maintainer:     example@example.com+copyright:      2018 Author name here+license:        BSD3+build-type:     Simple+cabal-version:  >= 1.10+extra-source-files:+    ChangeLog.md+    README.md++source-repository head+  type: git+  location: https://github.com/githubuser/do++executable do-exe+  main-is: Main.hs+  other-modules:+      Paths_do+  hs-source-dirs:+      app+  ghc-options: -threaded -rtsopts -with-rtsopts=-N+  build-depends:+      axel ==0.1.0.0+    , base >=4.7 && <5+  default-language: Haskell2010
+ examples/do/package.yaml view
@@ -0,0 +1,23 @@+copyright: 2018 Author name here+maintainer: example@example.com+dependencies:+- axel ==0.1.0.0+- base >= 4.7 && < 5+name: do+version: '0.1.0.0'+extra-source-files:+- README.md+- ChangeLog.md+author: Author name here+github: githubuser/do+license: BSD3+executables:+  do-exe:+    source-dirs: app+    main: Main.hs+    ghc-options:+    - -threaded+    - -rtsopts+    - -with-rtsopts=-N+    dependencies: []+description: Please see the README on GitHub at <https://github.com/githubuser/do#readme>
+ examples/do/stack.yaml view
@@ -0,0 +1,65 @@+# This file was automatically generated by 'stack init'+#+# Some commonly used options have been documented as comments in this file.+# For advanced use and comprehensive documentation of the format, please see:+# https://docs.haskellstack.org/en/stable/yaml_configuration/++# Resolver to choose a 'specific' stackage snapshot or a compiler version.+# A snapshot resolver dictates the compiler version and the set of packages+# to be used for project dependencies. For example:+#+# resolver: lts-3.5+# resolver: nightly-2015-09-21+# resolver: ghc-7.10.2+# resolver: ghcjs-0.1.0_ghc-7.10.2+#+# The location of a snapshot can be provided as a file or url. Stack assumes+# a snapshot provided as a file might change, whereas a url resource does not.+#+# resolver: ./custom-snapshot.yaml+# resolver: https://example.com/snapshots/2018-01-01.yaml+resolver: lts-12.0++# User packages to be built.+# Various formats can be used as shown in the example below.+#+# packages:+# - some-directory+# - https://example.com/foo/bar/baz-0.0.2.tar.gz+# - location:+#    git: https://github.com/commercialhaskell/stack.git+#    commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a+# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a+#  subdirs:+#  - auto-update+#  - wai+packages:+- .+# Dependency packages to be pulled from upstream that are not in the resolver+# using the same syntax as the packages field.+# (e.g., acme-missiles-0.3)+# extra-deps: []++# Override default flag values for local packages and extra-deps+# flags: {}++# Extra package databases containing global packages+# extra-package-dbs: []++# Control whether we use the GHC we find on the path+# system-ghc: true+#+# Require a specific version of stack, using version ranges+# require-stack-version: -any # Default+# require-stack-version: ">=1.7"+#+# Override the architecture used by stack, especially useful on Windows+# arch: i386+# arch: x86_64+#+# Extra directories used by stack for building+# extra-include-dirs: [/path/to/dir]+# extra-lib-dirs: [/path/to/dir]+#+# Allow a newer minor version of GHC than the snapshot specifies+# compiler-check: newer-minor
+ examples/example.axel view
@@ -0,0 +1,30 @@+-- This is just an example, and, since it's partial, is NOT advised for actual use.+(defmacro' when+  (([condition body]) (pure [`(if ~condition ~body (error "WHEN"))])))++(defmacro defmacro'+  ((exprs)+   (pure [`(defmacro ~@exprs)])))++(defmacro if+  (([cond true false])+   (pure [`(case ~cond+             (True ~true)+             (False ~false))])))++(defmacro quasiquote+  (([(AST.SExpression xs)])+   (let ((quasiquoteElem (fn (x) (case x+                                   ((AST.SExpression ['unquote x])+                                    (AST.SExpression ['list x]))+                                   ((AST.SExpression ['unquoteSplicing x])+                                    x)+                                   (atom+                                    (AST.SExpression+                                     ['list+                                      (AST.SExpression ['quasiquote atom])]))))))+     (pure [(AST.SExpression ['AST.SExpression (AST.SExpression ['concat (AST.SExpression (: 'list (map quasiquoteElem xs)))])])])))+  (([atom]) (pure [(AST.SExpression ['quote atom])])))++(= main (IO Unit)+   (() (if (== 1 1) (putStrLn "Hi!") (putStrLn "wat"))))
+ resources/autogenerated/macros/AST.hs view
@@ -0,0 +1,46 @@+-- NOTE Because this file will be used as the header of auto-generated macro programs,+--      it can't have any project-specific dependencies (such as `Fix`).+module Axel.Parse.AST where++import           Data.IORef                     ( IORef+                                                , modifyIORef+                                                , newIORef+                                                , readIORef+                                                )++import           System.IO.Unsafe               ( unsafePerformIO )++-- TODO `Expression` should probably be `Traversable`, use recursion schemes, etc.+--      I should provide `toFix` and `fromFix` functions for macros to take advantage of.+--      (Maybe all macros have the argument automatically `fromFix`-ed to make consumption simpler?)+data Expression+  = LiteralChar Char+  | LiteralInt Int+  | LiteralString String+  | SExpression [Expression]+  | Symbol String+  deriving (Eq, Show)++-- ******************************+-- Internal utilities+-- ******************************+toAxel :: Expression -> String+toAxel (LiteralChar   x ) = ['\\', x]+toAxel (LiteralInt    x ) = show x+toAxel (LiteralString xs) = "\"" ++ xs ++ "\""+toAxel (SExpression   xs) = "(" ++ unwords (map toAxel xs) ++ ")"+toAxel (Symbol        x ) = x++-- ******************************+-- Macro definition utilities+-- ******************************+{-# NOINLINE gensymCounter #-}+gensymCounter :: IORef Int+gensymCounter = unsafePerformIO $ newIORef 0++gensym :: IO Expression+gensym = do+  suffix <- readIORef gensymCounter+  let identifier = "aXEL_AUTOGENERATED_IDENTIFIER_" ++ show suffix+  modifyIORef gensymCounter succ+  pure $ Symbol identifier
+ resources/macros/MacroDefinitionAndEnvironmentHeader.hs view
@@ -0,0 +1,3 @@+module MacroDefinitionAndEnvironment where++import qualified Axel.Parse.AST as AST
+ resources/macros/Scaffold.hs view
@@ -0,0 +1,10 @@+module Scaffold where++import Axel.Parse.AST+import qualified MacroDefinitionAndEnvironment as MacroDefinitionAndEnvironment++main :: IO ()+main = do+  result <-+    MacroDefinitionAndEnvironment.%%%MACRO_NAME%%% %%%ARGUMENTS%%%+  putStrLn $ unlines $ map toAxel result
+ resources/new-project-template/Setup.axel view
@@ -0,0 +1,4 @@+(import Distribution.Simple (defaultMain))++(= main (IO Unit)+  (() defaultMain))
+ resources/new-project-template/Setup.hs view
@@ -0,0 +1,3 @@+import Distribution.Simple(defaultMain)+main :: (IO ())+main  = defaultMain
+ resources/new-project-template/app/Main.axel view
@@ -0,0 +1,6 @@+(module Main)++(importUnrestricted Lib)++(= main (IO Unit)+  (() someFunc))
+ resources/new-project-template/app/Main.hs view
@@ -0,0 +1,4 @@+module Main where+import Lib+main :: (IO ())+main  = someFunc
+ resources/new-project-template/src/Lib.axel view
@@ -0,0 +1,4 @@+(module Lib)++(= someFunc (IO Unit)+  (() (putStrLn "someFunc")))
+ resources/new-project-template/src/Lib.hs view
@@ -0,0 +1,3 @@+module Lib where+someFunc :: (IO ())+someFunc  = (putStrLn "someFunc")
+ resources/new-project-template/test/Spec.axel view
@@ -0,0 +1,2 @@+(= main (IO Unit)+  (() (putStrLn "Test suite not yet implemented")))
+ resources/new-project-template/test/Spec.hs view
@@ -0,0 +1,2 @@+main :: (IO ())+main  = (putStrLn "Test suite not yet implemented")
+ scripts/build.sh view
@@ -0,0 +1,9 @@+set -eu+set -o pipefail++echo "Copying macro header..."+mkdir -p resources/autogenerated/macros+cp src/Axel/Parse/AST.hs resources/autogenerated/macros/AST.hs+echo "Macro header copied!"++stack build
+ scripts/clean.sh view
@@ -0,0 +1,8 @@+set -eu+set -o pipefail++echo "Cleaning autogenerated resources..."+rm -rf resources/autogenerated+echo "Autogenerated resources cleaned!"++stack clean
+ scripts/ghcid.sh view
@@ -0,0 +1,1 @@+ghcid -c "stack ghci axel"
+ scripts/lint.sh view
@@ -0,0 +1,1 @@+hlint app src test
+ src/Axel/AST.hs view
@@ -0,0 +1,449 @@+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE FunctionalDependencies #-}+{-# LANGUAGE InstanceSigs #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TupleSections #-}++module Axel.AST where++import Axel.Error (fatal)+import Axel.Utils.Display+  ( Bracket(DoubleQuotes, Parentheses, SingleQuotes, SquareBrackets)+  , Delimiter(Commas, Newlines, Pipes, Spaces)+  , delimit+  , isOperator+  , renderBlock+  , renderPragma+  , surround+  )+import Axel.Utils.Recursion (Recursive(bottomUpFmap, bottomUpTraverse))++import Control.Arrow ((***))+import Control.Lens.Operators ((%~), (^.))+import Control.Lens.TH (makeFieldsNoPrefix)+import Control.Lens.Tuple (_1, _2)++import Data.Function ((&))+import Data.Semigroup ((<>))++class ToHaskell a where+  toHaskell :: a -> String++type Identifier = String++data CaseBlock = CaseBlock+  { _expr :: Expression+  , _matches :: [(Expression, Expression)]+  } deriving (Eq)++data FunctionApplication = FunctionApplication+  { _function :: Expression+  , _arguments :: [Expression]+  } deriving (Eq)++newtype TopLevel = TopLevel+  { _statements :: [Statement]+  } deriving (Eq)++data TypeDefinition+  = ProperType Identifier+  | TypeConstructor FunctionApplication+  deriving (Eq)++instance ToHaskell TypeDefinition where+  toHaskell :: TypeDefinition -> String+  toHaskell (ProperType x) = x+  toHaskell (TypeConstructor x) = toHaskell x++data DataDeclaration = DataDeclaration+  { _typeDefinition :: TypeDefinition+  , _constructors :: [FunctionApplication]+  } deriving (Eq)++newtype ArgumentList =+  ArgumentList [Expression]+  deriving (Eq)++instance ToHaskell ArgumentList where+  toHaskell :: ArgumentList -> String+  toHaskell (ArgumentList arguments) = delimit Spaces $ map toHaskell arguments++data FunctionDefinition = FunctionDefinition+  { _name :: Identifier+  , _typeSignature :: FunctionApplication+  , _definitions :: [(ArgumentList, Expression)]+  } deriving (Eq)++data Import+  = ImportItem Identifier+  | ImportType Identifier+               [Identifier]+  deriving (Eq)++instance ToHaskell Import where+  toHaskell :: Import -> String+  toHaskell (ImportItem x) =+    if isOperator x+      then surround Parentheses x+      else x+  toHaskell (ImportType typeName imports) =+    typeName <> surround Parentheses (delimit Commas imports)++data ImportSpecification+  = ImportAll+  | ImportOnly [Import]+  deriving (Eq)++instance ToHaskell ImportSpecification where+  toHaskell :: ImportSpecification -> String+  toHaskell ImportAll = ""+  toHaskell (ImportOnly importList) =+    surround Parentheses $ delimit Commas $ map toHaskell importList++data Lambda = Lambda+  { _arguments :: [Expression]+  , _body :: Expression+  } deriving (Eq)++newtype LanguagePragma = LanguagePragma+  { _language :: Identifier+  } deriving (Eq)++data LetBlock = LetBlock+  { _bindings :: [(Expression, Expression)]+  , _body :: Expression+  } deriving (Eq)++data MacroDefinition = MacroDefinition+  { _name :: Identifier+  , _definitions :: [(ArgumentList, Expression)]+  } deriving (Eq)++data QualifiedImport = QualifiedImport+  { _moduleName :: Identifier+  , _alias :: Identifier+  , _imports :: ImportSpecification+  } deriving (Eq)++data RestrictedImport = RestrictedImport+  { _moduleName :: Identifier+  , _imports :: ImportSpecification+  } deriving (Eq)++data TypeclassInstance = TypeclassInstance+  { _instanceName :: Expression+  , _definitions :: [FunctionDefinition]+  } deriving (Eq)++data TypeSynonym = TypeSynonym+  { _alias :: Expression+  , _definition :: Expression+  } deriving (Eq)++data Expression+  = ECaseBlock CaseBlock+  | EEmptySExpression+  | EFunctionApplication FunctionApplication+  | EIdentifier Identifier+  | ELambda Lambda+  | ELetBlock LetBlock+  | ELiteral Literal+  deriving (Eq)++instance ToHaskell Expression where+  toHaskell :: Expression -> String+  toHaskell (ECaseBlock x) = toHaskell x+  toHaskell EEmptySExpression = "()"+  toHaskell (EFunctionApplication x) = toHaskell x+  toHaskell (EIdentifier x) =+    if isOperator x+      then surround Parentheses x+      else x+  toHaskell (ELambda x) = toHaskell x+  toHaskell (ELetBlock x) = toHaskell x+  toHaskell (ELiteral x) = toHaskell x++data Literal+  = LChar Char+  | LInt Int+  | LList [Expression]+  | LString String+  deriving (Eq)++instance ToHaskell Literal where+  toHaskell :: Literal -> String+  toHaskell (LChar x) = surround SingleQuotes [x]+  toHaskell (LInt x) = show x+  toHaskell (LList xs) =+    surround SquareBrackets $ delimit Commas $ map toHaskell xs+  toHaskell (LString x) = surround DoubleQuotes x++data Statement+  = SDataDeclaration DataDeclaration+  | SFunctionDefinition FunctionDefinition+  | SLanguagePragma LanguagePragma+  | SMacroDefinition MacroDefinition+  | SModuleDeclaration Identifier+  | SQualifiedImport QualifiedImport+  | SRestrictedImport RestrictedImport+  | STopLevel TopLevel+  | STypeclassInstance TypeclassInstance+  | STypeSynonym TypeSynonym+  | SUnrestrictedImport Identifier+  deriving (Eq)++instance ToHaskell Statement where+  toHaskell :: Statement -> String+  toHaskell (SDataDeclaration x) = toHaskell x+  toHaskell (SFunctionDefinition x) = toHaskell x+  toHaskell (SLanguagePragma x) = toHaskell x+  toHaskell (SMacroDefinition x) = toHaskell x+  toHaskell (SModuleDeclaration x) = "module " <> x <> " where"+  toHaskell (SQualifiedImport x) = toHaskell x+  toHaskell (SRestrictedImport x) = toHaskell x+  toHaskell (STopLevel xs) = toHaskell xs+  toHaskell (STypeclassInstance x) = toHaskell x+  toHaskell (STypeSynonym x) = toHaskell x+  toHaskell (SUnrestrictedImport x) = "import " <> x++type Program = [Statement]++makeFieldsNoPrefix ''CaseBlock++makeFieldsNoPrefix ''DataDeclaration++makeFieldsNoPrefix ''FunctionApplication++makeFieldsNoPrefix ''FunctionDefinition++makeFieldsNoPrefix ''Lambda++makeFieldsNoPrefix ''LanguagePragma++makeFieldsNoPrefix ''LetBlock++makeFieldsNoPrefix ''MacroDefinition++makeFieldsNoPrefix ''QualifiedImport++makeFieldsNoPrefix ''RestrictedImport++makeFieldsNoPrefix ''TopLevel++makeFieldsNoPrefix ''TypeclassInstance++makeFieldsNoPrefix ''TypeSynonym++instance ToHaskell CaseBlock where+  toHaskell :: CaseBlock -> String+  toHaskell caseBlock =+    surround Parentheses $+    "case " <> toHaskell (caseBlock ^. expr) <> " of " <>+    renderBlock (map matchToHaskell (caseBlock ^. matches))+    where+      matchToHaskell (pat, result) = toHaskell pat <> " -> " <> toHaskell result++instance ToHaskell FunctionApplication where+  toHaskell :: FunctionApplication -> String+  toHaskell functionApplication =+    case functionApplication ^. function of+      EIdentifier "list" ->+        surround SquareBrackets $+        delimit Commas (map toHaskell $ functionApplication ^. arguments)+      _ ->+        surround Parentheses $+        toHaskell (functionApplication ^. function) <> " " <>+        delimit Spaces (map toHaskell $ functionApplication ^. arguments)++functionDefinitionToHaskell ::+     Identifier -> (ArgumentList, Expression) -> String+functionDefinitionToHaskell functionName (pattern', definitionBody) =+  functionName <> " " <> toHaskell pattern' <> " = " <> toHaskell definitionBody++instance ToHaskell FunctionDefinition where+  toHaskell :: FunctionDefinition -> String+  toHaskell functionDefinition =+    delimit Newlines $+    (functionDefinition ^. name <> " :: " <>+     toHaskell (functionDefinition ^. typeSignature)) :+    map+      (functionDefinitionToHaskell $ functionDefinition ^. name)+      (functionDefinition ^. definitions)++instance ToHaskell DataDeclaration where+  toHaskell :: DataDeclaration -> String+  toHaskell dataDeclaration =+    "data " <> toHaskell (dataDeclaration ^. typeDefinition) <> " = " <>+    delimit+      Pipes+      (map (removeSurroundingParentheses . toHaskell) $+       dataDeclaration ^. constructors)+    where+      removeSurroundingParentheses = tail . init++instance ToHaskell Lambda where+  toHaskell :: Lambda -> String+  toHaskell lambda =+    surround Parentheses $+    "\\" <> delimit Spaces (map toHaskell (lambda ^. arguments)) <> " -> " <>+    toHaskell (lambda ^. body)++instance ToHaskell LanguagePragma where+  toHaskell :: LanguagePragma -> String+  toHaskell languagePragma =+    renderPragma $ "LANGUAGE " <> languagePragma ^. language++instance ToHaskell LetBlock where+  toHaskell :: LetBlock -> String+  toHaskell letBlock =+    surround Parentheses $+    "let " <> renderBlock (map bindingToHaskell (letBlock ^. bindings)) <>+    " in " <>+    toHaskell (letBlock ^. body)+    where+      bindingToHaskell (pattern', value) =+        toHaskell pattern' <> " = " <> toHaskell value++instance ToHaskell MacroDefinition where+  toHaskell :: MacroDefinition -> String+  toHaskell macroDefinition =+    delimit Newlines $+    (macroDefinition ^. name <> " :: [AST.Expression] -> IO [AST.Expression]") :+    map+      (functionDefinitionToHaskell $ macroDefinition ^. name)+      (macroDefinition ^. definitions)++instance ToHaskell QualifiedImport where+  toHaskell :: QualifiedImport -> String+  toHaskell qualifiedImport =+    "import " <> qualifiedImport ^. moduleName <> " as " <> qualifiedImport ^.+    alias <>+    toHaskell (qualifiedImport ^. imports)++instance ToHaskell RestrictedImport where+  toHaskell :: RestrictedImport -> String+  toHaskell restrictedImport =+    "import " <> restrictedImport ^. moduleName <>+    toHaskell (restrictedImport ^. imports)++instance ToHaskell TopLevel where+  toHaskell :: TopLevel -> String+  toHaskell topLevel = delimit Newlines $ map toHaskell (topLevel ^. statements)++instance ToHaskell TypeclassInstance where+  toHaskell :: TypeclassInstance -> String+  toHaskell typeclassInstance =+    "instance " <> toHaskell (typeclassInstance ^. instanceName) <> " where " <>+    renderBlock (map toHaskell $ typeclassInstance ^. definitions)++instance ToHaskell TypeSynonym where+  toHaskell :: TypeSynonym -> String+  toHaskell typeSynonym =+    "type " <> toHaskell (typeSynonym ^. alias) <> " = " <>+    toHaskell (typeSynonym ^. definition)++instance Recursive Expression where+  bottomUpFmap :: (Expression -> Expression) -> Expression -> Expression+  bottomUpFmap f x =+    f $+    case x of+      ECaseBlock caseBlock ->+        ECaseBlock $+        caseBlock & expr %~ bottomUpFmap f & matches %~+        map (bottomUpFmap f *** bottomUpFmap f)+      EEmptySExpression -> f x+      EFunctionApplication functionApplication ->+        EFunctionApplication $+        functionApplication & function %~ bottomUpFmap f & arguments %~+        map (bottomUpFmap f)+      EIdentifier _ -> x+      ELambda lambda ->+        ELambda $+        lambda & arguments %~ map (bottomUpFmap f) & body %~ bottomUpFmap f+      ELetBlock letBlock ->+        ELetBlock $+        letBlock & bindings %~+        map ((_1 %~ bottomUpFmap f) . (_2 %~ bottomUpFmap f)) &+        body %~+        bottomUpFmap f+      ELiteral literal ->+        case literal of+          LChar _ -> x+          LInt _ -> x+          LList exprs -> ELiteral (LList $ map (bottomUpFmap f) exprs)+          LString _ -> x+  bottomUpTraverse ::+       (Monad m) => (Expression -> m Expression) -> Expression -> m Expression+  bottomUpTraverse f x =+    f =<<+    case x of+      ECaseBlock caseBlock ->+        ECaseBlock <$>+        (CaseBlock <$> bottomUpTraverse f (caseBlock ^. expr) <*>+         traverse+           (\(a, b) -> (,) <$> bottomUpTraverse f a <*> bottomUpTraverse f b)+           (caseBlock ^. matches))+      EEmptySExpression -> pure x+      EFunctionApplication functionApplication ->+        EFunctionApplication <$>+        (FunctionApplication <$>+         bottomUpTraverse f (functionApplication ^. function) <*>+         traverse (bottomUpTraverse f) (functionApplication ^. arguments))+      EIdentifier _ -> pure x+      ELambda lambda ->+        ELambda <$>+        (Lambda <$> traverse (bottomUpTraverse f) (lambda ^. arguments) <*>+         bottomUpTraverse f (lambda ^. body))+      ELetBlock letBlock ->+        ELetBlock <$>+        (LetBlock <$>+         traverse+           (\(a, b) -> (a, ) <$> bottomUpTraverse f b)+           (letBlock ^. bindings) <*>+         bottomUpTraverse f (letBlock ^. body))+      ELiteral literal ->+        case literal of+          LChar _ -> pure x+          LInt _ -> pure x+          LList exprs ->+            ELiteral . LList <$> traverse (bottomUpTraverse f) exprs+          LString _ -> pure x++extractNameFromDefinition :: Statement -> Maybe Identifier+extractNameFromDefinition (SDataDeclaration dataDeclaration) =+  Just $+  case dataDeclaration ^. typeDefinition of+    ProperType typeName -> typeName+    TypeConstructor fnApp ->+      case fnApp ^. function of+        ELiteral (LString typeName) -> typeName+        _ -> fatal "extractNameFromDefinition" "0001"+extractNameFromDefinition (SFunctionDefinition functionDefinition) =+  Just $ functionDefinition ^. name+extractNameFromDefinition (SLanguagePragma _) = Nothing+extractNameFromDefinition (SMacroDefinition _) = Nothing+extractNameFromDefinition (SModuleDeclaration _) = Nothing+extractNameFromDefinition (SQualifiedImport _) = Nothing+extractNameFromDefinition (SRestrictedImport _) = Nothing+extractNameFromDefinition (STopLevel _) = Nothing+extractNameFromDefinition (STypeclassInstance typeclassInstance) =+  case typeclassInstance ^. instanceName of+    ELiteral (LString identifier) -> Just identifier+    _ -> Nothing+extractNameFromDefinition (STypeSynonym typeSynonym) =+  case typeSynonym ^. alias of+    ELiteral (LString identifier) -> Just identifier+    _ -> Nothing+extractNameFromDefinition (SUnrestrictedImport _) = Nothing++removeDefinitionsByName :: [String] -> [Statement] -> [Statement]+removeDefinitionsByName namesToRemove =+  filter+    (\statement ->+       not $+       case extractNameFromDefinition statement of+         Just definitionName -> definitionName `elem` namesToRemove+         Nothing -> False)
+ src/Axel/Denormalize.hs view
@@ -0,0 +1,166 @@+module Axel.Denormalize where++import Axel.AST+  ( ArgumentList(ArgumentList)+  , Expression(ECaseBlock, EEmptySExpression, EFunctionApplication,+           EIdentifier, ELambda, ELetBlock, ELiteral)+  , Import(ImportItem, ImportType)+  , ImportSpecification(ImportAll, ImportOnly)+  , Literal(LChar, LInt, LList, LString)+  , Statement(SDataDeclaration, SFunctionDefinition, SLanguagePragma,+          SMacroDefinition, SModuleDeclaration, SQualifiedImport,+          SRestrictedImport, STopLevel, STypeSynonym, STypeclassInstance,+          SUnrestrictedImport)+  , TopLevel(TopLevel)+  , TypeDefinition(ProperType, TypeConstructor)+  , alias+  , arguments+  , bindings+  , body+  , constructors+  , definition+  , definitions+  , expr+  , function+  , imports+  , instanceName+  , language+  , matches+  , moduleName+  , name+  , typeDefinition+  , typeSignature+  )+import qualified Axel.Parse as Parse+  ( Expression(LiteralChar, LiteralInt, LiteralString, SExpression,+           Symbol)+  )++import Control.Lens.Operators ((^.))++denormalizeExpression :: Expression -> Parse.Expression+denormalizeExpression (ECaseBlock caseBlock) =+  let denormalizedCases =+        map+          (\(pat, res) ->+             Parse.SExpression+               [denormalizeExpression pat, denormalizeExpression res])+          (caseBlock ^. matches)+  in Parse.SExpression $+     Parse.Symbol "case" :+     denormalizeExpression (caseBlock ^. expr) : denormalizedCases+denormalizeExpression EEmptySExpression = Parse.SExpression []+denormalizeExpression (EFunctionApplication functionApplication) =+  Parse.SExpression $+  denormalizeExpression (functionApplication ^. function) :+  map denormalizeExpression (functionApplication ^. arguments)+denormalizeExpression (EIdentifier x) = Parse.Symbol x+denormalizeExpression (ELambda lambda) =+  let denormalizedArguments =+        Parse.SExpression $ map denormalizeExpression (lambda ^. arguments)+  in Parse.SExpression+       [ Parse.Symbol "fn"+       , denormalizedArguments+       , denormalizeExpression (lambda ^. body)+       ]+denormalizeExpression (ELetBlock letBlock) =+  let denormalizedBindings =+        Parse.SExpression $+        map+          (\(var, val) ->+             Parse.SExpression+               [denormalizeExpression var, denormalizeExpression val])+          (letBlock ^. bindings)+  in Parse.SExpression+       [ Parse.Symbol "let"+       , denormalizedBindings+       , denormalizeExpression (letBlock ^. body)+       ]+denormalizeExpression (ELiteral x) =+  case x of+    LChar char -> Parse.LiteralChar char+    LInt int -> Parse.LiteralInt int+    LList list ->+      Parse.SExpression $ Parse.Symbol "list" : map denormalizeExpression list+    LString string -> Parse.LiteralString string++denormalizeBinding :: (ArgumentList, Expression) -> Parse.Expression+denormalizeBinding (ArgumentList argumentList, expression) =+  Parse.SExpression+    [ Parse.SExpression $ map denormalizeExpression argumentList+    , denormalizeExpression expression+    ]++denormalizeImportSpecification :: ImportSpecification -> Parse.Expression+denormalizeImportSpecification ImportAll = Parse.Symbol "all"+denormalizeImportSpecification (ImportOnly importList) =+  Parse.SExpression $ map denormalizeImport importList+  where+    denormalizeImport (ImportItem item) = Parse.Symbol item+    denormalizeImport (ImportType type' items) =+      Parse.SExpression (Parse.Symbol type' : map Parse.Symbol items)++denormalizeStatement :: Statement -> Parse.Expression+denormalizeStatement (SDataDeclaration dataDeclaration) =+  let denormalizedTypeDefinition =+        case dataDeclaration ^. typeDefinition of+          TypeConstructor typeConstructor ->+            denormalizeExpression $ EFunctionApplication typeConstructor+          ProperType properType -> Parse.Symbol properType+  in Parse.SExpression+       [ Parse.Symbol "data"+       , denormalizedTypeDefinition+       , Parse.SExpression $+         map+           (denormalizeExpression . EFunctionApplication)+           (dataDeclaration ^. constructors)+       ]+denormalizeStatement (SFunctionDefinition functionDefinition) =+  Parse.SExpression $+  Parse.Symbol "=" :+  Parse.Symbol (functionDefinition ^. name) :+  denormalizeExpression+    (EFunctionApplication (functionDefinition ^. typeSignature)) :+  map denormalizeBinding (functionDefinition ^. definitions)+denormalizeStatement (SLanguagePragma languagePragma) =+  Parse.SExpression+    [Parse.Symbol "language", Parse.Symbol $ languagePragma ^. language]+denormalizeStatement (SMacroDefinition macroDefinition) =+  Parse.SExpression $+  Parse.Symbol "defmacro" :+  Parse.Symbol (macroDefinition ^. name) :+  map denormalizeBinding (macroDefinition ^. definitions)+denormalizeStatement (SModuleDeclaration identifier) =+  Parse.SExpression [Parse.Symbol "module", Parse.Symbol identifier]+denormalizeStatement (SQualifiedImport qualifiedImport) =+  Parse.SExpression+    [ Parse.Symbol "importq"+    , Parse.Symbol $ qualifiedImport ^. moduleName+    , Parse.Symbol $ qualifiedImport ^. alias+    , denormalizeImportSpecification (qualifiedImport ^. imports)+    ]+denormalizeStatement (SRestrictedImport restrictedImport) =+  Parse.SExpression+    [ Parse.Symbol "import"+    , Parse.Symbol $ restrictedImport ^. moduleName+    , denormalizeImportSpecification (restrictedImport ^. imports)+    ]+denormalizeStatement (STopLevel (TopLevel statements)) =+  Parse.SExpression $ Parse.Symbol "begin" : map denormalizeStatement statements+denormalizeStatement (STypeclassInstance typeclassInstance) =+  Parse.SExpression+    [ Parse.Symbol "instance"+    , denormalizeExpression (typeclassInstance ^. instanceName)+    , Parse.SExpression $+      map+        (denormalizeStatement . SFunctionDefinition)+        (typeclassInstance ^. definitions)+    ]+denormalizeStatement (STypeSynonym typeSynonym) =+  Parse.SExpression+    [ Parse.Symbol "type"+    , denormalizeExpression (typeSynonym ^. alias)+    , denormalizeExpression (typeSynonym ^. definition)+    ]+denormalizeStatement (SUnrestrictedImport identifier) =+  Parse.SExpression [Parse.Symbol "importUnrestricted", Parse.Symbol identifier]
+ src/Axel/Entry.hs view
@@ -0,0 +1,85 @@+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}++module Axel.Entry where++import Axel.AST (ToHaskell(toHaskell))+import Axel.Error (Error)+import Axel.GHC (runWithGHC)+import Axel.Macros (exhaustivelyExpandMacros, stripMacroDefinitions)+import Axel.Normalize (normalizeStatement)+import Axel.Parse (Expression(Symbol), parseSource)+import Axel.Utils.Directory (withTempDirectory)+import Axel.Utils.Recursion (Recursive(bottomUpFmap))+import Axel.Utils.Resources (readResource)+import qualified Axel.Utils.Resources as Res (astDefinition)++import Control.Lens.Operators ((.~))+import Control.Monad.Except (MonadError, runExceptT, throwError)+import Control.Monad.IO.Class (MonadIO)+import Control.Monad.Trans.Control (MonadBaseControl)++import Data.Maybe (fromMaybe)+import Data.Semigroup ((<>))+import qualified Data.Text as T (isSuffixOf, pack)++import System.FilePath ((</>), stripExtension)+import System.FilePath.Lens (directory)+import qualified System.IO.Strict as S (readFile)++convertList :: Expression -> Expression+convertList =+  bottomUpFmap $ \case+    Symbol "List" -> Symbol "[]"+    x -> x++convertUnit :: Expression -> Expression+convertUnit =+  bottomUpFmap $ \case+    Symbol "Unit" -> Symbol "()"+    Symbol "unit" -> Symbol "()"+    x -> x++transpileSource ::+     (MonadBaseControl IO m, MonadError Error m, MonadIO m)+  => String+  -> m String+transpileSource source =+  toHaskell . stripMacroDefinitions <$>+  (parseSource source >>= exhaustivelyExpandMacros . convertList . convertUnit >>=+   normalizeStatement)++axelPathToHaskellPath :: FilePath -> FilePath+axelPathToHaskellPath axelPath =+  let basePath =+        if ".axel" `T.isSuffixOf` T.pack axelPath+          then fromMaybe axelPath $ stripExtension ".axel" axelPath+          else axelPath+  in basePath <> ".hs"++-- TODO Switch this to `(MonadError Error m, MonadIO m)` and do the error check in `evalFile`.+transpileFile :: FilePath -> FilePath -> IO ()+transpileFile path newPath = do+  fileContents <- S.readFile path+  result <- runExceptT $ transpileSource fileContents+  case result of+    Left err -> throwError $ userError $ show err+    Right newContents -> writeFile newPath newContents++-- Transpile a file in place.+transpileFile' :: FilePath -> IO FilePath+transpileFile' path = do+  let newPath = axelPathToHaskellPath path+  transpileFile path newPath+  pure newPath++evalFile :: FilePath -> IO ()+evalFile path =+  withTempDirectory $ \tempDirectoryPath -> do+    let astDefinitionPath = tempDirectoryPath </> "Axel.hs"+    readResource Res.astDefinition >>= writeFile astDefinitionPath+    let newPath = directory .~ tempDirectoryPath $ axelPathToHaskellPath path+    transpileFile path newPath+    evalResult <- runExceptT $ runWithGHC newPath+    either (throwError . userError . show) putStr evalResult
+ src/Axel/Error.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE InstanceSigs #-}+{-# LANGUAGE GADTs #-}++module Axel.Error where++import Axel.Parse.AST (Expression, toAxel)++import Data.Semigroup ((<>))++import Text.Parsec (ParseError)++data Error+  = MacroError String+  | NormalizeError String+                   [Expression]+  | ParseError ParseError++instance Show Error where+  show :: Error -> String+  show (MacroError err) = err+  show (NormalizeError err context) =+    "error:\n" <> err <> "\n\n" <> "context:\n" <> unlines (map toAxel context)+  show (ParseError err) = show err++fatal :: String -> String -> a+fatal context message = error $ "[FATAL] " <> context <> " - " <> message
+ src/Axel/Eval.hs view
@@ -0,0 +1,44 @@+{-# LANGUAGE FlexibleContexts #-}++module Axel.Eval where++import Axel.Error (Error(MacroError))+import Axel.GHC (buildWithGHC, runWithGHC)+import Axel.Utils.Directory (withCurrentDirectoryLifted, withTempDirectory)++import Control.Monad.Except (MonadError, throwError)+import Control.Monad.IO.Class (MonadIO, liftIO)+import Control.Monad.Trans.Control (MonadBaseControl)++import System.Directory (createDirectoryIfMissing)+import System.FilePath ((</>))+import System.IO (writeFile)++execInterpreter :: (MonadError Error m, MonadIO m) => FilePath -> m String+execInterpreter scaffoldFilePath = do+  debugResult <- liftIO $ buildWithGHC scaffoldFilePath+  case debugResult of+    Right _ -> runWithGHC scaffoldFilePath+    Left stderr -> throwError $ MacroError stderr++evalMacro ::+     (MonadBaseControl IO m, MonadError Error m, MonadIO m)+  => String+  -> String+  -> String+  -> m String+evalMacro astDefinition scaffold macroDefinitionAndEnvironment =+  withTempDirectory $ \directoryName ->+    withCurrentDirectoryLifted directoryName $ do+      let astDirectoryPath = "Axel" </> "Parse"+      let macroDefinitionAndEnvironmentFileName =+            "MacroDefinitionAndEnvironment.hs"+      let scaffoldFileName = "Scaffold.hs"+      liftIO $ createDirectoryIfMissing True astDirectoryPath+      liftIO $ writeFile (astDirectoryPath </> "AST.hs") astDefinition+      liftIO $+        writeFile+          macroDefinitionAndEnvironmentFileName+          macroDefinitionAndEnvironment+      liftIO $ writeFile scaffoldFileName scaffold+      execInterpreter scaffoldFileName
+ src/Axel/GHC.hs view
@@ -0,0 +1,35 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# LANGUAGE FlexibleContexts #-}++module Axel.GHC where++import Axel.Error (Error(MacroError))++import Control.Monad.Except (MonadError, throwError)+import Control.Monad.IO.Class (MonadIO, liftIO)++import System.Exit (ExitCode(ExitFailure, ExitSuccess))+import System.Process (readProcessWithExitCode)++-- TODO Rename to `ghcCompile`+buildWithGHC :: (MonadIO m) => FilePath -> m (Either String String)+buildWithGHC filePath = do+  (exitCode, stdout, stderr) <-+    liftIO $+    readProcessWithExitCode+      "stack"+      ["--resolver", "lts-12.0", "ghc", "--", "-v0", "-ddump-json", filePath]+      ""+  pure $+    case exitCode of+      ExitSuccess -> Right stdout+      ExitFailure _ -> Left stderr++-- TODO Rename to `ghcInterpret`+runWithGHC :: (MonadError Error m, MonadIO m) => FilePath -> m String+runWithGHC filePath = do+  (exitCode, stdout, stderr) <-+    liftIO $ readProcessWithExitCode "stack" ["runghc", filePath] ""+  case exitCode of+    ExitSuccess -> pure stdout+    ExitFailure _ -> throwError $ MacroError stderr
+ src/Axel/Macros.hs view
@@ -0,0 +1,237 @@+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE LambdaCase #-}++module Axel.Macros where++import Axel.AST+  ( Identifier+  , MacroDefinition+  , Statement(SDataDeclaration, SFunctionDefinition, SLanguagePragma,+          SMacroDefinition, SModuleDeclaration, SQualifiedImport,+          SRestrictedImport, STopLevel, STypeSynonym, STypeclassInstance,+          SUnrestrictedImport)+  , ToHaskell(toHaskell)+  , name+  , statements+  )+import Axel.Denormalize (denormalizeStatement)+import Axel.Error (Error(MacroError))+import Axel.Eval (evalMacro)+import Axel.Normalize (normalizeStatement)+import qualified Axel.Parse as Parse+  ( Expression(LiteralChar, LiteralInt, LiteralString, SExpression,+           Symbol)+  , parseMultiple+  )+import Axel.Utils.Display (Delimiter(Newlines), delimit, isOperator)+import Axel.Utils.Function (uncurry3)+import Axel.Utils.Recursion+  ( Recursive(bottomUpFmap, bottomUpTraverse)+  , exhaustM+  )+import Axel.Utils.Resources (readResource)+import qualified Axel.Utils.Resources as Res+  ( astDefinition+  , macroDefinitionAndEnvironmentHeader+  , macroScaffold+  )+import Axel.Utils.String (replace)++import Control.Lens.Operators ((%~), (^.))+import Control.Lens.Tuple (_1, _2)+import Control.Monad (foldM)+import Control.Monad.Except (MonadError, catchError, throwError)+import Control.Monad.IO.Class (MonadIO, liftIO)+import Control.Monad.Trans.Control (MonadBaseControl)++import Data.Function ((&))+import Data.Semigroup ((<>))++generateMacroProgram ::+     (MonadBaseControl IO m, MonadError Error m, MonadIO m)+  => MacroDefinition+  -> [Statement]+  -> [Parse.Expression]+  -> m (String, String, String)+generateMacroProgram macroDefinition environment applicationArguments = do+  astDefinition <- liftIO $ readResource Res.astDefinition+  scaffold <- liftIO getScaffold+  macroDefinitionAndEnvironment <-+    (<>) <$> liftIO (readResource Res.macroDefinitionAndEnvironmentHeader) <*>+    getMacroDefinitionAndEnvironmentFooter+  pure (astDefinition, scaffold, macroDefinitionAndEnvironment)+  where+    getMacroDefinitionAndEnvironmentFooter = do+      hygenicMacroDefinition <-+        replaceName+          (macroDefinition ^. name)+          newMacroName+          (SMacroDefinition macroDefinition)+      let source =+            delimit Newlines $+            map toHaskell (environment <> [hygenicMacroDefinition])+      pure source+    getScaffold =+      let insertApplicationArguments =+            let applicationArgumentsPlaceholder = "%%%ARGUMENTS%%%"+            in replace+                 applicationArgumentsPlaceholder+                 (show applicationArguments)+          insertDefinitionName =+            let definitionNamePlaceholder = "%%%MACRO_NAME%%%"+            in replace definitionNamePlaceholder newMacroName+      in insertApplicationArguments . insertDefinitionName <$>+         readResource Res.macroScaffold+    newMacroName =+      (macroDefinition ^. name) +++      if isOperator (macroDefinition ^. name)+        then "%%%%%%%%%%"+        else "_AXEL_AUTOGENERATED_MACRO_DEFINITION"++expansionPass ::+     (MonadBaseControl IO m, MonadError Error m, MonadIO m)+  => Parse.Expression+  -> m Parse.Expression+expansionPass programExpr =+  stmtExprsToProgram . map denormalizeStatement <$>+  expandMacros (programToTopLevelExprs programExpr)+  where+    programToTopLevelExprs :: Parse.Expression -> [Parse.Expression]+    programToTopLevelExprs (Parse.SExpression (Parse.Symbol "begin":stmts)) =+      stmts+    programToTopLevelExprs _ =+      error "programToTopLevelExprs must be passed a top-level program!"+    stmtExprsToProgram :: [Parse.Expression] -> Parse.Expression+    stmtExprsToProgram stmts = Parse.SExpression (Parse.Symbol "begin" : stmts)++exhaustivelyExpandMacros ::+     (MonadBaseControl IO m, MonadError Error m, MonadIO m)+  => Parse.Expression+  -> m Parse.Expression+exhaustivelyExpandMacros = exhaustM expansionPass++-- TODO This needs heavy optimization.+expandMacros ::+     (MonadBaseControl IO m, MonadError Error m, MonadIO m)+  => [Parse.Expression]+  -> m [Statement]+expandMacros topLevelExprs =+  fst <$>+  foldM+    (\acc@(stmts, macroDefs) expr -> do+       expandedExpr <- fullyExpandExpr stmts macroDefs expr+       stmt <- normalizeStatement expandedExpr+       pure $+         case stmt of+           SMacroDefinition macroDefinition ->+             acc & _2 %~ (<> [macroDefinition])+           _ ->+             if isStmtNonconflicting stmt+               then acc & _1 %~ (<> [stmt])+               else acc)+    ([], [])+    topLevelExprs+  where+    isStmtNonconflicting =+      \case+        SDataDeclaration _ -> True+        SFunctionDefinition _ -> True+        SLanguagePragma _ -> True+        SMacroDefinition _ -> True+        SModuleDeclaration _ -> False+        SQualifiedImport _ -> True+        SRestrictedImport _ -> True+        STopLevel _ -> False+        STypeclassInstance _ -> True+        STypeSynonym _ -> True+        SUnrestrictedImport _ -> True+    fullyExpandExpr stmts macroDefs =+      exhaustM $+      bottomUpTraverse+        (\case+           Parse.SExpression xs ->+             Parse.SExpression <$>+             foldM+               (\acc x ->+                  case x of+                    Parse.LiteralChar _ -> pure $ acc ++ [x]+                    Parse.LiteralInt _ -> pure $ acc ++ [x]+                    Parse.LiteralString _ -> pure $ acc ++ [x]+                    Parse.SExpression [] -> pure $ acc ++ [x]+                    Parse.SExpression (function:args) ->+                      lookupMacroDefinition macroDefs function >>= \case+                        Just macroDefinition ->+                          (acc ++) <$>+                          expandMacroApplication macroDefinition stmts args+                        Nothing -> pure $ acc ++ [x]+                    Parse.Symbol _ -> pure $ acc ++ [x])+               []+               xs+           expr -> pure expr)++expandMacroApplication ::+     (MonadBaseControl IO m, MonadError Error m, MonadIO m)+  => MacroDefinition+  -> [Statement]+  -> [Parse.Expression]+  -> m [Parse.Expression]+expandMacroApplication macroDef auxEnv args = do+  macroProgram <- generateMacroProgram macroDef auxEnv args+  newSource <- uncurry3 evalMacro macroProgram+  Parse.parseMultiple newSource++lookupMacroDefinition ::+     (MonadError Error m)+  => [MacroDefinition]+  -> Parse.Expression+  -> m (Maybe MacroDefinition)+lookupMacroDefinition macroDefs identifierExpr =+  case filter (`isMacroBeingCalled` identifierExpr) macroDefs of+    [] -> pure Nothing+    [macroDef] -> pure $ Just macroDef+    macroDef:_ ->+      throwError+        (MacroError $+         "Multiple macro definitions named: `" <> macroDef ^. name <> "`!")++isMacroBeingCalled :: MacroDefinition -> Parse.Expression -> Bool+isMacroBeingCalled macroDef identifierExpr =+  case identifierExpr of+    Parse.LiteralChar _ -> False+    Parse.LiteralInt _ -> False+    Parse.LiteralString _ -> False+    Parse.SExpression _ -> False+    Parse.Symbol identifier -> macroDef ^. name == identifier++stripMacroDefinitions :: Statement -> Statement+stripMacroDefinitions =+  \case+    STopLevel topLevel ->+      STopLevel $+      (statements %~ filter (not . isMacroDefinitionStatement)) topLevel+    x -> x++isMacroDefinitionStatement :: Statement -> Bool+isMacroDefinitionStatement (SMacroDefinition _) = True+isMacroDefinitionStatement _ = False++replaceName ::+     (MonadError Error m)+  => Identifier+  -> Identifier+  -> Statement+  -> m Statement+replaceName oldName newName =+  normalize . bottomUpFmap replaceSymbol . denormalizeStatement+  where+    normalize expr =+      normalizeStatement expr `catchError` \_ ->+        throwError (MacroError $ "Invalid macro name: `" <> oldName <> "`!")+    replaceSymbol expr =+      case expr of+        Parse.Symbol identifier ->+          Parse.Symbol $+          if identifier == oldName+            then newName+            else identifier+        _ -> expr
+ src/Axel/Normalize.hs view
@@ -0,0 +1,187 @@+{-# LANGUAGE ApplicativeDo #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE LambdaCase #-}++module Axel.Normalize where++import Axel.AST+  ( ArgumentList(ArgumentList)+  , CaseBlock(CaseBlock)+  , DataDeclaration(DataDeclaration)+  , Expression(ECaseBlock, EEmptySExpression, EFunctionApplication,+           EIdentifier, ELambda, ELetBlock, ELiteral)+  , FunctionApplication(FunctionApplication)+  , FunctionDefinition(FunctionDefinition)+  , Import(ImportItem, ImportType)+  , ImportSpecification(ImportAll, ImportOnly)+  , Lambda(Lambda)+  , LanguagePragma(LanguagePragma)+  , LetBlock(LetBlock)+  , Literal(LChar, LInt, LString)+  , MacroDefinition(MacroDefinition)+  , QualifiedImport(QualifiedImport)+  , RestrictedImport(RestrictedImport)+  , Statement(SDataDeclaration, SFunctionDefinition, SLanguagePragma,+          SMacroDefinition, SModuleDeclaration, SQualifiedImport,+          SRestrictedImport, STopLevel, STypeSynonym, STypeclassInstance,+          SUnrestrictedImport)+  , TopLevel(TopLevel)+  , TypeDefinition(ProperType, TypeConstructor)+  , TypeSynonym(TypeSynonym)+  , TypeclassInstance(TypeclassInstance)+  )+import Axel.Error (Error(NormalizeError))+import qualified Axel.Parse as Parse+  ( Expression(LiteralChar, LiteralInt, LiteralString, SExpression,+           Symbol)+  )+import Axel.Quote (quoteParseExpression)++import Control.Monad.Except (MonadError, throwError)++normalizeExpression :: (MonadError Error m) => Parse.Expression -> m Expression+normalizeExpression (Parse.LiteralChar char) = pure $ ELiteral (LChar char)+normalizeExpression (Parse.LiteralInt int) = pure $ ELiteral (LInt int)+normalizeExpression (Parse.LiteralString string) =+  pure $ ELiteral (LString string)+normalizeExpression expr@(Parse.SExpression items) =+  case items of+    Parse.Symbol "case":var:cases ->+      let normalizedCases =+            traverse+              (\case+                 Parse.SExpression [pat, body] ->+                   (,) <$> normalizeExpression pat <*> normalizeExpression body+                 x -> throwError $ NormalizeError "Invalid case!" [x, expr])+              cases+      in ECaseBlock <$>+         (CaseBlock <$> normalizeExpression var <*> normalizedCases)+    [Parse.Symbol "fn", Parse.SExpression args, body] ->+      let normalizedArguments = traverse normalizeExpression args+      in ELambda <$>+         (Lambda <$> normalizedArguments <*> normalizeExpression body)+    [Parse.Symbol "let", Parse.SExpression bindings, body] ->+      let normalizedBindings =+            traverse+              (\case+                 Parse.SExpression [name, value] ->+                   (,) <$> normalizeExpression name <*>+                   normalizeExpression value+                 x -> throwError $ NormalizeError "Invalid pattern!" [x, expr])+              bindings+      in ELetBlock <$>+         (LetBlock <$> normalizedBindings <*> normalizeExpression body)+    [Parse.Symbol "quote", expr'] -> pure $ quoteParseExpression expr'+    fn:args ->+      EFunctionApplication <$>+      (FunctionApplication <$> normalizeExpression fn <*>+       traverse normalizeExpression args)+    [] -> pure EEmptySExpression+normalizeExpression (Parse.Symbol symbol) = pure $ EIdentifier symbol++normalizeDefinitions ::+     (MonadError Error m)+  => Parse.Expression+  -> [Parse.Expression]+  -> m [(ArgumentList, Expression)]+normalizeDefinitions ctxt =+  traverse+    (\case+       Parse.SExpression [Parse.SExpression args, body] ->+         (,) <$> (ArgumentList <$> traverse normalizeExpression args) <*>+         normalizeExpression body+       x -> throwError $ NormalizeError "Invalid definition!" [x, ctxt])++normalizeStatement :: (MonadError Error m) => Parse.Expression -> m Statement+normalizeStatement expr@(Parse.SExpression items) =+  case items of+    Parse.Symbol "=":Parse.Symbol fnName:typeSig:defs ->+      normalizeExpression typeSig >>= \case+        EFunctionApplication normalizedTypeSig ->+          SFunctionDefinition <$>+          (FunctionDefinition fnName normalizedTypeSig <$>+           normalizeDefinitions expr defs)+        _ ->+          throwError $ NormalizeError "Invalid type signature!" [typeSig, expr]+    Parse.Symbol "begin":stmts ->+      let normalizedStmts = traverse normalizeStatement stmts+      in STopLevel . TopLevel <$> normalizedStmts+    [Parse.Symbol "data", typeDef, Parse.SExpression constructors] ->+      let normalizedConstructors =+            traverse+              (\x ->+                 normalizeExpression x >>= \case+                   EFunctionApplication functionApplication ->+                     pure functionApplication+                   _ ->+                     throwError $+                     NormalizeError "Invalid type constructor!" [x, expr])+              constructors+      in normalizeExpression typeDef >>= \case+           EFunctionApplication typeConstructor ->+             SDataDeclaration <$>+             (DataDeclaration (TypeConstructor typeConstructor) <$>+              normalizedConstructors)+           EIdentifier properType ->+             SDataDeclaration <$>+             (DataDeclaration (ProperType properType) <$> normalizedConstructors)+           _ -> throwError $ NormalizeError "Invalid type!" [typeDef, expr]+    Parse.Symbol "defmacro":Parse.Symbol macroName:defs ->+      SMacroDefinition <$>+      (MacroDefinition macroName <$> normalizeDefinitions expr defs)+    [Parse.Symbol "import", Parse.Symbol moduleName, Parse.SExpression imports] ->+      SRestrictedImport <$>+      (RestrictedImport moduleName <$> normalizeImportList expr imports)+    [Parse.Symbol "importq", Parse.Symbol moduleName, Parse.Symbol alias, importSpec] ->+      SQualifiedImport <$>+      (QualifiedImport moduleName alias <$> normalizeImportSpec expr importSpec)+    [Parse.Symbol "importUnrestricted", Parse.Symbol moduleName] ->+      pure $ SUnrestrictedImport moduleName+    [Parse.Symbol "instance", instanceName, Parse.SExpression defs] ->+      let normalizedDefs =+            traverse+              (\x ->+                 normalizeStatement x >>= \case+                   SFunctionDefinition fnDef -> pure fnDef+                   _ ->+                     throwError $ NormalizeError "Invalid definition!" [x, expr])+              defs+      in STypeclassInstance <$>+         (TypeclassInstance <$> normalizeExpression instanceName <*>+          normalizedDefs)+    [Parse.Symbol "language", Parse.Symbol languageName] ->+      pure $ SLanguagePragma (LanguagePragma languageName)+    [Parse.Symbol "module", Parse.Symbol moduleName] ->+      pure $ SModuleDeclaration moduleName+    [Parse.Symbol "type", alias, def] ->+      let normalizedAlias = normalizeExpression alias+          normalizedDef = normalizeExpression def+      in STypeSynonym <$> (TypeSynonym <$> normalizedAlias <*> normalizedDef)+    _ -> throwError $ NormalizeError "Invalid top-level form!" [expr]+  where+    normalizeImportSpec ctxt importSpec =+      case importSpec of+        Parse.Symbol "all" -> pure ImportAll+        Parse.SExpression importList -> normalizeImportList ctxt importList+        x ->+          throwError $ NormalizeError "Invalid import specification!" [x, ctxt]+    normalizeImportList ctxt input =+      ImportOnly <$>+      traverse+        (\item ->+           case item of+             Parse.Symbol import' -> pure $ ImportItem import'+             Parse.SExpression (Parse.Symbol type':imports) ->+               let normalizedImports =+                     traverse+                       (\case+                          Parse.Symbol import' -> pure import'+                          x ->+                            throwError $+                            NormalizeError "Invalid import!" [x, item, ctxt])+                       imports+               in ImportType type' <$> normalizedImports+             x -> throwError $ NormalizeError "Invalid import!" [x, item, ctxt])+        input+normalizeStatement expr =+  throwError $ NormalizeError "Invalid top-level form!" [expr]
+ src/Axel/Parse.hs view
@@ -0,0 +1,148 @@+-- NOTE Because `Axel.Parse.AST` will be used as the header of auto-generated macro programs,+--      it can't have any project-specific dependencies. As such, the instance definition for+--      `BottomUp Expression` can't be defined in the same file as `Expression` itself+--      (due to the dependency on `BottomUp`). Fortunately, `Axel.Parse.AST` will (should)+--      never be imported by itself but only implicitly as part of this module.+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE InstanceSigs #-}+{-# LANGUAGE MultiParamTypeClasses #-}++module Axel.Parse+  ( module Axel.Parse+  , module Axel.Parse.AST+  ) where++import Axel.Error (Error(ParseError))++-- Re-exporting these so that consumers of parsed ASTs do not need+-- to know about the internal file.+import Axel.Parse.AST+  ( Expression(LiteralChar, LiteralInt, LiteralString, SExpression,+           Symbol)+  )+import Axel.Utils.List (takeUntil)+import Axel.Utils.Recursion (Recursive(bottomUpFmap, bottomUpTraverse))++import Control.Monad.Except (MonadError, throwError)++import Text.Parsec (ParsecT, Stream, (<|>), eof, parse, try)+import Text.Parsec.Char+  ( alphaNum+  , char+  , digit+  , letter+  , noneOf+  , oneOf+  , space+  , string+  )+import Text.Parsec.Combinator (many1, optional)+import Text.Parsec.Prim (many)++-- TODO `Expression` should probably instead be an instance of `Traversable`, use recursion schemes, etc.+--      If so, should I provide `toFix` and `fromFix` functions for macros to take advantage of?+--      (Maybe all macros have the argument automatically `fromFix`-ed to make consumption simpler?)+instance Recursive Expression where+  bottomUpFmap :: (Expression -> Expression) -> Expression -> Expression+  bottomUpFmap f x =+    f $+    case x of+      LiteralChar _ -> x+      LiteralInt _ -> x+      LiteralString _ -> x+      SExpression xs -> SExpression (map (bottomUpFmap f) xs)+      Symbol _ -> x+  bottomUpTraverse ::+       (Monad m) => (Expression -> m Expression) -> Expression -> m Expression+  bottomUpTraverse f x =+    f =<<+    case x of+      LiteralChar _ -> pure x+      LiteralInt _ -> pure x+      LiteralString _ -> pure x+      SExpression xs -> SExpression <$> traverse (bottomUpTraverse f) xs+      Symbol _ -> pure x++parseReadMacro ::+     (Stream s m Char) => String -> String -> ParsecT s u m Expression+parseReadMacro prefix wrapper = applyWrapper <$> (string prefix *> expression)+  where+    applyWrapper x = SExpression [Symbol wrapper, x]++any' :: (Stream s m Char) => ParsecT s u m Char+any' = noneOf ""++whitespace :: (Stream s m Char) => ParsecT s u m String+whitespace = many space++literalChar :: (Stream s m Char) => ParsecT s u m Expression+literalChar = LiteralChar <$> (char '\\' *> any')++literalInt :: (Stream s m Char) => ParsecT s u m Expression+literalInt = LiteralInt . read <$> many1 digit++literalList :: (Stream s m Char) => ParsecT s u m Expression+literalList =+  (SExpression . (Symbol "list" :)) <$> (char '[' *> many item <* char ']')+  where+    item = try (whitespace *> expression) <|> expression++literalString :: (Stream s m Char) => ParsecT s u m Expression+literalString = LiteralString <$> (char '"' *> many (noneOf "\"") <* char '"')++quasiquotedExpression :: (Stream s m Char) => ParsecT s u m Expression+quasiquotedExpression = parseReadMacro "`" "quasiquote"++quotedExpression :: (Stream s m Char) => ParsecT s u m Expression+quotedExpression = parseReadMacro "'" "quote"++sExpression :: (Stream s m Char) => ParsecT s u m Expression+sExpression = SExpression <$> (char '(' *> many item <* char ')')+  where+    item = try (whitespace *> expression) <|> expression++spliceUnquotedExpression :: (Stream s m Char) => ParsecT s u m Expression+spliceUnquotedExpression = parseReadMacro "~@" "unquoteSplicing"++symbol :: (Stream s m Char) => ParsecT s u m Expression+symbol =+  Symbol <$>+  ((:) <$> (letter <|> validSymbol) <*> many (alphaNum <|> validSymbol))+  where+    validSymbol = oneOf "!@#$%^&*-=~_+,./<>?\\|':"++unquotedExpression :: (Stream s m Char) => ParsecT s u m Expression+unquotedExpression = parseReadMacro "~" "unquote"++expression :: (Stream s m Char) => ParsecT s u m Expression+expression =+  literalChar <|> literalInt <|> literalList <|> literalString <|>+  quotedExpression <|>+  quasiquotedExpression <|>+  try spliceUnquotedExpression <|>+  unquotedExpression <|>+  sExpression <|>+  symbol++stripComments :: String -> String+stripComments = unlines . map cleanLine . lines+  where+    cleanLine = takeUntil "--"++parseMultiple :: (MonadError Error m) => String -> m [Expression]+parseMultiple =+  either (throwError . ParseError) pure .+  parse+    (many1 (optional whitespace *> expression <* optional whitespace) <* eof)+    ""++parseSingle :: (MonadError Error m) => String -> m Expression+parseSingle =+  either (throwError . ParseError) pure .+  parse (optional whitespace *> expression <* optional whitespace <* eof) ""++parseSource :: (MonadError Error m) => String -> m Expression+parseSource input = do+  statements <- parseMultiple $ stripComments input+  pure $ SExpression (Symbol "begin" : statements)
+ src/Axel/Parse/AST.hs view
@@ -0,0 +1,42 @@+-- NOTE Because this file will be used as the header of auto-generated macro programs,+--      it can't have any project-specific dependencies (such as `Fix`).+module Axel.Parse.AST where++import Data.IORef (IORef, modifyIORef, newIORef, readIORef)++import System.IO.Unsafe (unsafePerformIO)++-- TODO `Expression` should probably be `Traversable`, use recursion schemes, etc.+--      I should provide `toFix` and `fromFix` functions for macros to take advantage of.+--      (Maybe all macros have the argument automatically `fromFix`-ed to make consumption simpler?)+data Expression+  = LiteralChar Char+  | LiteralInt Int+  | LiteralString String+  | SExpression [Expression]+  | Symbol String+  deriving (Eq, Show)++-- ******************************+-- Internal utilities+-- ******************************+toAxel :: Expression -> String+toAxel (LiteralChar x) = ['\\', x]+toAxel (LiteralInt x) = show x+toAxel (LiteralString xs) = "\"" ++ xs ++ "\""+toAxel (SExpression xs) = "(" ++ unwords (map toAxel xs) ++ ")"+toAxel (Symbol x) = x++-- ******************************+-- Macro definition utilities+-- ******************************+{-# NOINLINE gensymCounter #-}+gensymCounter :: IORef Int+gensymCounter = unsafePerformIO $ newIORef 0++gensym :: IO Expression+gensym = do+  suffix <- readIORef gensymCounter+  let identifier = "aXEL_AUTOGENERATED_IDENTIFIER_" ++ show suffix+  modifyIORef gensymCounter succ+  pure $ Symbol identifier
+ src/Axel/Project.hs view
@@ -0,0 +1,91 @@+{-# LANGUAGE OverloadedStrings #-}++module Axel.Project where++import Axel.Entry (transpileFile')+import Axel.Utils.Directory (getRecursiveContents)++import Control.Lens ((%~))+import Control.Monad (void)+import Control.Monad.Except (throwError)+import Control.Monad.IO.Class (liftIO)++import Data.Aeson.Lens (_Array, key)+import Data.Function ((&))+import Data.List (foldl')+import Data.Semigroup ((<>))+import qualified Data.Text as T (append, isSuffixOf, pack)+import Data.Vector (cons)+import Data.Version (showVersion)+import Data.Yaml (Value(String), decodeFileEither, encodeFile)++import Paths_axel (getDataFileName, version)++import System.Directory (copyFile, getCurrentDirectory, removeFile)+import System.FilePath ((</>))+import System.Process (readProcess, readProcessWithExitCode)+import System.Process.Typed (proc, runProcess)++import Text.Regex.PCRE ((=~), getAllTextSubmatches)++newProject :: String -> IO ()+newProject projectName = do+  currentDirectory <- getCurrentDirectory+  void $ readProcess "stack" ["new", projectName, "new-template"] ""+  let projectDirectory = currentDirectory </> projectName+  templatePath <- getDataFileName ("resources" </> "new-project-template")+  let copyAxel filePath = do+        copyFile+          (templatePath </> filePath <> ".axel")+          (projectDirectory </> filePath <> ".axel")+        removeFile (projectDirectory </> filePath <> ".hs")+  mapM_ copyAxel ["Setup", "app" </> "Main", "src" </> "Lib", "test" </> "Spec"]++transpileProject :: IO [FilePath]+transpileProject = do+  files <- getRecursiveContents "."+  let axelFiles =+        filter (\filePath -> ".axel" `T.isSuffixOf` T.pack filePath) files+  mapM transpileFile' axelFiles++addAxelDependency :: IO ()+addAxelDependency = do+  let packageConfigPath = "package.yaml"+  let axelHackageVersion = T.pack $ showVersion version+  decodeResult <- decodeFileEither packageConfigPath+  case decodeResult of+    Right contents ->+      let newContents :: Value+          newContents =+            contents & key "dependencies" . _Array %~+            cons (String $ T.append "axel ==" axelHackageVersion)+      in encodeFile packageConfigPath newContents+    Left err ->+      throwError+        (userError $ "`package.yaml` could not be parsed: " <> show err)++buildProject :: IO ()+buildProject = do+  hsPaths <- transpileProject+  addAxelDependency+  void $ readProcess "stack" ["build"] ""+  mapM_ removeFile hsPaths++runProject :: IO ()+runProject = do+  (_, _, stderr) <- readProcessWithExitCode "stack" ["ide", "targets"] ""+  let targets = lines stderr+  case findExeTargets targets of+    [target] -> do+      liftIO $ putStrLn ("Running " <> target <> "...")+      void $ runProcess $ proc "stack" ["exec", target]+    _ -> throwError (userError "No executable target was unambiguously found!")+  where+    findExeTargets =+      foldl'+        (\acc target ->+           case getAllTextSubmatches $ target =~+                ("([^:]*):exe:([^:]*)" :: String) of+             [_fullMatch, _projectName, targetName] -> targetName : acc+             _ -> acc)+        []
+ src/Axel/Quote.hs view
@@ -0,0 +1,47 @@+module Axel.Quote where++import qualified Axel.AST as AST+  ( Expression(EFunctionApplication, EIdentifier, ELiteral)+  , FunctionApplication(FunctionApplication)+  , Literal(LChar, LInt, LString)+  )+import qualified Axel.Parse as Parse+  ( Expression(LiteralChar, LiteralInt, LiteralString, SExpression,+           Symbol)+  )++quoteList :: [Parse.Expression] -> AST.Expression+quoteList =+  foldr+    (\x acc ->+       AST.EFunctionApplication+         (AST.FunctionApplication+            (AST.EIdentifier ":")+            [quoteParseExpression x, acc]))+    (AST.EIdentifier "[]")++-- TODO Derive this with Template Haskell (it's really brittle, currently).+quoteParseExpression :: Parse.Expression -> AST.Expression+quoteParseExpression (Parse.LiteralChar x) =+  AST.EFunctionApplication $+  AST.FunctionApplication+    (AST.EIdentifier "AST.LiteralChar")+    [AST.ELiteral $ AST.LChar x]+quoteParseExpression (Parse.LiteralInt x) =+  AST.EFunctionApplication $+  AST.FunctionApplication+    (AST.EIdentifier "AST.LiteralInt")+    [AST.ELiteral $ AST.LInt x]+quoteParseExpression (Parse.LiteralString x) =+  AST.EFunctionApplication $+  AST.FunctionApplication+    (AST.EIdentifier "AST.LiteralString")+    [AST.ELiteral $ AST.LString x]+quoteParseExpression (Parse.SExpression xs) =+  AST.EFunctionApplication $+  AST.FunctionApplication (AST.EIdentifier "AST.SExpression") [quoteList xs]+quoteParseExpression (Parse.Symbol x) =+  AST.EFunctionApplication $+  AST.FunctionApplication+    (AST.EIdentifier "AST.Symbol")+    [AST.ELiteral $ AST.LString x]
+ src/Axel/Utils/Debug.hs view
@@ -0,0 +1,15 @@+module Axel.Utils.Debug where++import Debug.Trace (trace, traceShow)++unsafeTee :: String -> a -> a+unsafeTee = trace++unsafeTeeS :: Show a => a -> a+unsafeTeeS x = traceShow x x++unsafeTee' :: (a -> String) -> a -> a+unsafeTee' f x = trace (f x) x++unsafeTeeS' :: Show b => (a -> b) -> a -> a+unsafeTeeS' f x = traceShow (f x) x
+ src/Axel/Utils/Directory.hs view
@@ -0,0 +1,41 @@+{-# LANGUAGE FlexibleContexts #-}++module Axel.Utils.Directory where++import Control.Monad (forM)+import Control.Monad.IO.Class (MonadIO, liftIO)+import Control.Monad.Trans.Control (MonadBaseControl, control)++import System.Directory+  ( createDirectoryIfMissing+  , doesDirectoryExist+  , getDirectoryContents+  , getTemporaryDirectory+  , withCurrentDirectory+  )+import System.FilePath ((</>))++-- Adapted from http://book.realworldhaskell.org/read/io-case-study-a-library-for-searching-the-filesystem.html.+getRecursiveContents :: FilePath -> IO [FilePath]+getRecursiveContents startDir = do+  names <- getDirectoryContents startDir+  let properNames = filter (`notElem` [".", ".."]) names+  paths <-+    forM properNames $ \name -> do+      let path = startDir </> name+      isDirectory <- doesDirectoryExist path+      if isDirectory+        then getRecursiveContents path+        else pure [path]+  pure $ concat paths++withCurrentDirectoryLifted :: (MonadBaseControl IO m) => FilePath -> m a -> m a+withCurrentDirectoryLifted directory f =+  control $ \runInIO -> withCurrentDirectory directory (runInIO f)++withTempDirectory :: (MonadIO m) => (FilePath -> m a) -> m a+withTempDirectory f = do+  temporaryDirectory <- liftIO getTemporaryDirectory+  liftIO $ createDirectoryIfMissing True temporaryDirectory+  result <- f temporaryDirectory+  pure result
+ src/Axel/Utils/Display.hs view
@@ -0,0 +1,51 @@+module Axel.Utils.Display where++import Data.Char (isSymbol, toLower, toUpper)+import Data.List (intercalate)+import Data.Semigroup ((<>))++data Delimiter+  = Commas+  | Newlines+  | Pipes+  | Spaces++delimit :: Delimiter -> [String] -> String+delimit delimiter = intercalate (lookupDelimiter delimiter)+  where+    lookupDelimiter Commas = ","+    lookupDelimiter Newlines = "\n"+    lookupDelimiter Pipes = "|"+    lookupDelimiter Spaces = " "++-- https://stackoverflow.com/questions/10548170/what-characters-are-permitted-for-haskell-operators+isOperator :: String -> Bool+isOperator = all $ \x -> isSymbol x || x `elem` "!#$%&*+.,/<=>?@\\^|-~:"++lowerFirst :: String -> String+lowerFirst (x:xs) = toLower x : xs+lowerFirst "" = ""++renderBlock :: [String] -> String+renderBlock = surround CurlyBraces . intercalate ";"++renderPragma :: String -> String+renderPragma x = "{-# " <> x <> " #-}"++data Bracket+  = CurlyBraces+  | DoubleQuotes+  | Parentheses+  | SingleQuotes+  | SquareBrackets++surround :: Bracket -> String -> String+surround CurlyBraces x = "{" <> x <> "}"+surround DoubleQuotes x = "\"" <> x <> "\""+surround Parentheses x = "(" <> x <> ")"+surround SingleQuotes x = "'" <> x <> "'"+surround SquareBrackets x = "[" <> x <> "]"++upperFirst :: String -> String+upperFirst (x:xs) = toUpper x : xs+upperFirst "" = ""
+ src/Axel/Utils/Function.hs view
@@ -0,0 +1,4 @@+module Axel.Utils.Function where++uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d+uncurry3 f (a, b, c) = f a b c
+ src/Axel/Utils/List.hs view
@@ -0,0 +1,12 @@+module Axel.Utils.List where++import Data.List (isPrefixOf)++-- https://stackoverflow.com/a/26530188/2391244+takeUntil :: (Eq a) => [a] -> [a] -> [a]+takeUntil _ [] = []+takeUntil [] _ = []+takeUntil xs (y:ys) =+  if xs `isPrefixOf` (y : ys)+    then []+    else y : takeUntil xs ys
+ src/Axel/Utils/Recursion.hs view
@@ -0,0 +1,15 @@+module Axel.Utils.Recursion where++exhaustM :: (Eq a, Monad m) => (a -> m a) -> a -> m a+exhaustM f x = do+  result <- f x+  if x == result+    then pure result+    else exhaustM f result++-- TODO Use `Fix`-based recursion schemes, implement `Traversable`, and implement `Foldable` instead.+class Recursive a where+  bottomUpFmap :: (a -> a) -> a -> a+  -- TODO Remove dependency on `Monad` in favor of `Applicative`+  --      (which is all the standard `traverse` requires).+  bottomUpTraverse :: (Monad m) => (a -> m a) -> a -> m a
+ src/Axel/Utils/Resources.hs view
@@ -0,0 +1,28 @@+module Axel.Utils.Resources where++import Control.Monad ((>=>))++import Paths_axel (getDataFileName)++import System.FilePath ((</>))++import qualified System.IO.Strict as S (readFile)++newtype Resource =+  Resource String++getResourcePath :: Resource -> IO FilePath+getResourcePath (Resource resource) = getDataFileName $ "resources" </> resource++readResource :: Resource -> IO String+readResource = getResourcePath >=> S.readFile++astDefinition :: Resource+astDefinition = Resource "autogenerated/macros/AST.hs"++macroDefinitionAndEnvironmentHeader :: Resource+macroDefinitionAndEnvironmentHeader =+  Resource "macros/MacroDefinitionAndEnvironmentHeader.hs"++macroScaffold :: Resource+macroScaffold = Resource "macros/Scaffold.hs"
+ src/Axel/Utils/String.hs view
@@ -0,0 +1,7 @@+module Axel.Utils.String where++import qualified Data.Text as T (pack, replace, unpack)++replace :: String -> String -> String -> String+replace needle replacement haystack =+  T.unpack $ T.replace (T.pack needle) (T.pack replacement) (T.pack haystack)
+ test/Axel/Spec.hs view
@@ -0,0 +1,6 @@+module Axel.Spec+  ( main+  ) where++main :: IO ()+main = undefined